Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcbridgha2005-05-18 23:11:28 +0000
committercbridgha2005-05-18 23:11:28 +0000
commit08bd5b116ab8d104f7e10f99cab36138b816c0cf (patch)
tree478a2573d3944057cd49a07ac116eac1d13df1c9 /plugins/org.eclipse.jst.j2ee.ui
parentd68dc36dddf09e655260f68e2b6374a16bb1ae61 (diff)
downloadwebtools.javaee-N20050519.tar.gz
webtools.javaee-N20050519.tar.xz
webtools.javaee-N20050519.zip
This commit was manufactured by cvs2svn to create tag 'N20050519'.N20050519
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.ui')
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.classpath8
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.cvsignore5
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.project29
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java134
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBArchiveUIResourceHandler.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBCheckboxTableViewer.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBSelectiveImportDialog.java158
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ExportEJBAction.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ImportEJBAction.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/NewEJBProjectAction.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/TableObjects.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ExportRARAction.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/IConnectorArchiveConstants.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ImportRARAction.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/NewConnectorProjectAction.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/RARArchiveUIResourceHandler.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ExportWARAction.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ImportWARAction.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/build.properties20
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gifbin632 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/adown.gifbin826 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gifbin578 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gifbin78 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gifbin70 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gifbin981 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gifbin1094 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gifbin1129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gifbin581 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gifbin355 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gifbin865 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/eargroup_obj.gifbin596 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/ejbgroup_obj.gifbin569 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/folder.gifbin216 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_client_remove_action_obj.gifbin603 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_deploy_action_obj.gifbin571 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_export.gifbin356 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_import_wiz.gifbin358 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/ejbclientjar_wiz.gifbin1044 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ear.gifbin607 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ejbjar_wiz.gifbin563 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_rar.gifbin346 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/exportwar_wiz.gifbin581 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ear.gifbin595 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ejbjar.gifbin565 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_rar.gifbin347 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/importwar_wiz.gifbin580 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newappclient_wiz.gifbin364 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newconnectionprj_wiz.gifbin585 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newear_wiz.gifbin605 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newejbprj_wiz.gifbin587 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newwar_wiz.gifbin1039 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/re_execute.gifbin565 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_perspective.gifbin345 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_view.gifbin345 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_client_remove_action_obj.gifbin375 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_deploy_action_obj.gifbin356 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/13_ear_obj.gifbin632 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_cmpbean_obj.gifbin628 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejb_obj.gifbin1041 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejbjar_wiz.gifbin631 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/annotation_positioned_overlay.gifbin83 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14.gifbin590 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14_deploy.gifbin615 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/extwebserviceitemprovider_obj.gifbin599 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/home_interface_positioned_overlay.gifbin122 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_home_interface_positioned_overlay.gifbin125 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_interface_positioned_overlay.gifbin77 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/remote_interface_positioned_overlay.gifbin91 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/service_interface_positioned_overlay.gifbin77 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServiceItemProvider_obj.gifbin563 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServicesFolder_obj.gifbin604 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_14.gifbin590 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_deploy.gifbin364 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_bean_overlay.gifbin62 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_positioned_overlay.gifbin83 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/client_app_ovr.gifbin166 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/connector_ovr.gifbin166 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/dis_annotation_bean_overlay.gifbin111 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/ejb_module_ovr.gifbin167 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/enterprise_app_ovr.gifbin112 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/externalWebServiceOverlay_obj.gifbin82 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_overlay_obj.gifbin106 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_positioned_overlay.gifbin122 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/key_interf_ov.gifbin81 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_overlay_obj.gifbin108 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_positioned_overlay.gifbin125 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_overlay_obj.gifbin64 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_positioned_overlay.gifbin77 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_overlay_obj.gifbin77 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_positioned_overlay.gifbin91 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_overlay_obj.gifbin66 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_positioned_overlay.gifbin77 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/web_module_ovr.gifbin273 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_mess_dest_wiz_ban.gifbin2812 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_web_service_handler_wiz.gifbin3496 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addauthoritycontraints_wiz_.gifbin3577 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcmpfiled_wiz_ban.gifbin3434 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcontextparameter_wiz_ban.gifbin2900 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addenvirentry_wiz_ban.gifbin3368 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/adderrorcodeerror_wiz_ban.g.gifbin3374 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addexceptionerrorpage_wiz_ban.gifbin2687 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addfiltermapping_wiz_ban.gifbin3011 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addhandlersoapheader_wiz_ba.gifbin3249 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addjsppropgropu_wiz_ban.gifbin2904 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addlocencodingmap_wiz_ban.gifbin3095 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addmimemapping_wiz_ban.gifbin2960 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addservletmapping_wiz_ban.gifbin3352 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addtaglibref_wiz_ban.gifbin3385 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebSecuritycontraint_wiz.gifbin2904 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebrescollection_wiz_ban.gifbin3536 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebsecurityroleref_wiz_b.gifbin3129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwelcomepage_wiz_ban.gifbin3469 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/appclient_wiz.gifbin2940 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connection_migration_wizard_wiz.gifbin3771 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connector_wiz.gifbin2982 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ear_wiz.gifbin3213 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbclientjar_wizban.gifbin3415 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbproject_wiz.gifbin3091 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_appclient_wiz.gifbin2992 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ear_wiz.gifbin3189 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ejbjar_obj.gifbin3487 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_rar_wiz.gifbin3374 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_war_wiz.gifbin3574 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_appclient_wiz.gifbin2978 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_class_file_wiz_ban.gifbin3303 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ear_wiz.gifbin3360 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ejbjar_wiz.gifbin3533 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_rar_wiz.gifbin3520 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_war_wiz.gifbin3598 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/init_param_wiz_ban.gifbin2988 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_jms_creation_wiz.gifbin3163 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_non_jms_creation_wi.gifbin3163 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/newservlet_wiz.gifbin3180 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/versionmigrate3_wiz.gifbin3313 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/war_wiz.gifbin3526 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/web_library_project_wiz_ban.gifbin3554 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/jar_obj.gifbin579 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/jcu_obj.gifbin569 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/key_interf_ov.gifbin81 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/left_arrow.gifbin981 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/right_arrow.gifbin956 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/servlet.gifbin588 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/sessionBean_obj.gifbin583 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/showerr_tsk.gifbin339 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/showwarn_tsk.gifbin338 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/srvce_elem_obj.gifbin569 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/webgroup_obj.gifbin573 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/webservicedesc.gifbin563 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/wsdl.gifbin563 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java391
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesConstants.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesPage.java508
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java434
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java44
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebSettingsStateInputProvider.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java78
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java223
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java69
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java231
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java427
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java151
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java400
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java124
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java140
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java120
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java97
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java191
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java96
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java268
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java85
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java334
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java211
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java263
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java88
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java126
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeJavaSearchScope.java352
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeSearchEngine.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java314
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java365
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java142
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java115
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedAdapter.java332
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRenderer.java493
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRendererFactory.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/UIResourceHandler.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/IValidateEditListener.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java267
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java192
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java202
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java208
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java269
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPluginIcons.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java214
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java193
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java152
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java258
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java223
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java241
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java88
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java88
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java110
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java172
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizard.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizardPage.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java95
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientImportPage.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleExportWizard.java106
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleImportWizard.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ApplicationModuleProjectsPage.java287
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJ2EEComponentsContentProvider.java157
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java235
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableModuleProjectsProvider.java153
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java162
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java175
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DataModelAnnotationsStandaloneGroup.java160
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultModuleProjectCreationWizard.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondPage.java248
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondWizardPage.java238
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizard.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizardPage.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARExportPage.java124
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java98
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportOptionsPage.java360
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportPage.java176
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportProjectsPage.java317
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationExportWizard.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationImportWizard.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizard.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizardPage.java304
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java216
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactCreationWizard.java290
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java180
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java237
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizard.java190
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizardPage.java413
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java410
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java315
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportWizard.java159
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModulesDependencyPage.java235
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPage.java396
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePage.java428
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizard.java115
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizard.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizardPage.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewFlexibleProjectGroup.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java499
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java366
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java691
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleDataModelGroup.java262
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroup.java258
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroupEx.java274
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleProjectSelectionPage.java505
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewProjectGroup.java143
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneDataModelGroup.java140
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneGroup.java150
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetGroup.java141
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java173
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java261
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/TableObjects.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java132
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java1439
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/javadoc.xml6
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.properties40
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.xml919
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_figures.properties18
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_ui.properties43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/emftosed.properties3
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ejb_ui.properties15
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties319
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties21
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties19
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/migwizards.properties187
372 files changed, 0 insertions, 34062 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.classpath b/plugins/org.eclipse.jst.j2ee.ui/.classpath
deleted file mode 100644
index f5184485d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="j2ee_ui"/>
- <classpathentry kind="src" path="property_files"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.cvsignore b/plugins/org.eclipse.jst.j2ee.ui/.cvsignore
deleted file mode 100644
index 4a55a527e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-bin
-doc
-temp.folder
-build.xml
-j2ee_ui.jar
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.project b/plugins/org.eclipse.jst.j2ee.ui/.project
deleted file mode 100644
index 937fa4b6e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.j2ee.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>
- <nature>com.ibm.etools.ctc.javaprojectnature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java
deleted file mode 100644
index f610fcf6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.client.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class AppClientArchiveUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("appclientarchiveui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
deleted file mode 100644
index e24abfc63..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.client.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.AppClientExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportApplicationClientAction extends BaseAction {
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%client.export.action.label_ui_"); //$NON-NLS-1$
- private static final String ICON = "appclient_export_wiz"; //$NON-NLS-1$
-
- public ExportApplicationClientAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
- AppClientExportWizard wizard = new AppClientExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
deleted file mode 100644
index e20868c45..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.client.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.AppClientImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportApplicationClientAction extends BaseAction {
-
- public static String LABEL = AppClientArchiveUIResourceHandler.getString("Application_Client_Import_UI_"); //$NON-NLS-1$
- private static final String ICON = "appclient_import_wiz"; //$NON-NLS-1$
-
- public ImportApplicationClientAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
-
- AppClientImportWizard wizard = new AppClientImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
deleted file mode 100644
index 1682ee1a2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ArchiveEARUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("archiveearui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
deleted file mode 100644
index 9f4d5746e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-import org.eclipse.jst.j2ee.internal.ejb.actions.TableObjects;
-
-/**
- * Insert the type's description here. Creation date: (5/7/2001 11:39:11 AM)
- *
- * @author: Administrator
- */
-public class EARImportListContentProvider implements org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * EARImportListContentProvider constructor comment.
- */
- public EARImportListContentProvider() {
- super();
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(Object inputElement) {
- if (inputElement instanceof TableObjects)
- return ((TableObjects) inputElement).getTableObjects().toArray();
- return new Object[0]; //should throw exception instead
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
deleted file mode 100644
index 125a70fd3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ear.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EARExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportEARAction extends BaseAction {
-
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%ear.export.action.description_ui_");//$NON-NLS-1$
- private static final String ICON = "export_ear_wiz"; //$NON-NLS-1$
-
- public ExportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public void primRun(Shell shell) {
- EARExportWizard wizard = new EARExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
deleted file mode 100644
index 17a8ee1ee..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ear.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EARImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportEARAction extends BaseAction {
- public static String LABEL = ArchiveEARUIResourceHandler.getString("Import_EAR"); //$NON-NLS-1$
- private static final String ICON = "import_ear_wiz"; //$NON-NLS-1$
-
- public ImportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
-
- EARImportWizard wizard = new EARImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
deleted file mode 100644
index 52734300a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-import org.eclipse.jst.j2ee.application.operations.ClassPathSelection;
-
-/**
- * Insert the type's description here. Creation date: (8/22/2001 2:27:24 PM)
- *
- * @author: Administrator
- */
-public class ModulesProvider implements org.eclipse.jface.viewers.ILabelProvider, org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * ModulesProvider constructor comment.
- */
- public ModulesProvider() {
- super();
- }
-
- /**
- * Adds a listener to this label provider. Has no effect if an identical listener is already
- * registered.
- * <p>
- * Label provider listeners are informed about state changes that affect the rendering of the
- * viewer that uses this label provider.
- * </p>
- *
- * @param listener
- * a label provider listener
- */
- public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(java.lang.Object inputElement) {
- return ((java.util.List) inputElement).toArray();
- }
-
- /**
- * Returns the image for the label of the given element. The image is owned by the label
- * provider and must not be disposed directly. Instead, dispose the label provider when no
- * longer needed.
- *
- * @param element
- * the element for which to provide the label image
- * @return the image used to label the element, or <code>null</code> if these is no image for
- * the given object
- */
- public org.eclipse.swt.graphics.Image getImage(Object element) {
- return null;
- }
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element
- * the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code> if these is no text
- * label for the given object
- */
- public String getText(Object element) {
- return ((ClassPathSelection) element).getText();
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- }
-
- /**
- * Returns whether the label would be affected by a change to the given property of the given
- * element. This can be used to optimize a non-structural viewer update. If the property
- * mentioned in the update does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and <code>false</code> if it
- * would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * Removes a listener to this label provider. Has no affect if an identical listener is not
- * registered.
- *
- * @param listener
- * a label provider listener
- */
- public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBArchiveUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBArchiveUIResourceHandler.java
deleted file mode 100644
index 504781514..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBArchiveUIResourceHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class EJBArchiveUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("ejbarchiveui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-
- public static String getString(String key, Object[] args, int x) {
-
- return getString(key);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBCheckboxTableViewer.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBCheckboxTableViewer.java
deleted file mode 100644
index c62008532..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBCheckboxTableViewer.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.actions;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Widget;
-
-/**
- * Insert the type's description here. Creation date: (3/22/2001 4:44:53 PM)
- *
- * @author: Administrator
- */
-public class EJBCheckboxTableViewer extends org.eclipse.jface.viewers.CheckboxTableViewer {
- /**
- * EJBCheckboxTableViewer constructor comment.
- *
- * @param parent
- * org.eclipse.swt.widgets.Composite
- * @param style
- * int
- */
- public EJBCheckboxTableViewer(org.eclipse.swt.widgets.Composite parent, int style) {
- super(createTable(parent, style));
- }
-
- /**
- * EJBCheckboxTableViewer constructor comment.
- *
- * @param table
- * org.eclipse.swt.widgets.Table
- */
- public EJBCheckboxTableViewer(org.eclipse.swt.widgets.Table table) {
- super(table);
- }
-
- /**
- * Returns a list of elements corresponding to checked table items in this viewer.
- * <p>
- * This method is typically used when preserving the interesting state of a viewer;
- * <code>setCheckedElements</code> is used during the restore.
- * </p>
- * <p>
- * [Issue: Should return Object[] rather than List.]
- * </p>
- *
- * @return the list of checked nodes (element type: <code>Object</code>)
- * @see #setCheckedElements
- */
- public List getAllElements() {
- TableItem[] children = getTable().getItems();
- List v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- TableItem item = children[i];
- v.add(item.getData());
- }
-
- return v;
- }
-
- /**
- * Returns a list of elements corresponding to checked table items in this viewer.
- * <p>
- * This method is typically used when preserving the interesting state of a viewer;
- * <code>setCheckedElements</code> is used during the restore.
- * </p>
- * <p>
- * [Issue: Should return Object[] rather than List.]
- * </p>
- *
- * @return the list of checked nodes (element type: <code>Object</code>)
- * @see #setCheckedElements
- */
- public List getUnCheckedElements() {
- TableItem[] children = getTable().getItems();
- List v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- TableItem item = children[i];
- if (!(item.getChecked()))
- v.add(item.getData());
- }
- return v;
- }
-
- /**
- * Sets which nodes are checked in this viewer. The given list contains the elements that are to
- * be checked; all other nodes are to be unchecked.
- * <p>
- * This method is typically used when restoring the interesting state of a viewer captured by an
- * earlier call to <code>getCheckedElements</code>.
- * </p>
- * <p>
- * [Issue: Should accept Object[] rather than List.]
- * </p>
- *
- * @param elements
- * the list of checked elements (element type: <code>Object</code>)
- * @see #getCheckedElements
- */
- public void setUnCheckedElements(List elements) {
- for (int i = 0; i < elements.size(); i++) {
- Widget widget = findItem(elements.get(i));
- if (widget instanceof TableItem)
- ((TableItem) widget).setChecked(false);
- }
-
- }
-
- public void setCheckedElements(List elements) {
- for (int i = 0; i < elements.size(); i++) {
- Widget widget = findItem(elements.get(i));
- if (widget instanceof TableItem)
- ((TableItem) widget).setChecked(true);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBSelectiveImportDialog.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBSelectiveImportDialog.java
deleted file mode 100644
index 0fb932173..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/EJBSelectiveImportDialog.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.actions;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Insert the type's description here. Creation date: (9/7/2001 11:28:24 AM)
- *
- * @author: Administrator
- */
-public class EJBSelectiveImportDialog extends org.eclipse.jface.dialogs.MessageDialog {
- protected String[] ejbList;
-
- /**
- * EJBSelectiveImportDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public EJBSelectiveImportDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- }
-
- /**
- * EJBSelectiveImportDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public EJBSelectiveImportDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex, String[] ejbNames) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- ejbList = ejbNames;
- }
-
- /**
- * Creates and returns the contents of an area of the dialog which appears below the message and
- * above the button bar.
- * <p>
- * The default implementation of this framework method returns <code>null</code>. Subclasses
- * may override.
- * </p>
- *
- * @param the
- * parent composite to contain the custom area
- * @return the custom area control, or <code>null</code>
- */
- protected Control createCustomArea(Composite parent) {
-
- Composite composite = new Composite(parent, 0);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (ejbList != null) {
- List list = new List(composite, SWT.BORDER | SWT.HIDE_SELECTION);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- list.setLayoutData(data);
- list.setItems(ejbList);
- list.setForeground(new Color(null, 0, 0, 255));
- }
-
- return composite;
-
- }
-
- /**
- * Convenience method to open a simple Yes/No question dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openError(Shell parent, String title, String message, String[] names) {
- EJBSelectiveImportDialog dialog = new EJBSelectiveImportDialog(parent, title, null, // accept
- // the
- // default
- // window
- // icon
- message, ERROR, new String[]{IDialogConstants.OK_LABEL}, 0, names); // yes is
- // the
- // default
- return dialog.open() == 0;
- }
-
- /**
- * Convenience method to open a simple Yes/No question dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openQuestion(Shell parent, String title, String message, String[] ejbNames) {
- EJBSelectiveImportDialog dialog = new EJBSelectiveImportDialog(parent, title, null, // accept
- // the
- // default
- // window
- // icon
- message, QUESTION, new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, 0, ejbNames); // yes
- // is
- // the
- // default
- return dialog.open() == 0;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ExportEJBAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ExportEJBAction.java
deleted file mode 100644
index b2830af2d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ExportEJBAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.ejb.wizard.EJBExportWizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportEJBAction extends BaseAction {
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%ejb.export.action.description_ui_"); //$NON-NLS-1$
- private static final String ICON = "export_ejbjar_wiz"; //$NON-NLS-1$
-
- public ExportEJBAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
- EJBExportWizard wizard = new EJBExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ImportEJBAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ImportEJBAction.java
deleted file mode 100644
index 9871da0a8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/ImportEJBAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.ejb.wizard.EJBJarImportWizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportEJBAction extends BaseAction {
- public static String LABEL = EJBArchiveUIResourceHandler.getString("Import_EJBJar"); //$NON-NLS-1$
- private static final String ICON = "import_ejbjar_wiz"; //$NON-NLS-1$
-
- public ImportEJBAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
-
- EJBJarImportWizard wizard = new EJBJarImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/NewEJBProjectAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/NewEJBProjectAction.java
deleted file mode 100644
index 2e5b39090..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/NewEJBProjectAction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.actions;
-
-
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.actions.AbstractOpenWizardWorkbenchAction;
-import org.eclipse.jst.j2ee.internal.ejb.ui.util.EJBUIMessages;
-import org.eclipse.jst.j2ee.internal.ejb.wizard.EJBProjectWizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.ui.IWorkbench;
-
-
-
-
-public class NewEJBProjectAction extends AbstractOpenWizardWorkbenchAction {
-
- // TODO MDE 02-28 Find correct label
- public static String LABEL = EJBUIMessages.getResourceString("NewEJBProjectAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "newejbprj_wiz"; //$NON-NLS-1$
-
- public NewEJBProjectAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public NewEJBProjectAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected Wizard createWizard() {
- return new EJBProjectWizard();
- }
-
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }
-
- protected String getDialogText() {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/TableObjects.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/TableObjects.java
deleted file mode 100644
index 2aea64488..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/ejb/actions/TableObjects.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.actions;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Insert the type's description here. Creation date: (3/19/2001 5:10:14 PM)
- *
- * @author: Administrator
- */
-public class TableObjects {
- public List tableObjectsList;
-
- /**
- * EJBs constructor comment.
- */
- public TableObjects() {
- super();
- tableObjectsList = new ArrayList();
- }
-
- public List getTableObjects() {
- return tableObjectsList;
- }
-
- protected void initList() {
- if (tableObjectsList == null)
- tableObjectsList = new ArrayList();
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ExportRARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ExportRARAction.java
deleted file mode 100644
index b32e3fa37..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ExportRARAction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.rar.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.rar.wizard.RARExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportRARAction extends BaseAction {
-
- private String label = J2EEUIPlugin.getDefault().getDescriptor().getResourceString(IConnectorArchiveConstants.CONNECTOR_EXPORT_ACTION_LABEL);
- private static final String ICON = "export_rar_wiz"; //$NON-NLS-1$
-
- public ExportRARAction() {
- super();
- setText(label);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
- RARExportWizard wizard = new RARExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
- wizard.setDialogSettings(plugin.getDialogSettings());
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/IConnectorArchiveConstants.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/IConnectorArchiveConstants.java
deleted file mode 100644
index d8dc5ee8e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/IConnectorArchiveConstants.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.rar.actions;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-
-
-/**
- * Defines constants for Connector Archive operations.
- */
-public interface IConnectorArchiveConstants {
-
- //Actions
- public static final String CONNECTOR_EXPORT_ACTION_LABEL = "%connector.export.action.label_ui_"; //$NON-NLS-1$
-
- //General
- public static final String CONNECTOR_PROJECT_UI_ = RARArchiveUIResourceHandler.getString("Connector_Project_UI_"); //$NON-NLS-1$
- public static final String CONNECTOR_FILE_UI_ = RARArchiveUIResourceHandler.getString("Connector_File_UI_"); //$NON-NLS-1$
- public static final String STORE_CONNECTOR_FILE_NAMES_ID = "EJBImportWizardPage1.STORE_CONNECTOR_FILE_NAMES_ID"; //$NON-NLS-1$
- public static final String STORE_CONNECTOR_EXPORT_FILE_NAMES = "ConenctorExportWizardPage1.STORE_CONNECTOR_EXPORT_FILE_NAMES"; //$NON-NLS-1$
- public static final String WIZ_IMAGE = "connector_import_wiz"; //$NON-NLS-1$
- public static final String ID = "id"; //$NON-NLS-1$
- public static final String RAR_BROWSE_BUTTON_FILTER = "*.rar"; //$NON-NLS-1$
- public static final String TARGET_EXTENSION = "rar"; //$NON-NLS-1$
- public static final String YES_UI_ = RARArchiveUIResourceHandler.getString("Yes_UI_"); //$NON-NLS-1$
- public static final String NO_UI_ = RARArchiveUIResourceHandler.getString("No_UI_"); //$NON-NLS-1$
- public static final String QUESTION_UI_ = RARArchiveUIResourceHandler.getString("Question_UI_"); //$NON-NLS-1$
- public static final String RESOURCE__UI_ = "Resource_{0}_already_exists.__Would_you_like_to_overwrite_it_UI_"; //$NON-NLS-1$
- //Import
- public static final String IMPORT_UI_ = RARArchiveUIResourceHandler.getString("Import_UI_"); //$NON-NLS-1$
- public static final String IMPORT_A_CONNECTOR_UI_ = RARArchiveUIResourceHandler.getString("Import_a_Connector_project_from_the_file_system_UI_"); //$NON-NLS-1$
- public static final String IMPORT_INTO_NEW_OR_EXISTING_UI_ = RARArchiveUIResourceHandler.getString("Import_into_new_or_existing_Enterprise_Application_project_UI_"); //$NON-NLS-1$
- public static final String CONNECTOR_IMPORT_ID_ = "ConnectorProjectImportPage1"; //$NON-NLS-1$
- public static final String CONNECTOR_IMPORT_UI_ = RARArchiveUIResourceHandler.getString("Connector_Import_UI_"); //$NON-NLS-1$
- public static final String IRAR1000 = J2EEUIPlugin.PLUGIN_ID + ".irar1000"; //$NON-NLS-1$
-
- //Export
- public static final String CONNECTOR_EXPORT_UI_ = RARArchiveUIResourceHandler.getString("Connector_Export_UI_"); //$NON-NLS-1$
- public static final String EXPORT_CONNECTOR__UI_ = RARArchiveUIResourceHandler.getString("Export_Connector_Project_to_the_local_file_system_UI_"); //$NON-NLS-1$
- public static final String WORKBENCH_ID = "ConnectorExportPage1"; //$NON-NLS-1$
- public static final String EXPORT_UI_ = RARArchiveUIResourceHandler.getString("Export_UI_"); //$NON-NLS-1$
- public static final String EX_WIZ_IMAGE = "connector_export_wiz"; //$NON-NLS-1$
- public static final String ERAR1000 = J2EEUIPlugin.PLUGIN_ID + ".erar1000"; //$NON-NLS-1$
-
- //Errors
- public static final String UNABLE_TO_COMPLETE_THE_OPEN_ERROR_ = RARArchiveUIResourceHandler.getString("Unable_to_complete_the_operationdump_caused_by_this_UI_"); //$NON-NLS-1$
- public static final String IMPORT_PROBLEMS_UI_ = RARArchiveUIResourceHandler.getString("Import_Problems_UI_"); //$NON-NLS-1$
- public static final String CONNECTOR_IMPORT__UI_ = RARArchiveUIResourceHandler.getString("Connector_Import_Error_UI_"); //$NON-NLS-1$
- public static final String IMPORT_ERROR_UI_ = RARArchiveUIResourceHandler.getString("Import_Error_UI_"); //$NON-NLS-1$
- public static final String THE_JAR_FILE_DOES_NOT_EXIST_UI_ = RARArchiveUIResourceHandler.getString("The_jar_file_does_not_exist_or_cannot_be_opened,_UI_") + //$NON-NLS-1$
- RARArchiveUIResourceHandler.getString("Click_browse_to_select_a_valid_jar_or_enter_a_valid_jar_UI_"); //$NON-NLS-1$
- public static final String CONNECTOR_EXPORT_ERROR_UI_ = RARArchiveUIResourceHandler.getString("Connector_Export_Error_UI_"); //$NON-NLS-1$
- public static final String CANNOT_EXPORT_CLOSED_PROJECT_UI_ = RARArchiveUIResourceHandler.getString("Cannot_export_closed_projects_UI_"); //$NON-NLS-1$
- public static final String Rar_File_Name_Needed_UI_ = RARArchiveUIResourceHandler.getString("Rar_File_Name_Needed_UI_"); //$NON-NLS-1$
-
-}// IConnectorArchiveConstants
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ImportRARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ImportRARAction.java
deleted file mode 100644
index e8a5c9c70..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/ImportRARAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.rar.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.rar.wizard.RARImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportRARAction extends BaseAction {
- public static String LABEL = RARArchiveUIResourceHandler.getString("Import_RAR"); //$NON-NLS-1$
- private static final String ICON = "import_rar_wiz"; //$NON-NLS-1$
-
- public ImportRARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
-
- RARImportWizard wizard = new RARImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/NewConnectorProjectAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/NewConnectorProjectAction.java
deleted file mode 100644
index b0952daef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/NewConnectorProjectAction.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.rar.actions;
-
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.actions.AbstractOpenWizardWorkbenchAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.rar.ui.util.JCAUIMessages;
-import org.eclipse.jst.j2ee.internal.rar.wizard.JCAProjectWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-
-/**
- * Creates an action for the Connector project
- */
-public class NewConnectorProjectAction extends AbstractOpenWizardWorkbenchAction {
-
- // TODO MDE 02-28 Find correct label
- public static String LABEL = JCAUIMessages.getResourceString("NewConnectorProjectAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "newear_wiz"; //$NON-NLS-1$
-
- /**
- * Default constructor
- */
- public NewConnectorProjectAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }// NewConnectorProjectAction
-
- /**
- * Constructor initialization.
- *
- * @param IWorkbench
- * workbench - Workbench to add to this wizard too.
- * @param String
- * label - Label for project.
- * @param Class[]
- * acceptedTypes - List of accepted types for this wizard
- */
- public NewConnectorProjectAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }// NewConnectorProjectAction
-
- /**
- * Creates the wizard
- *
- * @return Wizard
- */
- protected Wizard createWizard() {
- return new JCAProjectWizard();
- }// createWizard
-
- /**
- * shouldAcceptElement - Always true
- *
- * @param Object
- * obj
- */
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }// shouldAcceptElement
-
- protected String getDialogText() {
- return null;
- }
-}// NewConnectorProjectAction
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/RARArchiveUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/RARArchiveUIResourceHandler.java
deleted file mode 100644
index dbeafc3b9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/rar/actions/RARArchiveUIResourceHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.rar.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class RARArchiveUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("rararchiveui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-
- public static String getString(String key, Object[] args, int x) {
-
- return getString(key);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ExportWARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ExportWARAction.java
deleted file mode 100644
index 37ce7bd89..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ExportWARAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 31, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.war.wizard.WARExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportWARAction extends BaseAction {
-
- public static String LABEL = "%ExportWaar - needs string"; //WebUIResourceHandler.getString("ExportWARAction_UI_0");
- // //$NON-NLS-1$
- // //$NON-NLS-1$
- private static final String ICON = "export_rar_wiz"; //$NON-NLS-1$
-
- public ExportWARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
- WARExportWizard wizard = new WARExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
- wizard.setDialogSettings(J2EEUIPlugin.getDefault().getDialogSettings());
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ImportWARAction.java b/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ImportWARAction.java
deleted file mode 100644
index 9402e8066..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/archiveui/org/eclipse/jst/j2ee/internal/war/actions/ImportWARAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 31, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.war.wizard.WARImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportWARAction extends BaseAction {
- public static String LABEL = "%ImportWar-needs string";//WebUIResourceHandler.getString("ImportWARAction_UI_0");
- // //$NON-NLS-1$
- // //$NON-NLS-1$
- private static final String ICON = "import_war_wiz"; //$NON-NLS-1$
-
- public ImportWARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
- WARImportWizard wizard = new WARImportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
- wizard.setDialogSettings(plugin.getDialogSettings());
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/build.properties b/plugins/org.eclipse.jst.j2ee.ui/build.properties
deleted file mode 100644
index d1abda1ee..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-bin.includes = plugin.xml,\
- icons/,\
- plugin.properties,\
- j2ee_ui.jar
-jars.compile.order = j2ee_ui.jar
-source.j2ee_ui.jar = j2ee_ui/,\
- property_files/
-output.j2ee_ui.jar = bin/
-src.includes = plugin.properties,\
- plugin.xml
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif
deleted file mode 100644
index 023fe8d4d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif
deleted file mode 100644
index 91e708f7c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif
deleted file mode 100644
index 276842824..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif
deleted file mode 100644
index 3c455c9ff..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif
deleted file mode 100644
index a9063201b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif
deleted file mode 100644
index 788e76d4a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif
deleted file mode 100644
index 3e31054b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif
deleted file mode 100644
index 573b60f0c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif
deleted file mode 100644
index 20ed1f9a4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif
deleted file mode 100644
index ad3af3c65..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif
deleted file mode 100644
index 5df61935f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/eargroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/eargroup_obj.gif
deleted file mode 100644
index 2eeb3ef01..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/eargroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/ejbgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/ejbgroup_obj.gif
deleted file mode 100644
index b0adb3e59..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/ejbgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/folder.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/folder.gif
deleted file mode 100644
index c91b26723..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/folder.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_client_remove_action_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_client_remove_action_obj.gif
deleted file mode 100644
index 182321138..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_client_remove_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_deploy_action_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_deploy_action_obj.gif
deleted file mode 100644
index db8945f83..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/clcl16/ejb_deploy_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_export.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_export.gif
deleted file mode 100644
index 6f83300c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_export.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_import_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_import_wiz.gif
deleted file mode 100644
index ce667f4ef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/appclient_import_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/ejbclientjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/ejbclientjar_wiz.gif
deleted file mode 100644
index 6e65e7d54..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/ejbclientjar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ear.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ear.gif
deleted file mode 100644
index 2270b1717..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ear.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ejbjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ejbjar_wiz.gif
deleted file mode 100644
index 72cd417c4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_ejbjar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_rar.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_rar.gif
deleted file mode 100644
index befb3d4e8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/export_rar.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/exportwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/exportwar_wiz.gif
deleted file mode 100644
index ced859dd4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/exportwar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ear.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ear.gif
deleted file mode 100644
index 099201bb5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ear.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ejbjar.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ejbjar.gif
deleted file mode 100644
index 5644b48df..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_ejbjar.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_rar.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_rar.gif
deleted file mode 100644
index 50f25a2f7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/import_rar.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/importwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/importwar_wiz.gif
deleted file mode 100644
index 432c06679..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/importwar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newappclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newappclient_wiz.gif
deleted file mode 100644
index 0ce86a13a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newappclient_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newconnectionprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newconnectionprj_wiz.gif
deleted file mode 100644
index 1bec6ba83..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newconnectionprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newear_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newear_wiz.gif
deleted file mode 100644
index 8b409b507..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newear_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newejbprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newejbprj_wiz.gif
deleted file mode 100644
index ecda22bf9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newejbprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newwar_wiz.gif
deleted file mode 100644
index b9ac6be16..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/newwar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/re_execute.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/re_execute.gif
deleted file mode 100644
index 8f943a8c3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ctool16/re_execute.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_perspective.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_perspective.gif
deleted file mode 100644
index 20acd4c42..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_perspective.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_view.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_view.gif
deleted file mode 100644
index 20acd4c42..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/cview16/j2ee_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_client_remove_action_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_client_remove_action_obj.gif
deleted file mode 100644
index 928a0bf95..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_client_remove_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_deploy_action_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_deploy_action_obj.gif
deleted file mode 100644
index 965738888..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/dlcl16/ejb_deploy_action_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/13_ear_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/13_ear_obj.gif
deleted file mode 100644
index 54b9b1745..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/13_ear_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_cmpbean_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_cmpbean_obj.gif
deleted file mode 100644
index 35835bc25..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_cmpbean_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejb_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejb_obj.gif
deleted file mode 100644
index 673ba6aa6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejb_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejbjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejbjar_wiz.gif
deleted file mode 100644
index 9dae05280..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/21_ejbjar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/annotation_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/annotation_positioned_overlay.gif
deleted file mode 100644
index cec1d2d54..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/annotation_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14.gif
deleted file mode 100644
index b2483803b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14_deploy.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14_deploy.gif
deleted file mode 100644
index b0d08af9e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/appclient_14_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/extwebserviceitemprovider_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/extwebserviceitemprovider_obj.gif
deleted file mode 100644
index f4cc6e3aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/extwebserviceitemprovider_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/home_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/home_interface_positioned_overlay.gif
deleted file mode 100644
index 91a756a3d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/home_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_home_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_home_interface_positioned_overlay.gif
deleted file mode 100644
index e5d6090fe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_home_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_interface_positioned_overlay.gif
deleted file mode 100644
index 156febec2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/local_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/remote_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/remote_interface_positioned_overlay.gif
deleted file mode 100644
index 203e398f4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/remote_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/service_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/service_interface_positioned_overlay.gif
deleted file mode 100644
index 614666731..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/service_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServiceItemProvider_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServiceItemProvider_obj.gif
deleted file mode 100644
index 8fb844f5b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServiceItemProvider_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServicesFolder_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServicesFolder_obj.gif
deleted file mode 100644
index ab3039ca2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webServicesFolder_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_14.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_14.gif
deleted file mode 100644
index 83f916563..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_14.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_deploy.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_deploy.gif
deleted file mode 100644
index 80531e39b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/webapp_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_bean_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_bean_overlay.gif
deleted file mode 100644
index f277755f6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_bean_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_positioned_overlay.gif
deleted file mode 100644
index cec1d2d54..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/annotation_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/client_app_ovr.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/client_app_ovr.gif
deleted file mode 100644
index 3ff1ca57e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/client_app_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/connector_ovr.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/connector_ovr.gif
deleted file mode 100644
index b7e77bc69..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/connector_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/dis_annotation_bean_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/dis_annotation_bean_overlay.gif
deleted file mode 100644
index dac498adf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/dis_annotation_bean_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/ejb_module_ovr.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/ejb_module_ovr.gif
deleted file mode 100644
index cf50d6d66..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/ejb_module_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/enterprise_app_ovr.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/enterprise_app_ovr.gif
deleted file mode 100644
index ec19c473c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/enterprise_app_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/externalWebServiceOverlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/externalWebServiceOverlay_obj.gif
deleted file mode 100644
index daff412d7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/externalWebServiceOverlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_overlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_overlay_obj.gif
deleted file mode 100644
index 48380fc8e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_overlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_positioned_overlay.gif
deleted file mode 100644
index 91a756a3d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/home_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/key_interf_ov.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/key_interf_ov.gif
deleted file mode 100644
index 307044047..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/key_interf_ov.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_overlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_overlay_obj.gif
deleted file mode 100644
index d7827341f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_overlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_positioned_overlay.gif
deleted file mode 100644
index e5d6090fe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_home_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_overlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_overlay_obj.gif
deleted file mode 100644
index 43e165576..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_overlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_positioned_overlay.gif
deleted file mode 100644
index 156febec2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/local_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_overlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_overlay_obj.gif
deleted file mode 100644
index 19c9cae05..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_overlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_positioned_overlay.gif
deleted file mode 100644
index 203e398f4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/remote_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_overlay_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_overlay_obj.gif
deleted file mode 100644
index 93f0679d5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_overlay_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_positioned_overlay.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_positioned_overlay.gif
deleted file mode 100644
index 614666731..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/service_interface_positioned_overlay.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/web_module_ovr.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/web_module_ovr.gif
deleted file mode 100644
index c1e96177a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/ovr16/web_module_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_mess_dest_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_mess_dest_wiz_ban.gif
deleted file mode 100644
index f9941cec6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_mess_dest_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_web_service_handler_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_web_service_handler_wiz.gif
deleted file mode 100644
index e1fa98a87..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/add_web_service_handler_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addauthoritycontraints_wiz_.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addauthoritycontraints_wiz_.gif
deleted file mode 100644
index 2ec0ffb08..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addauthoritycontraints_wiz_.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcmpfiled_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcmpfiled_wiz_ban.gif
deleted file mode 100644
index 879329ef0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcmpfiled_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcontextparameter_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcontextparameter_wiz_ban.gif
deleted file mode 100644
index 6457e12be..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addcontextparameter_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addenvirentry_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addenvirentry_wiz_ban.gif
deleted file mode 100644
index 653ab02a8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addenvirentry_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/adderrorcodeerror_wiz_ban.g.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/adderrorcodeerror_wiz_ban.g.gif
deleted file mode 100644
index 2eb9efee5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/adderrorcodeerror_wiz_ban.g.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addexceptionerrorpage_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addexceptionerrorpage_wiz_ban.gif
deleted file mode 100644
index e12d2ac10..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addexceptionerrorpage_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addfiltermapping_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addfiltermapping_wiz_ban.gif
deleted file mode 100644
index 5b5301060..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addfiltermapping_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addhandlersoapheader_wiz_ba.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addhandlersoapheader_wiz_ba.gif
deleted file mode 100644
index 189c3e9ac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addhandlersoapheader_wiz_ba.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addjsppropgropu_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addjsppropgropu_wiz_ban.gif
deleted file mode 100644
index 624fe7ffc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addjsppropgropu_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addlocencodingmap_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addlocencodingmap_wiz_ban.gif
deleted file mode 100644
index 46e3e0875..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addlocencodingmap_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addmimemapping_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addmimemapping_wiz_ban.gif
deleted file mode 100644
index bb856a40f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addmimemapping_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addservletmapping_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addservletmapping_wiz_ban.gif
deleted file mode 100644
index 2820c5a9b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addservletmapping_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addtaglibref_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addtaglibref_wiz_ban.gif
deleted file mode 100644
index d238b56db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addtaglibref_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebSecuritycontraint_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebSecuritycontraint_wiz.gif
deleted file mode 100644
index fc97d8469..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebSecuritycontraint_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebrescollection_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebrescollection_wiz_ban.gif
deleted file mode 100644
index 7dfe6e91d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebrescollection_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebsecurityroleref_wiz_b.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebsecurityroleref_wiz_b.gif
deleted file mode 100644
index aab4b505f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwebsecurityroleref_wiz_b.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwelcomepage_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwelcomepage_wiz_ban.gif
deleted file mode 100644
index e0f50ccf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/addwelcomepage_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/appclient_wiz.gif
deleted file mode 100644
index 56d7fa704..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/appclient_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connection_migration_wizard_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connection_migration_wizard_wiz.gif
deleted file mode 100644
index e9ecba580..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connection_migration_wizard_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connector_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connector_wiz.gif
deleted file mode 100644
index 231f8d3e7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/connector_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ear_wiz.gif
deleted file mode 100644
index 625e763c9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ear_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbclientjar_wizban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbclientjar_wizban.gif
deleted file mode 100644
index 231da6174..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbclientjar_wizban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbproject_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbproject_wiz.gif
deleted file mode 100644
index 7f2aa1e05..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/ejbproject_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_appclient_wiz.gif
deleted file mode 100644
index 351539638..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_appclient_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ear_wiz.gif
deleted file mode 100644
index a327fa68a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ear_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ejbjar_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ejbjar_obj.gif
deleted file mode 100644
index adca79ef0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_ejbjar_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_rar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_rar_wiz.gif
deleted file mode 100644
index 6047f1adc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_rar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_war_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_war_wiz.gif
deleted file mode 100644
index d25124251..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/export_war_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_appclient_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_appclient_wiz.gif
deleted file mode 100644
index 351a31dc9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_appclient_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_class_file_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_class_file_wiz_ban.gif
deleted file mode 100644
index 81b1e3f61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_class_file_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ear_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ear_wiz.gif
deleted file mode 100644
index 67754deee..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ear_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ejbjar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ejbjar_wiz.gif
deleted file mode 100644
index d123519da..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_ejbjar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_rar_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_rar_wiz.gif
deleted file mode 100644
index ea9dff4f6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_rar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_war_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_war_wiz.gif
deleted file mode 100644
index 514274d38..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/import_war_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/init_param_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/init_param_wiz_ban.gif
deleted file mode 100644
index 3fb6df46f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/init_param_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_jms_creation_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_jms_creation_wiz.gif
deleted file mode 100644
index 51b1d5a7f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_jms_creation_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_non_jms_creation_wi.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_non_jms_creation_wi.gif
deleted file mode 100644
index 51b1d5a7f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/mdb_2_1_non_jms_creation_wi.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/newservlet_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/newservlet_wiz.gif
deleted file mode 100644
index 147e57a52..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/newservlet_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/versionmigrate3_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/versionmigrate3_wiz.gif
deleted file mode 100644
index 9b72bf5de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/versionmigrate3_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/war_wiz.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/war_wiz.gif
deleted file mode 100644
index d964e2e56..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/war_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/web_library_project_wiz_ban.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/web_library_project_wiz_ban.gif
deleted file mode 100644
index 767a416a0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/wizban/web_library_project_wiz_ban.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/jar_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/jar_obj.gif
deleted file mode 100644
index ec315d5ff..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/jar_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/jcu_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/jcu_obj.gif
deleted file mode 100644
index 36a73ace2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/jcu_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/key_interf_ov.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/key_interf_ov.gif
deleted file mode 100644
index 307044047..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/key_interf_ov.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/left_arrow.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/left_arrow.gif
deleted file mode 100644
index 3bc383173..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/left_arrow.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/right_arrow.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/right_arrow.gif
deleted file mode 100644
index d03e351aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/right_arrow.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/servlet.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/servlet.gif
deleted file mode 100644
index fc1bece72..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/servlet.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/sessionBean_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/sessionBean_obj.gif
deleted file mode 100644
index 507b8a82e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/sessionBean_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/showerr_tsk.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/showerr_tsk.gif
deleted file mode 100644
index 0bc60689c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/showerr_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/showwarn_tsk.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/showwarn_tsk.gif
deleted file mode 100644
index 14009e997..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/showwarn_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/srvce_elem_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/srvce_elem_obj.gif
deleted file mode 100644
index 6fdcb3fe6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/srvce_elem_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/webgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/webgroup_obj.gif
deleted file mode 100644
index 274d361ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/webgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/webservicedesc.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/webservicedesc.gif
deleted file mode 100644
index 8fb844f5b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/webservicedesc.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/wsdl.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/wsdl.gif
deleted file mode 100644
index 8fb844f5b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/wsdl.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java
deleted file mode 100644
index 1158dc789..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModel;
-import org.eclipse.jst.j2ee.internal.listeners.IValidateEditListener;
-import org.eclipse.jst.j2ee.internal.wizard.AvailableJarsProvider;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ClasspathTableManager implements Listener, ICommonManifestUIConstants {
-
- protected Button useClientJARsBtn;
- protected Button useServerJARsBtn;
- protected Button useAnyJARsBtn;
- protected Button upButton;
- protected Button downButton;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- protected IClasspathTableOwner owner;
- protected Composite buttonColumn;
- protected ClasspathModel model;
- protected CheckboxTableViewer availableJARsViewer;
- protected IValidateEditListener validateEditListener;
-
- protected boolean readOnly;
- protected AvailableJarsProvider availableJarsProvider;
-
- /**
- * Constructor for ButtonBarManager.
- */
- public ClasspathTableManager(IClasspathTableOwner owner, ClasspathModel model) {
- super();
- this.owner = owner;
- this.model = model;
- }
-
- public ClasspathTableManager(IClasspathTableOwner owner, ClasspathModel model, IValidateEditListener listener) {
- super();
- this.owner = owner;
- this.model = model;
- this.validateEditListener = listener;
- }
- public void fillComposite(Composite parent) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.FILL_BOTH));
- createRadioGroup(parent);
- createTable(parent);
- createButtonColumn(parent);
- }
-
- private void initializeEJBClientDefaults() {
- if (model == null || model.getClassPathSelection() == null)
- return;
- boolean shouldUseServerJARs = false;
- ClassPathSelection selection = model.getClassPathSelection();
- int filterLevel;
- boolean ejbSelected = selection.isAnyEJBJarSelected();
- boolean clientSelected = selection.isAnyEJBClientJARSelected();
- if (ejbSelected && clientSelected)
- filterLevel = ClassPathSelection.FILTER_NONE;
- else if (shouldUseServerJARs) {
- if (clientSelected)
- filterLevel = ClassPathSelection.FILTER_NONE;
- else
- filterLevel = ClassPathSelection.FILTER_EJB_CLIENT_JARS;
- } else {
- if (ejbSelected)
- filterLevel = ClassPathSelection.FILTER_NONE;
- else
- filterLevel = ClassPathSelection.FILTER_EJB_SERVER_JARS;
- }
- initFilterLevel(filterLevel);
- }
-
- private void initFilterLevel(int filterLevel) {
- model.getClassPathSelection().setFilterLevel(filterLevel);
- switch (filterLevel) {
- case (ClassPathSelection.FILTER_NONE) :
- useAnyJARsBtn.setSelection(true);
- useClientJARsBtn.setSelection(false);
- useServerJARsBtn.setSelection(false);
- break;
- case (ClassPathSelection.FILTER_EJB_CLIENT_JARS) :
- useAnyJARsBtn.setSelection(false);
- useClientJARsBtn.setSelection(false);
- useServerJARsBtn.setSelection(true);
- break;
- case (ClassPathSelection.FILTER_EJB_SERVER_JARS) :
- useAnyJARsBtn.setSelection(false);
- useClientJARsBtn.setSelection(true);
- useServerJARsBtn.setSelection(false);
- break;
- }
- }
-
- private void createRadioGroup(Composite parent) {
- Group radioGroup = owner.createGroup(parent);
- radioGroup.setText(EJB_CLIENT_RADIO_UI_);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- data.horizontalSpan = 2;
- data.horizontalIndent = 0;
- GridLayout layout = new GridLayout(3, false);
- radioGroup.setLayout(layout);
- radioGroup.setLayoutData(data);
-
- useServerJARsBtn = createRadioButton(USE_EJB_SERVER_JARs_UI_, radioGroup);
- useClientJARsBtn = createRadioButton(USE_EJB_CLIENT_JARs_UI_, radioGroup);
- useAnyJARsBtn = createRadioButton(USE_BOTH_UI_, radioGroup);
- initializeEJBClientDefaults();
- }
-
-
- protected void createButtonColumn(Composite parent) {
- buttonColumn = owner.createButtonColumnComposite(parent);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonColumn.setLayoutData(data);
- createPushButtons();
- }
-
- protected void createTable(Composite parent) {
- availableJARsViewer = owner.createAvailableJARsViewer(parent);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
- availableJARsViewer.getTable().setLayoutData(gd);
- availableJarsProvider = new AvailableJarsProvider();
- availableJARsViewer.setContentProvider(availableJarsProvider);
- availableJARsViewer.setLabelProvider(availableJarsProvider);
- addTableListeners();
- }
-
-
- protected void createPushButtons() {
- upButton = createPushButton(UP_BUTTON);
- downButton = createPushButton(DOWN_BUTTON);
- selectAllButton = createPushButton(SELECT_ALL_BUTTON);
- deselectAllButton = createPushButton(DE_SELECT_ALL_BUTTON);
- if (isReadOnly()) {
- upButton.setEnabled(false);
- downButton.setEnabled(false);
- selectAllButton.setEnabled(false);
- deselectAllButton.setEnabled(false);
- }
- }
-
- protected Button createPushButton(String label) {
- Button aButton = owner.primCreatePushButton(label, buttonColumn);
- aButton.addListener(SWT.Selection, this);
- aButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return aButton;
- }
-
- protected Button createRadioButton(String label, Composite parent) {
- Button aButton = owner.primCreateRadioButton(label, parent);
- aButton.addListener(SWT.Selection, this);
- return aButton;
- }
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == upButton)
- upButtonSelected();
- else if (event.widget == downButton)
- downButtonSelected();
- else if (event.widget == selectAllButton)
- selectAllButtonSelected();
- else if (event.widget == deselectAllButton)
- deselectAllButtonSelected();
- else if (event.widget == useServerJARsBtn)
- handleServerJARsButtonSelected();
- else if (event.widget == useClientJARsBtn)
- handleClientJARsButtonSelected();
- else if (event.widget == useAnyJARsBtn)
- handleAnyJARsButtonSelected();
- }
-
- private void handleServerJARsButtonSelected() {
- model.selectFilterLevel(ClassPathSelection.FILTER_EJB_CLIENT_JARS);
- refresh();
- }
-
- private void handleClientJARsButtonSelected() {
- model.selectFilterLevel(ClassPathSelection.FILTER_EJB_SERVER_JARS);
- refresh();
- }
-
- private void handleAnyJARsButtonSelected() {
- model.selectFilterLevel(ClassPathSelection.FILTER_NONE);
- refresh();
- }
-
- public boolean validatateEdit() {
- return validateEditListener.validateState().isOK();
- }
-
- protected void deselectAllButtonSelected() {
- if (!validatateEdit())
- return;
- availableJARsViewer.setAllChecked(false);
- model.setAllClasspathElementsSelected(false);
- }
-
- protected void selectAllButtonSelected() {
- if (!validatateEdit())
- return;
- availableJARsViewer.setAllChecked(true);
- model.setAllClasspathElementsSelected(Arrays.asList(availableJARsViewer.getCheckedElements()), true);
- }
-
- protected java.util.List getSelectionAsList() {
- return ((IStructuredSelection) availableJARsViewer.getSelection()).toList();
- }
-
- protected void downButtonSelected() {
- if (!validatateEdit())
- return;
- model.moveDown(getSelectionAsList());
- refresh();
- }
-
- protected void upButtonSelected() {
- if (!validatateEdit())
- return;
- model.moveUp(getSelectionAsList());
- refresh();
- }
-
- /*
- * Updates the enable state of the all buttons
- */
- protected void updateButtonEnablements() {
- int[] indices = availableJARsViewer.getTable().getSelectionIndices();
- upButton.setEnabled(canMoveUp(indices));
- downButton.setEnabled(canMoveDown(indices, availableJARsViewer.getTable().getItemCount()));
- }
-
- protected boolean canMoveUp(int[] indices) {
- return canMove(indices, 0);
- }
-
- protected boolean canMoveDown(int[] indices, int itemCount) {
- return canMove(indices, itemCount - 1);
- }
-
- protected boolean canMove(int[] indices, int referenceIndex) {
- int length = indices.length;
- if (length == 0)
- return false;
- for (int i = 0; i < length; i++) {
- if (indices[i] == referenceIndex)
- return false;
- }
- return true;
- }
-
- protected void addTableListeners() {
- addCheckStateListener();
- addSelectionListener();
- }
-
- protected void addCheckStateListener() {
- availableJARsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- availableJARCheckStateChanged(event);
- }
- });
- }
-
- protected void availableJARCheckStateChanged(CheckStateChangedEvent event) {
- if (isReadOnly() || !validatateEdit() || (isMyClientJAR(event) && !event.getChecked())) {
- availableJARsViewer.setChecked(event.getElement(), !event.getChecked());
- return;
- }
- ClasspathElement element = (ClasspathElement) event.getElement();
- model.setSelection(element, event.getChecked());
- }
-
- /**
- * @param event
- * @return
- */
- private boolean isMyClientJAR(CheckStateChangedEvent event) {
- ClasspathElement element = (ClasspathElement) event.getElement();
- return getClasspathSelection().isMyClientJAR(element);
- }
-
- protected void addSelectionListener() {
- availableJARsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- tableSelectionChanged();
- }
- });
- }
-
- protected void tableSelectionChanged() {
- if (!isReadOnly())
- updateButtonEnablements();
- }
-
- protected ClassPathSelection getClasspathSelection() {
- if (model == null || model.getSelectedEARNature() == null)
- return null;
- return model.getClassPathSelection();
- }
-
- public void refreshCheckedItems() {
- if (getClasspathSelection() == null)
- return;
- java.util.List elements = getClasspathSelection().getClasspathElements();
- for (int i = 0; i < elements.size(); i++) {
- ClasspathElement element = (ClasspathElement) elements.get(i);
- availableJARsViewer.setChecked(element, element.isSelected());
- }
- }
-
- public void refresh() {
- availableJARsViewer.setInput(getClasspathSelection());
- GridData data = new GridData(GridData.FILL_BOTH);
- int numlines = Math.min(10, availableJARsViewer.getTable().getItemCount());
- data.heightHint = availableJARsViewer.getTable().getItemHeight() * numlines;
- availableJARsViewer.getTable().setLayoutData(data);
- refreshCheckedItems();
- updateButtonEnablements();
- }
-
-
- /**
- * Gets the model.
- * @return Returns a ClasspathModel
- */
- public ClasspathModel getModel() {
- return model;
- }
-
- /**
- * Sets the model.
- * @param model The model to set
- */
- public void setModel(ClasspathModel model) {
- this.model = model;
- initializeEJBClientDefaults();
- }
-
- /**
- * Returns the readOnly.
- * @return boolean
- */
- public boolean isReadOnly() {
- return readOnly;
- }
-
-
- /**
- * Sets the readOnly.
- * @param readOnly The readOnly to set
- */
- public void setReadOnly(boolean readOnly) {
- this.readOnly = readOnly;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java
deleted file mode 100644
index a2229f68d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface IClasspathTableOwner {
- Button primCreatePushButton(String label, Composite buttonColumn);
- Button primCreateRadioButton(String label, Composite parent);
- CheckboxTableViewer createAvailableJARsViewer(Composite parent);
- Composite createButtonColumnComposite(Composite parent);
- Button createHideEJBClientJARsButton(Composite parent);
- Group createGroup(Composite parent);
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java
deleted file mode 100644
index 7577ce641..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.common.CommonEditResourceHandler;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface ICommonManifestUIConstants {
- String UP_BUTTON = ManifestUIResourceHandler.getString("Up_1"); //$NON-NLS-1$
- String DOWN_BUTTON = ManifestUIResourceHandler.getString("Down_2"); //$NON-NLS-1$
- String SELECT_ALL_BUTTON = ManifestUIResourceHandler.getString("Select_All_3"); //$NON-NLS-1$
- String DE_SELECT_ALL_BUTTON = ManifestUIResourceHandler.getString("Deselect_All_4"); //$NON-NLS-1$
- String ERROR_READING_MANIFEST_DIALOG_TITLE = ManifestUIResourceHandler.getString("ERROR_READING_MANIFEST_DIALOG_TITLE"); //$NON-NLS-1$
- String SAVE_MANIFEST_WITH_ERROR =ManifestUIResourceHandler.getString("SAVE_MANIFEST_WITH_ERROR"); //$NON-NLS-1$
- String ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR = ManifestUIResourceHandler.getString("ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR"); //$NON-NLS-1$
- String ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE = ManifestUIResourceHandler.getString("ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE"); //$NON-NLS-1$
- String MANIFEST_PROBLEM_1 = ManifestUIResourceHandler.getString("MANIFEST_PROBLEM_1"); //$NON-NLS-1$
- String MANIFEST_PROBLEM_2 = ManifestUIResourceHandler.getString("MANIFEST_PROBLEM_2"); //$NON-NLS-1$
- String MANIFEST_PROBLEM_3 = ManifestUIResourceHandler.getString("MANIFEST_PROBLEM_3"); //$NON-NLS-1$
- String MANIFEST_PROBLEM_4 = ManifestUIResourceHandler.getString("MANIFEST_PROBLEM_4"); //$NON-NLS-1$
- String REDIRECT_TEXT_EDITOR_UI_ = ManifestUIResourceHandler.getString("REDIRECT_TEXT_EDITOR_UI_"); //$NON-NLS-1$
-
- String EJB_CLIENT_RADIO_UI_ = CommonEditResourceHandler.getString("EJB_CLIENT_RADIO_UI_"); //$NON-NLS-1$
- String USE_EJB_SERVER_JARs_UI_ = CommonEditResourceHandler.getString("USE_EJB_SERVER_JARs_UI_"); //$NON-NLS-1$
- String USE_EJB_CLIENT_JARs_UI_ = CommonEditResourceHandler.getString("USE_EJB_CLIENT_JARs_UI_"); //$NON-NLS-1$
- String USE_BOTH_UI_ = CommonEditResourceHandler.getString("USE_BOTH_UI_"); //$NON-NLS-1$
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesConstants.java
deleted file mode 100644
index ddfb3eec6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesConstants.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Apr 8, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public interface J2EEPropertiesConstants {
- //J2EEUIMessages.getResourceString("Import_Classes");
- public String J2EE_LEVEL = J2EEUIMessages.getResourceString("J2EE_Level"); //$NON-NLS-1$
- public String J2EE_12 = J2EEUIMessages.getResourceString("J2EE_12"); //$NON-NLS-1$
- public String J2EE_12_DESCRIPTION = J2EEUIMessages.getResourceString("J2EE_12_DESCRIPTION"); //$NON-NLS-1$
- public String J2EE_13 = J2EEUIMessages.getResourceString("J2EE_13"); //$NON-NLS-1$
- public String J2EE_13_DESCRIPTION = J2EEUIMessages.getResourceString("J2EE_13_DESCRIPTION"); //$NON-NLS-1$
- public String J2EE_14_DESCRIPTION = J2EEUIMessages.getResourceString("J2EE_14_DESCRIPTION"); //$NON-NLS-1$
- public String EJB_LEVEL = J2EEUIMessages.getResourceString("EJB_LEVEL"); //$NON-NLS-1$
- public String EJB_11 = J2EEUIMessages.getResourceString("EJB_11"); //$NON-NLS-1$
- public String EJB_11_DESCRIPTION = J2EEUIMessages.getResourceString("EJB_11_DESCRIPTION"); //$NON-NLS-1$
- public String EJB_20 = J2EEUIMessages.getResourceString("EJB_20"); //$NON-NLS-1$
- public String EJB_20_DESCRIPTION = J2EEUIMessages.getResourceString("EJB_20_DESCRIPTION"); //$NON-NLS-1$
- public String EJB_21_DESCRIPTION = J2EEUIMessages.getResourceString("EJB_21_DESCRIPTION"); //$NON-NLS-1$
- public String CONNECTOR_LEVEL = J2EEUIMessages.getResourceString("CONNECTOR_LEVEL"); //$NON-NLS-1$
- public String CONNECTOR_10 = J2EEUIMessages.getResourceString("CONNECTOR_10"); //$NON-NLS-1$
- public String CONNECTOR_15 = J2EEUIMessages.getResourceString("CONNECTOR_15"); //$NON-NLS-1$
- public String CONNECTOR_10_DESCRIPTION = J2EEUIMessages.getResourceString("CONNECTOR_10_DESCRIPTION"); //$NON-NLS-1$
- public String CONNECTOR_15_DESCRIPTION = J2EEUIMessages.getResourceString("CONNECTOR_15_DESCRIPTION"); //$NON-NLS-1$
- public String WEB_LEVEL = J2EEUIMessages.getResourceString("WEB_LEVEL"); //$NON-NLS-1$
- public String WEB_22_DESCRIPTION = J2EEUIMessages.getResourceString("WEB_22_DESCRIPTION"); //$NON-NLS-1$
- public String WEB_23_DESCRIPTION = J2EEUIMessages.getResourceString("WEB_23_DESCRIPTION"); //$NON-NLS-1$
- public String WEB_24_DESCRIPTION = J2EEUIMessages.getResourceString("WEB_24_DESCRIPTION"); //$NON-NLS-1$
- public String APP_CLIENT_LEVEL = J2EEUIMessages.getResourceString("APP_CLIENT_LEVEL"); //$NON-NLS-1$
- public String APP_CLIENT_12_DESCRIPTION = J2EEUIMessages.getResourceString("APP_CLIENT_12_DESCRIPTION"); //$NON-NLS-1$
- public String APP_CLIENT_13_DESCRIPTION = J2EEUIMessages.getResourceString("APP_CLIENT_13_DESCRIPTION"); //$NON-NLS-1$
- public String APP_CLIENT_14_DESCRIPTION = J2EEUIMessages.getResourceString("APP_CLIENT_14_DESCRIPTION"); //$NON-NLS-1$
- public String DESCRIPTION = J2EEUIMessages.getResourceString("DESCRIPTION"); //$NON-NLS-1$
- public String WEB_CONTEXT_ROOT = J2EEUIMessages.getResourceString("WEB_CONTEXT_ROOT"); //$NON-NLS-1$
- public String WEB_CONTENT_FOLDER_NAME = J2EEUIMessages.getResourceString("WEB_CONTENT_FOLDER_NAME"); //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesPage.java
deleted file mode 100644
index dada53188..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEPropertiesPage.java
+++ /dev/null
@@ -1,508 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal;
-
-import java.util.StringTokenizer;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.ApplicationClientNatureRuntime;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.ejb.project.EJBNatureRuntime;
-import org.eclipse.jst.j2ee.internal.jca.operations.ConnectorNatureRuntime;
-import org.eclipse.jst.j2ee.internal.project.J2EENature;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.jst.j2ee.internal.web.operations.WebProjectInfo;
-import org.eclipse.jst.j2ee.internal.web.operations.WebProjectPropertiesUpdateOperation;
-import org.eclipse.jst.j2ee.internal.web.operations.WebPropertiesUtil;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-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.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.frameworks.internal.operations.IHeadlessRunnableWithProgress;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class J2EEPropertiesPage extends PropertyPage implements J2EEPropertiesConstants {
- protected IProject project = null;
- private static final int SIZING_TEXT_FIELD_WIDTH = 250;
- Text contextRootNameField, webContentFolderField;
- protected WebProjectInfo wtWebProjectInfo = new WebProjectInfo();
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- Control control = null;
- IProject aProject = getJ2EEProject();
- if (aProject != null) {
- Composite containerGroup = new Composite(parent, SWT.NONE);
- control = containerGroup;
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
-
- containerGroup.setLayout(layout);
-
- fillInformation(aProject, containerGroup);
- }
- return control;
- }
-
- private void fillInformation(IProject p, Composite c) {
- try {
- if (EARNatureRuntime.hasRuntime(p)) {
- EARNatureRuntime nature = EARNatureRuntime.getRuntime(p);
- fillJ2EELevel(nature, c);
- } else if (EJBNatureRuntime.hasRuntime(p)) {
- fillEJBLevel(p, c);
- } else if (ApplicationClientNatureRuntime.hasRuntime(p)) {
- fillAppClientLevel(p, c);
- } else if (ConnectorNatureRuntime.hasRuntime(p)) {
- fillConnectorLevel(p, c);
- }
- //Do: need to rework based on Module
- //else if (J2EEWebNatureRuntime.hasRuntime(p)) {
- //fillWebLevel(p, c);
- //}
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @param p
- * @param c
- */
- private void fillWebLevel(IProject p, Composite c) {
- int servletVersion = getModuleServletVersion();
-
- //fillJ2EELevel(nature,c);
- Label label = new Label(c, SWT.NONE);
- //label.setText(WEB_LEVEL + " " + nature.getModuleVersionText()); //$NON-NLS-1$
- label.setText(WEB_LEVEL + " " + getModuleServletVersion()); //$NON-NLS-1$
- String moduleDesc = null;
- //switch (nature.getModuleVersion()) {
- switch ( servletVersion ) {
- case J2EEVersionConstants.WEB_2_2_ID :
- moduleDesc = WEB_22_DESCRIPTION;
- break;
- case J2EEVersionConstants.WEB_2_3_ID :
- moduleDesc = WEB_23_DESCRIPTION;
- break;
- case J2EEVersionConstants.WEB_2_4_ID :
- default :
- moduleDesc = WEB_24_DESCRIPTION;
- break;
- }
- fillDescription(c, moduleDesc);
- fillContextRoot(p, c);
- fillWebContentFolderName(p, c);
- }
-
-
- /**
- * @param p
- * @param c
- */
- private void fillWebContentFolderName(IProject p, Composite c) {
- // TODO Auto-generated method stub
- Label webContentFolderLabel = new Label(c, SWT.NULL);
- webContentFolderLabel.setText(WEB_CONTENT_FOLDER_NAME);
- GridData data = new GridData();
- data.horizontalIndent = 15;
- webContentFolderLabel.setLayoutData(data);
-
- webContentFolderField = new Text(c, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- webContentFolderField.setLayoutData(data);
- webContentFolderField.setEditable(true);
-
- String s = getModuleServerRoot().getName();
- webContentFolderField.setText(s);
-
- webContentFolderField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String newWebContent = webContentFolderField.getText();
- validateWebContentName(newWebContent);
- }
- });
-
- }
-
- private void fillContextRoot(IProject p, Composite c) {
- Label contextRootLabel = new Label(c, SWT.NULL);
- contextRootLabel.setText(WEB_CONTEXT_ROOT);
- GridData data = new GridData();
- data.horizontalIndent = 15;
- contextRootLabel.setLayoutData(data);
-
- contextRootNameField = new Text(c, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- contextRootNameField.setLayoutData(data);
- contextRootNameField.setEditable(true);
-
- String s = getModuleContextRoot();
- contextRootNameField.setText(s);
-
- contextRootNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- String newContextRoot = contextRootNameField.getText();
- validateContextRoot(newContextRoot);
- }
- });
- }
-
- /**
- * @param p
- * @param c
- */
- private void fillConnectorLevel(IProject p, Composite c) {
- ConnectorNatureRuntime nature = ConnectorNatureRuntime.getRuntime(p);
- //fillJ2EELevel(nature, c);
- Label label = new Label(c, SWT.NONE);
- label.setText(CONNECTOR_LEVEL + " " + nature.getModuleVersionText()); //$NON-NLS-1$
- String moduleDesc = null;
- switch (nature.getModuleVersion()) {
- case J2EEVersionConstants.JCA_1_0_ID :
- moduleDesc = CONNECTOR_10_DESCRIPTION;
- break;
- case J2EEVersionConstants.JCA_1_5_ID :
- default :
- moduleDesc = CONNECTOR_15_DESCRIPTION;
- break;
- }
- fillDescription(c, moduleDesc);
- }
-
- /**
- * @param p
- * @param c
- */
- private void fillAppClientLevel(IProject p, Composite c) {
- ApplicationClientNatureRuntime nature = ApplicationClientNatureRuntime.getRuntime(p);
- //fillJ2EELevel(nature, c);
- Label label = new Label(c, SWT.NONE);
- label.setText(APP_CLIENT_LEVEL + " " + nature.getModuleVersionText()); //$NON-NLS-1$
- String moduleDesc = null;
- switch (nature.getModuleVersion()) {
- case J2EEVersionConstants.J2EE_1_2_ID :
- moduleDesc = APP_CLIENT_12_DESCRIPTION;
- break;
- case J2EEVersionConstants.J2EE_1_3_ID :
- moduleDesc = APP_CLIENT_13_DESCRIPTION;
- break;
- case J2EEVersionConstants.J2EE_1_4_ID :
- default :
- moduleDesc = APP_CLIENT_14_DESCRIPTION;
- break;
- }
- fillDescription(c, moduleDesc);
- }
-
- /**
- * @param p
- * @param c
- */
- private void fillEJBLevel(IProject p, Composite c) {
- EJBNatureRuntime nature = EJBNatureRuntime.getRuntime(p);
- //fillJ2EELevel(nature, c);
- Label label = new Label(c, SWT.NONE);
- label.setText(EJB_LEVEL + " " + nature.getModuleVersionText()); //$NON-NLS-1$
- String moduleDesc = null;
- switch (nature.getModuleVersion()) {
- case J2EEVersionConstants.EJB_1_1_ID :
- moduleDesc = EJB_11_DESCRIPTION;
- break;
- case J2EEVersionConstants.EJB_2_0_ID :
- moduleDesc = EJB_20_DESCRIPTION;
- break;
- case J2EEVersionConstants.EJB_2_1_ID :
- default :
- moduleDesc = EJB_21_DESCRIPTION;
- break;
- }
- fillDescription(c, moduleDesc);
- }
-
- private void fillDescription(Composite c, String s) {
- GridData data = new GridData();
- data.horizontalSpan = 2;
- data.horizontalIndent = 15;
- Label label = new Label(c, SWT.NONE);
- label.setLayoutData(data);
- label.setText(DESCRIPTION);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- data.horizontalSpan = 2;
- data.horizontalIndent = 15;
- data.widthHint = 250;
- data.heightHint = 70;
- Text text = new Text(c, SWT.V_SCROLL | SWT.BORDER | SWT.MULTI | SWT.WRAP);
- text.setLayoutData(data);
- text.setTextLimit(80);
- text.setSize(300, 120);
- text.setEditable(false);
- text.setText(s);
- }
-
- private void fillJ2EELevel(J2EENature nature, Composite c) {
- Label label = new Label(c, SWT.NONE);
- label.setText(J2EE_LEVEL + " " + nature.getJ2EEVersionText()); //$NON-NLS-1$
- String desc = null;
- switch (nature.getJ2EEVersion()) {
- case J2EEVersionConstants.J2EE_1_2_ID :
- desc = J2EE_12_DESCRIPTION;
- break;
- case J2EEVersionConstants.J2EE_1_3_ID :
- desc = J2EE_13_DESCRIPTION;
- break;
- case J2EEVersionConstants.J2EE_1_4_ID :
- default :
- desc = J2EE_14_DESCRIPTION;
- break;
- }
- fillDescription(c, desc);
- }
-
- private IProject getJ2EEProject() {
- if (project == null) {
- Object element = getElement();
- if (element == null) {
- return null;
- }
- if (element instanceof IProject) {
- project = isJ2EEProject((IProject) element) ? (IProject) element : null;
- return project;
- }
- return null;
- }
- return project;
- }
-
- private static boolean isJ2EEProject(IProject p) {
- return EARNatureRuntime.hasRuntime(p) || /* //To Do: need to rework based on Module J2EEWebNatureRuntime.hasRuntime(p) || */ EJBNatureRuntime.hasRuntime(p) || ApplicationClientNatureRuntime.hasRuntime(p) || ConnectorNatureRuntime.hasRuntime(p);
- }
-
-
-
- private IHeadlessRunnableWithProgress getWebPropertiesUpdateOperation() {
- IProject aProject = getJ2EEProject();
- wtWebProjectInfo.setProject(aProject);
- int servletLevel = getModuleServletVersion();
- int jspLevel = getModuleJSPVersion();
-
- if (getContextRoot() != null)
- wtWebProjectInfo.setContextRoot(getContextRoot());
- if (getModuleServerRootName() != null)
- wtWebProjectInfo.setWebContentName(getModuleServerRootName());
- wtWebProjectInfo.setJSPLevel(jspLevel);
- wtWebProjectInfo.setServletLevel(servletLevel);
-
- return new WebProjectPropertiesUpdateOperation(wtWebProjectInfo);
- }
-
- /**
- * @return
- */
- private String getModuleServerRootName() {
- return (webContentFolderField != null) ? webContentFolderField.getText() : null;
- }
-
- /**
- * @return
- */
- private String getContextRoot() {
- return (contextRootNameField != null) ? contextRootNameField.getText() : null;
- }
-
- protected boolean hasUpdatedInformation() {
- return hasContextRootChanged() || hasWebContentNameChanged();
-
- }
-
- private boolean hasContextRootChanged() {
- String oldContextRoot = getModuleContextRoot();
- return oldContextRoot == null || !oldContextRoot.equals(getContextRoot());
- }
-
- private boolean hasWebContentNameChanged() {
- String oldWebContentName = getModuleServerRoot().getName();
- return oldWebContentName == null || !oldWebContentName.equals(getModuleServerRootName());
- }
-
- protected void performDefaults() {
- super.performDefaults();
-
- String contextRoot = getModuleContextRoot();
- String moduleServerRoot = getModuleServerRoot().getName();
-
- if (contextRootNameField != null)
- contextRootNameField.setText(contextRoot);
-
- if (webContentFolderField != null)
- webContentFolderField.setText(moduleServerRoot);
- }
-
- public boolean performOk() {
- boolean retVal = true;
- //IProject aProject = getJ2EEProject();
- // if the project isn't open, OK worked.
-
- //To Do: need to rework based on Module
-
- /*
- if ( J2EEWebNatureRuntime.hasRuntime(aProject)) {
- WorkspaceModifyComposedOperation composedOp = new WorkspaceModifyComposedOperation();
- if (hasUpdatedInformation()) {
- IHeadlessRunnableWithProgress runnable = getWebPropertiesUpdateOperation();
- IRunnableWithProgress op = new RunnableWithProgressWrapper(runnable);
- composedOp.addRunnable(op);
- Shell shell = getControl().getShell();
- try {
- // perform a validateEdit to make sure we can write to the WebSettings file.
- WebSettingsStateInputProvider wssip = new WebSettingsStateInputProvider(aProject);
- ResourceStateValidatorImpl rsvi = new ResourceStateValidatorImpl(wssip);
- ValidateEditListener vel = new ValidateEditListener(null, rsvi);
- vel.setShell(shell);
- if (!vel.validateState().isOK())
- return false;
- new ProgressMonitorDialog(shell).run(false, true, composedOp);
- } catch (InvocationTargetException e) {
- Throwable t = e.getTargetException();
- if (t instanceof CoreException) {
- ErrorDialog.openError(getShell(), IDEWorkbenchMessages.getString("InternalError"), //$NON-NLS-1$
- e.getLocalizedMessage(), ((CoreException) t).getStatus());
- return false;
- }
- Logger.getLogger().logError(e);
- e.printStackTrace();
- return false;
- } catch (InterruptedException e) {
- // cancelled
- return false;
- }
- }
- } */
- return retVal;
- }
-
- public void validateWebContentName(String name) {
- String msg = WebPropertiesUtil.validateWebContentName(this.getModuleServerRootName(), getJ2EEProject(), null);
- if (msg != null) {
- setValid(false);
- setErrorMessage(msg);
- } else {
- setValid(true);
- setErrorMessage(null);
- }
- }
-
-
-
- public void validateContextRoot(String name) {
- boolean bValid = true;
- if (name == null || name.length() == 0) { //$NON-NLS-1$
- // this was added because the error message shouldnt be shown initially. It should be
- // shown only if context
- // root field is edited to
- this.setErrorMessage(ProjectSupportResourceHandler.getString("Context_Root_cannot_be_empty_2")); //$NON-NLS-1$
- bValid = false;
- }
-
- if (name.trim().equals(name)) {
- StringTokenizer stok = new StringTokenizer(name, "."); //$NON-NLS-1$
- outer : while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- for (int i = 0; i < token.length(); i++) {
- if (!(token.charAt(i) == '_') && !(token.charAt(i) == '-') && !(token.charAt(i) == '/') && Character.isLetterOrDigit(token.charAt(i)) == false) {
- if (Character.isWhitespace(token.charAt(i)) == false) {
- this.setErrorMessage(ProjectSupportResourceHandler.getString("The_character_is_invalid_in_a_context_root", new Object[]{(new Character(token.charAt(i))).toString()})); //$NON-NLS-1$
- bValid = false;
- }
- }
- }
- }
- } // en/ end of if(name.trim
- else {
- this.setErrorMessage(ProjectSupportResourceHandler.getString("Names_cannot_begin_or_end_with_whitespace_5")); //$NON-NLS-1$
- bValid = false;
- }
- if (bValid)
- this.setErrorMessage(null);
- this.setValid(bValid);
-
- }
-
-
- protected String getModuleContextRoot() {
- //TODO can't assume one module per project
-// WebArtifactEdit webEdit = null;
-// try{
-// webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
-// if (webEdit != null) {
-// return webEdit.getServerContextRoot();
-// }
-// } finally{
-// if( webEdit != null )
-// webEdit.dispose();
-// }
- return null;
- }
-
- protected IContainer getModuleServerRoot() {
- return WebPropertiesUtil.getModuleServerRoot(project);
- }
-
- protected int getModuleServletVersion() {
- //TODO can't assume one module per project
-// WebArtifactEdit webEdit = null;
-// try{
-// webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
-// if (webEdit != null) {
-// return webEdit.getServletVersion();
-// }
-// } finally{
-// if( webEdit != null )
-// webEdit.dispose();
-// }
- return J2EEVersionConstants.SERVLET_2_2;
- }
-
- protected int getModuleJSPVersion() {
- //TODO can't assume one module per project
-// WebArtifactEdit webEdit = null;
-// try{
-// webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
-// if (webEdit != null) {
-// return webEdit.getJSPVersion();
-// }
-// } finally{
-// if( webEdit != null )
-// webEdit.dispose();
-// }
- return J2EEVersionConstants.SERVLET_2_2;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java
deleted file mode 100644
index c82efaee6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.jar.Manifest;
-
-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.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jem.util.emf.workbench.JavaProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModel;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModelEvent;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModelListener;
-import org.eclipse.jst.j2ee.internal.common.operations.UpdateJavaBuildPathOperation;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.listeners.IValidateEditListener;
-import org.eclipse.jst.j2ee.internal.listeners.ValidateEditListener;
-import org.eclipse.jst.j2ee.internal.project.J2EENature;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-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.Group;
-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.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.wst.common.frameworks.internal.operations.IHeadlessRunnableWithProgress;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-import org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class JARDependencyPropertiesPage extends PropertyPage implements IClasspathTableOwner, Listener, ClasspathModelListener, ICommonManifestUIConstants {
-
- protected IProject project;
- protected IOException caughtManifestException;
- protected boolean isDirty;
- protected Text classPathText;
- protected Text projectNameText;
- protected ClasspathModel model;
- protected CCombo availableAppsCombo;
- protected ClasspathTableManager tableManager;
- protected IValidateEditListener validateEditListener;
-
- /**
- * Constructor for JARDependencyPropertiesPage.
- */
- public JARDependencyPropertiesPage() {
- super();
- }
-
- protected void initialize() {
- project = (IProject) getElement().getAdapter(IResource.class);
- model = new ClasspathModel(null);
- model.setProject(project);
- model.addListener(this);
- updateModelManifest();
- initializeValidateEditListener();
- }
-
- private void updateModelManifest() {
- if (JavaProjectUtilities.isBinaryProject(project) || model.getAvailableEARNatures().length == 0)
- return;
-
- IContainer root = null;
- IFile manifestFile = null;
- J2EENature nature = J2EENature.getRegisteredRuntime(project);
- if (nature != null)
- root = nature.getEMFRoot();
- else
- root = JavaProjectUtilities.getSourceFolderOrFirst(project, null);
-
- if (root != null)
- manifestFile = root.getFile(new Path(J2EEConstants.MANIFEST_URI));
-
- if (manifestFile == null || !manifestFile.exists())
- return;
-
- InputStream in = null;
- try {
- in = manifestFile.getContents();
- ArchiveManifest mf = new ArchiveManifestImpl(new Manifest(in));
- model.primSetManifest(mf);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- model.primSetManifest(new ArchiveManifestImpl());
- } catch (IOException iox) {
- Logger.getLogger().logError(iox);
- model.primSetManifest(new ArchiveManifestImpl());
- caughtManifestException = iox;
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException weTried) {
- //Ignore
- }
- }
- }
- }
-
- protected void initializeValidateEditListener() {
- validateEditListener = new ValidateEditListener(null, model);
- validateEditListener.setShell(getShell());
- }
-
- /**
- * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- if (visible && caughtManifestException != null && !model.isDirty())
- ManifestErrorPrompter.showManifestException(getShell(), ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE, false, caughtManifestException);
-
- }
-
- /**
- * @see PreferencePage#createContents(Composite)
- */
- protected Control createContents(Composite parent) {
- initialize();
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- createProjectLabelsGroup(composite);
- createListGroup(composite);
- createTextGroup(composite);
- refresh();
-
- return composite;
- }
-
- protected void createProjectLabelsGroup(Composite parent) {
-
- Composite labelsGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- labelsGroup.setLayout(layout);
- labelsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label label = new Label(labelsGroup, SWT.NONE);
- label.setText(ManifestUIResourceHandler.getString("Project_name__UI_")); //$NON-NLS-1$ = "Project name:"
-
- projectNameText = new Text(labelsGroup, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- projectNameText.setEditable(false);
- projectNameText.setLayoutData(data);
- projectNameText.setText(project.getName());
-
- label = new Label(labelsGroup, SWT.NONE);
- label.setText(ManifestUIResourceHandler.getString("EAR_Project_Name__UI__UI_")); //$NON-NLS-1$ = "EAR project name:"
-
- availableAppsCombo = new CCombo(labelsGroup, SWT.READ_ONLY | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- availableAppsCombo.setLayoutData(gd);
-
- availableAppsCombo.addListener(SWT.Selection, this);
-
- }
-
- protected void createListGroup(Composite parent) {
- Composite listGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- listGroup.setLayout(layout);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.horizontalIndent = 5;
- listGroup.setLayoutData(gData);
-
- Label label = new Label(listGroup, SWT.NONE);
- gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- label.setText(ManifestUIResourceHandler.getString("Available_dependent_JARs__UI_")); //$NON-NLS-1$ = "Available dependent JARs:"
- label.setLayoutData(gData);
- createTableComposite(listGroup);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.j2ee.common.ui.classpath.IClasspathTableOwner#createGroup(org.eclipse.swt.widgets.Composite)
- */
- public Group createGroup(Composite parent) {
- return new Group(parent, SWT.NULL);
- }
-
- protected void createTextGroup(Composite parent) {
- Composite textGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- textGroup.setLayout(layout);
- textGroup.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL));
-
- Label label = new Label(textGroup, SWT.NONE);
- label.setText(ManifestUIResourceHandler.getString("Manifest_Class-Path__UI_")); //$NON-NLS-1$ = "Manifest Class-Path:"
-
- createClassPathText(textGroup);
- }
-
- protected void createClassPathText(Composite textGroup) {
- classPathText = new Text(textGroup, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.widthHint = 400;
- gData.heightHint = 100;
- classPathText.setLayoutData(gData);
- classPathText.setEditable(false);
- }
-
- protected void createTableComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gData);
- tableManager = new ClasspathTableManager(this, model, validateEditListener);
- tableManager.setReadOnly(isReadOnly());
- tableManager.fillComposite(composite);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.j2ee.common.ui.classpath.IClasspathTableOwner#createHideEJBClientJARsButton(org.eclipse.swt.widgets.Composite)
- */
- public Button createHideEJBClientJARsButton(Composite parent) {
- return new Button(parent, SWT.CHECK);
- }
-
- /**
- * @see IClasspathTableOwner#createAvailableJARsViewer(Composite)
- */
- public CheckboxTableViewer createAvailableJARsViewer(Composite parent) {
- int flags = SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI;
-
- Table table = new Table(parent,flags);
- CheckboxTableViewer availableJARsViewer = new CheckboxTableViewer(table);
-
- // set up table layout
- TableLayout tableLayout = new org.eclipse.jface.viewers.TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(200, true));
- tableLayout.addColumnData(new ColumnWeightData(200, true));
- table.setLayout(tableLayout);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- availableJARsViewer.setSorter(null);
-
- // table columns
- TableColumn fileNameColumn = new TableColumn(table, SWT.NONE, 0);
- fileNameColumn.setText(ManifestUIResourceHandler.getString("JAR/Module_UI_")); //$NON-NLS-1$
- fileNameColumn.setResizable(true);
-
- TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(ManifestUIResourceHandler.getString("Project_UI_")); //$NON-NLS-1$ = "Project"
- projectColumn.setResizable(true);
- tableLayout.layout(table, true);
- return availableJARsViewer;
-
- }
-
- /**
- * @see IClasspathTableOwner#createButtonColumnComposite(Composite)
- */
- public Composite createButtonColumnComposite(Composite parent) {
- Composite buttonColumn = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- buttonColumn.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
- buttonColumn.setLayoutData(data);
- return buttonColumn;
- }
-
- /**
- * @see IClasspathTableOwner
- */
- public Button primCreatePushButton(String label, Composite buttonColumn) {
- Button aButton = new Button(buttonColumn, SWT.PUSH);
- aButton.setText(label);
- return aButton;
- }
-
- /**
- * @see IClasspathTableOwner
- */
- public Button primCreateRadioButton(String label, Composite parent) {
- Button aButton = new Button(parent, SWT.RADIO);
- aButton.setText(label);
- return aButton;
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == availableAppsCombo)
- availableAppsSelected(event);
- }
- protected void availableAppsSelected(Event event) {
- int index = availableAppsCombo.getSelectionIndex();
- model.selectEAR(index);
- }
- protected void populateApps() {
- EARNatureRuntime[] natures = model.getAvailableEARNatures();
- String[] values = new String[natures.length];
- for (int i = 0; i < natures.length; i++) {
- values[i] = natures[i].getProject().getName();
- }
- availableAppsCombo.setItems(values);
- EARNatureRuntime selected = model.getSelectedEARNature();
- if (selected != null) {
- int index = Arrays.asList(natures).indexOf(selected);
- availableAppsCombo.select(index);
- } else
- availableAppsCombo.clearSelection();
- }
-
- /**
- * Checks if the any associations with ear, if not display an error.
- */
- protected void checkForEar() {
- if (availableAppsCombo.getItemCount() == 0) {
- setErrorMessage(ClasspathModel.NO_EAR_MESSAGE);
- } else {
- setErrorMessage(null);
- } // if
- } // checkForEar
-
- protected void refresh() {
- populateApps();
- tableManager.refresh();
- refreshText();
- checkForEar();
- }
-
- public void refreshText() {
- ClassPathSelection sel = model.getClassPathSelection();
- classPathText.setText(sel == null ? "" : sel.toString()); //$NON-NLS-1$
- }
-
- /**
- * @see ClasspathModelListener#modelChanged(ClasspathModelEvent)
- */
- public void modelChanged(ClasspathModelEvent evt) {
- if (evt.getEventType() == ClasspathModelEvent.CLASS_PATH_CHANGED) {
- isDirty = true;
- refreshText();
- } else if (evt.getEventType() == ClasspathModelEvent.EAR_PROJECT_CHANGED)
- tableManager.refresh();
- }
-
- /**
- * @see PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- model.resetClassPathSelection();
- refresh();
- isDirty = false;
- }
-
- /**
- * @see IPreferencePage#performOk()
- */
- public boolean performOk() {
- if (!isDirty)
- return true;
- WorkspaceModifyComposedOperation composed = new WorkspaceModifyComposedOperation(createManifestOperation());
- IHeadlessRunnableWithProgress pathOp = createBuildPathOperation();
- composed.addRunnable(WTPUIPlugin.getRunnableWithProgress(pathOp));
- try {
- new ProgressMonitorDialog(getShell()).run(true, true, composed);
- } catch (InvocationTargetException ex) {
- String title = ManifestUIResourceHandler.getString("An_internal_error_occurred_ERROR_"); //$NON-NLS-1$
- String msg = title;
- if (ex.getTargetException() != null && ex.getTargetException().getMessage() != null)
- msg = ex.getTargetException().getMessage();
- MessageDialog.openError(this.getShell(), title, msg);
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- return false;
- } catch (InterruptedException e) {
- // cancelled
- return false;
- }
- isDirty = false;
- return true;
- }
- protected IHeadlessRunnableWithProgress createBuildPathOperation() {
- IJavaProject javaProject = JavaProjectUtilities.getJavaProject(project);
- return new UpdateJavaBuildPathOperation(javaProject, model.getClassPathSelection());
- }
- protected UpdateManifestOperation createManifestOperation() {
- return new UpdateManifestOperation(project.getName(), model.getClassPathSelection().toString(), true);
- }
-
- protected boolean isReadOnly() {
- return JavaProjectUtilities.isBinaryProject(project);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java
deleted file mode 100644
index f18b1204c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ManifestErrorPrompter implements ICommonManifestUIConstants {
-
- /**
- * Constructor for ManifestErrorPrompter.
- */
- private ManifestErrorPrompter() {
- super();
- }
-
- public static boolean showManifestException(Shell shell, String baseMessage, boolean includeCancel, Throwable caught) {
- StringBuffer msg = new StringBuffer(baseMessage);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_1);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_2);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_3);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_4);
- return ErrorDialog.openError(shell,
- ERROR_READING_MANIFEST_DIALOG_TITLE,
- msg.toString(),
- caught,
- 0, includeCancel);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java
deleted file mode 100644
index 9d32806c6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ManifestUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("manifest_ui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String) will return the key
- // it was called with
- }
- return null;
- }
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle= getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-public static String getString(String key, Object[] args) {
-
- try {return MessageFormat.format(getString(key), args);}
- catch (IllegalArgumentException e) {return getString(key);}
-
-}
- public static String getString(String key, Object[] args, int x) {
-
- return getString(key);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java
deleted file mode 100644
index 155103334..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class UpdateManifestOperation implements org.eclipse.jface.operation.IRunnableWithProgress {
- protected String projectName;
- protected String classPathValue;
- protected boolean replace;
-/**
- * UpdateManifestOperation constructor comment.
- */
-public UpdateManifestOperation(String aProjectName, String aSpaceDelimitedPath, boolean replaceInsteadOfMerge) {
- super();
- projectName = aProjectName;
- classPathValue = aSpaceDelimitedPath;
- replace = replaceInsteadOfMerge;
-}
-protected IProject getProject() {
- return J2EEPlugin.getWorkspace().getRoot().getProject(projectName);
-}
-/**
- * Runs this operation. Progress should be reported to the given progress monitor.
- * This method is usually invoked by an <code>IRunnableContext</code>'s <code>run</code> method,
- * which supplies the progress monitor.
- * A request to cancel the operation should be honored and acknowledged
- * by throwing <code>InterruptedException</code>.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @exception InvocationTargetException if the run method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- *
- * @see IRunnableContext#run
- */
-public void run(org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, InterruptedException {
- IProject p = getProject();
- try {
- ArchiveManifest mf = J2EEProjectUtilities.readManifest(p);
- if (mf == null)
- mf = new ArchiveManifestImpl();
- mf.addVersionIfNecessary();
- if (replace)
- mf.setClassPath(classPathValue);
- else
- mf.mergeClassPath(ArchiveUtil.getTokens(classPathValue));
- J2EEProjectUtilities.writeManifest(p, mf);
- } catch (java.io.IOException ex) {
- throw new WFTWrappedException(ex);
- }
-}
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebSettingsStateInputProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebSettingsStateInputProvider.java
deleted file mode 100644
index b53f7a2e5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebSettingsStateInputProvider.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Aug 3, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.internal.project.IWebNatureConstants;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateInputProvider;
-
-
-/**
- * @author Administrator
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebSettingsStateInputProvider implements ResourceStateInputProvider {
- protected IProject project = null;
-
- /**
- * Constructor for WebSettingsStateInputProvider.
- */
- public WebSettingsStateInputProvider(IProject theProject) {
- super();
- project = theProject;
- }
-
- /**
- * @see ResourceStateInputProvider#isDirty()
- */
- public boolean isDirty() {
- return false;
- }
-
- /**
- * @see ResourceStateInputProvider#getResources()
- */
- public List getResources() {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @see com.ibm.etools.emf.workbench.ResourceStateInputProvider#getNonResourceFiles()
- */
- public List getNonResourceFiles() {
- IFile aFile = project.getFile(IWebNatureConstants.WEBSETTINGS_FILE_NAME);
- return Collections.singletonList(aFile);
- }
-
- /**
- * @see ResourceStateInputProvider#getNonResourceInconsistentFiles()
- */
- public List getNonResourceInconsistentFiles() {
- return null;
- }
-
- /**
- * @see ResourceStateInputProvider#cacheNonResourceValidateState(List)
- */
- public void cacheNonResourceValidateState(List arg0) {
- //Do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java
deleted file mode 100644
index d53efb2bd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Created on Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class WorkspaceModifyComposedOperation extends org.eclipse.ui.actions.WorkspaceModifyOperation {
-
- protected List fRunnables;
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule) {
- super(rule);
- }
-
- /**
- * Creates a new operation which will delegate its work to the given runnable.
- */
- public WorkspaceModifyComposedOperation() {
- super();
- }
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule, List nestedRunnablesWithProgress) {
- super(rule);
- fRunnables = nestedRunnablesWithProgress;
- }
-
- public WorkspaceModifyComposedOperation(List nestedRunnablesWithProgress) {
- super();
- fRunnables = nestedRunnablesWithProgress;
- }
-
- /**
- * Creates a new operation which will delegate its work to the given runnable.
- *
- * @param content
- * the runnable to delegate to when this operation is executed
- */
- public WorkspaceModifyComposedOperation(IRunnableWithProgress nestedOp) {
- super();
- getRunnables().add(nestedOp);
- }
-
- public boolean addRunnable(IRunnableWithProgress nestedOp) {
- return getRunnables().add(nestedOp);
- }
-
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- int size = fRunnables.size();
- monitor.beginTask("", size);//$NON-NLS-1$
- for (int i = 0; i < fRunnables.size(); i++) {
- IRunnableWithProgress op = (IRunnableWithProgress) fRunnables.get(i);
- op.run(new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
- }
- }
-
- protected List getRunnables() {
- if (fRunnables == null)
- fRunnables = new ArrayList(3);
- return fRunnables;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java
deleted file mode 100644
index ee8d0b63c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public abstract class AbstractActionDelegate implements org.eclipse.ui.IActionDelegate {
- protected ISelection selection;
- protected boolean allowsMultiSelect = false;
- public static final Class IPROJECT_CLASS = IProject.class;
- private final static String ERROR_OCCURRED_TITLE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_TITLE"); //$NON-NLS-1$
- private final static String ERROR_OCCURRED_MESSAGE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_MESSAGE"); //$NON-NLS-1$
-
- /**
- * EditModuleDependencyAction constructor comment.
- */
- public AbstractActionDelegate() {
- super();
- }
-
- /**
- * Applicable only when this action does not allow multi select
- */
- protected IProject getProject() {
- return getProject(getSelectedElement());
- }
-
- protected List getProjects() {
- if ((selection == null) || !(selection instanceof IStructuredSelection))
- return Collections.EMPTY_LIST;
-
- List result = new ArrayList();
- IStructuredSelection struct = (IStructuredSelection) selection;
- Iterator it = struct.iterator();
- while (it.hasNext()) {
- IProject p = getProject(it.next());
- if (p != null)
- result.add(p);
- }
- return result;
- }
-
- protected IProject getProject(Object element) {
-
- if (isSupportedAction(element))
- return ProjectUtilities.getProject((EObject) element);
- else if (element instanceof IAdaptable)
- return (IProject) ((IAdaptable) element).getAdapter(IPROJECT_CLASS);
- else
- return null;
- }
-
- protected IStructuredSelection getStructuredSelection() {
- if ((selection == null) || !(selection instanceof IStructuredSelection))
- return null;
- else if (selection.isEmpty()) {
- selection = J2EEUIPlugin.getCurrentSelection();
- }
- return (IStructuredSelection) selection;
- }
-
- /*
- * Only return if there is exactly one item selected
- */
- protected Object getSelectedElement() {
- IStructuredSelection sel = getStructuredSelection();
- return sel == null ? null : sel.getFirstElement();
- }
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return J2EEUIPlugin.getActiveWorkbenchWindow();
- }
-
- /**
- * Can the receiver be executed for
- *
- * @element
- */
- protected abstract boolean isSupportedAction(Object element);
-
- /**
- * @deprecated use {@link #primRun(Shell)}
- */
- protected void primRun(IProject project, Shell shell) {
- //Deprecated
- }
-
- /**
- * Subclasses should override this instead of {@link #run(org.eclipse.jface.action.IAction)}
- */
- protected void primRun(Shell shell) {
- primRun(getProject(), shell);
- }
-
- /**
- * Performs this action.
- * <p>
- * This method is called when the delegating action has been triggered. Implement this method to
- * do the actual work.
- * </p>
- *
- * @param action
- * the action proxy that handles the presentation portion of the action
- */
- public void run(org.eclipse.jface.action.IAction action) {
-
- Shell shell = getWorkbenchWindow().getShell();
- setActionStateFromProjects(action);
- if (!action.isEnabled())
- MessageDialog.openInformation(shell, J2EEUIMessages.getResourceString("INFORMATION_UI_"), J2EEUIMessages.getResourceString("CHOSEN_OP_NOT_AVAILABLE")); //$NON-NLS-2$ = "The chosen operation is not currently available." //$NON-NLS-1$ = "Information"
- else {
- try {
- primRun(shell);
- } catch (Throwable t) {
- org.eclipse.jst.j2ee.internal.plugin.ErrorDialog.openError(shell, ERROR_OCCURRED_TITLE, ERROR_OCCURRED_MESSAGE, t, 0, false);
- }
- }
-
-
- }
-
- /**
- * Notifies this action delegate that the selection in the workbench has changed.
- * <p>
- * Implementers can use this opportunity to change the availability of the action or to modify
- * other presentation properties.
- * </p>
- *
- * @param action
- * the action proxy that handles presentation portion of the action
- * @param aSelection
- * the current selection in the workbench
- */
- public void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection aSelection) {
- this.selection = aSelection;
- setActionState(action);
- }
-
- protected void setActionState(IAction action) {
- if (allowsMultiSelect)
- setActionStateForMultiSelect(action);
- else
- setActionStateForSingleSelect(action);
- }
-
- protected void setActionStateForSingleSelect(IAction action) {
- IStructuredSelection sel = getStructuredSelection();
- if (sel == null || sel.size() != 1) {
- action.setEnabled(false);
- return;
- }
- setActionStateFromProjects(action);
- }
-
- protected void setActionStateForMultiSelect(IAction action) {
- setActionStateFromProjects(action);
- }
-
- protected void setActionStateFromProjects(IAction action) {
- IStructuredSelection sel = getStructuredSelection();
- boolean allOk = false;
- if (sel != null && !sel.isEmpty()) {
- allOk = true;
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- IProject project = getProject(o);
- if (project == null || !project.isOpen()) {
- allOk = false;
- break;
- }
- }
- }
- action.setEnabled(allOk);
- }
-
- /**
- * Returns the allowsMultiSelect.
- *
- * @return boolean
- */
- public boolean allowsMultiSelect() {
- return allowsMultiSelect;
- }
-
-
- /**
- * Sets the allowsMultiSelect.
- *
- * @param allowsMultiSelect
- * The allowsMultiSelect to set
- */
- public void setAllowsMultiSelect(boolean allowsMultiSelect) {
- this.allowsMultiSelect = allowsMultiSelect;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java
deleted file mode 100644
index 1dbce3ddc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IActionDelegate;
-
-
-public abstract class AbstractActionWithDelegate extends org.eclipse.ui.actions.SelectionListenerAction {
- protected IActionDelegate delegate;
-
- /**
- * EditModuleDependencyAction constructor comment.
- *
- * @param text
- * java.lang.String
- */
- public AbstractActionWithDelegate() {
- super("");//$NON-NLS-1$
- initLabel();
- initDelegate();
- }
-
- protected abstract IActionDelegate createDelegate();
-
- protected abstract String getLabel();
-
- protected void initDelegate() {
- delegate = createDelegate();
- }
-
- protected void initLabel() {
- setText(getLabel());
- }
-
- /**
- * Implementation of method defined on <code>IAction</code>.
- */
- public void run() {
- delegate.run(this);
- }
-
- /**
- * Updates this action in response to the given selection.
- * <p>
- * The <code>SelectionListenerAction</code> implementation of this method returns
- * <code>true</code>. Subclasses may extend to react to selection changes; however, if the
- * super method returns <code>false</code>, the overriding method must also return
- * <code>false</code>.
- * </p>
- *
- * @param selection
- * the new selection
- * @return <code>true</code> if the action should be enabled for this selection, and
- * <code>false</code> otherwise
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- delegate.selectionChanged(this, selection);
- return this.isEnabled();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java
deleted file mode 100644
index 71a917e88..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.SelectionListenerAction;
-
-/**
- * Action for opening a J2EE resource from the J2EE navigator.
- */
-public abstract class AbstractOpenAction extends SelectionListenerAction implements IActionDelegate2 {
- // //$NON-NLS-1$
- protected IEditorDescriptor currentDescriptor;
- protected Object srcObject;
-
- protected AbstractOpenAction(String text) {
- super(text);
- }
-
- protected static IEditorDescriptor findEditorDescriptor(String id) {
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- return registry.findEditor(id);
- }
-
- protected void setAttributesFromDescriptor() {
- if (currentDescriptor == null)
- return;
- setText(currentDescriptor.getLabel());
- setToolTipText(currentDescriptor.getLabel());
- setImageDescriptor(currentDescriptor.getImageDescriptor());
- }
-
- /**
- * The structured selection has changed in the workbench. Subclasses should override this method
- * to react to the change. Returns true if the action should be enabled for this selection, and
- * false otherwise.
- *
- * When this method is overridden, the super method must always be invoked. If the super method
- * returns false, this method must also return false.
- *
- * @param sel
- * the new structured selection
- */
- public boolean updateSelection(IStructuredSelection s) {
- srcObject = null;
- if (!super.updateSelection(s))
- return false;
-
- if (s.size() != 1)
- return false;
-
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- //Dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- //init
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
- * org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- runWithEvent(event);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- // TODO Auto-generated method stub
- run();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO HACK!
- updateSelection((IStructuredSelection) selection);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java
deleted file mode 100644
index 92895c868..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import java.util.Iterator;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-
-
-public abstract class AbstractOpenWizardAction extends org.eclipse.jface.action.Action {
- // //$NON-NLS-1$
-
- private IWorkbench fWorkbench;
-
- private Class[] fActivatedOnTypes;
-
- private boolean fAcceptEmptySelection;
-
- protected AbstractOpenWizardAction() {
- //Default constructor
- }
-
- public AbstractOpenWizardAction(IWorkbench workbench, String label, Class[] activatedOnTypes, boolean acceptEmptySelection) {
- super(label);
- fWorkbench = workbench;
- fActivatedOnTypes = activatedOnTypes;
- fAcceptEmptySelection = acceptEmptySelection;
- }
-
- public AbstractOpenWizardAction(IWorkbench workbench, String label, boolean acceptEmptySelection) {
- this(workbench, label, null, acceptEmptySelection);
- }
-
- public boolean canActionBeAdded() {
- ISelection selection = getCurrentSelection();
- if (selection == null || selection.isEmpty()) {
- return fAcceptEmptySelection;
- }
- if (fActivatedOnTypes != null) {
- if (selection instanceof IStructuredSelection) {
- return isEnabled(((IStructuredSelection) selection).iterator());
- }
- return false;
- }
- return true;
- }
-
- /**
- * Create the specific Wizard (to be implemented by a subclass)
- */
- abstract protected Wizard createWizard();
-
- protected IStructuredSelection getCurrentSelection() {
- IWorkbenchWindow window = J2EEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
-
- }
- return null;
- }
-
- protected IWorkbench getWorkbench() {
- return fWorkbench;
- }
-
- private boolean isEnabled(Iterator iter) {
- while (iter.hasNext()) {
- Object obj = iter.next();
- if (!isOfAcceptedType(obj) || !shouldAcceptElement(obj)) {
- return false;
- }
- }
- return true;
- }
-
- private boolean isOfAcceptedType(Object obj) {
- for (int i = 0; i < fActivatedOnTypes.length; i++) {
- if (fActivatedOnTypes[i].isInstance(obj)) {
- return true;
- }
- }
- return false;
- }
-
- protected String getDialogText() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_LBL);
- }
-
- /**
- * The user has invoked this action.
- */
- public void run() {
- Wizard wizard = createWizard();
- if (wizard instanceof IWorkbenchWizard) {
- IStructuredSelection sel = null;
- if (null != getCurrentSelection())
- sel = getCurrentSelection();
- else
- sel = new StructuredSelection();
- ((IWorkbenchWizard) wizard).init(J2EEUIPlugin.getDefault().getWorkbench(), sel);
- }
- if (WorkbenchActivityHelper.allowUseOf(wizard)) {
- IWorkbenchWindow window = J2EEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
- WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
- dialog.create();
- String text = getDialogText();
- if (null != text) {
- dialog.getShell().setText(text);
- }
- dialog.open();
- }
- }
-
- protected void setWorkbench(IWorkbench workbench) {
- fWorkbench = workbench;
- }
-
- /**
- * can be overridden to add more checks obj is guaranteed to be instance of one of the accepted
- * types
- */
- protected boolean shouldAcceptElement(Object obj) {
- return true;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java
deleted file mode 100644
index a87d22af7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-public abstract class AbstractOpenWizardWorkbenchAction extends AbstractOpenWizardAction implements org.eclipse.ui.IWorkbenchWindowActionDelegate {
- protected AbstractOpenWizardWorkbenchAction() {
- //Default
- }
-
- public AbstractOpenWizardWorkbenchAction(IWorkbench workbench, String label, Class[] activatedOnTypes, boolean acceptEmptySelection) {
- super(workbench, label, null, acceptEmptySelection);
- }
-
- public AbstractOpenWizardWorkbenchAction(IWorkbench workbench, String label, boolean acceptEmptySelection) {
- super(workbench, label, null, acceptEmptySelection);
- }
-
- /**
- * @see AbstractOpenWizardAction#dispose
- */
- public void dispose() {
- // do nothing.
- setWorkbench(null);
- }
-
- /**
- * @see AbstractOpenWizardAction#init
- */
- public void init(IWorkbenchWindow window) {
- setWorkbench(window.getWorkbench());
- }
-
- /**
- * @see IActionDelegate#run
- */
- public void run(IAction action) {
- run();
- }
-
- /**
- * @see IActionDelegate#selectionChanged
- */
- public void selectionChanged(IAction action, ISelection selection) {
- // do nothing. Action doesn't depend on selection.
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java
deleted file mode 100644
index 6880e605e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public abstract class BaseAction extends Action implements IActionDelegate {
-
- private final static String ERROR_OCCURRED_TITLE = "!!!!Error"; //$NON-NLS-1$
-
- private final static String ERROR_OCCURRED_MESSAGE = "!!@!!Error"; //$NON-NLS-1$
-
- protected IStructuredSelection selection = null;
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return J2EEUIPlugin.getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- public void setSelection(IStructuredSelection selection) {
- this.selection = selection;
- }
-
- public void run() {
- Shell shell = getWorkbenchWindow().getShell();
- if (null == selection) {
- ISelection autoselection = getWorkbenchWindow().getSelectionService().getSelection();
- if (autoselection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection) autoselection;
- }
-
- try {
- primRun(shell);
- this.selection = null;
- } catch (Throwable t) {
- ErrorDialog.openError(shell, ERROR_OCCURRED_TITLE, ERROR_OCCURRED_MESSAGE, t, 0, false);
- }
-
- }
-
- protected abstract void primRun(Shell shell);
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- //dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- //init
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection aSelection) {
- setSelection((IStructuredSelection) aSelection);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
- * org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java
deleted file mode 100644
index 250ac341f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-
-
-/**
- * Insert the type's description here. Creation date: (9/6/2001 12:23:02 PM)
- *
- * @author: Administrator
- */
-public interface IJ2EEUIContextIds {
-
- // common stuff
- public static final String ICON_DIALOG = J2EEUIPlugin.PLUGIN_ID + ""; //$NON-NLS-1$
- public static final String ADD_SECURITY_ROLE_WIZARD_1 = J2EEUIPlugin.PLUGIN_ID + ""; //$NON-NLS-1$
-
- //J2EE project view
- public static final String J2EE_PROEJCT_VIEW_P1 = "com.ibm.wtp.ui.ProjectNavigator"; //$NON-NLS-1$
-
- //jar dependency editor, page - 3 Pages
- public static final String JAR_DEPENDENCIES_EDITOR_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_JAR_DEPENDENCIES_EDITOR_PAGE1"; //$NON-NLS-1$
- public static final String JAR_DEPENDENCIES_EDITOR_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_JAR_DEPENDENCIES_EDITOR_PAGE2"; //$NON-NLS-1$
- public static final String JAR_DEPENDENCIES_EDITOR_P3 = J2EEUIPlugin.PLUGIN_ID + ".EJB_JAR_DEPENDENCIES_EDITOR_PAGE3"; //$NON-NLS-1$
- public static final String JAR_DEPENDENCIES_EDITOR_P4 = J2EEUIPlugin.PLUGIN_ID + ".EJB_JAR_DEPENDENCIES_EDITOR_PAGE4"; //$NON-NLS-1$
- public static final String JAR_DEPENDENCIES_EDITOR_P6 = J2EEUIPlugin.PLUGIN_ID + ".JAR_DEPENDENCIES_EDITOR_PAGE6"; //$NON-NLS-1$
-
- // New EAR project wizard, page 1
- public static final String NEW_EAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EAR_NEW_EAR_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_EAR_ADD_MODULES_PAGE = J2EEUIPlugin.PLUGIN_ID + ".NEW_EAR_ADD_MODULES_PAGE"; //$NON-NLS-1$
- public static final String EAR_NEW_MODULE_PROJECTS_PAGE = J2EEUIPlugin.PLUGIN_ID + ".EAR_NEW_MODULE_PROJECTS_PAGE"; //$NON-NLS-1$
-
- // New EJB project wizard, page - 3 Pages
- public static final String NEW_EJB_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_NEW_EJB_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_EJB_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_NEW_EJB_WIZARD_PAGE2"; //$NON-NLS-1$
- public static final String NEW_EJB_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".EJB_NEW_EJB_WIZARD_PAGE3"; //$NON-NLS-1$
-
- //New App Client project Wizard - 3 Pages
- public static final String NEW_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_NEW_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
-
- //Import App Client wizard - 3 Pages
- public static final String IMPORT_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_IMPORT_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
-
- public static final String IMPORT_RAR_WIZARD_PAGE = J2EEUIPlugin.PLUGIN_ID + ".IMPORT_RAR_WIZARD_PAGE"; //$NON-NLS-1$
- public static final String EXPORT_RAR_WIZARD_PAGE = J2EEUIPlugin.PLUGIN_ID + ".EXPORT_RAR_WIZARD_PAGE"; //$NON-NLS-1$
-
- //Import EJB wizard - 3 Pages
- public static final String IMPORT_EJB_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_IMPORT_EJB_WIZARD_PAGE1"; //$NON-NLS-1$
-
- //Import EAR Wizard - 3 Pages
- public static final String IMPORT_EAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EAR_IMPORT_EAR_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String IMPORT_EAR_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EAR_IMPORT_EAR_WIZARD_PAGE2"; //$NON-NLS-1$
- public static final String IMPORT_EAR_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".EAR_IMPORT_EAR_WIZARD_PAGE3"; //$NON-NLS-1$
- public static final String IMPORT_EAR_WIZARD_P4 = J2EEUIPlugin.PLUGIN_ID + ".EAR_IMPORT_EAR_WIZARD_PAGE4"; //$NON-NLS-1$
- //Export App Client Wizard - 1 Page
- public static final String EXPORT_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EXPORT_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
-
- //Delete Enterprise Bean Dialog
- public static final String DELETE_ENTERPRISE_BEAN_DIALOG = "org.eclipse.wst.common.generic.Delete"; //$NON-NLS-1$
-
- //Add Jar Wizard
- public static final String ADD_JAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_ADDJAR_PAGE1"; //$NON-NLS-1$
-
- //Export EJB Wizard - 1 Page
- public static final String EXPORT_EJB_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_EXPORT_PAGE1"; //$NON-NLS-1$
- //Export EAR Wizard - 1 Page
- public static final String EXPORT_EAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EAR_EXPORT_PAGE1"; //$NON-NLS-1$
- // New bean wizard, pages
- public static final String NEW_BEAN_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_NEWBEAN_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_BEAN_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".NEW_BEAN_WIZARD_TYPES_SELECTION"; //$NON-NLS-1$
- public static final String NEW_BEAN_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".NEW_BEAN_WIZARD_BEAN_CLASS_SETTINGS"; //$NON-NLS-1$
- public static final String NEW_BEAN_WIZARD_JAVA_CLASS_SETTINGS = J2EEUIPlugin.PLUGIN_ID + ".NEW_BEAN_WIZARD_JAVA_CLASS_SETTINGS"; //$NON-NLS-1 //$NON-NLS-1$
-
- public static final String ADD_CMP_ATTRIBUTE = J2EEUIPlugin.PLUGIN_ID + ".ADD_CMP_ATTRIBUTE"; //$NON-NLS-1$
-
- //Relationship Wizard
- public static final String RELATIONSHIP_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_RELATIONSHIP_PAGE1"; //$NON-NLS-1$
- public static final String RELATIONSHIP_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_RELATIONSHIP_PAGE2"; //$NON-NLS-1$
- //Add Environment Variable Wizard
- public static final String ENVIRONMENT_WIZARD = J2EEUIPlugin.PLUGIN_ID + ".EJBAPPCLIENT_ENVIRONMENT_WIZARD"; //$NON-NLS-1$
- //Add Client View
- public static final String CLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_CREATECLIENTVIEW_PAGE1"; //$NON-NLS-1$
- public static final String CLIENT_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_CREATECLIENTVIEW_PAGE2"; //$NON-NLS-1$
- //EJBQL Query for EJB 2.0
- public static final String QUERY_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_QUERY_PAGE1"; //$NON-NLS-1$
- public static final String QUERY_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_QUERY_PAGE2"; //$NON-NLS-1$
- //Add Security Role
- public static final String SECURITY_ROLE_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".SECURITY_ROLE_PAGE1"; //$NON-NLS-1$
- //Add Method Permission
- public static final String METHODS_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_METHODSPERMISSION_PAGE1"; //$NON-NLS-1$
- public static final String METHODS_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_METHODSPERMISSION_PAGE2"; //$NON-NLS-1$
- public static final String METHODS_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".EJB_METHODSPERMISSION_PAGE3"; //$NON-NLS-1$
- //Add Container Transaction
- public static final String TRANSACTION_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_METHODTRANSACTION_PAGE1"; //$NON-NLS-1$ //NF
- public static final String TRANSACTION_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_METHODTRANSACTION_PAGE2"; //$NON-NLS-1$
- //Add Exclude List
- public static final String EXCLUDE_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_EXCLUDE_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String EXCLUDE_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_EXCLUDE_WIZARD_PAGE2"; //$NON-NLS-1$
- //Add Reference
- public static final String REFERENCE_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String REFERENCE_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE2"; //$NON-NLS-1$
- public static final String REFERENCE_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE3"; //$NON-NLS-1$ //NF
- public static final String REFERENCE_WIZARD_P4 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE4"; //$NON-NLS-1$
- public static final String REFERENCE_WIZARD_P5 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE5"; //$NON-NLS-1$
- public static final String REFERENCE_WIZARD_P6 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE6"; //$NON-NLS-1$
- public static final String REFERENCE_WIZARD_P7 = J2EEUIPlugin.PLUGIN_ID + ".REFERENCE_WIZARD_PAGE7"; //$NON-NLS-1$
-
- //Add Security Identity (Bean Level)
- public static final String BEAN_SECURITY_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_BEANSECURITYWIZARD_PAGE1"; //$NON-NLS-1$
- public static final String BEAN_SECURITY_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".EJB_BEANSECURITYWIZARD_PAGE2"; //$NON-NLS-1$
-
- //Add Module
- public static final String ADD_MODULE_WIZARD = J2EEUIPlugin.PLUGIN_ID + ".EAR_ADDMODULEWIZARD_PAGE1"; //$NON-NLS-1$
- //Combine Roles
- public static final String COMBINE_ROLES_WIZARD_PAGE1 = J2EEUIPlugin.PLUGIN_ID + ".EAR_COMBINEROLESWIZARD_PAGE1"; //$NON-NLS-1$
- public static final String COMBINE_ROLES_WIZARD_PAGE2 = J2EEUIPlugin.PLUGIN_ID + ".EAR_COMBINEROLESWIZARD_PAGE2"; //$NON-NLS-1$
- //New Connector Project
- public static final String NEW_CONNECTOR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".JCA_NEWIZARD_PAGE1"; //$NON-NLS-1$
-
- // V5 application editor
- public static final String APP_EDITOR_OVERVIEW = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW"; //$NON-NLS-1$
- public static final String APP_EDITOR_OVERVIEW_ALERT = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW_ALERT"; //$NON-NLS-1$
- public static final String APP_EDITOR_OVERVIEW_GENERAL = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW_GENERAL"; //$NON-NLS-1$
- public static final String APP_EDITOR_OVERVIEW_MODULE = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW_MODULE"; //$NON-NLS-1$
- public static final String APP_EDITOR_OVERVIEW_SECURITY = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW_SECURITY"; //$NON-NLS-1$
- public static final String APP_EDITOR_OVERVIEW_ICON = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_OVERVIEW_ICON"; //$NON-NLS-1$
- public static final String APP_EDITOR_MODULE = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_MODULE"; //$NON-NLS-1$
- public static final String APP_EDITOR_MODULE_MODULE = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_MODULE_MODULE"; //$NON-NLS-1$
- public static final String APP_EDITOR_MODULE_UTILITY = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_MODULE_UTILITY"; //$NON-NLS-1$
- public static final String APP_EDITOR_SECURITY = J2EEUIPlugin.PLUGIN_ID + ".APP_EDITOR_SECURITY"; //$NON-NLS-1$
-
- // V5 application client editor
- public static final String APPCLIENT_EDITOR_OVERVIEW = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_ALERT = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_ALERT"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_GENERAL = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_GENERAL"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_ICON = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_ICON"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_REFERENCES = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_REFERENCES"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_ENV_VAR = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_ENV_VAR"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_CALLBACK = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_CALLBACK"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_REFERENCES = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_REFERENCES"; //$NON-NLS-1$
- public static final String APPCLIENT_EDITOR_OVERVIEW_MAINCLASS = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_OVERVIEW_MAINCLASS"; //$NON-NLS-1$
-
- // V5 EJB editor
- public static final String EJB_EDITOR_OVERVIEW = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_ALERT = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_ALERT"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_GENERAL = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_GENERAL"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_USAGE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_USAGE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_BEAN = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_BEAN"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_ASSEMBLY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_ASSEMBLY"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_EJBCLIENTJAR = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_EJBCLIENTJAR"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_REFERENCES = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_REFERENCES"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_ICON = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_ICON"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_RELATIONSHIP20 = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_RELATIONSHIP20"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_CMPFACTORY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_CMPFACTORY"; //$NON-NLS-1$
-
- public static final String EJB_EDITOR_BEAN = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_BEAN = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_BEAN"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_CLASS = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_CLASS"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_ENVVAR = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_ENVVAR"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_ICON = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_ICON"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_QUERY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_QUERY"; //$NON-NLS-1$
-
- public static final String EJB_EDITOR_ASSEMBLY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ASSEMBLY"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ASSEMBLY_SECURITY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ASSEMBLY_SECURITY"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ASSEMBLY_PERMISSION = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ASSEMBLY_PERMISSION"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ASSEMBLY_TRANSACTION = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ASSEMBLY_TRANSACTION"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ASSEMBLY_EXCLUDE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ASSEMBLY_EXCLUDE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_EJB_REFERENCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_EJB_REFERENCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_EJB_LOCAL_REFERENCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_EJB_LOCAL_REFERENCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_RES_REFERENCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_RES_REFERENCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_SEC_ROLE_REFERENCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_SEC_ROLE_REFERENCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_RES_ENV_REFERENCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_RES_ENV_REFERENCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ACCESS = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ACCESS"; //$NON-NLS-1$
-
- // V5 J2EE preference
- public static final String J2EE_PREFERENCE = J2EEUIPlugin.PLUGIN_ID + ".J2EE_PREFERENCE_PAGE"; //$NON-NLS-1$
-
- //1.1 Finder Descriptor
- public static final String FINDER_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".FINDER_WIZARD_P1"; //$NON-NLS-1$
- public static final String FINDER_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".FINDER_WIZARD_P2"; //$NON-NLS-1$
-
- public static final String EJBQL_METHOD_PARM_PAGE = J2EEUIPlugin.PLUGIN_ID + ".EJBQL_METHOD_PARM_PAGE"; //$NON-NLS-1$
- public static final String MDB_SETTINGS_PAGE = J2EEUIPlugin.PLUGIN_ID + ".MDB_SETTINGS_PAGE"; //$NON-NLS-1$
- public static final String MDB_TYPES_PAGE = J2EEUIPlugin.PLUGIN_ID + ".MDB_TYPES_PAGE"; //$NON-NLS-1$
-
- // TODO remove these constants
- public static final String APPCLIENT_EDITOR_SOURCE = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EDITOR_SOURCE"; //$NON-NLS-1$
- public static final String EJB_EDITOR_OVERVIEW_JARBINDING = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_OVERVIEW_JARBINDING"; //$NON-NLS-1$
- public static final String EJB_EDITOR_BEAN_EXTENSIONS = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_BEAN_EXTENSIONS"; //$NON-NLS-1$
- public static final String EJB_EDITOR_REFERENCES_EXTENSION = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_REFERENCES_EXTENSION"; //$NON-NLS-1$
- public static final String EJB_EDITOR_SOURCE = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_SOURCE"; //$NON-NLS-1$
- public static final String ACCESS_INTENT_1_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".ACCESS_INTENT_1_WIZARD_P3"; //$NON-NLS-1$
- public static final String ACCESS_INTENT_1_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".ACCESS_INTENT_1_WIZARD_P2"; //$NON-NLS-1$
- public static final String EJB_EDITOR_ACCESS_IDENTITY = J2EEUIPlugin.PLUGIN_ID + ".EJB_EDITOR_ACCESS_IDENTITY"; //$NON-NLS-1$
- public static final String JAR_DEPENDENCIES_EDITOR_P5 = J2EEUIPlugin.PLUGIN_ID + ".jard3000"; //$NON-NLS-1$
- public static final String NEW_CONNECTOR_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".conp2000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P1 = J2EEUIPlugin.PLUGIN_ID + ".exte1000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P2 = J2EEUIPlugin.PLUGIN_ID + ".exte2000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P3 = J2EEUIPlugin.PLUGIN_ID + ".exte3000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P4 = J2EEUIPlugin.PLUGIN_ID + ".exte4000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P5 = J2EEUIPlugin.PLUGIN_ID + ".exte5000"; //$NON-NLS-1$
- public static final String EXTENSION_EDITOR_P6 = J2EEUIPlugin.PLUGIN_ID + ".exte6000"; //$NON-NLS-1$
- public static final String METHOD_SECURITY_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".secm1000"; //$NON-NLS-1$
- public static final String METHOD_SECURITY_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".secm1100"; //$NON-NLS-1$
- public static final String NEW_APPCLIENT_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".appc2000"; //$NON-NLS-1$
- public static final String NEW_APPCLIENT_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".appc3000"; //$NON-NLS-1$
- public static final String IMPORT_APPCLIENT_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".iapp2000"; //$NON-NLS-1$
- public static final String IMPORT_APPCLIENT_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".iapp3000"; //$NON-NLS-1$
- public static final String IMPORT_EJB_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".iejb1500"; //$NON-NLS-1$
- public static final String IMPORT_EJB_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".iejb2000"; //$NON-NLS-1$
- public static final String APP_EDITOR_SECURITY_RUN_AS = J2EEUIPlugin.PLUGIN_ID + ".appe3200"; //$NON-NLS-1$
- public static final String APP_EDITOR_SOURCE = J2EEUIPlugin.PLUGIN_ID + ".appe4000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P1 = J2EEUIPlugin.PLUGIN_ID + ".ejbe1000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P2 = J2EEUIPlugin.PLUGIN_ID + ".ejbe2000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P3 = J2EEUIPlugin.PLUGIN_ID + ".ejbe3000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P4 = J2EEUIPlugin.PLUGIN_ID + ".ejbe4000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P5 = J2EEUIPlugin.PLUGIN_ID + ".ejbe5000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P6 = J2EEUIPlugin.PLUGIN_ID + ".ejbe6000"; //$NON-NLS-1$
- public static final String EJB_EDITOR_P7 = J2EEUIPlugin.PLUGIN_ID + ".ejbe7000"; //$NON-NLS-1$
- public static final String J2EE_HIERARCHY_VIEW_P1 = J2EEUIPlugin.PLUGIN_ID + ".J2EE_HIERARCHY_VIEW_P1"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java
deleted file mode 100644
index bab3bd3a9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 31, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.ClassesImportWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportClassesAction extends WTPBaseAction {
-
- public static String LABEL = J2EEUIMessages.getResourceString("Import_Classes"); //$NON-NLS-1$
-
- public ImportClassesAction() {
- super();
- setText(LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
- IProject project = ProjectUtilities.getProject(getSelection().getFirstElement());
- ClassesImportWizard wizard = new ClassesImportWizard(project);
-
-
- wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY);
- wizard.setDialogSettings(J2EEUIPlugin.getDefault().getDialogSettings());
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
-
- dialog.create();
- dialog.getShell().setSize(550, 550);
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java
deleted file mode 100644
index e123ed4fa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.internal.core.JavaProject;
-import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.internal.common.util.CommonUtil;
-import org.eclipse.jst.j2ee.internal.delete.DeleteModuleOperation;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.jst.j2ee.internal.dialogs.DeleteEARDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.DeleteModuleDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EEDeleteDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EEDeleteUIConstants;
-import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.ejb.project.EJBNatureRuntime;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.actions.DeleteResourceAction;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-public class J2EEDeleteAction extends SelectionDispatchAction implements J2EEDeleteUIConstants {
-
- protected Shell shell;
- //Used for EAR delete
- protected Set referencedProjects;
- protected List projects;
- protected DeleteOptions options;
- // added for IRefactoringAction behavior
- protected ISelectionProvider provider = null;
- protected DeleteModuleOperation deleteModuleOperation;
-
-
- /**
- * Constructor for DeleteModuleAction.
- *
- * @param text
- */
- public J2EEDeleteAction(IWorkbenchSite site, Shell parent) {
- super(site);
- setText(DELETE);
- shell = parent;
- }
-
- public J2EEDeleteAction(IWorkbenchSite site, ISelectionProvider newProvider) {
- super(site);
- setText(DELETE);
- shell = J2EEUIPlugin.getActiveWorkbenchWindow().getShell();
- provider = newProvider;
- }
-
- protected void reset() {
- referencedProjects = null;
- projects = null;
- options = null;
- if (deleteModuleOperation != null) {
- deleteModuleOperation.release();
- deleteModuleOperation = null;
- }
- }
-
- protected boolean getEnableStateBasedOnSelection(IStructuredSelection selection) {
- if (selection.isEmpty())
- return false;
- return isSelectionApplicable() && isSelectionSomeJ2EE();
- }
-
- /**
- * @see SelectionListenerAction#updateSelection(IStructuredSelection)
- */
- protected void updateSelection(IStructuredSelection selection) {
- update(selection);
- }
-
- protected boolean isSelectionApplicable() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isJ2EEModule(o) && !isApplication(o) && !isProjectOrJavaProject(o))
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionSomeJ2EE() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (isJ2EEModule(o) || isApplication(o))
- return true;
- }
- return false;
- }
-
-
- protected boolean isSelectionAllDDRoots() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isJ2EEModule(o))
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionAllApplications() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isApplication(o))
- return false;
- }
- return true;
- }
-
- protected boolean isJ2EEModule(Object o) {
- if (o instanceof WorkbenchComponent) {
- WorkbenchComponent module = (WorkbenchComponent) o;
- String moduleType = module.getComponentType().getComponentTypeId();
- //TODO need to add connector, app client, ear, ejb client
- return moduleType.equals(IModuleConstants.JST_WEB_MODULE) || moduleType.equals(IModuleConstants.JST_EJB_MODULE);
- }
- return CommonUtil.isDeploymentDescriptorRoot(o, false);
- }
-
- protected boolean isApplication(Object o) {
- return (o instanceof Application) || isJ2EEApplicationProject(o);
- }
-
- protected boolean isProjectOrJavaProject(Object o) {
- return (o instanceof IProject) || (o instanceof IJavaProject);
- }
-
- protected List getProjects() {
- if (projects == null) {
- projects = new ArrayList();
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator iterator = sel.iterator();
- IProject project = null;
- Object o = null;
- while (iterator.hasNext()) {
- o = iterator.next();
- if (o instanceof JavaProject)
- o = ((JavaProject) o).getProject();
- if (o instanceof IProject) {
- projects.add(o);
- addEJBClientProjectIfNecessary((IProject) o, projects);
- } else if (o instanceof EObject) {
- EObject obj = (EObject) o;
- project = ProjectUtilities.getProject(obj);
- if (project == null)
- throw new RuntimeException(J2EEUIMessages.getResourceString("Project_should_not_be_null_1_EXC_")); //$NON-NLS-1$
- projects.add(project);
- addEJBClientProjectIfNecessary(project, projects);
- } else {
- throw new RuntimeException(J2EEUIMessages.getResourceString("Non-project_in_selection_2_EXC_")); //$NON-NLS-1$
- }
- }
- }
- return projects;
- }
-
- /**
- * @param project
- * @param localProjects
- */
- private void addEJBClientProjectIfNecessary(IProject project, List localProjects) {
- EJBNatureRuntime nature = EJBNatureRuntime.getRuntime(project);
- if (nature != null && nature.hasEJBClientJARProject())
- localProjects.add(nature.getEJBClientJARProject());
- }
-
- /**
- * @see IAction#run()
- */
- public void run() {
- try {
- J2EEDeleteDialog dlg = null;
- if (isSelectionAllApplications())
- dlg = new DeleteEARDialog(shell, getReferencedProjects());
- else if (isSelectionAllDDRoots())
- dlg = new DeleteModuleDialog(shell);
- else {
- if (confirmStandardDelete())
- runResourceDeleteAction();
- return;
- }
-
- dlg.open();
- if (dlg.getReturnCode() == Window.CANCEL)
- return;
- options = dlg.getDeleteOptions();
- if (options != null)
- options.setSelectedProjects(getProjects());
- else
- return;
- if (!(ensureEditorsSaved() && validateState()))
- return;
- deleteProjectsIfNecessary();
- deleteMetadataIfNecessary();
- presentStatusIfNeccessary();
- } finally {
- reset();
- }
- }
-
- private boolean ensureEditorsSaved() {
- return CommonEditorUtility.promptToSaveAllDirtyEditors();
- }
-
- protected boolean confirmStandardDelete() {
- return MessageDialog.openConfirm(shell, DELETE_PROJECTS, CUSTOM_DELETE_MIX_MATCH);
- }
-
- protected Set getReferencedProjects() {
- if (referencedProjects == null)
- computeReferencedProjects();
- return referencedProjects;
- }
-
- protected void computeReferencedProjects() {
- getProjects();
- referencedProjects = new HashSet();
- for (int i = 0; i < projects.size(); i++) {
- IProject project = (IProject) projects.get(i);
- EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
- if (runtime == null)
- continue;
- EAREditModel editModel = runtime.getEarEditModelForRead(this);
- try {
- referencedProjects.addAll(editModel.getModuleMappedProjects());
- } finally {
- editModel.releaseAccess(this);
- }
- }
- }
-
- protected DeleteModuleOperation getDeleteModuleOperation() {
- if (deleteModuleOperation == null)
- deleteModuleOperation = new DeleteModuleOperation(options);
- return deleteModuleOperation;
- }
-
- protected void deleteMetadataIfNecessary() {
- if (!shouldDeleteMetaData())
- return;
-
- IRunnableWithProgress runnable = WTPUIPlugin.getRunnableWithProgress(getDeleteModuleOperation());
- ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(shell);
-
- try {
- monitorDialog.run(false, false, runnable);
- } catch (InvocationTargetException e) {
- handleException(e);
- } catch (InterruptedException e) {
- //Ignore
- }
- }
-
- protected boolean shouldDeleteMetaData() {
- if (deleteProjectsFailedOrCancelled())
- return false;
- return primShouldDeleteMetaData();
- }
-
- protected boolean primShouldDeleteMetaData() {
- return options != null && (options.shouldDeleteModules() || options.shouldDeleteModuleDependencies());
- }
-
- protected boolean deleteProjectsFailedOrCancelled() {
- if (options == null || !options.shouldDeleteProjects())
- return false;
- return deletedProjectsExist();
- }
-
- protected boolean deletedProjectsExist() {
- List deletedProjects = options.getAllProjectsToDelete();
- for (int i = 0; i < deletedProjects.size(); i++) {
- IProject project = (IProject) deletedProjects.get(i);
- if (project.exists())
- return true;
- }
- return false;
- }
-
- protected void deleteProjectsIfNecessary() {
- if (options.shouldDeleteProjects())
- runResourceDeleteAction();
- }
-
- protected void runResourceDeleteAction() {
- DeleteResourceAction action = new DeleteResourceAction(shell);
- List localProjects = null;
- if (options == null)
- localProjects = getProjects();
- else
- localProjects = options.getAllProjectsToDelete();
- Iterator it = localProjects.iterator();
- while (it.hasNext()) {
- IProject p = (IProject) it.next();
- if (!p.exists())
- it.remove();
- }
- IStructuredSelection sel = new StructuredSelection(localProjects);
- action.selectionChanged(sel);
- action.run();
- }
-
- public void handleException(InvocationTargetException e) {
- Logger.getLogger().logError(e);
- IStatus status = J2EEPlugin.newErrorStatus(IStatus.ERROR, DELETE_ERROR, e);
- ErrorDialog.openError(shell, DELETE_ERROR, DELETE_NOT_COMPLETED, status);
- }
-
- /**
- * Update the action's enable state according to the current selection of the used selection
- * provider.
- */
- public void update() {
- IStructuredSelection selection = null;
-
- if (provider != null) {
- selection = (IStructuredSelection) provider.getSelection();
- selectionChanged((ISelection) selection);
- } else {
- selection = (IStructuredSelection) getSelection();
-
- if (selection == null) {
- setEnabled(false);
- } else {
- updateSelection(selection);
- }
- }
- }
-
- protected boolean isJ2EEApplicationProject(Object o) {
- boolean retVal = false;
- if (o instanceof IProject) {
- IProject project = (IProject) o;
- if (EARNatureRuntime.hasRuntime(project))
- retVal = true;
- }
- return retVal;
- }
-
- protected void setEnabledFromSelection(IStructuredSelection selection) {
- if (selection == null) {
- setEnabled(false);
- } else {
- setEnabled(getEnableStateBasedOnSelection(selection));
- }
- }
-
- /**
- * @see SelectionDispatchAction#selectionChanged(ISelection)
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection)
- setEnabledFromSelection((IStructuredSelection) selection);
- else
- super.selectionChanged(selection);
- }
-
- protected boolean validateState() {
- // TODO Fix validateState
- // if (!primShouldDeleteMetaData())
- // return true;
- //
- // IValidateEditListener listener = new ValidateEditListener(null,
- // getDeleteModuleOperation().getDeleteEditModel());
- // listener.setShell(shell);
- // return listener.validateState().isOK();
- return true;
- }
-
- protected void presentStatusIfNeccessary() {
- IStatus status = null;
- if (deleteModuleOperation != null)
- status = deleteModuleOperation.getStatus();
-
- if (status == null || status.isOK())
- return;
-
- ErrorDialog.openError(shell, null, null, status, IStatus.ERROR);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java
deleted file mode 100644
index 83bd8c671..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Jun 16, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.wst.common.frameworks.internal.operation.extensionui.IActionWTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.operation.extensionui.WTPOperationDataModelUICreator;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEDeleteModuleActionPopulator implements WTPOperationDataModelUICreator {
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.operation.extension.ui.WTPOperationDataModelUICreator#createDataModel(java.lang.String,
- * java.lang.String, org.eclipse.jface.viewers.IStructuredSelection,
- * org.eclipse.ui.IWorkbenchSite)
- */
- public WTPOperationDataModel createDataModel(String extendedOperationId, String operationClass, IStructuredSelection selection, IWorkbenchSite site) {
- J2EEDeleteAction deleteAction = new J2EEDeleteAction(site, (ISelectionProvider) null);
- WTPOperationDataModel dataModel = IActionWTPOperationDataModel.createDataModel(deleteAction, selection, site.getSelectionProvider(), site.getShell());
- return dataModel;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java
deleted file mode 100644
index 95dc32fcf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 30, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jst.j2ee.internal.deploy.DeployerRegistry;
-import org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPluginResourceHandler;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.progress.IProgressService;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationJobAdapter;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class J2EEDeployAction extends BaseAction {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.ui.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
-
- if (isEnabled()) {
- J2EEDeployOperation op = new J2EEDeployOperation(selection.toArray());
- //IRunnableWithProgress runnable = WTPUIPlugin.getRunnableWithProgress(op);
- //J2EEDeployStatusDialog dialog = new
- // J2EEDeployStatusDialog(shell,op.getMultiStatus());
- WTPOperationJobAdapter jobAdapter = new WTPOperationJobAdapter(op);
- jobAdapter.setName(J2EEPluginResourceHandler.getString("J2EEDeployOperation_UI_0"));//$NON-NLS-1$
- IWorkbench workbench = J2EEUIPlugin.getDefault().getWorkbench();
- IProgressService progressService = workbench.getProgressService();
- jobAdapter.setPriority(Job.INTERACTIVE);
- progressService.showInDialog(workbench.getActiveWorkbenchWindow().getShell(), jobAdapter);
- jobAdapter.schedule();
- }
-
- }
-
- /*
- *
- */
- public J2EEDeployAction() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection aSelection) {
- // TODO Auto-generated method stub
- super.selectionChanged(action, aSelection);
- action.setEnabled(isEnabled());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.action.IAction#isEnabled()
- */
- public boolean isEnabled() {
-
- try {
- DeployerRegistry reg = DeployerRegistry.instance();
-
- List modules = DeployerRegistry.getSelectedModules(selection.toArray());
- for (int i = 0; i < modules.size(); i++) {
- EObject module = (EObject) modules.get(i);
- IProject proj = ProjectUtilities.getProject(module);
- IRuntime runtime = ServerCore.getProjectProperties(proj).getRuntimeTarget();
- if (proj == null || runtime == null)
- return false;
- List visitors = reg.getDeployModuleExtensions(module, runtime);
- if (!visitors.isEmpty())
- return true;
- }
- return false;
- } catch (RuntimeException e) {
- System.out.println("Deploy Action recovering from problem verifying enablement."); //$NON-NLS-1$
- e.printStackTrace();
- }
- return false;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java
deleted file mode 100644
index 421e770dd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Sep 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Collections;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.rename.RenameModuleOperation;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.resources.ComponentHandle;
-
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEModuleRenameChange extends Change {
-
- private String newName;
- private WorkbenchComponent target;
- private boolean renameDependencies;
-
- public J2EEModuleRenameChange(WorkbenchComponent target, String newName, boolean renameDependencies) {
- this.target = target;
- this.newName = newName;
- this.renameDependencies = renameDependencies;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#getName()
- */
- public String getName() {
- return J2EERenameUIConstants.RENAME_MODULES;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeValidationData(IProgressMonitor pm) {
- //Do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#isValid(org.eclipse.core.runtime.IProgressMonitor)
- */
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- if (target != null)
- return RefactoringStatus.create(Status.OK_STATUS);
- return RefactoringStatus.create(new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, "", null)); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change perform(IProgressMonitor pm) throws CoreException {
- try {
-
- RenameModuleOperation renameOp = new RenameModuleOperation(getRenameOptions());
- renameOp.run(pm);
-
- //String contextRoot = getServerContextRoot();
- // TODO fix up rename and context root operations
- //if (webNature != null) {
- //new UpdateWebContextRootMetadataOperation(newTarget, webNature.getContextRoot()).run(pm);
-// if(contextRoot.equals("") == false){ //$NON-NLS-1$
-// new UpdateWebContextRootMetadataOperation(target, contextRoot).run(pm);
-// } else if (J2EENature.getRegisteredRuntime(target) == null)
-// new RenameUtilityJarMetadataOperation(target, newTarget).run(pm);
- } catch (InvocationTargetException e) {
- //Ignore
- } catch (InterruptedException e) {
- //Ignore
- }
- return null;
- }
-
- protected String getServerContextRoot() {
- WebArtifactEdit webEdit = null;
- try{
- ComponentHandle handle = ComponentHandle.create(StructureEdit.getContainingProject(target),target.getName());
- webEdit = WebArtifactEdit.getWebArtifactEditForRead(handle);
- if (webEdit != null)
- return webEdit.getServerContextRoot();
- } finally {
- if (webEdit != null )
- webEdit.dispose();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @return
- */
- private RenameOptions getRenameOptions() {
- RenameOptions options = new RenameOptions();
- options.setNewName(this.newName);
- options.setSelectedProjects(Collections.singletonList(this.target));
- // TODO check module type for EAR type
- //options.setIsEARRename(EARNatureRuntime.getRuntime(this.target) != null);
- options.setRenameModuleDependencies(this.renameDependencies);
- options.setRenameModules(true);
- options.setRenameProjects(false);
- return options;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#getModifiedElement()
- */
- public Object getModifiedElement() {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java
deleted file mode 100644
index 7b8efc504..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.internal.common.util.CommonUtil;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.jst.j2ee.internal.dialogs.RenameModuleDialog;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.listeners.IValidateEditListener;
-import org.eclipse.jst.j2ee.internal.listeners.ValidateEditListener;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.rename.RenameModuleOperation;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.RenameResourceAction;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-
-public class J2EERenameAction extends SelectionDispatchAction implements J2EERenameUIConstants {
-
- protected Shell shell;
- //Used for EAR rename
- protected Set referencedProjects;
- protected List modules;
- protected RenameOptions options;
- // added for IRefactoringAction behavior
- protected ISelectionProvider provider = null;
- protected RenameModuleOperation renameModuleOperation = null;
-
- /**
- * Constructor for RenameModuleAction.
- *
- * @param text
- */
- public J2EERenameAction(IWorkbenchSite site, Shell parent) {
- super(site);
- setText(RENAME);
- shell = parent;
- }
-
- public J2EERenameAction(IWorkbenchSite site, ISelectionProvider newProvider) {
- super(site);
- setText(RENAME);
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- provider = newProvider;
- }
-
- protected void reset() {
- if (renameModuleOperation != null) {
- renameModuleOperation.release();
- renameModuleOperation = null;
- }
- referencedProjects = null;
- modules = null;
- options = null;
- }
-
- /**
- * @see SelectionListenerAction#updateSelection(IStructuredSelection)
- */
- protected void updateSelection(IStructuredSelection selection) {
- super.update(selection);
- }
-
- /**
- * @see SelectionDispatchAction#selectionChanged(ISelection)
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection)
- setEnabledFromSelection((IStructuredSelection) selection);
- else
- super.selectionChanged(selection);
- }
-
- protected void setEnabledFromSelection(IStructuredSelection selection) {
- if (selection == null) {
- setEnabled(false);
- } else {
- if (selection.toList().size() != 1) {
- setEnabled(false);
- } else {
- setEnabled(getEnableStateBasedOnSelection(selection));
- }
- }
- }
-
- protected boolean getEnableStateBasedOnSelection(IStructuredSelection selection) {
- if (selection.isEmpty())
- return false;
- return isSelectionAllDDRoots() || isSelectionAllApplications();
- }
-
- protected boolean isSelectionAllDDRoots() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- //TODO check for j2ee workbench module selection
- if (!CommonUtil.isDeploymentDescriptorRoot(o, false) /*&& !isJ2EEProject(o)*/)
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionAllApplications() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!(o instanceof Application) && !isJ2EEApplicationProject(o))
- return false;
- }
- return true;
- }
-
-
- protected List getModules() {
- if (modules == null) {
- modules = new ArrayList();
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator iterator = sel.iterator();
- WorkbenchComponent module = null;
- Object o = null;
- while (iterator.hasNext()) {
- o = iterator.next();
- if (o instanceof WorkbenchComponent) {
- modules.add(o);
- } else if (o instanceof EObject) {
- EObject obj = (EObject) o;
- IProject project = ProjectUtilities.getProject(obj);
- StructureEdit moduleCore = null;
- try {
- moduleCore = StructureEdit.getStructureEditForRead(project);
- URI uri = obj.eResource().getURI();
- ComponentResource[] resources = moduleCore.findResourcesBySourcePath(uri);
- for (int i=0; i<resources.length; i++) {
- module = resources[i].getComponent();
- if (module !=null)
- break;
- }
- if (module == null)
- throw new RuntimeException(J2EEUIMessages.getResourceString("Project_should_not_be_null_1_ERROR_")); //$NON-NLS-1$
- modules.add(module);
- } catch (UnresolveableURIException e) {
- //Ignore
- } finally {
- if (moduleCore !=null)
- moduleCore.dispose();
- }
- } else {
- throw new RuntimeException(J2EEUIMessages.getResourceString("Non-project_in_selection_2_ERROR_")); //$NON-NLS-1$
- }
- }
- }
- return modules;
- }
-
- /**
- * @see IAction#run()
- */
- public void run() {
- try {
- List localModules = getModules();
- if (localModules.size() != 1)
- return;
- WorkbenchComponent module = (WorkbenchComponent) localModules.get(0);
- J2EERenameDialog dlg = null;
-
- // if all we are doing is renaming an EAR, let the base platform do it
- if (isSelectionAllApplications()) {
- RenameResourceAction action = new RenameResourceAction(shell);
- action.selectionChanged(new StructuredSelection(module));
- action.run();
- } else {
- String contextRoot = ""; //$NON-NLS-1$
- //TODO add context root to the module model
- //contextRoot = module.getServerContextRoot();
- dlg = new RenameModuleDialog(shell, module.getName(), contextRoot);
- dlg.open();
- if (dlg.getReturnCode() == Window.CANCEL)
- return;
-
- options = dlg.getRenameOptions();
- if (options != null)
- options.setSelectedProjects(localModules);
-
- if (!(ensureEditorsSaved() && validateState()))
- return;
- renameProjectsIfNecessary();
- renameMetadataIfNecessary();
- presentStatusIfNeccessary();
- }
- } finally {
- reset();
- }
- }
-
-
- private boolean ensureEditorsSaved() {
- return CommonEditorUtility.promptToSaveAllDirtyEditors();
- }
-
- protected Set getReferencedProjects() {
- if (referencedProjects == null)
- computeReferencedProjects();
- return referencedProjects;
- }
-
- protected void computeReferencedProjects() {
- getModules();
- referencedProjects = new HashSet();
- for (int i = 0; i < modules.size(); i++) {
- //WorkbenchComponent module = (WorkbenchComponent) modules.get(i);
- //TODO fix up code here for modules instead of projects
-// EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
-// if (runtime == null)
-// continue;
-// EAREditModel editModel = runtime.getEarEditModelForRead(this);
-// try {
-// referencedProjects.addAll(editModel.getModuleMappedProjects());
-// } finally {
-// editModel.releaseAccess(this);
-// }
- }
- }
-
- protected void renameMetadataIfNecessary() {
- if (!shouldRenameMetaData())
- return;
- RenameModuleOperation op = getRenameModuleOperation();
- IRunnableWithProgress runnable = WTPUIPlugin.getRunnableWithProgress(op);
- ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(shell);
-
- try {
- monitorDialog.run(false, false, runnable);
- } catch (InvocationTargetException e) {
- handleException(e);
- } catch (InterruptedException e) {
- //Ignore
- }
- }
-
- protected boolean shouldRenameMetaData() {
- if (renameProjectsFailedOrCancelled())
- return false;
-
- return primShouldRenameMetaData();
- }
-
- protected boolean renameProjectsFailedOrCancelled() {
- if (options == null || !options.shouldRenameProjects())
- return false;
- return renamedProjectsExist();
- }
-
- protected boolean renamedProjectsExist() {
- List renamedProjects = options.getAllProjectsToRename();
- for (int i = 0; i < renamedProjects.size(); i++) {
- IProject project = (IProject) renamedProjects.get(i);
- if (project.exists())
- return true;
- }
- return false;
- }
-
- protected void renameProjectsIfNecessary() {
- if (options == null || !options.shouldRenameProjects())
- return;
- J2EERenameResourceAction action = new J2EERenameResourceAction(shell);
- action.setNewName(options.getNewName());
- IStructuredSelection sel = new StructuredSelection(options.getAllProjectsToRename());
- action.selectionChanged(sel);
- action.run();
-
- // only web projects should have a context root
- String newContextRoot = options.getNewContextRoot();
- if (newContextRoot != null && options.shouldRenameProjects()) {
- //WorkbenchComponent module = (WorkbenchComponent) getModules().get(0);
- try {
- // TODO add server context root to the module model
- //module.setServerContextRoot(newContextRoot);
- } catch (Throwable t) {
- //Ignore
- }
- }
- }
-
- public void handleException(InvocationTargetException e) {
- Logger.getLogger().logError(e);
- IStatus status = J2EEPlugin.newErrorStatus(IStatus.ERROR, RENAME_ERROR, e);
- ErrorDialog.openError(shell, RENAME_ERROR, RENAME_NOT_COMPLETED, status);
- }
-
- /**
- * Update the action's enable state according to the current selection of the used selection
- * provider.
- */
- public void update() {
- IStructuredSelection selection = null;
-
- if (provider != null) {
- selection = (IStructuredSelection) provider.getSelection();
- super.update(selection);
- } else {
- selection = (IStructuredSelection) getSelection();
-
- if (selection == null) {
- setEnabled(false);
- } else {
- updateSelection(selection);
- }
- }
- }
-
- protected boolean isJ2EEApplicationProject(Object o) {
- boolean retVal = false;
- if (o instanceof IProject) {
- IProject project = (IProject) o;
- try {
- if (EARNatureRuntime.hasRuntime(project)) {
- retVal = true;
- }
- } catch (Throwable t) {
- retVal = false;
- }
- }
- return retVal;
- }
-
- protected boolean validateState() {
- if (!primShouldRenameMetaData())
- return true;
-
- IValidateEditListener listener = new ValidateEditListener(null, getRenameModuleOperation().getRenameEditModel());
- listener.setShell(shell);
- return listener.validateState().isOK();
- }
-
- protected boolean primShouldRenameMetaData() {
- return options != null && (options.shouldRenameModules() || options.shouldRenameModuleDependencies());
- }
-
- protected RenameModuleOperation getRenameModuleOperation() {
- if (renameModuleOperation == null) {
- renameModuleOperation = new RenameModuleOperation(options);
- }
- return renameModuleOperation;
- }
-
- protected void presentStatusIfNeccessary() {
- IStatus status = null;
-
- if (renameModuleOperation != null) {
- status = renameModuleOperation.getStatus();
- }
-
- if (status == null || status.isOK())
- return;
-
- ErrorDialog.openError(shell, null, null, status, IStatus.ERROR);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java
deleted file mode 100644
index 917e0a435..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Sep 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.UtilityJARMapping;
-import org.eclipse.jst.j2ee.internal.project.J2EENature;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility;
-
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EERenameParticipant extends RenameParticipant {
-
- private static final Class IPROJECT_CLASS = IProject.class;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- if (element == null)
- return false;
-
- IProject project = (IProject) AdaptabilityUtility.getAdapter(element, IPROJECT_CLASS);
- if (project.isAccessible()) {
-
- if (J2EENature.getRegisteredRuntime(project) != null)
- return true;
-
- // only return true for utility jar projects
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- EAREditModel model = null;
- UtilityJARMapping mapping = null;
- IProject[] allProjects = root.getProjects();
- for (int i = 0; i < allProjects.length; i++) {
- EARNatureRuntime earNature = EARNatureRuntime.getRuntime(allProjects[i]);
- if (earNature != null) {
- try {
- model = earNature.getEarEditModelForRead(this);
- mapping = model.getUtilityJARMapping(project);
-
- if (mapping != null)
- return true;
-
- } finally {
- if (model != null) {
- model.releaseAccess(this);
- model = null;
- }
- }
- }
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- Object[] targetElements = getProcessor().getElements();
- if (targetElements == null || targetElements.length != 1)
- return null;
- IProject project = (IProject) AdaptabilityUtility.getAdapter(targetElements[0], IPROJECT_CLASS);
- // TODO switch to be module based, not project based
- //if (project != null)
- // return new J2EEModuleRenameChange(project, getArguments().getNewName(), getArguments().getUpdateReferences());
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- return J2EERenameUIConstants.RENAME;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor,
- * org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
- */
- public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
- return RefactoringStatus.create(Status.OK_STATUS);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java
deleted file mode 100644
index f927e1cac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.RenameResourceAction;
-
-public class J2EERenameResourceAction extends RenameResourceAction {
- String newName = null;
-
- /**
- * Creates a new action. Using this constructor directly will rename using a dialog (if
- * necessary) rather than the inline editor of a ResourceNavigator. Note that a rename happens
- * on one and only one resource at a time.
- *
- * @param shell
- * the shell for any dialogs
- */
- public J2EERenameResourceAction(Shell shell) {
- super(shell);
- }
-
- /**
- * Return the new name to be given to the target resource.
- *
- * @return java.lang.String
- */
- protected String queryNewResourceName(final IResource resource) {
- String retVal = null;
-
- if (newName == null || newName.length() < 1) {
- retVal = super.queryNewResourceName(resource);
- } else {
- retVal = newName;
- }
-
- return retVal;
- }
-
- /**
- * Gets the newName.
- *
- * @return Returns a String
- */
- public String getNewName() {
- return newName;
- }
-
- /**
- * Sets the newName.
- *
- * @param newName
- * The newName to set
- */
- public void setNewName(String newName) {
- this.newName = newName;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java
deleted file mode 100644
index 5afcc0594..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Created on Feb 2, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class J2EEResourceOpenListener implements IOpenListener{
-
- private OpenJ2EEResourceAction action;
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IOpenListener#open(org.eclipse.jface.viewers.OpenEvent)
- */
-
- public void open(OpenEvent anEvent) {
- ISelection selection = anEvent.getSelection();
- if (selection instanceof IStructuredSelection) {
-
- if (getAction().updateSelection((IStructuredSelection)selection))
- action.run();
- }
-
- }
-
- /**
- * @return
- */
- private OpenJ2EEResourceAction getAction() {
- if (action == null)
- action = new OpenJ2EEResourceAction();
- return action;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java
deleted file mode 100644
index f00559703..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-public class NewAppClientComponentAction extends AbstractOpenWizardWorkbenchAction {
-
- // TODO MDE 02-28 Find correct label
- public static String LABEL = J2EEUIMessages.getResourceString("NewApplClientModuleAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "new_appclientproject_wiz"; //$NON-NLS-1$
-
- public NewAppClientComponentAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public NewAppClientComponentAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected Wizard createWizard() {
- return new AppClientComponentCreationWizard();
- }
-
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }
-
- protected String getDialogText() {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java
deleted file mode 100644
index 4de7409de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-public class NewEARComponentAction extends AbstractOpenWizardWorkbenchAction {
- // TODO MDE 02-28 Find correct label
- public static String LABEL = J2EEUIMessages.getResourceString("NewEARModuleAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "newear_wiz"; //$NON-NLS-1$
-
- public NewEARComponentAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public NewEARComponentAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected Wizard createWizard() {
- return new EARComponentCreationWizard();
- }
-
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }
-
- protected String getDialogText() {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java
deleted file mode 100644
index b101d1cbe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-
-/**
- * Action for opening a J2EE resource from the J2EE navigator.
- */
-public class OpenJ2EEResourceAction extends AbstractOpenAction {
-
- public static final String ID = "org.eclipse.jst.j2ee.internal.internal.ui.actions.OpenJ2EEResourceAction"; //$NON-NLS-1$
- public static final String JAVA_EDITOR_ID = "org.eclipse.jst.j2ee.internal.internal.ejb.ui.java.EnterpriseBeanJavaEditor"; //$NON-NLS-1$
- public static final String BASE_JAVA_EDITOR_ID = "org.eclipse.jdt.ui.CompilationUnitEditor"; //$NON-NLS-1$
-
- protected static IEditorDescriptor javaEditorDescriptor;
- protected static IEditorDescriptor baseJavaEditorDescriptor;
-
- /**
- * Create an instance of this class
- */
- public OpenJ2EEResourceAction() {
- super(""); //$NON-NLS-1$
- }
-
- /**
- * Returns the action ID.
- */
- public String getID() {
- return ID;
- }
-
- public static IEditorDescriptor getJavaEditorDescriptor() {
- if (javaEditorDescriptor == null)
- javaEditorDescriptor = findEditorDescriptor(JAVA_EDITOR_ID);
- return javaEditorDescriptor;
- }
-
- public static IEditorDescriptor getBaseJavaEditorDescriptor() {
- if (baseJavaEditorDescriptor == null)
- baseJavaEditorDescriptor = findEditorDescriptor(BASE_JAVA_EDITOR_ID);
- return baseJavaEditorDescriptor;
- }
-
- /**
- * open the appropriate editor
- */
- protected void openAppropriateEditor(IResource r) {
- if (r == null)
- return;
- IWorkbenchPage page = null;
- IEditorPart editor = null;
- try {
- page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- editor = page.openEditor(new FileEditorInput((IFile) r), currentDescriptor.getId());
- if (editor instanceof ISetSelectionTarget)
- ((ISetSelectionTarget) editor).selectReveal(getStructuredSelection());
- } catch (Exception e) {
- MessageDialog.openError(page.getWorkbenchWindow().getShell(), J2EEUIMessages.getResourceString("Problems_Opening_Editor_ERROR_"), e.getMessage()); //$NON-NLS-1$ = "Problems Opening Editor"
- }
- }
-
- /**
- * The user has invoked this action
- */
- public void run() {
- if (!isEnabled())
- return;
-
- if (srcObject instanceof J2EEJavaClassProviderHelper) {
- ((J2EEJavaClassProviderHelper) srcObject).openInEditor();
- return;
- }
-
- //openAppropriateEditor(WorkbenchResourceHelper.getFile(srcObject));
- }
-
- /**
- * The structured selection has changed in the workbench. Subclasses should override this method
- * to react to the change. Returns true if the action should be enabled for this selection, and
- * false otherwise.
- *
- * When this method is overridden, the super method must always be invoked. If the super method
- * returns false, this method must also return false.
- *
- * @param sel the new structured selection
- */
- public boolean updateSelection(IStructuredSelection s) {
- if (!super.updateSelection(s))
- return false;
-
- // Make sure this is one of the selections we can handle,
- // then set the source object as is. The run() will do the hard stuff.
- Object obj = s.getFirstElement();
-
- if (obj instanceof J2EEJavaClassProviderHelper)
- currentDescriptor = getJavaEditorDescriptor();
- else if (obj instanceof BeanLink)
- currentDescriptor = getBaseJavaEditorDescriptor();
- else {
- currentDescriptor = null;
- return false;
- }
- setAttributesFromDescriptor();
- srcObject = obj;
- return true;
- }
-
- protected EObject getRootObject(Object obj) {
- if (obj instanceof EObject) {
- EObject refObj = (EObject) obj;
- while (refObj != null && refObj.eContainer() != null)
- refObj = refObj.eContainer();
- return refObj;
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java
deleted file mode 100644
index ef0dcce2c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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
- **************************************************************************************************/
-/*
- * Created on Jul 7, 2004
- *
- * TODO To change the template for this generated file go to Window - Preferences - Java - Code
- * Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-
-public abstract class WTPBaseAction extends Action implements IActionDelegate2 {
- private final static String ERROR_OCCURRED_TITLE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_TITLE"); //$NON-NLS-1$
- private final static String ERROR_OCCURRED_MESSAGE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_MESSAGE"); //$NON-NLS-1$
-
- protected IStructuredSelection selection = null;
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return J2EEUIPlugin.getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- public void setSelection(IStructuredSelection selection) {
- this.selection = selection;
- }
-
- public void run() {
- Shell shell = getWorkbenchWindow().getShell();
- if (null == selection) {
- ISelection autoselection = getWorkbenchWindow().getSelectionService().getSelection();
- if (autoselection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection) autoselection;
- }
-
- try {
- primRun(shell);
- this.selection = null;
- } catch (Throwable t) {
- ErrorDialog.openError(shell, ERROR_OCCURRED_TITLE, ERROR_OCCURRED_MESSAGE, t, 0, false);
- }
-
- }
-
- protected abstract void primRun(Shell shell);
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- //dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- //init
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection aSelection) {
- setSelection((IStructuredSelection) aSelection);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
- * org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- }
-
- /**
- * @return Returns the selection.
- */
- protected IStructuredSelection getSelection() {
- return selection;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java
deleted file mode 100644
index 021b9315a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * An operation which delegates its work to a runnable that modifies the workspace.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
- */
-public class WorkspaceModifyComposedOperation extends org.eclipse.ui.actions.WorkspaceModifyOperation {
- protected List fRunnables;
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule) {
- super(rule);
- }
-
- /**
- * Creates a new operation which will delegate its work to the given runnable.
- */
- public WorkspaceModifyComposedOperation() {
- super();
- }
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule, List nestedRunnablesWithProgress) {
- super(rule);
- fRunnables = nestedRunnablesWithProgress;
- }
-
- public WorkspaceModifyComposedOperation(List nestedRunnablesWithProgress) {
- super();
- fRunnables = nestedRunnablesWithProgress;
- }
-
- /**
- * Creates a new operation which will delegate its work to the given runnable.
- *
- * @param content
- * the runnable to delegate to when this operation is executed
- */
- public WorkspaceModifyComposedOperation(IRunnableWithProgress nestedOp) {
- super();
- getRunnables().add(nestedOp);
- }
-
- public boolean addRunnable(IRunnableWithProgress nestedOp) {
- return getRunnables().add(nestedOp);
- }
-
- protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- int size = fRunnables.size();
- monitor.beginTask("", size);//$NON-NLS-1$
- for (int i = 0; i < fRunnables.size(); i++) {
- IRunnableWithProgress op = (IRunnableWithProgress) fRunnables.get(i);
- op.run(new SubProgressMonitor(monitor, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
- }
- }
-
- protected List getRunnables() {
- if (fRunnables == null)
- fRunnables = new ArrayList(3);
- return fRunnables;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java
deleted file mode 100644
index f610fcf6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/AppClientArchiveUIResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.client.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class AppClientArchiveUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("appclientarchiveui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
deleted file mode 100644
index d4f21616d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.client.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.AppClientModuleExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportApplicationClientAction extends BaseAction {
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%client.export.action.label_ui_"); //$NON-NLS-1$
- private static final String ICON = "appclient_export_wiz"; //$NON-NLS-1$
-
- public ExportApplicationClientAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
- AppClientModuleExportWizard wizard = new AppClientModuleExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
deleted file mode 100644
index 3fdb3b2ad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.client.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.AppClientModuleImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportApplicationClientAction extends BaseAction {
-
- public static String LABEL = AppClientArchiveUIResourceHandler.getString("Application_Client_Import_UI_"); //$NON-NLS-1$
- private static final String ICON = "appclient_import_wiz"; //$NON-NLS-1$
-
- public ImportApplicationClientAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
-
- AppClientModuleImportWizard wizard = new AppClientModuleImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java
deleted file mode 100644
index 42564f6ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.edit.command.AbstractOverrideableCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-/**
- * Insert the type's description here. Creation date: (06/07/01 10:56:08 AM)
- *
- * @author: Administrator
- */
-public abstract class AbstractOverrideCommand extends AbstractCommand {
- private AbstractOverrideableCommand overridable;
- private J2EEClipboard j2eeClipboard;
-
- /**
- * AbstractOverrideCommand constructor comment.
- */
- protected AbstractOverrideCommand() {
- super();
- }
-
- public AbstractOverrideCommand(AbstractOverrideableCommand command) {
- super(command.getLabel(), command.getDescription());
- setOverridable(command);
- }
-
- public boolean canExecute() {
- return super.canExecute() && overridable.doCanExecute();
- }
-
- public boolean canUndo() {
- return overridable.doCanUndo();
- }
-
- public Collection getAffectedObjects() {
- return overridable.doGetAffectedObjects();
- }
-
- public EditingDomain getDomain() {
- return getOverridable().getDomain();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 11:19:27 AM)
- *
- * @return org.eclipse.jst.j2ee.internal.internal.internal.command.J2EEClipboard
- */
- public J2EEClipboard getJ2eeClipboard() {
- return j2eeClipboard;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 10:58:33 AM)
- *
- * @return AbstractOverrideableCommand
- */
- public AbstractOverrideableCommand getOverridable() {
- return overridable;
- }
-
- public Collection getResult() {
- return getJ2eeClipboard();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 11:19:27 AM)
- *
- * @param newJ2eeClipboard
- * org.eclipse.jst.j2ee.internal.internal.internal.command.J2EEClipboard
- */
- protected void setJ2eeClipboard(J2EEClipboard newJ2eeClipboard) {
- j2eeClipboard = newJ2eeClipboard;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 10:58:33 AM)
- *
- * @param AbstractOverrideableCommand
- */
- protected void setOverridable(AbstractOverrideableCommand newOverridable) {
- overridable = newOverridable;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java
deleted file mode 100644
index ea1c4024d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-
-public class J2EEClipboard extends ArrayList {
- private Map bindings;
- private Map extensions;
-
- /**
- * J2EEClipboard constructor comment.
- */
- public J2EEClipboard(Collection defaultClipboard) {
- super(defaultClipboard);
- }
-
- public boolean addAll(Collection c) {
- boolean result = super.addAll(c);
- if (result && (c instanceof J2EEClipboard))
- addAllExtra((J2EEClipboard) c);
- return result;
- }
-
- protected void addAllExtra(J2EEClipboard c) {
- getBindings().putAll(c.getBindings());
- getExtensions().putAll(c.getExtensions());
- }
-
- protected void addBinding(EObject boundObject, EObject binding) {
- getBindings().put(boundObject, binding);
- }
-
- protected void addExtension(EObject extendedObject, EObject extension) {
- getExtensions().put(extendedObject, extension);
- }
-
- public EObject getBinding(EObject o) {
- return (EObject) getBindings().get(o);
- }
-
- protected Map getBindings() {
- if (bindings == null)
- bindings = new HashMap(10);
- return bindings;
- }
-
- public EObject getExtension(EObject o) {
- return (EObject) getExtensions().get(o);
- }
-
- protected Map getExtensions() {
- if (extensions == null)
- extensions = new HashMap(10);
- return extensions;
- }
-
- public boolean hasBindings() {
- return bindings != null && !bindings.isEmpty();
- }
-
- public boolean hasExtensions() {
- return extensions != null && !extensions.isEmpty();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java
deleted file mode 100644
index bf103abeb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-
-/**
- * Insert the type's description here. Creation date: (06/13/01 10:27:16 AM)
- *
- * @author: Administrator
- */
-public class J2EECompoundCommand extends CompoundCommand {
- /**
- * J2EECompoundCommand constructor comment.
- */
- public J2EECompoundCommand() {
- super();
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- */
- public J2EECompoundCommand(int resultIndex) {
- super(resultIndex);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- */
- public J2EECompoundCommand(int resultIndex, String label) {
- super(resultIndex, label);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EECompoundCommand(int resultIndex, String label, String description) {
- super(resultIndex, label, description);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, String label, String description, java.util.List commandList) {
- super(resultIndex, label, description, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, String label, java.util.List commandList) {
- super(resultIndex, label, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, java.util.List commandList) {
- super(resultIndex, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- */
- public J2EECompoundCommand(String label) {
- super(label);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EECompoundCommand(String label, String description) {
- super(label, description);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(String label, String description, java.util.List commandList) {
- super(label, description, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(String label, java.util.List commandList) {
- super(label, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(java.util.List commandList) {
- super(commandList);
- }
-
- protected Collection getMergedAffectedObjectsCollection() {
- J2EEClipboard result = new J2EEClipboard(new ArrayList());
-
- for (Iterator commands = commandList.iterator(); commands.hasNext();) {
- Command command = (Command) commands.next();
- result.addAll(command.getAffectedObjects());
- }
-
- return result;
- }
-
- protected Collection getMergedResultCollection() {
- J2EEClipboard result = new J2EEClipboard(new ArrayList());
-
- for (Iterator commands = commandList.iterator(); commands.hasNext();) {
- Command command = (Command) commands.next();
- result.addAll(command.getResult());
- }
-
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java
deleted file mode 100644
index 99ee2c62e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.CopyGroup;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility;
-
-
-public class J2EECopyCommand extends AbstractCommand {
- protected EObject objectToCopy;
- protected EObject bindingToCopy;
- protected EObject extensionToCopy;
- protected J2EEClipboard result;
- protected EtoolsCopyUtility copyUtil;
-
- public J2EECopyCommand(EObject object, EObject binding, EObject extension, EtoolsCopyUtility copyUtility) {
- objectToCopy = object;
- bindingToCopy = binding;
- extensionToCopy = extension;
- copyUtil = copyUtility;
- }
-
- /**
- * This will perform the command activity required for the effect. The effect of calling execute
- * when canExecute returns false, or when canExecute hasn't been called, is undefined.
- */
- public void execute() {
- CopyGroup group = new CopyGroup();
-
- group.add(objectToCopy);
-
- if (bindingToCopy != null)
- group.add(bindingToCopy);
- if (extensionToCopy != null)
- group.add(extensionToCopy);
- copyUtil.copy(group);
- EObject copy = copyUtil.getCopy(objectToCopy);
- result = new J2EEClipboard(Collections.singleton(copy));
-
- if (bindingToCopy != null)
- result.addBinding(copy, copyUtil.getCopy(bindingToCopy));
- if (extensionToCopy != null)
- result.addExtension(copy, copyUtil.getCopy(extensionToCopy));
- }
-
- public Collection getAffectedObjects() {
- return result;
- }
-
- public Collection getResult() {
- return result;
- }
-
- protected boolean prepare() {
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- //redo
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java
deleted file mode 100644
index 4e9d19fd8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jst.j2ee.internal.provider.J2EEUIEditingDomain;
-import org.eclipse.wst.common.internal.emf.utilities.CopyGroup;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility;
-
-
-/**
- * Insert the type's description here. Creation date: (06/11/01 8:45:21 AM)
- *
- * @author: Administrator
- */
-public class J2EECopyFromClipboardCommand extends AbstractCommand {
- private J2EEUIEditingDomain domain;
- private J2EEClipboard result;
- private EtoolsCopyUtility copyUtil;
-
- public J2EECopyFromClipboardCommand(J2EEUIEditingDomain editingDomain) {
- domain = editingDomain;
-
- }
-
- /**
- * This will perform the command activity required for the effect. The effect of calling execute
- * when canExecute returns false, or when canExecute hasn't been called, is undefined.
- */
- public void execute() {
- if (copyUtil != null)
- return;
- copyUtil = new EtoolsCopyUtility();
- J2EEClipboard clipboard = domain.getJ2EEClipboard();
- result = new J2EEClipboard(new ArrayList(0));
- for (int i = 0; i < clipboard.size(); i++) {
- CopyGroup group = new CopyGroup();
- EObject o = (EObject) clipboard.get(i);
- group.add(o);
- EObject bnd = clipboard.getBinding(o);
- if (bnd != null)
- group.add(bnd);
- EObject ext = clipboard.getExtension(o);
- if (ext != null)
- group.add(ext);
- copyUtil.copy(group);
- EObject copy = copyUtil.getCopy(o);
- result.add(copy);
- if (bnd != null)
- result.addBinding(copy, copyUtil.getCopy(bnd));
- if (ext != null)
- result.addExtension(copy, copyUtil.getCopy(ext));
- }
- //Reset the util so redo will actuall redo
- copyUtil = null;
- }
-
- public Collection getAffectedObjects() {
- return result;
- }
-
- public Collection getResult() {
- return result;
- }
-
- protected boolean prepare() {
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- execute();
- }
-
- public void undo() {
- result = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java
deleted file mode 100644
index cf1fa3acb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.Iterator;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility;
-
-
-public class J2EECopyToClipboardOverrideCommand extends CopyToClipboardCommand {
- //The collection of source objects, with bindings and extensions, if any exist
- protected J2EEClipboard extendedSourceObjects;
- protected boolean onlyRefObjects = true;
-
- public J2EECopyToClipboardOverrideCommand(CopyToClipboardCommand cmd) {
- super(cmd.getDomain(), cmd.getSourceObjects());
- }
-
- protected Command createCopyCommand() {
- CompoundCommand cmd = new J2EECompoundCommand(CompoundCommand.MERGE_COMMAND_ALL);
- Iterator it = extendedSourceObjects.iterator();
- EtoolsCopyUtility copyUtil = new EtoolsCopyUtility();
- while (it.hasNext()) {
- Object o = it.next();
- if (!(o instanceof EObject)) {
- cmd.append(UnexecutableCommand.INSTANCE);
- } else {
- EObject r = (EObject) o;
- cmd.append(new J2EECopyCommand(r, extendedSourceObjects.getBinding(r), extendedSourceObjects.getExtension(r), copyUtil));
- }
- }
- return cmd.unwrap();
- }
-
- protected boolean prepare() {
- prepareSourceObjects();
- if (!onlyRefObjects) {
- copyCommand = UnexecutableCommand.INSTANCE;
- return copyCommand.canExecute();
- }
-
- if (!extendedSourceObjects.hasBindings() && !extendedSourceObjects.hasExtensions())
- return super.prepare();
-
- copyCommand = createCopyCommand();
- return copyCommand.canExecute();
- }
-
- protected void prepareSourceObjects() {
- extendedSourceObjects = new J2EEClipboard(getSourceObjects());
- Iterator it = getSourceObjects().iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (o instanceof EObject) {
- // EObject r = (EObject) o;
- // TODO switch to adaptable commands
- // EObject bnd = BindingAndExtensionHelper.getBinding(r);
- // EObject ext = BindingAndExtensionHelper.getExtension(r);
- // if (bnd != null)
- // extendedSourceObjects.addBinding(r, bnd);
- // if (ext != null)
- // extendedSourceObjects.addExtension(r, ext);
- } else {
- //Right now we can only handle ref objects in the tree
- onlyRefObjects = false;
- return;
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java
deleted file mode 100644
index 85c97e5f5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandWrapper;
-import org.eclipse.emf.common.command.StrictCompoundCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
-import org.eclipse.jst.j2ee.internal.common.util.IDUtility;
-import org.eclipse.jst.j2ee.internal.provider.J2EEUIEditingDomain;
-
-
-public class J2EEPasteFromClipboardOverrideCommand extends PasteFromClipboardCommand {
- private J2EECopyFromClipboardCommand copyCommand;
- private Command addBindingsCommand;
- private Command addExtensionsCommand;
-
- public J2EEPasteFromClipboardOverrideCommand(PasteFromClipboardCommand p) {
- super(p.getDomain(), p.getOwner(), p.getFeature(), p.getIndex(), false);
- }
-
- public void doExecute() {
- super.doExecute();
- executeAddBindings();
- executeAddExtensions();
- J2EEClipboard result = (J2EEClipboard) doGetResult();
- for (int i = 0; i < result.size(); i++) {
- EObject o = (EObject) result.get(i);
- if (result.getBinding(o) != null || result.getExtension(o) != null)
- IDUtility.setDefaultID(o, true);
- }
- }
-
- public Collection doGetAffectedObjects() {
- return copyCommand.getAffectedObjects();
- }
-
- public Collection doGetResult() {
- return copyCommand.getResult();
- }
-
- public void doRedo() {
- super.doRedo();
- if (addBindingsCommand != null)
- addBindingsCommand.redo();
- if (addExtensionsCommand != null)
- addExtensionsCommand.redo();
- }
-
- public void doUndo() {
- super.doUndo();
- if (addBindingsCommand != null)
- addBindingsCommand.undo();
- if (addExtensionsCommand != null)
- addExtensionsCommand.undo();
- }
-
- protected void executeAddBindings() {
- if (addBindingsCommand != null && addBindingsCommand.canExecute())
- addBindingsCommand.execute();
- }
-
- protected void executeAddExtensions() {
- if (addExtensionsCommand != null && addExtensionsCommand.canExecute())
- addExtensionsCommand.execute();
- }
-
- public J2EEClipboard getCopiedClipoard() {
- return (J2EEClipboard) copyCommand.getResult();
- }
-
- protected J2EEClipboard getJ2EEClipboard() {
- return (J2EEClipboard) domain.getClipboard();
- }
-
- protected boolean prepare() {
- if (getJ2EEClipboard() == null)
- return false;
- command = new StrictCompoundCommand();
-
- copyCommand = new J2EECopyFromClipboardCommand((J2EEUIEditingDomain) domain);
- command.append(copyCommand);
-
- command.append(new CommandWrapper() {
- protected Command createCommand() {
- Command addCommand = AddCommand.create(getDomain(), getOwner(), getFeature(), copyCommand.getResult(), getIndex());
- return addCommand;
- }
- });
- prepareBindingCommand(copyCommand);
- prepareExtensionCommand(copyCommand);
-
- boolean result;
- if (optimize) {
- // This will determine canExecute as efficiently as possible.
- //
- result = optimizedCanExecute();
- } else {
- // This will actually execute the copy command in order to check if the add can execute.
- //
- result = command.canExecute();
- }
-
- return result;
- }
-
- protected void prepareBindingCommand(final J2EECopyFromClipboardCommand cmd) {
- if (!getJ2EEClipboard().hasBindings())
- return;
- //TODO make adaptable command
- // addBindingsCommand = new CommandWrapper() {
- // protected Command createCommand() {
- // Object bindingOwner = BindingAndExtensionHelper.getBindingAddOwner((EObject)getOwner());
- // Collection bindingsCopies = getCopiedClipoard().getBindings().values();
- // Command addCommand = AddCommand.create(getDomain(), bindingOwner, null, bindingsCopies,
- // CommandParameter.NO_INDEX);
- // return addCommand;
- // }
- // };
- }
-
- protected void prepareExtensionCommand(final J2EECopyFromClipboardCommand cmd) {
- if (!getJ2EEClipboard().hasExtensions())
- return;
- // TODO make adaptable command
- // addExtensionsCommand = new CommandWrapper() {
- // protected Command createCommand() {
- // Object extensionOwner =
- // BindingAndExtensionHelper.getExtensionAddOwner((EObject)getOwner());
- // Collection extensionsCopies = getCopiedClipoard().getExtensions().values();
- // Command addCommand = AddCommand.create(getDomain(), extensionOwner, null,
- // extensionsCopies, CommandParameter.NO_INDEX);
- // return addCommand;
- // }
- // };
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java
deleted file mode 100644
index ab6103904..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.command.RemoveCommand;
-
-/**
- * Insert the type's description here. Creation date: (06/07/01 10:44:02 AM)
- *
- * @author: Administrator
- */
-public class J2EERemoveOverrideCommand extends AbstractOverrideCommand {
- private RemoveCommand bindingsRemoveCommand;
- private RemoveCommand extensionsRemoveCommand;
- private ResourceSet resourceSet;
-
- /**
- * J2EERemoveOverrideCommand constructor comment.
- */
- protected J2EERemoveOverrideCommand() {
- super();
- }
-
- public J2EERemoveOverrideCommand(RemoveCommand command) {
- super(command);
- }
-
- protected RemoveCommand createRemoveCommand(Collection elements) {
- return (RemoveCommand) RemoveCommand.create(getDomain(), elements);
- }
-
- /**
- * This will perform the command activity required for the effect. The effect of calling execute
- * when canExecute returns false, or when canExecute hasn't been called, is undefined.
- */
- public void execute() {
- /*
- * For each object being removed, check if it has a binding, and an extension Make
- * collections of these, make a command parameter for each collection, an instantiate a
- * remove command
- */
-
- Collection objects = getRemoveCommand().getCollection();
- List bindings = new ArrayList(objects.size());
- List extensions = new ArrayList(objects.size());
- Iterator it = objects.iterator();
- while (it.hasNext()) {
- EObject o = (EObject) it.next();
- if (resourceSet == null)
- resourceSet = o.eResource().getResourceSet();
- // TODO make command adaptable
- // EObject binding = BindingAndExtensionHelper.getBinding(o);
- // if (binding != null) {
- // bindings.add(binding);
- // getJ2eeClipboard().addBinding(o, binding);
- // }
- // EObject extension = BindingAndExtensionHelper.getExtension(o);
- // if (extension != null) {
- // extensions.add(extension);
- // getJ2eeClipboard().addExtension(o, extension);
- // }
- }
- if (!bindings.isEmpty())
- setBindingsRemoveCommand(createRemoveCommand(bindings));
-
- if (!extensions.isEmpty())
- setExtensionsRemoveCommand(createRemoveCommand(extensions));
-
- executeAllChildren();
- }
-
- protected void executeAllChildren() {
- executeNested(bindingsRemoveCommand);
- executeNested(extensionsRemoveCommand);
- getOverridable().doExecute();
- }
-
- protected void executeNested(RemoveCommand cmd) {
- if (cmd != null && cmd.doCanExecute()) {
- cmd.doExecute();
- // Collection result = cmd.getResult();
- //TODO
- // BindingAndExtensionHelper.resolveAllProxies(result, resourceSet);
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @return RemoveCommand
- */
- protected RemoveCommand getBindingsRemoveCommand() {
- return bindingsRemoveCommand;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @return RemoveCommand
- */
- protected RemoveCommand getExtensionsRemoveCommand() {
- return extensionsRemoveCommand;
- }
-
- public RemoveCommand getRemoveCommand() {
- return (RemoveCommand) getOverridable();
- }
-
- protected boolean prepare() {
- setJ2eeClipboard(new J2EEClipboard(getRemoveCommand().getCollection()));
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- executeAllChildren();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @param newBindingsRemoveCommand
- * RemoveCommand
- */
- protected void setBindingsRemoveCommand(RemoveCommand newBindingsRemoveCommand) {
- bindingsRemoveCommand = newBindingsRemoveCommand;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @param newExtensionsRemoveCommand
- * RemoveCommand
- */
- protected void setExtensionsRemoveCommand(RemoveCommand newExtensionsRemoveCommand) {
- extensionsRemoveCommand = newExtensionsRemoveCommand;
- }
-
- public void undo() {
- getRemoveCommand().doUndo();
- undoNested(bindingsRemoveCommand);
- undoNested(extensionsRemoveCommand);
- }
-
- protected void undoNested(RemoveCommand cmd) {
- if (cmd != null && cmd.doCanUndo())
- cmd.doUndo();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java
deleted file mode 100644
index e0df82ab7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.command;
-
-import org.eclipse.emf.common.command.StrictCompoundCommand;
-
-
-
-/**
- * Overridden to provide an accessor to the pessimistic field. This is needed for the case of
- * undo/redo paste. We need the nested copy commmand in the paste command to redo itself when the
- * paste command is copied, otherwise we run into sed exception.
- */
-public class J2EEStrictCompoundCommand extends StrictCompoundCommand {
- /**
- * J2EEStrictCompoundCommand constructor comment.
- */
- public J2EEStrictCompoundCommand() {
- super();
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- */
- public J2EEStrictCompoundCommand(String label) {
- super(label);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EEStrictCompoundCommand(String label, String description) {
- super(label, description);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(String label, String description, java.util.List commandList) {
- super(label, description, commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(String label, java.util.List commandList) {
- super(label, commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(java.util.List commandList) {
- super(commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- */
- public J2EEStrictCompoundCommand(boolean pessimistic) {
- super();
- setIsPessismistic(pessimistic);
- }
-
- public void setIsPessismistic(boolean aBool) {
- isPessimistic = aBool;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java
deleted file mode 100644
index 36dfdd726..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-public class DeleteEARComposite extends Composite implements J2EEDeleteUIConstants, Listener, ICheckStateListener {
-
- protected DeleteEARDialog dialog;
- protected Button deleteAppProjectsBtn;
- protected Button deleteRefProjectsBtn;
- protected Composite radioComposite;
- protected Button detailsBtn;
- protected DeleteModuleReferencesComposite moduleRefsComposite;
- protected CheckboxTableViewer projectsList;
- protected boolean listCreated = false;
- protected Map referencedProjects;
- protected WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- /**
- * Constructor for DeleteEARComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteEARComposite(Composite parent, DeleteEARDialog dialog, int style, Set referencedProjects) {
- super(parent, style);
- this.dialog = dialog;
- initReferencedProjects(referencedProjects);
- addChildren();
- }
-
- /**
- * Answer the referenced projects which the user has chosen to also delete
- */
- public java.util.List getSelectedReferencedProjects() {
- if (deleteAppProjectsBtn.getSelection())
- return Collections.EMPTY_LIST;
- java.util.List result = new ArrayList();
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry element = (Map.Entry) iter.next();
- boolean isSelected = ((Boolean) element.getValue()).booleanValue();
- if (isSelected)
- result.add(element.getKey());
- }
- return result;
- }
-
- /**
- * @see J2EEDeleteDialog#createDeleteOptions()
- */
- public DeleteOptions createDeleteOptions() {
- DeleteOptions opts = new DeleteOptions();
- opts.setIsEARDelete(true);
- opts.setDeleteProjects(true);
- opts.setDeleteModuleDependencies(moduleRefsComposite.shouldDeleteModuleDependencies());
- opts.setDeleteModules(moduleRefsComposite.shouldDeleteModules());
- opts.setSelectedReferencedProjects(getSelectedReferencedProjects());
- return opts;
- }
-
-
-
- protected void initReferencedProjects(Set projects) {
- referencedProjects = new HashMap();
- for (Iterator iter = projects.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- referencedProjects.put(project, Boolean.TRUE);
- }
- }
-
- protected void addChildren() {
- setLayout();
- addRadioComposite();
- moduleRefsComposite = new DeleteModuleReferencesComposite(this, SWT.NONE, true);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- //setup defaults
- deleteAppProjectsBtn.setSelection(true);
- deleteAppProjectsBtnSelected();
- }
-
- protected void setLayout() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
- }
-
- protected void addRadioComposite() {
- radioComposite = new Composite(this, SWT.NONE);
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- deleteAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteAppProjectsBtn.setText(DELETE_EAR_PROJECTS);
- deleteAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- deleteAppProjectsBtn.setLayoutData(data);
-
- deleteRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteRefProjectsBtn.setText(DELETE_REFERENCED_PROJECTS);
- deleteRefProjectsBtn.addListener(SWT.Selection, this);
- deleteRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- detailsBtn = new Button(radioComposite, SWT.PUSH);
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- detailsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- detailsBtn.addListener(SWT.Selection, this);
- detailsBtn.setEnabled(false);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteAppProjectsBtn)
- deleteAppProjectsBtnSelected();
- else if (event.widget == deleteRefProjectsBtn)
- deleteRefProjectsBtnSelected();
- else if (event.widget == detailsBtn)
- detailsBtnSelected();
- }
-
- protected void deleteAppProjectsBtnSelected() {
- if (deleteAppProjectsBtn.getSelection()) {
- if (listCreated)
- toggleDetailsArea();
- detailsBtn.setEnabled(false);
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void deleteRefProjectsBtnSelected() {
- if (deleteRefProjectsBtn.getSelection()) {
- detailsBtn.setEnabled(true);
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- protected void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = dialog.getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (listCreated) {
- projectsList.getControl().dispose();
- listCreated = false;
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownList();
- detailsBtn.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
-
- Point newSize = dialog.getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- protected void createDropDownList() {
- // create the list
- projectsList = CheckboxTableViewer.newCheckList(radioComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- projectsList.setLabelProvider(createLabelProvider());
- projectsList.setSorter(new ViewerSorter() {/*viewersorter*/});
- projectsList.addCheckStateListener(this);
- // fill the list
- populateList();
-
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.heightHint = projectsList.getTable().getItemHeight() * referencedProjects.size();
- data.horizontalSpan = 2;
- data.horizontalIndent = 10;
- projectsList.getTable().setLayoutData(data);
-
- listCreated = true;
- }
-
- protected void populateList() {
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- projectsList.add(entry.getKey());
- boolean checked = ((Boolean) entry.getValue()).booleanValue();
- projectsList.setChecked(entry.getKey(), checked);
- }
- }
-
- protected void detailsBtnSelected() {
- toggleDetailsArea();
- }
-
- /**
- * @see ICheckStateListener#checkStateChanged(CheckStateChangedEvent)
- */
- public void checkStateChanged(CheckStateChangedEvent event) {
- referencedProjects.put(event.getElement(), new Boolean(event.getChecked()));
- }
-
- protected ITableLabelProvider createLabelProvider() {
- return new ITableLabelProvider() {
- public void dispose() {
- //dispose
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return workbenchLabelProvider.getImage(element);
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return workbenchLabelProvider.getText(element);
- }
-
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
- };
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java
deleted file mode 100644
index 4f924ad3e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.Set;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class DeleteEARDialog extends J2EEDeleteDialog {
- protected DeleteEARComposite deleteComposite;
- protected Set referencedProjects;
-
- /**
- * Constructor for DeleteEARDialog.
- *
- * @param parentShell
- * @param dialogTitle
- */
- public DeleteEARDialog(Shell parentShell, Set referencedProjects) {
- super(parentShell, DELETE_EAR_OPTIONS);
- this.referencedProjects = referencedProjects;
- }
-
-
- /**
- * @see MessageDialog#createCustomArea(Composite)
- */
- protected Control createCustomArea(Composite parent) {
- WorkbenchHelp.setHelp(parent, "com.ibm.etools.commonedit.navm2000"); //$NON-NLS-1$
- deleteComposite = new DeleteEARComposite(parent, this, SWT.NONE, referencedProjects);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- deleteComposite.setLayoutData(data);
- return deleteComposite;
- }
-
- /**
- * @see J2EEDeleteDialog#createDeleteOptions()
- */
- public void createDeleteOptions() {
- deleteOptions = deleteComposite.createDeleteOptions();
- }
-
- /**
- * @see org.eclipse.jface.window.Window#getContents()
- */
- public Control getContents() {
- return super.getContents();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java
deleted file mode 100644
index ceda40a34..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-
-public class DeleteModuleComposite extends Composite implements J2EEDeleteUIConstants, Listener {
-
- // protected Button deleteProjectsCheckBox;
- protected Button deleteAppProjectsBtn;
- protected Button deleteRefProjectsBtn;
- protected Composite radioComposite;
- protected DeleteModuleReferencesComposite moduleRefsComposite;
-
-
- /**
- * Constructor for DeleteModuleComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteModuleComposite(Composite parent, int style) {
- super(parent, style);
- addChildren();
-
- }
-
- protected void addChildren() {
- addDeleteProjectsGroup();
- addDeleteModuleRefsComposite();
- //set default values
- deleteAppProjectsBtn.setSelection(true);
- deleteAppProjectsBtnSelected();
- }
-
- protected void addDeleteProjectsGroup() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- radioComposite = new Composite(this, SWT.NONE);
- lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- deleteAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteAppProjectsBtn.setText(DELETE_PROJECTS_ONLY);
- deleteAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- deleteAppProjectsBtn.setLayoutData(data);
-
- deleteRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteRefProjectsBtn.setText(DELETE_PROJECT_REFERENCES);
- deleteRefProjectsBtn.addListener(SWT.Selection, this);
- deleteRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- }
-
- protected void addDeleteModuleRefsComposite() {
- moduleRefsComposite = new DeleteModuleReferencesComposite(this, SWT.NONE, false);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- }
-
-
- protected void addSeparator() {
- Label sep = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- sep.setLayoutData(data);
- }
-
- public boolean shouldDeleteProjects() {
- // return deleteProjectsCheckBox.getSelection();
- // the project should be deleted, since delete was the selected action
- return true;
- }
-
-
- public boolean shouldDeleteModuleDependencies() {
- return moduleRefsComposite.shouldDeleteModuleDependencies();
- }
-
- public boolean shouldDeleteModules() {
- return moduleRefsComposite.shouldDeleteModules();
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteAppProjectsBtn)
- deleteAppProjectsBtnSelected();
- else if (event.widget == deleteRefProjectsBtn)
- deleteRefProjectsBtnSelected();
- }
-
- protected void deleteAppProjectsBtnSelected() {
- if (deleteAppProjectsBtn.getSelection()) {
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void deleteRefProjectsBtnSelected() {
- if (deleteRefProjectsBtn.getSelection()) {
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java
deleted file mode 100644
index 5eaac2394..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-
-public class DeleteModuleDialog extends J2EEDeleteDialog implements J2EEDeleteUIConstants {
-
- protected DeleteModuleComposite deleteComposite;
-
- public DeleteModuleDialog(Shell parentShell) {
- super(parentShell, DELETE_MODULE_OPTIONS);
- }
-
- protected Control createCustomArea(Composite parent) {
- WorkbenchHelp.setHelp(parent, "com.ibm.etools.commonedit.navm2000"); //$NON-NLS-1$
- deleteComposite = new DeleteModuleComposite(parent, SWT.NONE);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- deleteComposite.setLayoutData(data);
- return deleteComposite;
- }
-
- public void createDeleteOptions() {
- deleteOptions = new DeleteOptions();
- deleteOptions.setDeleteProjects(deleteComposite.shouldDeleteProjects());
- deleteOptions.setDeleteModules(deleteComposite.shouldDeleteModules());
- deleteOptions.setDeleteModuleDependencies(deleteComposite.shouldDeleteModuleDependencies());
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java
deleted file mode 100644
index 393189d18..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class DeleteModuleReferencesComposite extends Composite implements J2EEDeleteUIConstants, Listener {
-
- protected Button deleteModulesCheckbox;
- protected Button deleteModuleDependenciesCheckbox;
- protected boolean isEARDelete;
-
- /**
- * Constructor for DeleteModuleReferencesComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteModuleReferencesComposite(Composite parent, int style, boolean isEARDelete) {
- super(parent, style);
- this.isEARDelete = isEARDelete;
- addChildren();
- }
-
- protected void addChildren() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- addDeleteModulesCheckbox();
- addDeleteModuleDependenciesCheckbox();
- }
-
- protected void addDeleteModuleDependenciesCheckbox() {
- deleteModuleDependenciesCheckbox = new Button(this, SWT.CHECK);
- deleteModuleDependenciesCheckbox.setText(DELETE_MODULE_DEPENDENCIES);
-
- }
-
- protected void addDeleteModulesCheckbox() {
- deleteModulesCheckbox = new Button(this, SWT.CHECK);
- String label = isEARDelete ? DELETE_MODULES_OTHER : DELETE_MODULES;
- deleteModulesCheckbox.setText(label);
- deleteModulesCheckbox.addListener(SWT.Selection, this);
- }
-
- public boolean shouldDeleteModuleDependencies() {
- return deleteModuleDependenciesCheckbox.getSelection();
- }
-
- public boolean shouldDeleteModules() {
- return deleteModulesCheckbox.getSelection();
- }
-
- public void setButtonsEnabled(boolean enabled) {
- deleteModuleDependenciesCheckbox.setSelection(enabled);
- deleteModulesCheckbox.setSelection(enabled);
- deleteModuleDependenciesCheckbox.setEnabled(enabled);
- deleteModulesCheckbox.setEnabled(enabled);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteModulesCheckbox && deleteModulesCheckbox.getSelection() && !deleteModuleDependenciesCheckbox.getSelection())
- deleteModuleDependenciesCheckbox.setSelection(true);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java
deleted file mode 100644
index a52ad1f97..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.internal.ui.wizards.TypedElementSelectionValidator;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-public class FilteredFileSelectionDialog extends ElementTreeSelectionDialog {
- protected String[] fExtensions;
- /**
- * FilteredFileSelectionDialog constructor comment.
- *
- * @param parent
- * Shell
- * @parent extensions String[]
- */
- public FilteredFileSelectionDialog(Shell parent, String[] extensions) {
- this(parent, null, null, extensions, false);
- }
- /**
- * FilteredFileSelectionDialog constructor comment.
- *
- * @param parent
- * Shell
- * @param title
- * String
- * @param message
- * String
- * @parent extensions String[]
- * @param allowMultiple
- * boolean
- */
- public FilteredFileSelectionDialog(Shell parent, String title, String message, String[] extensions, boolean allowMultiple) {
- super(parent, new WorkbenchLabelProvider(), new WorkbenchContentProvider());
- setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.RESIZE);
-
- setTitle(title);
- if (title == null)
- setTitle(J2EEUIMessages.getResourceString("File_Selection_UI_")); //$NON-NLS-1$
- if (message == null)
- message = J2EEUIMessages.getResourceString("Select_a_file__UI_"); //$NON-NLS-1$
- setMessage(message);
- setAllowMultiple(true);
- setExtensions(extensions);
- addFilter(new TypedFileViewerFilter(extensions));
- setValidator(new TypedElementSelectionValidator(new Class[]{IFile.class}, allowMultiple));
-
- }
- public String[] getExtensions() {
- return fExtensions;
- }
- public void setExtensions(String[] extensions) {
- fExtensions = extensions;
- }
-
- public void setHelp(String helpCode) {
- WorkbenchHelp.setHelp(this.getParentShell(), helpCode); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java
deleted file mode 100644
index be97f20db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class J2EEDeleteDialog extends MessageDialog implements J2EEDeleteUIConstants {
-
- protected DeleteOptions deleteOptions;
-
- /**
- * Constructor for J2EEDeleteDialog.
- *
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
- public J2EEDeleteDialog(Shell parentShell, String dialogTitle) {
- super(parentShell, dialogTitle, null, DELETE_DIALOG_MESSAGE, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
- }
-
- public DeleteOptions getDeleteOptions() {
- return deleteOptions;
- }
-
-
- public abstract void createDeleteOptions();
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == 0)
- createDeleteOptions();
- super.buttonPressed(buttonId);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java
deleted file mode 100644
index 2ae744b61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EEDeleteUIConstants {
- String DELETE = J2EEUIMessages.getResourceString("Delete_1"); //$NON-NLS-1$
- String DELETE_PROJECTS = J2EEUIMessages.getResourceString("Delete_selected_project(s)_2"); //$NON-NLS-1$
- String DELETE_MODULES = J2EEUIMessages.getResourceString("Remove_module(s)_from_all_Enterprise_Applications_3"); //$NON-NLS-1$
- String DELETE_MODULES_OTHER = J2EEUIMessages.getResourceString("Remove_module(s)_from_all_other_Enterprise_Applications_4"); //$NON-NLS-1$
- String DELETE_MODULE_DEPENDENCIES = J2EEUIMessages.getResourceString("Remove_module_dependencies_referencing_selected_project(s)_5"); //$NON-NLS-1$
- String DELETE_MODULE_OPTIONS = J2EEUIMessages.getResourceString("Delete_Module_Options_6"); //$NON-NLS-1$
- String DELETE_EAR_OPTIONS = J2EEUIMessages.getResourceString("Delete_Enterprise_Application_Options_7"); //$NON-NLS-1$
- String DELETE_NOT_COMPLETED = J2EEUIMessages.getResourceString("Delete_could_not_be_completed_8"); //$NON-NLS-1$
- String DELETE_ERROR = J2EEUIMessages.getResourceString("Delete_error_9"); //$NON-NLS-1$
- String DELETE_DIALOG_MESSAGE = J2EEUIMessages.getResourceString("What_would_you_like_to_delete__10"); //$NON-NLS-1$
- String DELETE_EAR_PROJECTS = J2EEUIMessages.getResourceString("Delete_selected_Enterprise_Application_project(s)_only_11"); //$NON-NLS-1$
- String DELETE_REFERENCED_PROJECTS = J2EEUIMessages.getResourceString("Also_delete_module_and_utility_Java_projects_12"); //$NON-NLS-1$
- String DELETE_PROJECTS_ONLY = J2EEUIMessages.getResourceString("Delete_selected_project(s)_only_13"); //$NON-NLS-1$
- String DELETE_PROJECT_REFERENCES = J2EEUIMessages.getResourceString("Also_delete_references_to_selected_project(s)_14"); //$NON-NLS-1$
- String CUSTOM_DELETE_MIX_MATCH = J2EEUIMessages.getResourceString("CUSTOM_DELETE_MIX_MATCH_UI_"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java
deleted file mode 100644
index c09a5476c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on May 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-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.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author sagarwal
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class J2EEDeployStatusDialog extends ProgressMonitorDialog implements J2EEDeployUIConstants {
-
- /**
- * Reserve room for this many list items.
- */
- private static final int LIST_ITEM_COUNT = 7;
- private int severity = IStatus.OK;
- public Color DESC_COLOR = new Color(null, 255, 255, 255);
- /**
- * The Details button.
- */
- private Button detailsButton;
-
- /**
- * The SWT list control that displays the error details.
- */
- private Text text;
-
- /**
- * Indicates whether the error details viewer is currently created.
- */
- private boolean textCreated = false;
-
- /**
- * List of the main error object's detailed errors (element type:
- * <code>J2EEMigrationStatus</code>).
- */
- private java.util.List statusList;
-
- /**
- * @param parent
- */
- public J2EEDeployStatusDialog(Shell parent, List status) {
- super(parent);
- setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL | SWT.RESIZE); // no
- statusList = status;
- }
-
- /**
- * Called just after the operation is run. Default behaviour is to decrement the nesting depth,
- * and close the dialog.
- *
- * @since 3.0
- */
- protected void finishedRun() {
- decrementNestingDepth();
- clearCursors();
- cancel.setEnabled(true);
- detailsButton.setEnabled(true);
- computeSeverity();
- setDeploymentStatus();
- }
-
- /**
- *
- */
- private void setDeploymentStatus() {
- setMessageOrDefault();
- imageLabel.setImage(getImage());
- }
-
- protected void setMessageOrDefault() {
- switch (getSeverity()) {
- case IStatus.ERROR :
- message = DEPLOY_ERRORS_REPORT;
- break;
- case IStatus.WARNING :
- message = DEPLOY_WARNINGS_REPORT;
- break;
- default :
- message = DEPLOY_SUCCESS_REPORT;
- break;
- }
- setMessage(message);
- }
-
-
- protected void createCancelButton(Composite parent) {
- super.createCancelButton(parent);
- cancel.setText(IDialogConstants.OK_LABEL);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // cancel button
- createCancelButton(parent);
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
- detailsButton.setEnabled(false);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog. Handles the pressing of the Ok or Details button in
- * this dialog. If the Ok button was pressed then close this dialog. If the Details button was
- * pressed then toggle the displaying of the error details area. Note that the Details button
- * will only be visible if the error being displayed specifies child details.
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.DETAILS_ID) { // was the details button pressed?
- toggleDetailsArea();
- } else {
- logStatus();
- super.buttonPressed(id);
-
- }
- }
-
- /*
- * @see org.eclipse.jface.dialogs.IconAndMessageDialog#getImage()
- */
-
-
- protected Image getImage() {
- switch (getSeverity()) {
- case IStatus.ERROR :
- return this.getErrorImage();
- case IStatus.WARNING :
- return this.getWarningImage();
- default :
- return this.getInfoImage();
- }
- }
-
- protected Text createDropDownText(Composite parent) {
- // create the list
- text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
- // fill the list
- populateText(text);
-
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.horizontalSpan = 2;
- data.heightHint = text.getLineHeight() * LIST_ITEM_COUNT;
- text.setLayoutData(data);
- textCreated = true;
- return text;
- }
-
- private void logStatus() {
- Iterator aenum = statusList.iterator();
- StringBuffer sb = new StringBuffer();
- sb.append(message);
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- populateText(sb, childStatus, 0);
- }
- Logger.getLogger().logInfo(sb.toString());
-
- }
-
- /**
- * Populates the list using this error dialog's status object. This walks the child stati of the
- * status object and displays them in a list. The format for each entry is status_path :
- * status_message If the status's path was null then it (and the colon) are omitted.
- */
- private void populateText(Text someText) {
- Iterator aenum = statusList.iterator();
- StringBuffer sb = new StringBuffer();
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- //sb.append("Deployment results for " + childStatus.);
- populateText(sb, childStatus, 0);
- }
- someText.setText(sb.toString());
-
- }
-
- private void populateText(StringBuffer sb, IStatus status, int nesting) {
- for (int i = 0; i < nesting; i++) {
- sb.append(" "); //$NON-NLS-1$
- }
- sb.append(getMessageForDisplay(status));
- sb.append('\n');
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- populateText(sb, children[i], nesting + 1);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (textCreated) {
- text.dispose();
- textCreated = false;
- detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- text = createDropDownText((Composite) getContents());
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- text.setEditable(false);
- text.setBackground(DESC_COLOR);
- }
-
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- public String getMessageForDisplay(IStatus status) {
- String messageString = status.getMessage();
- return messageString;
-
- }
-
- protected String getSeverityText(IStatus status) {
- switch (status.getSeverity()) {
- case IStatus.ERROR :
- return ERROR_TEXT;
- case IStatus.WARNING :
- return WARNING_TEXT;
- case IStatus.INFO :
- return INFO_TEXT;
- case IStatus.OK :
- return OK_TEXT;
- default :
- return ""; //$NON-NLS-1$
- }
- }
-
- private void setSeverity(int sev) {
- if (severity == IStatus.ERROR)
- return;
- if (sev == IStatus.ERROR)
- severity = IStatus.ERROR;
- else if (sev == IStatus.WARNING) {
- severity = IStatus.WARNING;
- }
- }
-
- private int getSeverity() {
- return severity;
- }
-
- private int computeSeverity() {
- Iterator aenum = statusList.iterator();
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- setSeverity(childStatus.getSeverity());
- if (getSeverity() == IStatus.ERROR)
- return getSeverity();
- computeSeverity(childStatus);
- if (getSeverity() == IStatus.ERROR)
- getSeverity();
- }
- return getSeverity();
- }
-
- private void computeSeverity(IStatus status) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- computeSeverity(children[i]);
- if (getSeverity() == IStatus.ERROR)
- return;
- }
- }
-
- /*
- * (non-Javadoc) Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(DEPLOY_DIALOG_TITLE);
- //shell.setSize(600,200); don't set the size this breaks the dialog for linux.
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Control control = super.createDialogArea(parent);
- setMessage(DEPLOYMENT_IN_PROGRESS);
- return control;
- }
-
- /**
- * Set the message in the message label.
- */
- private void setMessage(String messageString) {
- //must not set null text in a label
- message = messageString == null ? "" : messageString; //$NON-NLS-1$
- if (messageLabel == null || messageLabel.isDisposed())
- return;
- messageLabel.setText(message);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java
deleted file mode 100644
index dfe358952..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EEDeployUIConstants {
- public static final String ERROR_TEXT = J2EEUIMessages.getResourceString("DEPLOY_ERROR_TEXT"); //$NON-NLS-1$
- public static final String WARNING_TEXT = J2EEUIMessages.getResourceString("DEPLOY_WARNING_TEXT"); //$NON-NLS-1$
- public static final String INFO_TEXT = J2EEUIMessages.getResourceString("DEPLOY_INFO_TEXT"); //$NON-NLS-1$
- public static final String OK_TEXT = J2EEUIMessages.getResourceString("DEPLOY_OK_TEXT"); //$NON-NLS-1$
- public static final String DEPLOYMENT_IN_PROGRESS = J2EEUIMessages.getResourceString("DEPLOYMENT_IN_PROGRESS"); //$NON-NLS-1$
- public static final String DEPLOY_SUCCESS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_SUCCESS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_WARNINGS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_WARNINGS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_ERRORS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_ERRORS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_DIALOG_TITLE = J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java
deleted file mode 100644
index 6dcbf118d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class J2EERenameDialog extends MessageDialog implements J2EERenameUIConstants {
-
- protected RenameOptions renameOptions;
- protected String currentName = null;
-
- /**
- * Constructor for J2EERenameDialog.
- *
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
- public J2EERenameDialog(Shell parentShell, String dialogTitle, String name) {
- super(parentShell, dialogTitle, null, RENAME_DIALOG_MESSAGE, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
- currentName = name;
- }
-
- public RenameOptions getRenameOptions() {
- return renameOptions;
- }
-
-
- public abstract void createRenameOptions();
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == 0)
- createRenameOptions();
- super.buttonPressed(buttonId);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java
deleted file mode 100644
index baa574d2a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EERenameUIConstants {
- String RENAME = J2EEUIMessages.getResourceString("Rename_1"); //$NON-NLS-1$
- String RENAME_PROJECTS = J2EEUIMessages.getResourceString("Rename_selected_project_2"); //$NON-NLS-1$
- String RENAME_MODULES = J2EEUIMessages.getResourceString("Rename_module_in_all_Enterprise_Applications_3"); //$NON-NLS-1$
- String RENAME_MODULES_OTHER = J2EEUIMessages.getResourceString("Rename_module_in_all_other_Enterprise_Applications_4"); //$NON-NLS-1$
- String RENAME_MODULE_DEPENDENCIES = J2EEUIMessages.getResourceString("Rename_module_dependencies_referencing_selected_project_5"); //$NON-NLS-1$
- String RENAME_MODULE_OPTIONS = J2EEUIMessages.getResourceString("Rename_Module_Options_6"); //$NON-NLS-1$
- String RENAME_EAR_OPTIONS = J2EEUIMessages.getResourceString("Rename_Enterprise_Application_Options_7"); //$NON-NLS-1$
- String RENAME_NOT_COMPLETED = J2EEUIMessages.getResourceString("Rename_could_not_be_completed_8"); //$NON-NLS-1$
- String RENAME_ERROR = J2EEUIMessages.getResourceString("Rename_error_9"); //$NON-NLS-1$
- String RENAME_DIALOG_MESSAGE = J2EEUIMessages.getResourceString("What_would_you_like_to_rename_this_to__10"); //$NON-NLS-1$
- String RENAME_CONTEXT_ROOT = J2EEUIMessages.getResourceString("Context_Root__11"); //$NON-NLS-1$
- String RENAME_EAR_PROJECTS = J2EEUIMessages.getResourceString("Rename_selected_Enterprise_Application_project_only_12"); //$NON-NLS-1$
- String RENAME_REFERENCED_PROJECTS = J2EEUIMessages.getResourceString("Also_rename_module_and_utility_Java_projects_13"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java
deleted file mode 100644
index 8808b1db2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Insert the type's description here. Creation date: (9/7/2001 11:28:24 AM)
- *
- * @author: Administrator
- */
-public class ListMessageDialog extends org.eclipse.jface.dialogs.MessageDialog {
- protected String[] listItems;
- protected List list;
-
- /**
- * EJBSelectiveImportDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public ListMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- }
-
- /**
- * ListMessageDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public ListMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex, String[] names) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- listItems = names;
- }
-
- /**
- * Creates and returns the contents of an area of the dialog which appears below the message and
- * above the button bar.
- * <p>
- * The default implementation of this framework method returns <code>null</code>. Subclasses
- * may override.
- * </p>
- *
- * @param the
- * parent composite to contain the custom area
- * @return the custom area control, or <code>null</code>
- */
- protected Control createCustomArea(Composite parent) {
-
- Composite composite = new Composite(parent, 0);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (listItems != null) {
- list = new List(composite, SWT.BORDER);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- list.setLayoutData(data);
- list.setItems(listItems);
- }
-
- return composite;
-
- }
-
- /**
- * Convenience method to open a simple confirm (OK/Cancel) dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openConfirm(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0, items); // OK
- // is
- // the
- // default
- return dialog.open() == 0;
- }
-
- /**
- * Convenience method to open a standard error dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openError(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, ERROR, new String[]{IDialogConstants.OK_LABEL}, 0, items); // ok is the
- // default
- dialog.open();
- return;
- }
-
- /**
- * Convenience method to open a standard information dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openInformation(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, INFORMATION, new String[]{IDialogConstants.OK_LABEL}, 0, items);
- // ok is the default
- dialog.open();
- return;
- }
-
- /**
- * Convenience method to open a simple Yes/No question dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openQuestion(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, QUESTION, new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, 0, items); // yes
- // is
- // the
- // default
- return dialog.open() == 0;
- }
-
- /**
- * Convenience method to open a standard warning dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openWarning(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, WARNING, new String[]{IDialogConstants.OK_LABEL}, 0, items); // ok is
- // the
- // default
- dialog.open();
- return;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java
deleted file mode 100644
index 0a0a18a0f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-public class RenameEARComposite extends Composite implements J2EERenameUIConstants, Listener, ICheckStateListener {
-
- protected Button renameAppProjectsBtn;
- protected Button renameRefProjectsBtn;
- protected Composite radioComposite;
- protected Button detailsBtn;
- protected RenameModuleReferencesComposite moduleRefsComposite;
- protected CheckboxTableViewer projectsList;
- protected boolean listCreated = false;
- protected Map referencedProjects;
- protected WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- /**
- * Constructor for RenameEARComposite.
- *
- * @param parent
- * @param style
- */
- public RenameEARComposite(Composite parent, int style, Set referencedProjects) {
- super(parent, style);
- initReferencedProjects(referencedProjects);
- addChildren();
- }
-
- /**
- * Answer the referenced projects which the user has chosen to also rename
- */
- public java.util.List getSelectedReferencedProjects() {
- if (renameAppProjectsBtn.getSelection())
- return Collections.EMPTY_LIST;
- java.util.List result = new ArrayList();
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry element = (Map.Entry) iter.next();
- boolean isSelected = ((Boolean) element.getValue()).booleanValue();
- if (isSelected)
- result.add(element.getKey());
- }
- return result;
- }
-
- /**
- * @see J2EERenameDialog#createRenameOptions()
- */
- public RenameOptions createRenameOptions() {
- RenameOptions opts = new RenameOptions();
- opts.setIsEARRename(true);
- opts.setRenameProjects(true);
- opts.setRenameModuleDependencies(moduleRefsComposite.shouldRenameModuleDependencies());
- opts.setRenameModules(moduleRefsComposite.shouldRenameModules());
- opts.setSelectedReferencedProjects(getSelectedReferencedProjects());
- return opts;
- }
-
-
-
- protected void initReferencedProjects(Set projects) {
- referencedProjects = new HashMap();
- for (Iterator iter = projects.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- referencedProjects.put(project, Boolean.TRUE);
- }
- }
-
- protected void addChildren() {
- setLayout();
- addRadioComposite();
- moduleRefsComposite = new RenameModuleReferencesComposite(this, SWT.NONE, true);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- }
-
- protected void setLayout() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
- }
-
- protected void addRadioComposite() {
- radioComposite = new Composite(this, SWT.NONE);
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- renameAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- renameAppProjectsBtn.setText(RENAME_EAR_PROJECTS);
- renameAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- renameAppProjectsBtn.setLayoutData(data);
-
- renameRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- renameRefProjectsBtn.setText(RENAME_REFERENCED_PROJECTS);
- renameRefProjectsBtn.addListener(SWT.Selection, this);
- renameRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- detailsBtn = new Button(radioComposite, SWT.PUSH);
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- detailsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- detailsBtn.addListener(SWT.Selection, this);
- detailsBtn.setEnabled(false);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == renameAppProjectsBtn)
- renameAppProjectsBtnSelected();
- else if (event.widget == renameRefProjectsBtn)
- renameRefProjectsBtnSelected();
- else if (event.widget == detailsBtn)
- detailsBtnSelected();
- }
-
- protected void renameAppProjectsBtnSelected() {
- if (renameAppProjectsBtn.getSelection()) {
- if (listCreated)
- toggleDetailsArea();
- detailsBtn.setEnabled(false);
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void renameRefProjectsBtnSelected() {
- if (renameRefProjectsBtn.getSelection()) {
- detailsBtn.setEnabled(true);
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- protected void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (listCreated) {
- projectsList.getControl().dispose();
- listCreated = false;
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownList();
- detailsBtn.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
-
- Point newSize = getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- protected void createDropDownList() {
- // create the list
- projectsList = CheckboxTableViewer.newCheckList(radioComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- projectsList.setLabelProvider(createLabelProvider());
- projectsList.setSorter(new ViewerSorter() {/*viewersorter*/});
- projectsList.addCheckStateListener(this);
- // fill the list
- populateList();
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = projectsList.getTable().getItemHeight() * referencedProjects.size();
- data.horizontalSpan = 2;
- data.horizontalIndent = 10;
- projectsList.getTable().setLayoutData(data);
-
- listCreated = true;
- }
-
- protected void populateList() {
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- projectsList.add(entry.getKey());
- boolean checked = ((Boolean) entry.getValue()).booleanValue();
- projectsList.setChecked(entry.getKey(), checked);
- }
- }
-
- protected void detailsBtnSelected() {
- toggleDetailsArea();
- }
-
- /**
- * @see ICheckStateListener#checkStateChanged(CheckStateChangedEvent)
- */
- public void checkStateChanged(CheckStateChangedEvent event) {
- referencedProjects.put(event.getElement(), new Boolean(event.getChecked()));
- }
-
- protected ITableLabelProvider createLabelProvider() {
- return new ITableLabelProvider() {
- public void dispose() {
- //dispose
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return workbenchLabelProvider.getImage(element);
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return workbenchLabelProvider.getText(element);
- }
-
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
- };
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java
deleted file mode 100644
index 7b665df4b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.Set;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-public class RenameEARDialog extends J2EERenameDialog {
- protected RenameEARComposite renameComposite;
- protected Set referencedProjects;
-
- /**
- * Constructor for RenameEARDialog.
- *
- * @param parentShell
- * @param dialogTitle
- */
- public RenameEARDialog(Shell parentShell, Set referencedProjects, String name) {
- super(parentShell, RENAME_EAR_OPTIONS, name);
- this.referencedProjects = referencedProjects;
- }
-
-
- /**
- * @see MessageDialog#createCustomArea(Composite)
- */
- protected Control createCustomArea(Composite parent) {
- WorkbenchHelp.setHelp(parent, "com.ibm.etools.commonedit.navm3000"); //$NON-NLS-1$
- renameComposite = new RenameEARComposite(parent, SWT.NONE, referencedProjects);
- // renameComposite.setNewName(currentName);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- renameComposite.setLayoutData(data);
- return renameComposite;
- }
-
- /**
- * @see J2EERenameDialog#createRenameOptions()
- */
- public void createRenameOptions() {
- renameOptions = renameComposite.createRenameOptions();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java
deleted file mode 100644
index 0923fced8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-
-public class RenameModuleComposite extends Composite implements J2EERenameUIConstants, Listener {
-
- // protected Button renameProjectsCheckBox;
- protected RenameModuleReferencesComposite moduleRefsComposite;
- protected Text newNameText = null;
- protected Text newContextRootText = null;
- protected Label newContextRootLabel = null;
- protected String oldName = null;
- protected Button OKButton = null;
- protected Label statusMessageLabel = null;
-
- /**
- * Constructor for RenameModuleComposite.
- *
- * @param parent
- * @param style
- */
- public RenameModuleComposite(Composite parent, int style) {
- super(parent, style);
- addChildren();
- }
-
- protected void addChildren() {
- addRenameProjectsGroup();
- addSeparator();
- addRenameModuleRefsComposite();
- //Add in a label for status messages if required
- statusMessageLabel = new Label(this, SWT.NONE);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- statusMessageLabel.setLayoutData(data);
- statusMessageLabel.setFont(this.getFont());
- }
-
- protected void addRenameProjectsGroup() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- newNameText = new Text(this, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- newNameText.setLayoutData(data);
-
- newContextRootLabel = new Label(this, SWT.NONE);
- newContextRootLabel.setText(RENAME_CONTEXT_ROOT);
- data = new GridData(GridData.FILL_HORIZONTAL);
- newContextRootLabel.setLayoutData(data);
-
- newContextRootText = new Text(this, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- newContextRootText.setLayoutData(data);
-
- /*
- * renameProjectsCheckBox = new Button(this, SWT.CHECK);
- * renameProjectsCheckBox.setText(RENAME_PROJECTS);
- * renameProjectsCheckBox.setSelection(true);
- * renameProjectsCheckBox.addListener(SWT.Selection, this); data = new
- * GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2;
- * renameProjectsCheckBox.setLayoutData(data);
- */
- }
-
- protected void addRenameModuleRefsComposite() {
- moduleRefsComposite = new RenameModuleReferencesComposite(this, SWT.NONE, false);
- }
-
- protected void addSeparator() {
- Label sep = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- sep.setLayoutData(data);
- }
-
- public boolean shouldRenameProjects() {
- // return renameProjectsCheckBox.getSelection();
- // always rename the project
- return true;
- }
-
- public boolean shouldRenameModuleDependencies() {
- return moduleRefsComposite.shouldRenameModuleDependencies();
- }
-
- public boolean shouldRenameModules() {
- return moduleRefsComposite.shouldRenameModules();
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == newNameText && OKButton != null) {
- String newName = newNameText.getText();
- if (newName.trim().length() == 0) {
- statusMessageLabel.setText("");//$NON-NLS-1$
- OKButton.setEnabled(false);
- return;
- }
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IProject newProject = root.getProject(newName);
- if (newProject.exists()) {
- statusMessageLabel.setForeground(JFaceColors.getErrorText(statusMessageLabel.getDisplay()));
- String[] names = {newName};
- statusMessageLabel.setText(MessageFormat.format(J2EEUIMessages.getResourceString("Project_already_exists."), names)); //$NON-NLS-1$
- OKButton.setEnabled(false);
- } else {
- statusMessageLabel.setText("");//$NON-NLS-1$
- OKButton.setEnabled(true);
- }
- }
- }
-
- public String getNewName()
-
- {
- return newNameText.getText();
- }
-
- public void setNewName(String newName) {
- oldName = newName;
- newNameText.setText(newName);
- newNameText.selectAll();
- newNameText.addListener(SWT.Modify, this);
- }
-
- public String getNewContextRoot() {
- return newContextRootText.getText();
- }
-
- public void setNewContextRoot(String newContextRoot) {
- if (newContextRoot != null && newContextRoot.length() > 1) {
- newContextRootText.setText(newContextRoot);
- } else {
- newContextRootLabel.setVisible(false);
- newContextRootText.setVisible(false);
- }
- }
-
- /**
- * Sets the OKButton.
- *
- * @param OKButton
- * The OKButton to set
- */
- public void setOKButton(Button oKButton) {
- OKButton = oKButton;
- OKButton.setEnabled(false);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java
deleted file mode 100644
index 34d2ea805..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.SWT;
-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.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-
-public class RenameModuleDialog extends J2EERenameDialog implements J2EERenameUIConstants {
-
- protected RenameModuleComposite renameComposite;
- protected String contextRoot = null;
-
- public RenameModuleDialog(Shell parentShell, String name, String oldContextRoot) {
- super(parentShell, RENAME_MODULE_OPTIONS, name);
- contextRoot = oldContextRoot;
- }
-
- protected Control createCustomArea(Composite parent) {
- WorkbenchHelp.setHelp(parent, "com.ibm.etools.commonedit.navm3000"); //$NON-NLS-1$
- renameComposite = new RenameModuleComposite(parent, SWT.NONE);
- renameComposite.setNewName(currentName);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- renameComposite.setLayoutData(data);
- renameComposite.setNewContextRoot(contextRoot);
- return renameComposite;
- }
-
- public void createRenameOptions() {
- renameOptions = new RenameOptions();
- renameOptions.setRenameProjects(renameComposite.shouldRenameProjects());
- renameOptions.setRenameModules(renameComposite.shouldRenameModules());
- renameOptions.setRenameModuleDependencies(renameComposite.shouldRenameModuleDependencies());
- renameOptions.setNewName(renameComposite.getNewName());
- renameOptions.setNewContextRoot(renameComposite.getNewContextRoot());
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- Button OKButton = null;
- super.createButtonsForButtonBar(parent);
- OKButton = getButton(0);
- renameComposite.setOKButton(OKButton);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java
deleted file mode 100644
index 7614aabb0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class RenameModuleReferencesComposite extends Composite implements J2EERenameUIConstants, Listener {
-
- protected Button renameModulesCheckbox;
- protected Button renameModuleDependenciesCheckbox;
- protected boolean isEARRename;
-
- /**
- * Constructor for RenameModuleReferencesComposite.
- *
- * @param parent
- * @param style
- */
- public RenameModuleReferencesComposite(Composite parent, int style, boolean isEARRename) {
- super(parent, style);
- this.isEARRename = isEARRename;
- addChildren();
- }
-
- protected void addChildren() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- setLayoutData(data);
-
- addRenameModulesCheckbox();
- addRenameModuleDependenciesCheckbox();
- }
-
- protected void addRenameModuleDependenciesCheckbox() {
- renameModuleDependenciesCheckbox = new Button(this, SWT.CHECK);
- renameModuleDependenciesCheckbox.setSelection(true);
- renameModuleDependenciesCheckbox.setText(RENAME_MODULE_DEPENDENCIES);
-
- }
-
- protected void addRenameModulesCheckbox() {
- renameModulesCheckbox = new Button(this, SWT.CHECK);
- renameModulesCheckbox.setSelection(true);
- String label = isEARRename ? RENAME_MODULES_OTHER : RENAME_MODULES;
- renameModulesCheckbox.setText(label);
- renameModulesCheckbox.addListener(SWT.Selection, this);
- }
-
- public boolean shouldRenameModuleDependencies() {
- return renameModuleDependenciesCheckbox.getSelection();
- }
-
- public boolean shouldRenameModules() {
- return renameModulesCheckbox.getSelection();
- }
-
- public void setButtonsEnabled(boolean enabled) {
- renameModuleDependenciesCheckbox.setSelection(enabled);
- renameModulesCheckbox.setSelection(enabled);
- renameModuleDependenciesCheckbox.setEnabled(enabled);
- renameModulesCheckbox.setEnabled(enabled);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == renameModulesCheckbox && renameModulesCheckbox.getSelection() && !renameModuleDependenciesCheckbox.getSelection())
- renameModuleDependenciesCheckbox.setSelection(true);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java
deleted file mode 100644
index 573eb7968..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-/**
- * @author jialin
- *
- * To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Generation - Code and Comments
- */
-import java.util.Comparator;
-
-import org.eclipse.jface.util.Assert;
-
-/**
- * Quick sort to sort key-value pairs. The keys and arrays are specified in
- * separate arrays.
- *
- * @since 2.0
- */
-public class TwoArrayQuickSorter {
-
- private Comparator fComparator;
-
- /**
- * Default comparator.
- */
- public static final class StringComparator implements Comparator {
- private boolean fIgnoreCase;
-
- StringComparator(boolean ignoreCase) {
- fIgnoreCase = ignoreCase;
- }
-
- public int compare(Object left, Object right) {
- return fIgnoreCase ? ((String) left).compareToIgnoreCase((String) right) : ((String) left).compareTo((String) right);
- }
- }
-
- /**
- * Creates a sorter with default string comparator. The keys are assumed to
- * be strings.
- *
- * @param ignoreCase
- * specifies whether sorting is case sensitive or not.
- */
- public TwoArrayQuickSorter(boolean ignoreCase) {
- fComparator = new StringComparator(ignoreCase);
- }
-
- /**
- * Creates a sorter with a comparator.
- *
- * @param comparator
- * the comparator to order the elements. The comparator must not
- * be <code>null</code>.
- */
- public TwoArrayQuickSorter(Comparator comparator) {
- fComparator = comparator;
- }
-
- /**
- * Sorts keys and values in parallel.
- *
- * @param keys
- * the keys to use for sorting.
- * @param values
- * the values associated with the keys.
- */
- public void sort(Object[] keys, Object[] values) {
- if ((keys == null) || (values == null)) {
- Assert.isTrue(false, "Either keys or values in null"); //$NON-NLS-1$
- return;
- }
-
- if (keys.length <= 1)
- return;
-
- internalSort(keys, values, 0, keys.length - 1);
- }
-
- private void internalSort(Object[] keys, Object[] values, int left, int right) {
- int original_left = left;
- int original_right = right;
-
- Object mid = keys[(left + right) / 2];
- do {
- while (fComparator.compare(keys[left], mid) < 0)
- left++;
-
- while (fComparator.compare(mid, keys[right]) < 0)
- right--;
-
- if (left <= right) {
- swap(keys, left, right);
- swap(values, left, right);
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, values, original_left, right);
-
- if (left < original_right)
- internalSort(keys, values, left, original_right);
- }
-
- /*
- * Swaps x[a] with x[b].
- */
- private static final void swap(Object x[], int a, int b) {
- Object t = x[a];
- x[a] = x[b];
- x[b] = t;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeJavaSearchScope.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeJavaSearchScope.java
deleted file mode 100644
index 980120a35..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeJavaSearchScope.java
+++ /dev/null
@@ -1,352 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IOpenable;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-
-/**
- * This class was derived from JavaSearchScope as that class did not have a
- * provision to exclude classpath entries that are not exported A Java-specific
- * scope for searching relative to one or more java elements.
- */
-public class TypeJavaSearchScope implements IJavaSearchScope {
-
- private boolean includeExportedClassPathEntriesOnly = true;
-
- private ArrayList elements;
-
- /*
- * The paths of the resources in this search scope (or the classpath
- * entries' paths if the resources are projects)
- */
- private IPath[] paths;
- private boolean[] pathWithSubFolders;
- private int pathsCount;
-
- private IPath[] enclosingProjectsAndJars;
-
- public TypeJavaSearchScope() {
- this.initialize();
-
- // disabled for now as this could be expensive
- // JavaModelManager.getJavaModelManager().rememberScope(this);
- }
-
- private void addEnclosingProjectOrJar(IPath path) {
- int length = this.enclosingProjectsAndJars.length;
- for (int i = 0; i < length; i++) {
- if (this.enclosingProjectsAndJars[i].equals(path))
- return;
- }
- System.arraycopy(this.enclosingProjectsAndJars, 0, this.enclosingProjectsAndJars = new IPath[length + 1], 0, length);
- this.enclosingProjectsAndJars[length] = path;
- }
-
- /**
- * Method addProject. This method adds all the classpath entries for the
- * current project to the search scope.
- *
- * @param javaProject
- * @param includesPrereqProjects
- * @param visitedProjects
- * @throws JavaModelException
- */
- public void addProject(IJavaProject javaProject, boolean includesPrereqProjects, HashSet visitedProjects) throws JavaModelException {
- IProject project = javaProject.getProject();
- if (!project.isAccessible() || !visitedProjects.add(project))
- return;
-
- this.addEnclosingProjectOrJar(project.getFullPath());
-
- IClasspathEntry[] entries = javaProject.getResolvedClasspath(true);
- IJavaModel model = javaProject.getJavaModel();
- for (int i = 0, length = entries.length; i < length; i++) {
- IClasspathEntry entry = entries[i];
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_LIBRARY :
- IPath path = entry.getPath();
- this.add(path, true);
- this.addEnclosingProjectOrJar(path);
- break;
- case IClasspathEntry.CPE_PROJECT :
- if (includesPrereqProjects) {
- this.add(model.getJavaProject(entry.getPath().lastSegment()), true, visitedProjects);
- }
- break;
- case IClasspathEntry.CPE_SOURCE :
- this.add(entry.getPath(), true);
- break;
- }
- }
- }
-
- /**
- * Method add. This method filters out all the classpath entries of the
- * project which are not exported.
- *
- * @param javaProject
- * @param includesPrereqProjects
- * @param visitedProjects
- * @throws JavaModelException
- */
- public void add(IJavaProject javaProject, boolean includesPrereqProjects, HashSet visitedProjects) throws JavaModelException {
- IProject project = javaProject.getProject();
- if (!project.isAccessible() || !visitedProjects.add(project))
- return;
-
- this.addEnclosingProjectOrJar(project.getFullPath());
-
- IClasspathEntry[] entries = javaProject.getResolvedClasspath(true);
- IJavaModel model = javaProject.getJavaModel();
- for (int i = 0, length = entries.length; i < length; i++) {
- IClasspathEntry entry = entries[i];
- if (includeExportedClassPathEntriesOnly()) {
- if (!entry.isExported() && entry.getEntryKind() != IClasspathEntry.CPE_SOURCE)
- continue;
- }
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_LIBRARY :
- IPath path = entry.getPath();
- this.add(path, true);
- this.addEnclosingProjectOrJar(path);
- break;
- case IClasspathEntry.CPE_PROJECT :
- if (includesPrereqProjects) {
- this.add(model.getJavaProject(entry.getPath().lastSegment()), true, visitedProjects);
- }
- break;
- case IClasspathEntry.CPE_SOURCE :
- this.add(entry.getPath(), true);
- break;
- }
- }
- }
- public void add(IJavaElement element) throws JavaModelException {
- IPackageFragmentRoot root = null;
- switch (element.getElementType()) {
- case IJavaElement.JAVA_MODEL :
- // a workspace sope should be used
- break;
- case IJavaElement.JAVA_PROJECT :
- this.add((IJavaProject) element, true, new HashSet(2));
- break;
- case IJavaElement.PACKAGE_FRAGMENT_ROOT :
- root = (IPackageFragmentRoot) element;
- this.add(root.getPath(), true);
- break;
- case IJavaElement.PACKAGE_FRAGMENT :
- root = (IPackageFragmentRoot) element.getParent();
- if (root.isArchive()) {
- this.add(root.getPath().append(new Path(element.getElementName().replace('.', '/'))), false);
- } else {
- IResource resource = element.getUnderlyingResource();
- if (resource != null && resource.isAccessible()) {
- this.add(resource.getFullPath(), false);
- }
- }
- break;
- default :
- // remember sub-cu (or sub-class file) java elements
- if (element instanceof IMember) {
- if (this.elements == null) {
- this.elements = new ArrayList();
- }
- this.elements.add(element);
- }
- this.add(this.fullPath(element), true);
-
- // find package fragment root including this java element
- IJavaElement parent = element.getParent();
- while (parent != null && !(parent instanceof IPackageFragmentRoot)) {
- parent = parent.getParent();
- }
- if (parent instanceof IPackageFragmentRoot) {
- root = (IPackageFragmentRoot) parent;
- }
- }
-
- if (root != null) {
- if (root.getKind() == IPackageFragmentRoot.K_BINARY) {
- this.addEnclosingProjectOrJar(root.getPath());
- } else {
- this.addEnclosingProjectOrJar(root.getJavaProject().getProject().getFullPath());
- }
- }
- }
-
- /**
- * Adds the given path to this search scope. Remember if subfolders need to
- * be included as well.
- */
- private void add(IPath path, boolean withSubFolders) {
- if (this.paths.length == this.pathsCount) {
- System.arraycopy(this.paths, 0, this.paths = new IPath[this.pathsCount * 2], 0, this.pathsCount);
- System.arraycopy(this.pathWithSubFolders, 0, this.pathWithSubFolders = new boolean[this.pathsCount * 2], 0, this.pathsCount);
- }
- this.paths[this.pathsCount] = path;
- this.pathWithSubFolders[this.pathsCount++] = withSubFolders;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see IJavaSearchScope#encloses(String)
- */
- public boolean encloses(String resourcePathString) {
- IPath resourcePath;
- int separatorIndex = resourcePathString.indexOf(JAR_FILE_ENTRY_SEPARATOR);
- if (separatorIndex != -1) {
- resourcePath = new Path(resourcePathString.substring(0, separatorIndex)).append(new Path(resourcePathString.substring(separatorIndex + 1)));
- } else {
- resourcePath = new Path(resourcePathString);
- }
- return this.encloses(resourcePath);
- }
-
- /**
- * Returns whether this search scope encloses the given path.
- */
- private boolean encloses(IPath path) {
- for (int i = 0; i < this.pathsCount; i++) {
- if (this.pathWithSubFolders[i]) {
- if (this.paths[i].isPrefixOf(path)) {
- return true;
- }
- } else {
- IPath scopePath = this.paths[i];
- if (scopePath.isPrefixOf(path) && (scopePath.segmentCount() == path.segmentCount() - 1)) {
- return true;
- }
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see IJavaSearchScope#encloses(IJavaElement)
- */
- public boolean encloses(IJavaElement element) {
- if (this.elements != null) {
- for (int i = 0, length = this.elements.size(); i < length; i++) {
- IJavaElement scopeElement = (IJavaElement) this.elements.get(i);
- IJavaElement searchedElement = element;
- while (searchedElement != null) {
- if (searchedElement.equals(scopeElement)) {
- return true;
- }
- searchedElement = searchedElement.getParent();
- }
- }
- return false;
- }
- return this.encloses(this.fullPath(element));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see IJavaSearchScope#enclosingProjectsAndJars()
- */
- public IPath[] enclosingProjectsAndJars() {
- return this.enclosingProjectsAndJars;
- }
- private IPath fullPath(IJavaElement element) {
- if (element instanceof IPackageFragmentRoot) {
- return ((IPackageFragmentRoot) element).getPath();
- }
- IJavaElement parent = element.getParent();
- IPath parentPath = parent == null ? null : this.fullPath(parent);
- IPath childPath;
- if (element instanceof IPackageFragment) {
- childPath = new Path(element.getElementName().replace('.', '/'));
- } else if (element instanceof IOpenable) {
- childPath = new Path(element.getElementName());
- } else {
- return parentPath;
- }
- return parentPath == null ? childPath : parentPath.append(childPath);
- }
-
- protected void initialize() {
- this.paths = new IPath[1];
- this.pathWithSubFolders = new boolean[1];
- this.pathsCount = 0;
- this.enclosingProjectsAndJars = new IPath[0];
- }
- /**
- * Gets the includeExportedClassPathEntriesOnly.
- *
- * @return Returns a boolean
- */
- public boolean includeExportedClassPathEntriesOnly() {
- return includeExportedClassPathEntriesOnly;
- }
-
- /**
- * Sets the includeExportedClassPathEntriesOnly.
- *
- * @param includeExportedClassPathEntriesOnly
- * The includeExportedClassPathEntriesOnly to set
- */
- public void setIncludeExportedClassPathEntriesOnly(boolean includeExportedClassPathEntriesOnly) {
- this.includeExportedClassPathEntriesOnly = includeExportedClassPathEntriesOnly;
- }
- /**
- * @see IJavaSearchScope#includesBinaries()
- * @deprecated
- */
- public boolean includesBinaries() {
- return true;
- }
-
- /**
- * @see IJavaSearchScope#includesClasspaths()
- * @deprecated
- */
- public boolean includesClasspaths() {
- return true;
- }
-
- /**
- * @see IJavaSearchScope#setIncludesBinaries(boolean)
- * @deprecated
- */
- public void setIncludesBinaries(boolean includesBinaries) {
- //Default nothing
- }
-
- /**
- * @see IJavaSearchScope#setIncludesClasspaths(boolean)
- * @deprecated
- */
- public void setIncludesClasspaths(boolean includesClasspaths) {
- //Default nothing
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeSearchEngine.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeSearchEngine.java
deleted file mode 100644
index dc739f26d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeSearchEngine.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import java.util.HashSet;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-
-public class TypeSearchEngine extends SearchEngine {
-
- /**
- * Constructor for TypeSearchEngine.
- */
- public TypeSearchEngine() {
- super();
- }
-
- /**
- * Constructor for TypeSearchEngine.
- *
- * @param workingCopies
- */
- public TypeSearchEngine(ICompilationUnit[] workingCopies) {
- super(workingCopies);
- }
-
- /**
- * Method createJavaSearchScopeForAProject. Given a project it returns the
- * scope of the classes within the project's scope
- *
- * @param project
- * @param includeReferencedProjects
- * @param includeExportedClassPathEntriesOnly
- * @return IJavaSearchScope
- */
- public static IJavaSearchScope createJavaSearchScopeForAProject(IJavaProject project, boolean includeReferencedProjects, boolean includeExportedClassPathEntriesOnly) {
- if (!includeExportedClassPathEntriesOnly) {
- IJavaElement javaElements[] = new IJavaElement[]{project};
- return SearchEngine.createJavaSearchScope(javaElements, includeReferencedProjects);
- }
- TypeJavaSearchScope scope = new TypeJavaSearchScope();
- scope.setIncludeExportedClassPathEntriesOnly(true);
- HashSet visitedProjects = new HashSet(2);
- try {
- scope.addProject(project, includeReferencedProjects, visitedProjects);
- } catch (JavaModelException e) {
- // ignore
- }
- return scope;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java
deleted file mode 100644
index f92a0f6ce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.dialogs;
-
-import java.util.Hashtable;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.Viewer;
-
-public class TypedFileViewerFilter extends org.eclipse.jface.viewers.ViewerFilter {
- private String[] fAcceptedExtensions;
- private Hashtable visitedElements;
- public TypedFileViewerFilter(String[] acceptedExtensions) {
- fAcceptedExtensions = acceptedExtensions;
- visitedElements = new Hashtable();
- }
- public boolean isFilterProperty(Object element, Object property) {
- return false;
- }
- public boolean isValid(Object element) {
- if (IFile.class.isInstance(element))
- return isValidFile((IFile) element);
- if (IContainer.class.isInstance(element))
- return isValidContainer((IContainer) element);
- return false;
- }
- /*
- * A valid container is one that contains at least one valid member.
- */
- public boolean isValidContainer(IContainer container) {
- IResource[] members;
- Object valid = visitedElements.get(container);
- if (valid != null)
- return ((Boolean) valid).booleanValue();
- try {
- members = container.members();
- for (int i = 0; i < members.length; i++) {
- if (isValid(members[i])) {
- visitedElements.put(container, Boolean.TRUE);
- return true;
- }
- }
- } catch (CoreException e) {
- // Do nothing
- }
- visitedElements.put(container, Boolean.FALSE);
- return false;
- }
- public boolean isValidFile(IFile file) {
- String ext = file.getFileExtension();
- for (int i = 0; i < fAcceptedExtensions.length; i++) {
- if (fAcceptedExtensions[i].equalsIgnoreCase(ext)) {
- return true;
- }
- }
- return false;
- }
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return isValid(element);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
deleted file mode 100644
index 1682ee1a2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ArchiveEARUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("archiveearui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
deleted file mode 100644
index f43d7f758..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-import org.eclipse.jst.j2ee.internal.wizard.TableObjects;
-
-/**
- * Insert the type's description here. Creation date: (5/7/2001 11:39:11 AM)
- *
- * @author: Administrator
- */
-public class EARImportListContentProvider implements org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * EARImportListContentProvider constructor comment.
- */
- public EARImportListContentProvider() {
- super();
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- //dispose
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(Object inputElement) {
- if (inputElement instanceof TableObjects)
- return ((TableObjects) inputElement).getTableObjects().toArray();
- return new Object[0]; //should throw exception instead
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
deleted file mode 100644
index cabe5ca44..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ear.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportEARAction extends BaseAction {
-
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%ear.export.action.description_ui_");//$NON-NLS-1$
- private static final String ICON = "export_ear_wiz"; //$NON-NLS-1$
-
- public ExportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public void primRun(Shell shell) {
- EnterpriseApplicationExportWizard wizard = new EnterpriseApplicationExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
deleted file mode 100644
index b93c2d1c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 27, 2003
- *
- * To change this generated comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ear.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportEARAction extends BaseAction {
- public static String LABEL = ArchiveEARUIResourceHandler.getString("Import_EAR"); //$NON-NLS-1$
- private static final String ICON = "import_ear_wiz"; //$NON-NLS-1$
-
- public ImportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
-
- EnterpriseApplicationImportWizard wizard = new EnterpriseApplicationImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
deleted file mode 100644
index 202444c6c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ear.actions;
-
-
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-
-/**
- * Insert the type's description here. Creation date: (8/22/2001 2:27:24 PM)
- *
- * @author: Administrator
- */
-public class ModulesProvider implements org.eclipse.jface.viewers.ILabelProvider, org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * ModulesProvider constructor comment.
- */
- public ModulesProvider() {
- super();
- }
-
- /**
- * Adds a listener to this label provider. Has no effect if an identical listener is already
- * registered.
- * <p>
- * Label provider listeners are informed about state changes that affect the rendering of the
- * viewer that uses this label provider.
- * </p>
- *
- * @param listener
- * a label provider listener
- */
- public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- //dispose
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(java.lang.Object inputElement) {
- return ((java.util.List) inputElement).toArray();
- }
-
- /**
- * Returns the image for the label of the given element. The image is owned by the label
- * provider and must not be disposed directly. Instead, dispose the label provider when no
- * longer needed.
- *
- * @param element
- * the element for which to provide the label image
- * @return the image used to label the element, or <code>null</code> if these is no image for
- * the given object
- */
- public org.eclipse.swt.graphics.Image getImage(Object element) {
- return null;
- }
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element
- * the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code> if these is no text
- * label for the given object
- */
- public String getText(Object element) {
- return ((ClassPathSelection) element).getText();
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /**
- * Returns whether the label would be affected by a change to the given property of the given
- * element. This can be used to optimize a non-structural viewer update. If the property
- * mentioned in the update does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and <code>false</code> if it
- * would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * Removes a listener to this label provider. Has no affect if an identical listener is not
- * registered.
- *
- * @param listener
- * a label provider listener
- */
- public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java
deleted file mode 100644
index c95056b67..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.EjbMethodElementComparator;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodElement;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.common.frameworks.internal.ui.DisplayUtility;
-
-
-public abstract class AbstractMethodsContentProvider extends AdapterFactoryContentProvider {
- protected static EStructuralFeature ME_EJB_SF = EjbFactoryImpl.getPackage().getMethodElement_EnterpriseBean();
- protected static EStructuralFeature JAR_ASSEMBLY_SF = EjbFactoryImpl.getPackage().getEJBJar_AssemblyDescriptor();
- private static final EStructuralFeature ECORE_BEAN_NAME = EcorePackage.eINSTANCE.getENamedElement_Name(); //ENAMED_ELEMENT__NAME
- protected Comparator meComparator;
- protected boolean isRoot = true;
-
- public class EJBMethodItem {
- public EObject refObject;
- public EnterpriseBean ejb;
-
- public EJBMethodItem(EObject aRefObject, EnterpriseBean anEJB) {
- refObject = aRefObject;
- ejb = anEJB;
- }
-
- }
-
- /**
- * Constructor for AbstractMethodsContentProvider.
- *
- * @param adapterFactory
- */
- public AbstractMethodsContentProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public AbstractMethodsContentProvider(AdapterFactory adapterFactory, boolean root) {
- super(adapterFactory);
- isRoot = root;
- }
-
- protected Comparator getEnterpriseBeanComparator() {
- return EJBNameComparator.singleton();
- }
-
- protected Comparator getMethodElementComparator() {
- if (meComparator == null)
- meComparator = new EjbMethodElementComparator();
- return meComparator;
- }
-
- /*
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return getMethodElements((AbstractMethodsContentProvider.EJBMethodItem) parentElement);
- return new Object[0];
- }
-
- protected Object[] getMethodElements(AbstractMethodsContentProvider.EJBMethodItem ejbItem) {
- EObject refObject = ejbItem.refObject;
- if (refObject == null)
- return new Object[0];
- List elements = getMethodElements(refObject, ejbItem.ejb);
- Object[] result = elements.toArray();
- if (result.length == 1)
- return result;
- Arrays.sort(result, getMethodElementComparator());
- return result;
- }
-
- protected abstract List getMethodElements(EObject aRefObject, EnterpriseBean anEJB);
-
- protected Object[] getEnterpriseBeans(EObject parentElement, List someMethodElements) {
- if (someMethodElements.isEmpty())
- return new Object[0];
- Set ejbs = new HashSet();
- EnterpriseBean ejb = null;
- MethodElement me = null;
- for (int i = 0; i < someMethodElements.size(); i++) {
- me = (MethodElement) someMethodElements.get(i);
- ejb = me.getEnterpriseBean();
- if (ejb != null)
- ejbs.add(ejb);
- }
- Object[] result = ejbs.toArray();
- if (result.length != 1)
- Arrays.sort(result, getEnterpriseBeanComparator());
- ejb = null;
- for (int i = 0; i < result.length; i++) {
- ejb = (EnterpriseBean) result[i];
- result[i] = new EJBMethodItem(parentElement, ejb);
- }
- return result;
- }
-
- protected AssemblyDescriptor getAssemblyDescriptor(EnterpriseBean ejb) {
- if (ejb == null)
- return null;
- return ejb.getEjbJar().getAssemblyDescriptor();
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return true;
- return false;
- }
-
- protected TreeViewer getTreeViewer() {
- return (TreeViewer) viewer;
- }
-
- protected void refreshTreeViewer(Object obj) {
- if (viewer != null)
- DisplayUtility.asyncExec(createRefreshTreeRunnable(obj));
- }
-
- protected void refreshTreeViewer() {
- if (viewer != null)
- DisplayUtility.asyncExec(createRefreshTreeRunnable(null));
- }
-
- protected void refreshTreeViewer(MethodElement me) {
- refreshTreeViewer(me.eContainer());
- }
-
- protected void refreshTreeViewer(List aList) {
- if (aList.isEmpty())
- return;
- refreshTreeViewer((MethodElement) aList.get(0));
- }
-
- protected void addToTreeViewer(final MethodElement me) {
- if (viewer == null)
- return;
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- // findMethodItem() should be run in a Display thread
- EJBMethodItem item = findMethodItem(me);
- if (item != null)
- DisplayUtility.asyncExec(createAddItemTreeRunnable(item, me));
- else
- refreshTreeViewer(me.eContainer());
-
- }
- });
- }
-
- protected void removeFromTreeViewer(final EObject parent, final MethodElement me) {
- if (viewer == null)
- return;
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- EnterpriseBean ejb = me.getEnterpriseBean();
- EJBMethodItem item = findMethodItem(ejb, parent);
- if (item != null)
- refreshTreeViewer(item);
- else
- refreshTreeViewer((Object) null);
- }
- });
- }
-
- protected EJBMethodItem findMethodItem(MethodElement me) {
- return findMethodItem(me.getEnterpriseBean(), me.eContainer());
- }
-
- protected EJBMethodItem findMethodItem(EnterpriseBean ejb, EObject parentMethod) {
- TreeItem[] items = getTreeViewer().getTree().getItems();
- return findMethodItem(ejb, parentMethod, items);
- }
-
- protected EJBMethodItem findMethodItem(EnterpriseBean ejb, EObject parentMethod, TreeItem[] items) {
- TreeItem item = null;
- Object data = null;
- EJBMethodItem methodItem = null, found = null;
- for (int i = 0; i < items.length; i++) {
- item = items[i];
- data = item.getData();
- if (data instanceof EJBMethodItem) {
- methodItem = (EJBMethodItem) data;
- if (methodItem.ejb == ejb && methodItem.refObject == parentMethod)
- return methodItem;
- }
- found = findMethodItem(ejb, parentMethod, item.getItems());
- if (found != null)
- return found;
- }
- return null;
- }
-
- /*
- * @see INotifyChangedListener#notifyChanged(new ENotificationImpl((InternalEObject)Object,
- * int,(EStructuralFeature) Object, Object, Object, int))
- */
- public void notifyChanged(Notification notifier) {
- if (notifier.getEventType() == Notification.RESOLVE)
- return;
- else if (notifier.getOldValue() instanceof CMPAttribute && notifier.getNewValue() == null)
- return;
- else if (notifier.getFeature() == ME_EJB_SF) {
- refreshTreeViewer((MethodElement) notifier.getNotifier());
- return;
- } else if (notifier.getFeature() == ECORE_BEAN_NAME) {
- refreshTreeViewer();
- return;
- } else if (getMethodElementsReference() == notifier.getFeature()) {
- if (notifier.getEventType() == Notification.ADD)
- addToTreeViewer((MethodElement) notifier.getNewValue());
- else if (notifier.getEventType() == Notification.REMOVE)
- removeFromTreeViewer((EObject) notifier.getNotifier(), (MethodElement) notifier.getOldValue());
- return;
- } else if (notifier.getFeature() == JAR_ASSEMBLY_SF && isRoot) {
- updateTreeInput(notifier.getNewValue());
- } else if (notifier.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notifier);
- }
-
- /**
- * @param notifier
- */
- protected void updateTreeInput(final Object target) {
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
-
- getTreeViewer().setInput(target); //reset the input
- getTreeViewer().refresh(target);
-
- }
- });
- }
-
- private Runnable createAddItemTreeRunnable(final Object parent, final MethodElement me) {
- return new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- getTreeViewer().add(parent, me);
- }
- };
- }
-
- private Runnable createRefreshTreeRunnable(final Object target) {
- return new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- if (target != null)
- getTreeViewer().refresh(target);
- else
- getTreeViewer().refresh();
- }
- };
- }
-
- protected abstract EStructuralFeature getMethodElementsReference();
-
- protected abstract EStructuralFeature getMethodElementsContainerReference();
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java
deleted file mode 100644
index 38a42ebce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:29:49 AM)
- *
- * @author: Administrator
- */
-public class BeanClassProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * BeanClassProviderHelper constructor comment.
- */
- public BeanClassProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:09 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getEjbClass();
- }
-
- protected String getOverlayKey() {
- return "ejb_module_ovr";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("EJB_Class_UI_", new Object[]{className}); //$NON-NLS-1$ = "EJB Class"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java
deleted file mode 100644
index 48587820f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.wst.common.frameworks.internal.Messages;
-
-
-public class EJBUIMessages extends Messages {
-
- public static final String IMAGE_LOAD_ERROR = "0"; //$NON-NLS-1$
- public static final String EJB_PROJECT_WIZ_TITLE = "1"; //$NON-NLS-1$
- public static final String EJB_VERSION_LBL = "2"; //$NON-NLS-1$
- public static final String EJB_PROJECT_MAIN_PG_TITLE = "3"; //$NON-NLS-1$
- public static final String EJB_PROJECT_MAIN_PG_DESC = "4"; //$NON-NLS-1$
- public static final String EJB_IMPORT_MAIN_PG_DESC = "5"; //$NON-NLS-1$
- public static final String EJB_IMPORT_MAIN_PG_TITLE = "6"; //$NON-NLS-1$
- public static final String EJB_JAR_FILE_LBL = "7"; //$NON-NLS-1$
- public static final String EJB_PROJECT_LBL = "8"; //$NON-NLS-1$
- public static final String EJB_EXPORT_MAIN_PG_TITLE = "9"; //$NON-NLS-1$
- public static final String EJB_EXPORT_MAIN_PG_DESC = "10"; //$NON-NLS-1$
- public static final String EJB_Client_Title = "11"; //$NON-NLS-1$
- public static final String EJB_Client_Desc = "12"; //$NON-NLS-1$
- public static final String Client_JAR_URI = "13"; //$NON-NLS-1$
- public static final String Project_name = "14"; //$NON-NLS-1$
- public static final String Project_location = "15"; //$NON-NLS-1$
- public static final String EJB_Project = "16"; //$NON-NLS-1$
- public static final String DELETE_BEAN_ONLY = "17"; //$NON-NLS-1$
- public static final String Delete_Bean_Classes_UI = "18"; //$NON-NLS-1$
- public static final String Delete_Access_Bean = "19"; //$NON-NLS-1$
- public static final String Delete_Deployed_Code = "20"; //$NON-NLS-1$
- public static final String Select_All_UI = "21"; //$NON-NLS-1$
- public static final String Deselect_All_UI = "22"; //$NON-NLS-1$
- public static final String The_selected_Enterprise_Be = "23"; //$NON-NLS-1$
- public static final String Delete = "24"; //$NON-NLS-1$
- public static final String Cannot_delete_Enterprise_B = "25"; //$NON-NLS-1$
- public static final String Cannot_delete_bean = "26"; //$NON-NLS-1$
- public static final String Delete_Enterprise_Beans = "27"; //$NON-NLS-1$
- public static final String Delete_Options_Query = "27"; //$NON-NLS-1$
-
- private static EJBUIMessages INSTANCE = new EJBUIMessages();
-
- /**
- * The constructor.
- */
- private EJBUIMessages() {
- super();
- }
-
- /**
- * Returns the string from the resource bundle, or 'key' if not found.
- */
- public static String getResourceString(String key) {
- return INSTANCE.doGetResourceString(key);
- }
-
- public static String getResourceString(String key, Object[] args) {
- return INSTANCE.doGetResourceString(key, args);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.Messages#initializeBundle()
- */
- protected void initializeBundle() {
- try {
- resourceBundle = ResourceBundle.getBundle("j2ee_ejb_ui"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- //Ignore
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java
deleted file mode 100644
index 7f0d86917..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-
-
-public class ExcludeListContentProvider extends AbstractMethodsContentProvider {
- private static final EStructuralFeature EXCLUDE_ME_SF = EjbFactoryImpl.getPackage().getExcludeList_MethodElements();
- private static final EStructuralFeature AD_EL_SF = EjbFactoryImpl.getPackage().getAssemblyDescriptor_ExcludeList();
- protected static final EStructuralFeature ECORE_BEAN_NAME = EcorePackage.eINSTANCE.getENamedElement_Name(); //ENAMED_ELEMENT__NAME
-
- /**
- * Constructor for ExcludeListContentProvider.
- *
- * @param adapterFactory
- * @param root
- * @param viewer
- */
- public ExcludeListContentProvider(AdapterFactory adapterFactory, boolean root) {
- super(adapterFactory, root);
- }
-
- /**
- * Constructor for ExcludesListContentProvider.
- *
- * @param adapterFactory
- */
- public ExcludeListContentProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- protected Object[] getEnterpriseBeans(ExcludeList list) {
- List mes = list.getMethodElements();
- return getEnterpriseBeans(list, mes);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElements(EObject, EnterpriseBean)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof ExcludeList))
- return Collections.EMPTY_LIST;
- ExcludeList parentList = (ExcludeList) aRefObject;
- if (parentList == null)
- return Collections.EMPTY_LIST;
- return parentList.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- ExcludeList list = null;
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- list = jar.getAssemblyDescriptor().getExcludeList();
- if (list != null)
- return getEnterpriseBeans(list);
- }
- if (inputElement instanceof AssemblyDescriptor) {
- list = ((AssemblyDescriptor) inputElement).getExcludeList();
- if (list != null)
- return getEnterpriseBeans(list);
- }
- return new Object[0];
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ExcludeList)
- return getEnterpriseBeans((ExcludeList) parentElement);
- return super.getChildren(parentElement);
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof ExcludeList)
- return !((ExcludeList) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- public void notifyChanged(Notification notifier) {
- if ((notifier.getFeature() == EXCLUDE_ME_SF && notifier.getNotifier() instanceof ExcludeList) || notifier.getFeature() == ECORE_BEAN_NAME) {
- if (notifier.getEventType() == Notification.RESOLVE)
- return;
- if (isRoot)
- refreshTreeViewer();
- else
- refreshTreeViewer(notifier.getNotifier());
- }
- if (notifier.getOldValue() instanceof CMPAttribute && notifier.getNewValue() == null)
- return;
- if (notifier.getFeature() == getMethodElementsReference() || notifier.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notifier);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return EXCLUDE_ME_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_EL_SF;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java
deleted file mode 100644
index b6593903d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider;
-
-
-
-/**
- * This class is the item provider for EJB groups
- */
-public abstract class GroupedEJBItemProvider extends J2EEItemProvider {
-
- public GroupedEJBItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public abstract String getText(Object object);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java
deleted file mode 100644
index 6173265f4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationWrapper;
-import org.eclipse.emf.common.notify.impl.NotificationImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.ejb.EjbPackage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider;
-
-
-/**
- * @author Sachin P Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedEJBJarItemProvider extends EJBJarItemProvider {
-
- private GroupedSessionItemProvider sessionProvider = null;
- private GroupedEntityItemProvider entityProvider = null;
- private GroupedMessageItemProvider messageProvider = null;
-
- private static Hashtable sessionTable = new Hashtable();
- private static Hashtable entityTable = new Hashtable();
- private static Hashtable messageTable = new Hashtable();
-
- private static final String SESSION = EJBUIMessages.getResourceString("GroupedEJBJarItemProvider_UI_0"); //$NON-NLS-1$
- private static final String ENTITY = EJBUIMessages.getResourceString("GroupedEJBJarItemProvider_UI_1"); //$NON-NLS-1$
- private static final String MESSAGE = EJBUIMessages.getResourceString("GroupedEJBJarItemProvider_UI_2"); //$NON-NLS-1$
-
- // Normally there is one instance of an item provider for all instances of the objecct
- // in the tree. The item provider would be stateless. However, because we are doing tricks
- // here, we are keeping track of all items this provider manages. The key in the map is the
- // object (EJBJar), and the value is the children nodes that we inserted
-
- protected Map children = new HashMap();
- private boolean showAssemblyDescriptor;
- private boolean isDisposing;
-
- public GroupedEJBJarItemProvider(AdapterFactory adapterFactory, boolean showAssemblyDescriptor) {
- super(adapterFactory);
- this.showAssemblyDescriptor = showAssemblyDescriptor;
- }
-
- public Collection getChildren(Object object) {
- List result = initChildren(object);
- if (showAssemblyDescriptor) {
- if (((EJBJar) object).getAssemblyDescriptor() != null)
- result.add(((EJBJar) object).getAssemblyDescriptor());
- }
- return result;
- }
-
- protected List initChildren(Object object) {
- EJBJar ejbJar = (EJBJar) object;
- List allRootBeans = getAllRootBeans(ejbJar);
-
- boolean is20Jar = is20Jar(ejbJar);
-
- List localChildren = new ArrayList(5);
-
- List entityBeans = new ArrayList();
- List sessionBeans = new ArrayList();
- List messageBeans = new ArrayList();
-
- catagorizeBeans(allRootBeans, entityBeans, sessionBeans, messageBeans);
-
- //ENABLE FOR: NOT TO SHOW EMPTY GROUPS
- //if (sessionBeans.size() > 0) {
- if (sessionTable.get(ejbJar) == null) {
- //create new item provider instance
- sessionProvider = new GroupedSessionItemProvider(adapterFactory, null, getImage(SESSION), object, sessionBeans);
- sessionTable.put(ejbJar, sessionProvider);
- localChildren.add(sessionProvider);
- } else {
- //use existing instance from table
- localChildren.add(sessionTable.get(ejbJar));
- }
- //}
-
- //ENABLE FOR: NOT TO SHOW EMPTY GROUPS
- //if (entityBeans.size() > 0) {
- if (entityTable.get(ejbJar) == null) {
- //create new item provider instance
- entityProvider = new GroupedEntityItemProvider(adapterFactory, null, getImage(ENTITY), object, entityBeans);
- entityTable.put(ejbJar, entityProvider);
- localChildren.add(entityProvider);
- } else {
- //use existing instance from table
- localChildren.add(entityTable.get(ejbJar));
- }
- //}
-
- //ENABLE FOR: NOT TO SHOW EMPTY GROUPS
- //if (is20Jar && messageBeans.size() > 0) {
- if (is20Jar) {
- if (messageTable.get(ejbJar) == null) {
- //create new item provider instance
- messageProvider = new GroupedMessageItemProvider(adapterFactory, null, getImage(MESSAGE), object, messageBeans);
- messageTable.put(ejbJar, messageProvider);
- localChildren.add(messageProvider);
- } else {
- //use existing instance from table
- localChildren.add(messageTable.get(ejbJar));
- }
- }
- //}
-
- children.put(object, localChildren);
-
- return localChildren;
- }
-
- protected static List getAllRootBeans(EJBJar ejbJar) {
- return ejbJar.getEnterpriseBeans();
- }
-
- protected void catagorizeBeans(List allRootBeans, List entityBeans, List sessionBeans, List messageBeans) {
- for (int i = 0; i < allRootBeans.size(); i++) {
- if (((EnterpriseBean) allRootBeans.get(i)).isSession()) {
- sessionBeans.add(allRootBeans.get(i));
- } else if (((EnterpriseBean) allRootBeans.get(i)).isEntity()) {
- entityBeans.add(allRootBeans.get(i));
- } else if (((EnterpriseBean) allRootBeans.get(i)).isMessageDriven()) {
- messageBeans.add(allRootBeans.get(i));
- }
- }
- }
-
- static protected GroupedSessionItemProvider getSessionNode(Object object) {
- return (GroupedSessionItemProvider) sessionTable.get(object);
- }
-
- static protected GroupedEntityItemProvider getEntityNode(Object object) {
- return (GroupedEntityItemProvider) entityTable.get(object);
- }
-
- static protected GroupedMessageItemProvider getMessageNode(Object object) {
- return (GroupedMessageItemProvider) messageTable.get(object);
- }
-
- public Object getImage(String type) {
- if (type.equals(SESSION))
- return J2EEPlugin.getPlugin().getImage("sessionBean_obj"); //$NON-NLS-1$
- else if (type.equals(MESSAGE))
- return J2EEPlugin.getPlugin().getImage("message_bean_obj"); //$NON-NLS-1$
- else if (type.equals(ENTITY))
- return J2EEPlugin.getPlugin().getImage("entitybean_obj"); //$NON-NLS-1$
- else
- return null;
- }
-
- private boolean is20Jar(EJBJar ejbJar) {
- switch (ejbJar.getVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID :
- case J2EEVersionConstants.EJB_1_1_ID :
- return false;
- case J2EEVersionConstants.EJB_2_0_ID :
- case J2EEVersionConstants.EJB_2_1_ID :
- default :
- return true;
- }
- }
-
- public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.REMOVING_ADAPTER && notification.getOldValue() == this && !isDisposing) {
- removeTarget(notification);
- return;
- }
- if (notification.getFeature() == EjbPackage.eINSTANCE.getEJBJar_EnterpriseBeans()) {
- J2EEItemProvider provider = beansChanged((EJBJar) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
-
- //EJB's group has not been added yet, need to add group to tree before EJB can be added
- if (provider == null) {
- Notification msg = new NotificationImpl(Notification.ADD, null, getEJBItemProvider((EnterpriseBean) notification.getNewValue()), 1);
- NotificationWrapper notificationWrapper = new NotificationWrapper(notification.getNotifier(), msg);
- fireNotifyChanged(notificationWrapper);
- provider = beansChanged((EJBJar) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
- }
-
- //Fire notification for EJB add or remove
- NotificationWrapper notificationWrapper = new NotificationWrapper(provider, notification);
- fireNotifyChanged(notificationWrapper);
-
- //ENABLE FOR: NOT TO SHOW EMPTY GROUPS
- //If Group is empty remove the group
- /*
- * if (provider != null && provider.getChildren().size() == 0) { Notification msg = new
- * NotificationImpl(Notification.REMOVE, provider, null, 1); notificationWrapper = new
- * NotificationWrapper(notification.getNotifier(), msg);
- * fireNotifyChanged(notificationWrapper);
- *
- * //Group is removed so flush out table entry if (provider instanceof
- * GroupedSessionItemProvider) { sessionTable.remove(notification.getNotifier());
- * provider = null; } else if (provider instanceof GroupedEntityItemProvider) {
- * entityTable.remove(notification.getNotifier()); provider = null; } else if (provider
- * instanceof GroupedMessageItemProvider) {
- * messageTable.remove(notification.getNotifier()); provider = null; }
- *
- * //If all groups are removed remove the extended children List allChildren = new
- * ArrayList(this.getChildren((EJBJar) notification.getNotifier()));
- * if(sessionTable.get(notification.getNotifier()) == null &&
- * entityTable.get(notification.getNotifier()) == null &&
- * messageTable.get(notification.getNotifier()) == null) { for(int i = 0; i <
- * allChildren.size(); i++) { Notification message = new
- * NotificationImpl(Notification.REMOVE, allChildren.get(i), null, 1);
- * notificationWrapper = new NotificationWrapper(notification.getNotifier(), message);
- * fireNotifyChanged(notificationWrapper); } this.getChildren((EJBJar)
- * notification.getNotifier()).clear(); } }
- */
- } else {
- super.notifyChanged(notification);
- }
- }
-
- protected J2EEItemProvider beansChanged(EJBJar ejbJar, int eventType, Object oldValue, Object newValue, int pos) {
- J2EEItemProvider provider = getItemProvider(ejbJar, oldValue, newValue);
-
- if (provider != null) {
- Collection grandChildren = provider.getChildren();
-
- switch (eventType) {
- case Notification.ADD : {
- if (!grandChildren.contains(newValue))
- grandChildren.add(newValue);
-
- break;
- }
- case Notification.ADD_MANY : {
- grandChildren.addAll((Collection) newValue);
- break;
- }
- case Notification.REMOVE : {
- grandChildren.remove(oldValue);
- break;
- }
- case Notification.REMOVE_MANY : {
- grandChildren.removeAll((Collection) oldValue);
- break;
- }
- }
- } else {
- //GroupedProvider for new bean does not exist, create one.
- List allRootBeans = getAllRootBeans(ejbJar);
-
- List entityBeans = new ArrayList();
- List sessionBeans = new ArrayList();
- List messageBeans = new ArrayList();
-
- catagorizeBeans(allRootBeans, entityBeans, sessionBeans, messageBeans);
-
- if (newValue instanceof Session) {
- sessionProvider = new GroupedSessionItemProvider(adapterFactory, null, getImage(SESSION), ejbJar, sessionBeans);
- sessionTable.put(ejbJar, sessionProvider);
- } else if (newValue instanceof Entity) {
- entityProvider = new GroupedEntityItemProvider(adapterFactory, null, getImage(ENTITY), ejbJar, entityBeans);
- entityTable.put(ejbJar, entityProvider);
- } else if (newValue instanceof MessageDriven) {
- messageProvider = new GroupedMessageItemProvider(adapterFactory, null, getImage(MESSAGE), ejbJar, messageBeans);
- messageTable.put(ejbJar, messageProvider);
- }
- }
- return provider;
- }
-
- static public J2EEItemProvider getEJBJarItemProvider(EJBJar ejbJar, Object bean) {
- J2EEItemProvider provider = null;
- if (ejbJar != null && bean != null) {
- if (bean instanceof Session) {
- provider = getSessionNode(ejbJar);
- } else if (bean instanceof Entity) {
- provider = getEntityNode(ejbJar);
- } else if (bean instanceof MessageDriven) {
- provider = getMessageNode(ejbJar);
- }
- }
- return provider;
- }
-
- static public J2EEItemProvider getEJBItemProvider(EnterpriseBean bean) {
- if (bean != null) {
- EJBJar ejbJar = bean.getEjbJar();
- return getEJBJarItemProvider(ejbJar, bean);
- }
- return null;
- }
-
- protected J2EEItemProvider getItemProvider(EJBJar ejbJar, Object oldValue, Object newValue) {
- if (newValue != null)
- return getEJBJarItemProvider(ejbJar, newValue);
- else if (oldValue != null)
- return getEJBJarItemProvider(ejbJar, oldValue);
- else
- return null;
- }
-
- public static boolean isRootBean(EnterpriseBean bean) {
- List allRootBeans = getAllRootBeans(bean.getEjbJar());
- if (allRootBeans != null && allRootBeans.contains(bean)) {
- return true;
- }
- return false;
- }
-
- // Utility method for garbage collection - if EJBJar removed, remove
- // all entires in table for EJBJar
- static public void flushOutTableEntriesForEJBJar(EJBJar ejbJar) {
- sessionTable.remove(ejbJar);
- entityTable.remove(ejbJar);
- messageTable.remove(ejbJar);
- }
-
- public boolean hasChildren(Object parent) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.provider.EJBJarItemProvider#removeTarget(org.eclipse.emf.common.notify.Notification)
- */
- protected void removeTarget(Notification not) {
- if (not.getNotifier() instanceof EJBJar)
- flushOutTableEntriesForEJBJar((EJBJar) not.getNotifier());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#dispose()
- */
- public void dispose() {
- try {
- isDisposing = true;
- super.dispose();
- } finally {
- isDisposing = false;
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java
deleted file mode 100644
index 0dbb40b2d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedEntityItemProvider extends GroupedEJBItemProvider {
-
- public static final String ENTITY = J2EEUIMessages.getResourceString("Entity_UI_"); //$NON-NLS-1$
-
- public GroupedEntityItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return ENTITY;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java
deleted file mode 100644
index 6c977b2d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedMessageItemProvider extends GroupedEJBItemProvider {
-
- public static final String MESSAGE_BEANS = J2EEUIMessages.getResourceString("Message_Driven_Beans_UI_"); //$NON-NLS-1$
-
- public GroupedMessageItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return MESSAGE_BEANS;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java
deleted file mode 100644
index 15c28172c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedSessionItemProvider extends GroupedEJBItemProvider {
-
- public static final String SESSION_BEANS = J2EEUIMessages.getResourceString("Session_Beans_UI_"); //$NON-NLS-1$
-
- public GroupedSessionItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return SESSION_BEANS;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java
deleted file mode 100644
index 6c37abe75..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:23:30 PM)
- *
- * @author: Administrator
- */
-public class HomeInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * HomeInterfaceProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public HomeInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:49 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getHomeInterface();
- }
-
- protected String getOverlayKey() {
- return "home_interface_overlay_obj";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Home_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Home Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java
deleted file mode 100644
index ec5f13c6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 6:58:51 PM)
- *
- * @author: Administrator
- */
-public class J2EEContainerManagedEntityItemProvider extends ContainerManagedEntityItemProvider {
- /**
- * J2EEContainerManagedEntityItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEContainerManagedEntityItemProvider(EjbItemProviderAdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildren(object));
- J2EEJavaClassProviderHelper.addChildren((ContainerManagedEntity) object, result);
- result.addAll(((ContainerManagedEntity) object).getEnvironmentProperties());
- result.addAll(J2EEReferenceProviderHelper.getReferences((EnterpriseBean) object));
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java
deleted file mode 100644
index 0cf1822fb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import org.eclipse.emf.common.notify.Adapter;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 7:20:07 PM)
- *
- * @author: Administrator
- */
-public class J2EEEjbItemProviderAdapterFactory extends org.eclipse.jst.j2ee.internal.ejb.provider.EjbItemProviderAdapterFactory {
- /**
- * J2EEEjbItemProviderAdapterFactory constructor comment.
- */
- public J2EEEjbItemProviderAdapterFactory() {
- super();
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.ejb.ContainerManagedEntity}.
- */
- public Adapter createContainerManagedEntityAdapter() {
- if (containerManagedEntityItemProvider == null) {
- containerManagedEntityItemProvider = new J2EEContainerManagedEntityItemProvider(this);
- }
-
- return containerManagedEntityItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.EJBJar}.
- */
- public Adapter createEJBJarAdapter() {
- if (eJBJarItemProvider == null) {
- eJBJarItemProvider = new GroupedEJBJarItemProvider(this, true);
- }
-
- return eJBJarItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.Entity}.
- */
- public Adapter createEntityAdapter() {
- if (entityItemProvider == null) {
- entityItemProvider = new J2EEEntityItemProvider(this);
- }
-
- return entityItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.Session}.
- */
- public Adapter createSessionAdapter() {
- if (sessionItemProvider == null) {
- sessionItemProvider = new J2EESessionItemProvider(this);
- }
-
- return sessionItemProvider;
- }
-
- public Adapter createMessageDrivenAdapter() {
- if (messageDrivenItemProvider == null) {
- messageDrivenItemProvider = new J2EEMessageDrivenItemProvider(this);
- }
- return messageDrivenItemProvider;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java
deleted file mode 100644
index 037d4d67e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.Entity;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:10:06 PM)
- *
- * @author: Administrator
- */
-public class J2EEEntityItemProvider extends EntityItemProvider {
- /**
- * J2EEEntityItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEEntityItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- J2EEJavaClassProviderHelper.addChildren((Entity) object, result);
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java
deleted file mode 100644
index 7c784f123..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.frameworks.internal.ui.OverlayIcon;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-public abstract class J2EEJavaClassProviderHelper implements IAdaptable {
- private EnterpriseBean ejb;
- public static final Class IRESOURCE_CLASS = IResource.class;
-
- /**
- * J2EEJavaClassProviderHelper constructor comment.
- */
- public J2EEJavaClassProviderHelper(EnterpriseBean anEJB) {
- super();
- setEjb(anEJB);
- }
-
- public static void addChildren(Entity ejb, Collection children) {
- addChildren((EnterpriseBean) ejb, children);
- if (ejb.getPrimaryKey() != null)
- children.add(new PrimaryKeyClassProviderHelper(ejb));
- }
-
- public static void addChildren(EnterpriseBean ejb, Collection children) {
-
- if (ejb.getHomeInterface() != null)
- children.add(new HomeInterfaceProviderHelper(ejb));
- if (ejb.getRemoteInterface() != null)
- children.add(new RemoteInterfaceProviderHelper(ejb));
- if (ejb.getLocalHomeInterface() != null)
- children.add(new LocalHomeInterfaceProviderHelper(ejb));
- if (ejb.getLocalInterface() != null)
- children.add(new LocalInterfaceProviderHelper(ejb));
- if (ejb.getEjbClass() != null)
- children.add(new BeanClassProviderHelper(ejb));
- }
-
- protected Image createImage() {
- ImageDescriptor base = J2EEUIPlugin.getDefault().getImageDescriptor("jcu_obj");//$NON-NLS-1$
- if (base == null)
- return null;
- ImageDescriptor overlay = getOverlayDescriptor();
- if (overlay == null)
- return base.createImage();
- return new OverlayIcon(base, new ImageDescriptor[][]{{overlay}}).createImage();
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:47:24 PM)
- *
- * @return org.eclipse.jst.j2ee.internal.internal.ejb.EnterpriseBean
- */
- public org.eclipse.jst.j2ee.ejb.EnterpriseBean getEjb() {
- return ejb;
- }
-
- public Image getImage() {
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/20/2001 10:30:54 PM)
- *
- * @return JavaClass
- */
- public abstract JavaClass getJavaClass();
-
- protected ImageDescriptor getOverlayDescriptor() {
- return J2EEUIPlugin.getDefault().getImageDescriptor(getOverlayKey());
- }
-
- protected abstract String getOverlayKey();
-
- protected IProject getProject() {
- return ProjectUtilities.getProject(getJavaClass());
- }
-
- public String getStatusLineMessage() {
- if (getJavaClass() != null)
- return getTypeString(getJavaClass().getQualifiedName());
- return ""; //$NON-NLS-1$
- }
-
- public String getText() {
- if (getJavaClass() != null)
- return getJavaClass().getName();
- return ""; //$NON-NLS-1$
- }
-
- public abstract String getTypeString(String className);
-
- public void openInEditor() {
- IProject project = ProjectUtilities.getProject(getJavaClass());
- try {
- J2EEEditorUtility.openInEditor(getJavaClass(), project);
- } catch (Exception cantOpen) {
- //Ignore
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:47:24 PM)
- *
- * @param newEjb
- * org.eclipse.jst.j2ee.internal.internal.ejb.EnterpriseBean
- */
- public void setEjb(org.eclipse.jst.j2ee.ejb.EnterpriseBean newEjb) {
- ejb = newEjb;
- }
-
- /**
- * @see IAdaptable#EcoreUtil.getAdapter(eAdapters(),Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IRESOURCE_CLASS)
- return J2EEEditorUtility.getFile(getJavaClass());
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java
deleted file mode 100644
index a01558641..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class J2EEMessageDrivenItemProvider extends MessageDrivenItemProvider {
-
- public J2EEMessageDrivenItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- J2EEJavaClassProviderHelper.addChildren((MessageDriven) object, result);
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java
deleted file mode 100644
index b8b894876..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on May 6, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class J2EEReferenceProviderHelper {
-
- public static Collection getReferences(EnterpriseBean bean) {
- List result = new ArrayList();
- if (!bean.getEjbRefs().isEmpty())
- result.addAll(bean.getEjbRefs());
- if (!bean.getEjbLocalRefs().isEmpty())
- result.addAll(bean.getEjbLocalRefs());
- if (!bean.getResourceRefs().isEmpty())
- result.addAll(bean.getResourceRefs());
- if (!bean.getSecurityRoleRefs().isEmpty())
- result.addAll(bean.getSecurityRoleRefs());
- if (!bean.getResourceEnvRefs().isEmpty())
- result.addAll(bean.getResourceEnvRefs());
- return result;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java
deleted file mode 100644
index d64d2751b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:10:48 PM)
- *
- * @author: Administrator
- */
-public class J2EESessionItemProvider extends org.eclipse.jst.j2ee.internal.ejb.provider.SessionItemProvider {
- /**
- * J2EESessionItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EESessionItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- addServiceEndpointInterface((Session) object, result);
- J2EEJavaClassProviderHelper.addChildren((Session) object, result);
- return result;
- }
-
- /**
- * @param session
- * @param result
- */
- private void addServiceEndpointInterface(Session session, Collection children) {
- if (session.getVersionID() >= J2EEVersionConstants.EJB_2_1_ID && session.getServiceEndpoint() != null)
- children.add(new ServiceEndpointInterfaceProviderHelper(session));
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java
deleted file mode 100644
index cfea51ac7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-public class LocalHomeInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
-
- private static Image image;
-
- /**
- * Constructor for LocalHomeInterfaceProviderHelper.
- *
- * @param anEJB
- */
- public LocalHomeInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getJavaClass()
- */
- public JavaClass getJavaClass() {
- return getEjb().getLocalHomeInterface();
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- protected String getOverlayKey() {
- return "local_home_interface_overlay_obj"; //$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Local_Home_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Local Home Interface";
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java
deleted file mode 100644
index 9a9af2dcb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-public class LocalInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
-
- private static Image image;
-
- /**
- * Constructor for LocalInterfaceProviderHelper.
- *
- * @param anEJB
- */
- public LocalInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getJavaClass()
- */
- public JavaClass getJavaClass() {
- return getEjb().getLocalInterface();
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- protected String getOverlayKey() {
- return "local_interface_overlay_obj";//$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Local_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Local Interface"
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java
deleted file mode 100644
index 042a4332e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.CMPAttribute;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-
-
-public class MethodPermissionsContentProvider extends AbstractMethodsContentProvider {
- private static final EStructuralFeature PERMISSION_MES_SF = EjbFactoryImpl.getPackage().getMethodPermission_MethodElements();
- private static final EStructuralFeature PERMISSION_MES_UNCHECKED_SF = EjbFactoryImpl.getPackage().getMethodPermission_Unchecked();
- private static final EStructuralFeature PERMISSION_MES_ROLES_SF = EjbFactoryImpl.getPackage().getMethodPermission_Roles();
- private static final EStructuralFeature AD_MP_SF = EjbFactoryImpl.getPackage().getAssemblyDescriptor_MethodPermissions();
-
- /**
- * Constructor for MethodPermissionsContentProvider.
- *
- * @param adapterFactory
- * @param root
- * @param viewer
- */
- public MethodPermissionsContentProvider(AdapterFactory adapterFactory, boolean root) {
- super(adapterFactory, root);
- }
-
- /**
- * Constructor for MethodPermissionsContentProvider.
- *
- * @param adapterFactory
- */
- public MethodPermissionsContentProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /*
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof MethodPermission)
- return getEnterpriseBeans((MethodPermission) parentElement);
- return super.getChildren(parentElement);
- }
-
- protected Object[] getEnterpriseBeans(MethodPermission mp) {
- List mes = mp.getMethodElements();
- return getEnterpriseBeans(mp, mes);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElements(EObject, EnterpriseBean)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof MethodPermission))
- return Collections.EMPTY_LIST;
- MethodPermission parentMP = (MethodPermission) aRefObject;
- if (parentMP == null)
- return Collections.EMPTY_LIST;
- return parentMP.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- return jar.getAssemblyDescriptor().getMethodPermissions().toArray();
- }
- if (inputElement instanceof AssemblyDescriptor)
- return ((AssemblyDescriptor) inputElement).getMethodPermissions().toArray();
- return new Object[0];
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof MethodPermission)
- return !((MethodPermission) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return PERMISSION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MP_SF;
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.INotifyChangedListener#notifyChanged(Notification)
- */
- public void notifyChanged(Notification notification) {
- if (notification.getFeature() == PERMISSION_MES_SF || notification.getFeature() == AD_MP_SF)
- refreshTreeViewer();
- else if (notification.getOldValue() instanceof CMPAttribute && notification.getNewValue() == null)
- return;
- if (notification.getFeature() == PERMISSION_MES_UNCHECKED_SF || notification.getFeature() == PERMISSION_MES_ROLES_SF || notification.getFeature() == getMethodElementsReference() || notification.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notification);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java
deleted file mode 100644
index 37510ae23..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jst.j2ee.ejb.AssemblyDescriptor;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-
-
-public class MethodTransactionContentProvider extends AbstractMethodsContentProvider {
- private static final EStructuralFeature TRANSACTION_MES_SF = EjbFactoryImpl.getPackage().getMethodTransaction_MethodElements();
- private static final EStructuralFeature AD_MT_SF = EjbFactoryImpl.getPackage().getAssemblyDescriptor_MethodTransactions();
-
- /**
- * Constructor for MethodTransactionContentProvider.
- *
- * @param adapterFactory
- * @param root
- * @param viewer
- */
- public MethodTransactionContentProvider(AdapterFactory adapterFactory, boolean root) {
- super(adapterFactory, root);
- }
-
- /**
- * Constructor for MethodTransationContentProvider.
- *
- * @param adapterFactory
- */
- public MethodTransactionContentProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /*
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof MethodTransaction)
- return getEnterpriseBeans((MethodTransaction) parentElement);
- return super.getChildren(parentElement);
- }
-
- protected Object[] getEnterpriseBeans(MethodTransaction mt) {
- List mes = mt.getMethodElements();
- return getEnterpriseBeans(mt, mes);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElements(EObject, EnterpriseBean)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof MethodTransaction))
- return Collections.EMPTY_LIST;
- MethodTransaction parentMT = (MethodTransaction) aRefObject;
- if (parentMT == null)
- return Collections.EMPTY_LIST;
- return parentMT.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- return jar.getAssemblyDescriptor().getMethodTransactions().toArray();
- }
- if (inputElement instanceof AssemblyDescriptor)
- return ((AssemblyDescriptor) inputElement).getMethodTransactions().toArray();
- return new Object[0];
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof MethodTransaction)
- return !((MethodTransaction) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return TRANSACTION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MT_SF;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java
deleted file mode 100644
index a2893b519..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:28:55 AM)
- *
- * @author: Administrator
- */
-public class PrimaryKeyClassProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * PrimaryKeyClassProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public PrimaryKeyClassProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:54:22 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return ((Entity) getEjb()).getPrimaryKey();
- }
-
- protected String getOverlayKey() {
- return "key_interf_ov";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Primary_Key_Class_UI_", new Object[]{className}); //$NON-NLS-1$ = "Primary Key Class"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java
deleted file mode 100644
index 3fcb79009..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:28:12 AM)
- *
- * @author: Administrator
- */
-public class RemoteInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * RemoteInterfaceProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public RemoteInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:55:48 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getRemoteInterface();
- }
-
- protected String getOverlayKey() {
- return "remote_interface_overlay_obj";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Remote_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Remote Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java
deleted file mode 100644
index 5ad2b0c2e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 19, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * @author dfholttp
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class ServiceEndpointInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * @param anEJB
- */
- public ServiceEndpointInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:49 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return ((Session) getEjb()).getServiceEndpoint();
- }
-
- protected String getOverlayKey() {
- //TODO: DFH we need an icon
- return "";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Service_Endpoint_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Home Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedAdapter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedAdapter.java
deleted file mode 100644
index fb29e52fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedAdapter.java
+++ /dev/null
@@ -1,332 +0,0 @@
-package org.eclipse.jst.j2ee.internal.emf2xml.sed;
-
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterImpl;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer;
-import org.eclipse.wst.common.internal.emf.resource.Translator;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.utilities.Assert;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emf.utilities.FeatureValueConversionException;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-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.ElementImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-public class EMF2DOMSedAdapter extends EMF2DOMAdapterImpl implements INodeAdapter {
-
-
-
- public EMF2DOMSedAdapter(TranslatorResource resource, Document document, EMF2DOMRenderer renderer, Translator translator) {
- super(resource, document, renderer, translator);
- }
-
-
- public EMF2DOMSedAdapter(Notifier object, Node node, EMF2DOMRenderer renderer, Translator translator) {
- super(object, node, renderer, translator);
- }
-
-
- public EMF2DOMSedAdapter(Node node, EMF2DOMRenderer renderer, Translator translator) {
- super(node, renderer, translator);
- }
-
- /*
- * This method is called when the DOM node changes. It attempts to update MOF object based on
- * the changes.
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
-
- if (!isNotificationEnabled())
- return;
-
- debugDOMNotify(notifier, eventType, changedFeature, oldValue, newValue);
-
- if (notifier != getNode() && eventType != INodeNotifier.CHANGE) {
- // This is the case where the notification was sent from a
- // sub node. Use the notifiers name to determine which
- // MOF feature to update. Note that is is assumed that if
- // the eventType is CHANGE then it attribute on a path node
- // changing. This was put in for the EGL group.
- if (notifier instanceof Element) {
- if (eventType == INodeNotifier.STRUCTURE_CHANGED || eventType == INodeNotifier.CONTENT_CHANGED || eventType == INodeNotifier.CHANGE) {
- Element notifyingNode = (Element) notifier;
- Translator map = findTranslator(notifyingNode.getNodeName(), false);
- if (map != null)
- updateMOFFeature(map, getNode(), getEObject());
- }
- }
- } else {
- // Update everything on STRUCTURE_CHANGE or CONTENT_CHANGE.
- // Other event types occur too often.
- if (eventType == INodeNotifier.STRUCTURE_CHANGED || eventType == INodeNotifier.CONTENT_CHANGED) {
- updateMOF();
- }
- // Update just the attribute that changed.
- else if (eventType == INodeNotifier.CHANGE) {
- Translator map = findTranslator(changedFeature.toString(), true);
- if (map != null)
- updateMOFFeature(map, getNode(), getEObject());
- }
- }
- }
-
-
- /*
- * Prints out a DOM notification for debugging.
- */
- protected void debugDOMNotify(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue) {
- if (fDebug) {
- String notifType = ""; //$NON-NLS-1$
- switch (eventType) {
- case INodeNotifier.ADD :
- notifType = "ADD"; //$NON-NLS-1$
- break;
- case INodeNotifier.REMOVE :
- notifType = "REMOVE"; //$NON-NLS-1$
- break;
- case INodeNotifier.CHANGE :
- notifType = "CHANGE"; //$NON-NLS-1$
- break;
- case INodeNotifier.CONTENT_CHANGED :
- notifType = "CONTENT_CHANGED"; //$NON-NLS-1$
- break;
- case INodeNotifier.STRUCTURE_CHANGED :
- notifType = "STRUCTURE_CHANGE"; //$NON-NLS-1$
- break;
- }
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("DOM Change: " + notifType); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnotifier : " + notifier); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tchangedFeature: " + changedFeature); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\toldValue : " + oldValue); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError("\tnewValue : " + newValue); //$NON-NLS-1$
- }
- }
-
- protected String getNewlineString(Node node) {
- // we should always have XMLNode, and Flatmodel,
- // and consquently a valid "preferred" line delimiter,
- // but just to be safe, we'll assign something
- // by default.
- if (node instanceof IDOMNode) {
- IDOMNode xmlNode = (IDOMNode) node;
- IStructuredDocument document = xmlNode.getStructuredDocument();
- if (document != null) {
- return document.getLineDelimiter();
- }
- }
- return DOMUtilities.NEWLINE_STRING;
- }
-
- protected String primGetIndentString(Node node) {
- IStructuredDocument flatModel = ((IDOMNode) node).getStructuredDocument();
- int nodeStartOff = ((IDOMNode) node).getStartOffset();
-
- int startOff = Math.max(0, nodeStartOff - 100);
- int endOff = nodeStartOff;
-
- try {
- String text = flatModel.get(startOff, endOff - startOff);
-
- int inx = text.length() - 1;
- if (inx >= 0) {
- for (; inx >= 0; inx--) {
- char ch = text.charAt(inx);
- if (Character.isWhitespace(ch) && ch != '\n' && ch != '\r') {
- continue;
- }
- inx++;
- break;
- }
-
- return text.substring(inx);
- }
- } catch (org.eclipse.jface.text.BadLocationException ex) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- }
- return ""; //$NON-NLS-1$
- }
-
- protected IDOMNode getXMLNode() {
- return (IDOMNode) getNode();
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.EMF2DOMAdapterImpl#primAddDOMAdapter(Node, EMF2DOMAdapter)
- */
- protected void primAddDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- ((IDOMNode) aNode).addAdapter((EMF2DOMSedAdapter) anAdapter);
- }
-
- protected EMF2DOMAdapter primGetExistingAdapter(Node aNode) {
- return (EMF2DOMAdapter) ((IDOMNode) aNode).getExistingAdapter(EMF2DOMAdapter.ADAPTER_CLASS);
-
- }
-
- protected void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- ((IDOMNode) aNode).removeAdapter((EMF2DOMSedAdapter) anAdapter);
- }
-
- protected void setEmptyTag(Element element) {
- ((ElementImpl) element).setEmptyTag(true);
- }
-
- protected boolean isEmptyTag(Element parent) {
- return ((ElementImpl) parent).isEmptyTag();
- }
-
- protected IDOMModel getXMLModel() {
- if (getNode() != null)
- return ((IDOMNode) getNode()).getModel();
- return null;
- }
-
- public void updateDOM() {
- if (!isNotificationEnabled())
- return;
- try {
- disableUndoManagementIfNecessary();
- primUpdateDOM();
- } finally {
- enableUndoManagement();
- }
- }
-
- protected void preUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- super.preUpdateDOMFeature(map, node, mofObject);
- disableUndoManagementIfNecessary();
- }
-
- protected void disableUndoManagementIfNecessary() {
- IDOMModel model = getXMLModel();
- if (model != null && model.getUndoManager() != null)
- model.disableUndoManagement();
- }
-
- protected void postUpdateDOMFeature(Translator map, Node node, EObject mofObject) {
- enableUndoManagement();
- }
-
- protected void enableUndoManagement() {
- IDOMModel model = getXMLModel();
- if (model != null && model.getUndoManager() != null)
- model.enableUndoManagement();
- }
-
- protected void indent(Node node, Translator map) {
- Assert.isNotNull(node.getParentNode(), "Node must be connected into the tree"); //$NON-NLS-1$
- Assert.isNotNull(node);
-
- String indentString = calcIndentString(node);
-
- // Indent before the start tag
- indentStartTag(indentString, node, map);
-
- // Indent before the end tag
- indentEndTag(indentString, node, map);
- }
-
- /**
- * Indent before the end tag of the <node>passed in.
- */
- protected void indentEndTag(String indentString, Node node, Translator map) {
- if (!map.shouldIndentEndTag())
- return;
- String domPath = map.getDOMPath();
-
- if ((!map.isManagedByParent() && !map.isDOMTextValue()) || (map.isManagedByParent() && domPath.length() != 0) && node.getNodeName().equals(domPath)) {
- Text newWS = node.getOwnerDocument().createTextNode(getNewlineString(node) + indentString); //$NON-NLS-1$
- DOMUtilities.insertBeforeNode(node, newWS, null);
- }
- }
-
- /**
- * Indent before the start tag of the <node>passed in.
- */
- protected void indentStartTag(String indentString, Node node, Translator map) {
-
- Node parent = node.getParentNode();
- Text newWS = node.getOwnerDocument().createTextNode(getNewlineString(node) + indentString); //$NON-NLS-1$
- DOMUtilities.insertAfterNode(parent, newWS, DOMUtilities.getPreviousNodeSibling(node));
- }
-
- protected String calcIndentString(Node node) {
- Assert.isNotNull(node);
- Assert.isNotNull(node.getParentNode(), "Node must be connected into the tree"); //$NON-NLS-1$
-
- Node parent = node.getParentNode();
-
- String indentString = getNewlineString(node);
-
- // Find indentation string for this node based on its sibling or parent
- Node previousSibling = DOMUtilities.getPreviousNodeSibling(node);
- if (previousSibling != null) {
- indentString = primGetIndentString(previousSibling);
- } else {
- String parentIndentString = primGetIndentString(parent);
- indentString = parentIndentString + DOMUtilities.INDENT_STRING;
- }
- return indentString;
- }
-
- /**
- * @see com.ibm.etools.emf2xml.impl.AbstractEMF2DOMAdapterImpl#reorderDOMChild(Node, Node, Node,
- * Translator)
- */
- protected void reorderDOMChild(Node parentNode, Node childNode, Node insertBeforeNode, Translator map) {
- super.reorderDOMChild(parentNode, childNode, insertBeforeNode, map);
- // Since reordering deletes all the whitespace before the node, we must indent .
- if (insertBeforeNode != null && insertBeforeNode.getNodeType() == Node.ELEMENT_NODE)
- indentStartTag(calcIndentString(insertBeforeNode), insertBeforeNode, map);
- else
- indentStartTag(calcIndentString(childNode), childNode, map);
- }
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(EObject mofObject, Translator childMap) {
-
- Element newNode = createNewNode(mofObject, childMap);
- return new EMF2DOMSedAdapter(mofObject, newNode, fRenderer, childMap);
- }
-
-
- /**
- * Create an adapter for a child DOM node
- *
- * @param node
- * org.w3c.dom.Node The node to create the adapter for.
- */
- protected EMF2DOMAdapter primCreateAdapter(Node node, Translator childMap) {
- return new EMF2DOMSedAdapter(node, fRenderer, childMap);
- }
-
- /*
- * Do nothing for SED, we will tolerate anything they add
- */
- protected void handleInvalidMultiNodes(String nodeName) {
- //Do nothing
- }
-
- /*
- * Do nothing for SED, we will tolerate anything they add
- */
- protected void handleFeatureValueConversionException(FeatureValueConversionException ex) {
- //Do nothing
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRenderer.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRenderer.java
deleted file mode 100644
index e393ccc85..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRenderer.java
+++ /dev/null
@@ -1,493 +0,0 @@
-package org.eclipse.jst.j2ee.internal.emf2xml.sed;
-
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.ArrayList;
-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.IFolder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jem.util.emf.workbench.ProjectResourceSet;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapter;
-import org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResource;
-import org.eclipse.wst.common.internal.emf.utilities.DOMUtilities;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.integration.ResourceSetWorkbenchEditSynchronizer;
-import org.eclipse.wst.sse.core.internal.model.ModelLifecycleEvent;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLifecycleListener;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelStateListener;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.StructuredModelManager;
-import org.eclipse.wst.xml.core.internal.document.DocumentTypeImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-public class EMF2DOMSedRenderer extends EMF2DOMRenderer implements IModelStateListener, IModelLifecycleListener {
-
- /** The XML DOM model */
- protected IDOMModel xmlModel;
-
- /** Used internally; the unique id for the xml model */
- protected String xmlModelId;
-
- private IModelManager modelManager;
-
- protected Object aboutToChangeNode = null;
-
- protected boolean xmlModelReverted = false;
-
- protected boolean isBatchChanges = false;
-
- private boolean isSaving = false;
-
- public EMF2DOMSedRenderer() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.EMF2DOMRenderer#managesDOMAdapters()
- */
- protected boolean managesDOMAdapters() {
- return false;
- }
-
- protected EMF2DOMAdapter createRootDOMAdapter() {
- return new EMF2DOMSedAdapter(getResource(), document, this, getResource().getRootTranslator());
- }
-
- public void deRegisterAsModelStateListener() {
- if (xmlModel != null)
- xmlModel.removeModelStateListener(this);
- }
-
- public void deRegisterAsModelLifecycleListener() {
- if (xmlModel != null)
- xmlModel.removeModelLifecycleListener(this);
- }
-
- /**
- * Return the DOM model for this resource.
- */
- public IDOMModel getXMLModel() {
- return xmlModel;
- }
-
- public String getXMLModelId() {
- return xmlModelId;
- }
-
- public boolean isModified() {
- return (getXMLModel() != null && getXMLModel().isDirty());
- }
-
- public void modelAboutToBeChanged(IStructuredModel model) {
- if (model.getStructuredDocument() != null)
- aboutToChangeNode = model.getStructuredDocument().getFirstStructuredDocumentRegion();
- }
-
- public void modelChanged(IStructuredModel model) {
- if (isBatchChanges)
- return;
- try {
- if (aboutToChangeNode != null && model.getStructuredDocument() != null && model.getStructuredDocument().getFirstStructuredDocumentRegion() != aboutToChangeNode) {
- modelAccessForWrite();
- try {
- xmlModelReverted = true;
- resource.unload();
- } finally {
- if (getXMLModel() != null)
- getXMLModel().releaseFromEdit();
- }
- }
- } finally {
- aboutToChangeNode = null;
- }
- }
-
- public void accessForRead() {
- if (!resource.isNew()) {
- String id = getModelManagerId();
- getModelManager().getExistingModelForRead(id);
- }
- }
-
- public void accessForWrite() {
- modelAccessForWrite();
- }
-
- private void modelAccessForWrite() {
- String id = getModelManagerId();
- getModelManager().getExistingModelForEdit(id);
- }
-
- public void modelDirtyStateChanged(IStructuredModel model, boolean isDirty) {
- if (!isDirty && resource.isModified()) { //The XMLModel was saved
- resource.setModified(false);
- long stamp = WorkbenchResourceHelper.computeModificationStamp(resource);
- WorkbenchResourceHelper.setSynhronizationStamp(resource, stamp);
- }
- }
-
- public void modelResourceDeleted(IStructuredModel model) {
- //Do nothing
- }
-
- public void modelResourceMoved(IStructuredModel oldModel, IStructuredModel newModel) {
- //Do nothing
- }
-
- /**
- * This method is called just prior to being removed from the ResourceSet. Ensure that all
- * reference counts to the XMLModel are removed.
- */
- public void preDelete() {
- if (resource.isLoaded())
- deregisterFromXMLModel();
- }
-
- public void preUnload() {
- deregisterFromXMLModel();
- }
-
- private void deregisterFromXMLModel() {
- deRegisterAsModelStateListener();
- deRegisterAsModelLifecycleListener();
- // This try/catch block is a hack to fix defect 204114. This occurs
- // because
- // the model manager plugin is shut down and unloaded before the j2ee
- // plugin.
- // Calling getModelManager() can result in a class cast exception that
- // should
- // be ignored.
- //ModelManager mgr = null;
- try {
- getModelManager();
- } catch (ClassCastException exc) {
- return;
- }
- if (xmlModel != null) {
- int writeCount = resource.getWriteCount();
- int readCount = resource.getReadCount();
- for (int i = 0; i < writeCount; i++)
- xmlModel.releaseFromEdit();
- for (int ii = 0; ii < readCount; ii++)
- xmlModel.releaseFromRead();
- }
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getAdapter(resource.eAdapters(), EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null) {
- adapter.removeAdapters(adapter.getNode());
- }
- xmlModel = null;
- xmlModelId = null;
- }
-
- /**
- * Insert the method's description here. Creation date: (9/7/2001 10:49:53 AM)
- */
- public void registerAsModelStateListener() {
- this.xmlModel.addModelStateListener(this);
- }
-
- public void registerAsModelLifecycleListener() {
- this.xmlModel.addModelLifecycleListener(this);
- }
-
- /**
- * Return the DOM model for this resource.
- */
- public void setXMLModel(IDOMModel xmlModel) {
- deRegisterAsModelStateListener();
- deRegisterAsModelLifecycleListener();
- this.xmlModel = xmlModel;
- registerAsModelStateListener();
- registerAsModelLifecycleListener();
- }
-
- public void setXMLModelId(String id) {
- xmlModelId = id;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.Renderer#doSave(java.io.OutputStream, java.util.Map)
- */
- public void doSave(OutputStream outputStream, Map options) throws IOException {
-
- try {
- isSaving = true;
- if (null != outputStream) {
- throw new RuntimeException(UIResourceHandler.getString("EMF2DOMSedRenderer_UI_0", new Object[]{this.getClass().getName()}));} //$NON-NLS-1$
- createDOMTreeIfNecessary();
- ResourceSetWorkbenchEditSynchronizer synchronizer = (ResourceSetWorkbenchEditSynchronizer) ((ProjectResourceSet) resource.getResourceSet()).getSynchronizer();
- IFile aFile = WorkbenchResourceHelper.getFile(resource);
- try {
- synchronizer.preSave(aFile);
- xmlModel.save(aFile);
- } catch (CoreException ex) {
- synchronizer.removeFromRecentlySavedList(aFile);
- Logger.getLogger().logError(ex);
- }
- cacheSynchronizationStamp();
- } finally {
- isSaving = false;
- }
- }
-
- /**
- * @see com.ibm.etools.common.mof2dom.XMLDOMResource#wasReverted()
- */
- public boolean wasReverted() {
- return xmlModelReverted;
- }
-
- protected IModelManager getModelManager() {
- if (modelManager == null)
- modelManager = StructuredModelManager.getModelManager();
- return modelManager;
- }
-
- /**
- * Return id used to key the XML resource in the XML ModelManager.
- */
- protected String getModelManagerId() {
- if (xmlModelId == null) {
- IFile file = WorkbenchResourceHelper.getFile(getResource());
- if (file != null) {
- xmlModelId = getModelManager().calculateId(file);
- } else {
- xmlModelId = resource.getURI() + Long.toString(System.currentTimeMillis());
- }
- }
- return xmlModelId;
- }
-
- public void releaseFromRead() {
- if (xmlModel != null)
- xmlModel.releaseFromRead();
- }
-
- public void releaseFromWrite() {
- if (xmlModel != null)
- xmlModel.releaseFromEdit();
- }
-
- protected ResourceSet getResourceSet() {
- return resource == null ? null : resource.getResourceSet();
- }
-
- public boolean isShared() {
- if (getResourceSet() == null || xmlModel == null)
- return false;
- return xmlModel.isShared();
- }
-
- public boolean isSharedForWrite() {
- if (getResourceSet() == null || xmlModel == null)
- return false;
- return xmlModel.isSharedForEdit();
- }
-
- /**
- * Create a new Document given
- *
- * @aResource.
- */
- protected void createDocument() {
- TranslatorResource res = getResource();
- res.setDefaults();
- IFile file = WorkbenchResourceHelper.getFile(resource);
- InputStream is = DOMUtilities.createHeaderInputStream(res.getDoctype(), res.getPublicId(), res.getSystemId());
- if (is == null)
- return;
- try {
- try {
- List folders = new ArrayList();
- IContainer container = file.getParent();
- while (null != container && !container.exists() && container instanceof IFolder) {
- folders.add(container);
- container = container.getParent();
- }
- IFolder folder = null;
- for (int i = 0; i < folders.size(); i++) {
- folder = (IFolder) folders.get(i);
- folder.create(true, true, null);
- }
- file.create(is, true, null);
- file.setLocal(true, 1, null);
- } catch (CoreException e1) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e1);
- } finally {
- if (null != is) {
- is.close();
- }
- }
- initializeXMLModel(file, true);
- } catch (java.io.IOException ex) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(UIResourceHandler.getString("Unexpected_IO_exception_occurred_creating_xml_document_1_EXC_"));//$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- }
- }
-
- protected void createDOMTreeIfNecessary() {
- if (needsToCreateDOM)
- createDOMTree();
- }
-
- private IDOMModel initializeXMLModel(IFile file, boolean forWrite) throws UnsupportedEncodingException, IOException {
- if (file == null || !file.exists())
- throw new FileNotFoundException((file == null) ? "null" : file.getFullPath().toOSString()); //$NON-NLS-1$
- String id = getModelManagerId();
- try {
- if (forWrite)
- setXMLModel((IDOMModel) getModelManager().getModelForEdit(file));
- else
- setXMLModel((IDOMModel) getModelManager().getModelForRead(file));
- needsToCreateDOM = false;
- } catch (CoreException e) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(e);
- return null;
- }
- syncReferenceCounts(id, forWrite);
- if (xmlModel != null) {
- xmlModel.setModelManager(getModelManager());
- xmlModel.setBaseLocation(id);
- }
- if (xmlModel != null)
- document = xmlModel.getDocument();
- return xmlModel;
- }
-
- private void syncReferenceCounts(String id, boolean forWrite) {
- int editIndex = 0, readIndex = 0;
- if (forWrite)
- editIndex++;
- else
- readIndex++;
- int writeCount = resource.getWriteCount();
- int readCount = resource.getReadCount();
- for (int i = writeCount; i > editIndex; i--)
- modelManager.getExistingModelForEdit(id);
- for (int i = readCount; i > readIndex; i--)
- modelManager.getExistingModelForRead(id);
- }
-
- protected void loadDocument(InputStream in, Map options) throws IOException {
- if (null != in) {
- throw new RuntimeException(UIResourceHandler.getString("EMF2DOMSedRenderer_UI_1", new Object[]{this.getClass().getName()}));} //$NON-NLS-1$
- IFile file = WorkbenchResourceHelper.getFile(resource);
- initializeXMLModel(file, (resource.getWriteCount() != 0));
- cacheSynchronizationStamp();
- }
-
- private void cacheSynchronizationStamp() {
- IFile file = WorkbenchResourceHelper.getFile(resource);
- if (file != null) {
- if (xmlModel != null)
- xmlModel.resetSynchronizationStamp(file);
- }
- }
-
- public void setBatchMode(boolean isBatch) {
- if (isBatch) {
- isBatchChanges = true;
- getXMLModel().aboutToChangeModel();
- } else {
- setRootNodeAdapterNotificationEnabled(false);
- try {
- getXMLModel().changedModel();
- } finally {
- setRootNodeAdapterNotificationEnabled(true);
- }
- isBatchChanges = false;
- }
- }
-
- private void setRootNodeAdapterNotificationEnabled(boolean b) {
- EObject root = resource.getRootObject();
- if (root != null) {
- EMF2DOMAdapter adapter = (EMF2DOMAdapter) EcoreUtil.getExistingAdapter(root, EMF2DOMAdapter.ADAPTER_CLASS);
- if (adapter != null)
- adapter.setNotificationEnabled(b);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.impl.EMF2DOMRenderer#getExistingDOMAdapter(org.w3c.dom.Node)
- */
- public EMF2DOMAdapter getExistingDOMAdapter(Node node) {
- IDOMNode xNode = (IDOMNode) node;
- return (EMF2DOMSedAdapter) xNode.getAdapterFor(EMF2DOMAdapter.ADAPTER_CLASS);
- }
-
- public void removeDOMAdapter(Node aNode, EMF2DOMAdapter anAdapter) {
- ((IDOMNode) aNode).removeAdapter((EMF2DOMSedAdapter) anAdapter);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.internal.util.emf.xml.EMF2DOMRenderer#replaceDocumentType(java.lang.String,
- * java.lang.String, java.lang.String)
- */
- public void replaceDocumentType(String docTypeName, String publicId, String systemId) {
- if (document == null)
- return;
- DocumentTypeImpl docType = (DocumentTypeImpl) document.getDoctype();
- if (docType == null)
- return;
- if (publicId == null && systemId == null)
- document.removeChild(docType);
- else {
- docType.setPublicId(publicId);
- docType.setSystemId(systemId);
- }
- }
-
- public boolean useStreamsForIO() {
- return false;
- }
-
- public void processPostModelEvent(ModelLifecycleEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- public void processPreModelEvent(ModelLifecycleEvent event) {
- if (!isSaving) {
- if (event.getType() == ModelLifecycleEvent.MODEL_SAVED) {
- ResourceSetWorkbenchEditSynchronizer synchronizer = (ResourceSetWorkbenchEditSynchronizer) ((ProjectResourceSet) resource.getResourceSet()).getSynchronizer();
- IFile aFile = WorkbenchResourceHelper.getFile(resource);
- synchronizer.preSave(aFile);
- }
- }
- }
-
- public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
- // TODO Auto-generated method stub
-
- }
-
- public void modelReinitialized(IStructuredModel structuredModel) {
- // TODO Auto-generated method stub
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRendererFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRendererFactory.java
deleted file mode 100644
index adb48a0d7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/EMF2DOMSedRendererFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Created on Oct 10, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.emf2xml.sed;
-
-import org.eclipse.wst.common.internal.emf.resource.Renderer;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EMF2DOMSedRendererFactory extends RendererFactory {
-
- public static final EMF2DOMSedRendererFactory INSTANCE = new EMF2DOMSedRendererFactory();
-
- public EMF2DOMSedRendererFactory() {
- //Default constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.ibm.etools.emf2xml.RendererFactory#createRenderer()
- */
- public Renderer createRenderer() {
- return new EMF2DOMSedRenderer();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/UIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/UIResourceHandler.java
deleted file mode 100644
index dd95b26ad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/emf2xml/sed/UIResourceHandler.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jst.j2ee.internal.emf2xml.sed;
-
-/*
- * Licensed Material - Property of IBM (C) Copyright IBM Corp. 2001, 2002 - All Rights Reserved. US
- * Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP
- * Schedule Contract with IBM Corp.
- */
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class UIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("emftosed");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
-
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/IValidateEditListener.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/IValidateEditListener.java
deleted file mode 100644
index 0544eb584..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/IValidateEditListener.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.listeners;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.swt.events.ShellListener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter;
-
-
-public interface IValidateEditListener extends ResourceStateValidatorPresenter, IPartListener, ShellListener {
- /**
- * This method should be called by any action that is about to edit any contents of any IFile.
- */
- public IStatus validateState();
-
- /**
- * Return true if there are any read only IFiles that are being managed.
- *
- * @return boolean
- * @see com.ibm.etools.emf.workbench.ResourceStateInputProvider#getResources()
- */
- boolean hasReadOnlyFiles();
-
- /**
- * This method should be called prior to saving the contents. It returns true if the contents
- * can be saved.
- */
- boolean checkSave() throws CoreException;
-
- /**
- * Use this method to set the Shell that will be used to prompt to the user.
- */
- void setShell(Shell aShell);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java
deleted file mode 100644
index 6bbb9fce0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.listeners;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.ListMessageDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-
-public class ValidateEditListener extends ShellAdapter implements IValidateEditListener {
- protected ResourceStateValidator fValidator;
- private boolean fNeedsStateValidation = true;
- private Shell fShell;
- private IWorkbenchPart fPart;
- private boolean fHasReadOnlyFiles = false;
- private boolean firstReadOnlyFileAttempt = true;
- private boolean fMessageUp = false;
- private boolean fIsActivating = false;
- private boolean fIsDeactivating = false;
-
- /**
- * Constructor for ValidateEditHandler.
- */
- public ValidateEditListener(IWorkbenchPart part, ResourceStateValidator aValidator) {
- super();
- fPart = part;
- fValidator = aValidator;
- if (part != null)
- part.getSite().getPage().addPartListener(this);
- if (getShell() != null)
- getShell().addShellListener(this);
- }
-
- protected Shell getShell() {
- if (fShell == null) {
- if (fPart != null && fPart.getSite() != null)
- fShell = fPart.getSite().getShell();
- }
- return fShell;
- }
-
- /**
- * @see IValidateEditListener#getValidator()
- */
- public ResourceStateValidator getValidator() {
- return fValidator;
- }
-
- /**
- * @see IValidateEditListener#getNeedsStateValidation()
- */
- public boolean getNeedsStateValidation() {
- return fNeedsStateValidation;
- }
-
- /**
- * @see IValidateEditListener#setNeedsStateValidation(boolean)
- */
- public void setNeedsStateValidation(boolean needsStateValidation) {
- fNeedsStateValidation = needsStateValidation;
- }
-
- /**
- * @see ResourceStateValidatorPresenter#promptForInconsistentFileRefresh(List)
- */
- public boolean promptForInconsistentFileRefresh(List inconsistentFiles) {
- if (inconsistentFiles == null || inconsistentFiles.size() == 0) // this case should never
- // occur.
- return false;
- String title = null;
- String message = null;
- String[] fileNames = new String[inconsistentFiles.size()];
- for (int i = 0; inconsistentFiles.size() > i; i++) {
- Object file = inconsistentFiles.get(i);
- if (file instanceof Resource) {
- IFile aFile = WorkbenchResourceHelper.getFile((Resource) file);
- fileNames[i] = aFile.getFullPath().toOSString();
- } else if (file instanceof IResource) {
- IResource resfile = (IResource) file;
- if (!resfile.exists()) {
- return false;
- }
- fileNames[i] = resfile.getFullPath().toOSString();
- }
- }
-
-
- title = J2EEUIMessages.getResourceString("Inconsistent_Files_3"); //$NON-NLS-1$
- message = J2EEUIMessages.getResourceString("The_following_workspace_files_are_inconsistent_with_the_editor_4"); //$NON-NLS-1$
- message += J2EEUIMessages.getResourceString("Update_the_editor_with_the_workspace_contents__5"); //$NON-NLS-1$
- return ListMessageDialog.openQuestion(getShell(), title, message, fileNames);
- }
-
- /**
- * @see ResourceStateValidatorPresenter#getValidateEditContext()
- */
- public Object getValidateEditContext() {
- return getShell();
- }
-
- /**
- * @see IPartListener#partActivated(IWorkbenchPart)
- */
- public void partActivated(IWorkbenchPart part) {
- if (part == fPart) {
- handleActivation();
- }
- }
-
- protected void handleActivation() {
- if (fIsActivating)
- return;
- fIsActivating = true;
- try {
- fValidator.checkActivation(this);
- updatePartReadOnly();
- } catch (CoreException e) {
- // do nothing for now
- } finally {
- fIsActivating = false;
- }
- }
-
- /**
- * @see org.eclipse.swt.events.ShellListener#shellActivated(ShellEvent)
- */
- public void shellActivated(ShellEvent event) {
- handleActivation();
- }
-
- /**
- * @see IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- //do nothing
- }
-
- /**
- * @see IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part == fPart)
- part.getSite().getPage().removePartListener(this);
- if (getShell() != null)
- getShell().removeShellListener(this);
- }
-
- /**
- * @see IPartListener#partDeactivated(IWorkbenchPart)
- */
- public void partDeactivated(IWorkbenchPart part) {
- if (part == fPart) {
- if (fIsDeactivating)
- return;
- fIsDeactivating = true;
- try {
- fValidator.lostActivation(this);
- updatePartReadOnly();
- } catch (CoreException e) {
- // do nothing for now
- } finally {
- fIsDeactivating = true;
- }
- }
- }
-
- /**
- * @see IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- //do nothing
- }
-
- public IStatus validateState() {
- if (fNeedsStateValidation) {
- setNeedsStateValidation(false);
- IStatus status = null;
- try {
- status = fValidator.validateState(this);
- if (status.getSeverity() == IStatus.ERROR) {
- setNeedsStateValidation(true);
- if (!fMessageUp) {
- fMessageUp = true;
- MessageDialog.openError(getShell(), J2EEUIMessages.getResourceString("Error_checking_out_files_10"), status.getMessage()); //$NON-NLS-1$
- fMessageUp = false;
- }
- }
- fValidator.checkActivation(this);
- updatePartReadOnly();
- } catch (CoreException e) {
- // do nothing for now
- }
- return status;
- }
- return ResourceStateValidator.OK_STATUS;
- }
-
- /**
- * @see ResourceStateValidatorPresenter#promptForInconsistentFileOverwrite(List)
- */
- public boolean promptForInconsistentFileOverwrite(List inconsistentFiles) {
- int size = inconsistentFiles.size();
- String[] items = new String[size];
- IFile file = null;
- for (int i = 0; i < size; i++) {
- file = (IFile) inconsistentFiles.get(i);
- items[i] = file.getFullPath().toString();
- }
- return ListMessageDialog.openQuestion(getShell(), J2EEUIMessages.getResourceString("Inconsistent_files_detected_11"), //$NON-NLS-1$
- J2EEUIMessages.getResourceString("The_following_files_are_inconsistent_with_the_file_system._Do_you_want_to_save_and_overwrite_these_files_on_the_file_system__12_WARN_"), //$NON-NLS-1$
- items);
- }
-
- protected boolean checkReadOnly() {
- fHasReadOnlyFiles = fValidator.checkReadOnly();
- return fHasReadOnlyFiles;
- }
-
- /**
- * @see IValidateEditListener#hasReadOnlyFiles()
- */
- public boolean hasReadOnlyFiles() {
- if (firstReadOnlyFileAttempt) {
- checkReadOnly();
- firstReadOnlyFileAttempt = false;
- }
- return fHasReadOnlyFiles;
- }
-
- /**
- * Method updatePartReadOnly.
- */
- protected void updatePartReadOnly() {
- if (!getNeedsStateValidation()) {
- checkReadOnly();
- setNeedsStateValidation(true);
- } else { //So that J2EEXMLActionBarContributor get updated info when editor Activated.
- firstReadOnlyFileAttempt = true;
- }
- }
-
- public boolean checkSave() throws CoreException {
- return validateState().isOK() && getValidator().checkSave(this);
- }
-
- public void setShell(Shell aShell) {
- fShell = aShell;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java
deleted file mode 100644
index c360d1eca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Created on Dec 7, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.perspective;
-
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-
-/**
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEPerspective implements org.eclipse.ui.IPerspectiveFactory {
-
- protected static String ID_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
- //protected static String ID_J2EE_HIERARCHY_VIEW = "org.eclipse.wst.navigator.ui.WTPCommonNavigator"; //$NON-NLS-1$
- protected static String ID_J2EE_HIERARCHY_VIEW = "org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator"; //$NON-NLS-1$
-
-
-
- public J2EEPerspective() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
- */
- public void createInitialLayout(IPageLayout layout) {
- defineLayout(layout);
- defineActions(layout);
- }
-
- public void defineActions(IPageLayout layout) {
- layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet2"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet3"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet4"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.jdt.ui.JavaActionSet"); //$NON-NLS-1$
- layout.addActionSet("org.eclipse.debug.ui.launchActionSet");//$NON-NLS-1$
- layout.addShowViewShortcut(ID_J2EE_HIERARCHY_VIEW);
- layout.addShowViewShortcut(ID_SERVERS_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- }
-
- public void defineLayout(IPageLayout layout) {
- // Editors are placed for free.
- String editorArea = layout.getEditorArea();
-
- // Top left.
- IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea);//$NON-NLS-1$
- topLeft.addView(ID_J2EE_HIERARCHY_VIEW);
-
- // Bottom left.
- IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, (float) 0.66, "topLeft");//$NON-NLS-1$ //$NON-NLS-2$
- bottomLeft.addView(IPageLayout.ID_OUTLINE);
-
- // Bottom right.
- IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, (float) 0.66, editorArea);//$NON-NLS-1$
- bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
- bottomRight.addView(IPageLayout.ID_TASK_LIST);
- bottomRight.addView(IPageLayout.ID_PROP_SHEET);
- bottomRight.addView(ID_SERVERS_VIEW);
- }
-}
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java
deleted file mode 100644
index bf58cbbf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.plugin;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.EditorManager;
-
-
-
-public class CommonEditorUtility {
-
- public static final Class IRESOURCE_CLASS = IResource.class;
-
- private CommonEditorUtility() {
- super();
- }
-
- /**
- * Returns an array of all editors that have an unsaved content. If the identical content is
- * presented in more than one editor, only one of those editor parts is part of the result.
- *
- * @return an array of all dirty editor parts.
- */
- public static IEditorPart[] getDirtyEditors() {
- return getDirtyEditors(null);
- }
-
- /**
- * Returns an array of all editors that have an unsaved content, where the content is include in
- * one of the projects in the List parameter. If the identical content is presented in more than
- * one editor, only one of those editor parts is part of the result.
- *
- * @return an array of all dirty editor parts.
- */
- public static IEditorPart[] getDirtyEditors(List projects) {
- Set inputs = new HashSet();
- List result = new ArrayList(0);
- IWorkbench workbench = J2EEUIPlugin.getPluginWorkbench();
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (int i = 0; i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int x = 0; x < pages.length; x++) {
- IEditorPart[] editors = pages[x].getDirtyEditors();
- for (int z = 0; z < editors.length; z++) {
- IEditorPart ep = editors[z];
- IEditorInput input = ep.getEditorInput();
- if (!inputs.contains(input) && (projects == null || inputInProjects(input, projects))) {
- inputs.add(input);
- result.add(ep);
- }
- }
- }
- }
- return (IEditorPart[]) result.toArray(new IEditorPart[result.size()]);
- }
-
- public static boolean inputInProjects(IEditorInput input, List projects) {
- IResource res = (IResource) input.getAdapter(IRESOURCE_CLASS);
- IProject project = res == null ? null : res.getProject();
- if (project == null)
- return false;
- for (int i = 0; i < projects.size(); i++) {
- if (project.equals(projects.get(i)))
- return true;
- }
- return false;
- }
-
- public static boolean promptToSaveAllDirtyEditors() {
- return promptToSaveDirtyEditors(Arrays.asList(getDirtyEditors()));
- }
-
- public static boolean promptToSaveDirtyEditors(List dirtyEditors) {
- if (dirtyEditors.isEmpty())
- return true;
- return EditorManager.saveAll(dirtyEditors, true, J2EEUIPlugin.getActiveWorkbenchWindow());
- }
-
- public static boolean promptToSaveDirtyEditorsInProjects(List projects) {
- return promptToSaveDirtyEditors(Arrays.asList(getDirtyEditors(projects)));
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java
deleted file mode 100644
index 25b71019c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.plugin;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.SWTException;
-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.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * Added a Details button to the MessageDialog to show the exception stack trace.
- *
- * Borrowed from an eclipse InternalErrorDialog
- */
-public class ErrorDialog extends MessageDialog {
- protected static final String[] LABELS_OK = {IDialogConstants.OK_LABEL};
- protected static final String[] LABELS_OK_CANCEL = {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL};
- protected static final String[] LABELS_OK_DETAILS = {IDialogConstants.OK_LABEL, IDialogConstants.SHOW_DETAILS_LABEL};
- protected static final String[] LABELS_OK_CANCEL_DETAILS = {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL, IDialogConstants.SHOW_DETAILS_LABEL};
- private Throwable detail;
- private int detailButtonID = -1;
- private Text text;
- private String message;
- //Workaround. SWT does not seem to set the default button if
- //there is not control with focus. Bug: 14668
- private int defaultButtonIndex = 0;
- /**
- * Size of the text in lines.
- */
- private static final int TEXT_LINE_COUNT = 15;
-
- public ErrorDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, Throwable detail, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- defaultButtonIndex = defaultIndex;
- this.detail = detail;
- message = dialogMessage;
- setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.RESIZE);
- }
-
- //Workaround. SWT does not seem to set rigth the default button if
- //there is not control with focus. Bug: 14668
- public int open() {
- create();
- Button b = getButton(defaultButtonIndex);
- b.setFocus();
- b.getShell().setDefaultButton(b);
- return super.open();
- }
-
- /**
- * Set the detail button;
- */
- public void setDetailButton(int index) {
- detailButtonID = index;
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == detailButtonID) {
- toggleDetailsArea();
- } else {
- setReturnCode(buttonId);
- close();
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- if (text != null) {
- text.dispose();
- text = null;
- getButton(detailButtonID).setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownText((Composite) getContents());
- getButton(detailButtonID).setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent
- * the parent composite
- * @return the drop-down list component
- */
- protected void createDropDownText(Composite parent) {
- // create the list
- text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- // print the stacktrace in the text field
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(baos);
- detail.printStackTrace(ps);
- if ((detail instanceof SWTError) && (((SWTError) detail).throwable != null)) {
- ps.println("\n*** Stack trace of contained exception ***"); //$NON-NLS-1$
- ((SWTError) detail).throwable.printStackTrace(ps);
- } else if ((detail instanceof SWTException) && (((SWTException) detail).throwable != null)) {
- ps.println("\n*** Stack trace of contained exception ***"); //$NON-NLS-1$
- ((SWTException) detail).throwable.printStackTrace(ps);
- }
- ps.flush();
- baos.flush();
- text.setText(baos.toString());
- } catch (IOException e) {
- //Ignore
- }
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.heightHint = text.getLineHeight() * TEXT_LINE_COUNT;
- text.setLayoutData(data);
- }
-
- public static boolean openError(Shell parent, String title, String message, Throwable detail, int defaultIndex, boolean showCancel) {
- String[] labels;
- if (detail == null)
- labels = showCancel ? LABELS_OK_CANCEL : LABELS_OK;
- else
- labels = showCancel ? LABELS_OK_CANCEL_DETAILS : LABELS_OK_DETAILS;
- ErrorDialog dialog = new ErrorDialog(parent, title, null, // accept
- // the
- // default
- // window
- // icon
- message, detail, ERROR, labels, defaultIndex);
- if (detail != null)
- dialog.setDetailButton(labels.length - 1);
- return dialog.open() == 0;
- }
-
- protected Control createDialogArea(Composite parent) {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parent.getFont());
- ((GridLayout) composite.getLayout()).numColumns = 2;
- // create image
- Image image = composite.getDisplay().getSystemImage(SWT.ICON_ERROR);
- if (image != null) {
- Label label = new Label(composite, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));
- }
- // create message
- if (message != null) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- }
- return composite;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java
deleted file mode 100644
index e5db3709f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package org.eclipse.jst.j2ee.internal.plugin;
-
-/*
- * Licensed Material - Property of IBM
- * (C) Copyright IBM Corp. 2002 - All Rights Reserved.
- * US Government Users Restricted Rights - Use, duplication or disclosure
- * restricted by GSA ADP Schedule Contract with IBM Corp.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
-import org.eclipse.jem.internal.adapters.jdom.JavaClassJDOMAdaptor;
-import org.eclipse.jem.internal.java.adapters.ReadAdaptor;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.java.JavaPackage;
-import org.eclipse.jem.util.emf.workbench.JavaProjectUtilities;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-/*
- * Licensed Materials - Property of IBM,
- * WebSphere Studio Workbench
- * (c) Copyright IBM Corp 1999, 2000
- */
-
-/**
- * A number of routines for working with JavaElements in editors
- *
- * Use 'isOpenInEditor' to test if an element is already open in a editor Use 'openInEditor' to
- * force opening an element in a editor With 'getWorkingCopy' you get the working copy (element in
- * the editor) of an element
- */
-public class J2EEEditorUtility {
- // //$NON-NLS-1$
- public static final String EJB_JAVA_EDITOR_ID = "org.eclipse.jst.j2ee.internal.internal.ejb.ui.misc.EJBJavaEditor"; //$NON-NLS-1$
-
- public static ICompilationUnit getCompilationUnit(JavaClass javaClass) {
- IProject project = ProjectUtilities.getProject(javaClass);
- if (project == null)
- return null;
- return getCompilationUnit(javaClass, project);
- }
-
- public static ICompilationUnit getCompilationUnit(JavaClass javaClass, IProject project) {
- if (javaClass == null)
- return null;
- IJavaProject javaProj = getJavaProject(project);
- if (javaProj == null)
- return null;
- return getCompilationUnit(javaClass, javaProj);
- }
-
- public static ICompilationUnit getCompilationUnit(JavaClass javaClass, IJavaProject javaProject) {
- if (javaClass == null)
- return null;
- IType type = getType(javaClass);
- if (type != null)
- return type.getCompilationUnit();
- return null;
- }
-
- public static IType getType(JavaClass javaClass) {
- if (javaClass != null) {
- JavaClassJDOMAdaptor adaptor = (JavaClassJDOMAdaptor) EcoreUtil.getRegisteredAdapter(javaClass, ReadAdaptor.TYPE_KEY);
- if (adaptor != null)
- return adaptor.getSourceType();
- }
- return null;
- }
-
- public static IEditorInput getEditorInput(Object input) {
- if (input instanceof EObject)
- return new FileEditorInput(WorkbenchResourceHelper.getFile((EObject) input));
- if (input instanceof IFile)
- return new FileEditorInput((IFile) input);
- return null;
- }
-
- public static IFile getFile(JavaClass javaClass) {
- ICompilationUnit comp = getCompilationUnit(javaClass);
- if (comp == null)
- return null;
- IEditorInput input = null;
- try {
- input = EditorUtility.getEditorInput(comp);
- } catch (JavaModelException ex) {
- return null;
- }
- if (input != null) {
- return (IFile) input.getAdapter(IFile.class);
- }
- return null;
- }
-
- public static IJavaProject getJavaProject(IProject aProject) {
- if (aProject == null)
- return null;
- IJavaModel javaModel = JavaProjectUtilities.getJavaModel();
- return javaModel.getJavaProject(aProject.getName());
- }
-
- /**
- * Return the IPackageFragment for the JavaPackage for
- *
- * @javaClass.
- */
- public static IPackageFragment getPackageFragment(JavaClass javaClass, IJavaProject javaProject) {
- if (javaProject != null) {
- try {
- JavaPackage javaPackage = (JavaPackage) javaClass.eContainer();
- String packageName = javaPackage.getName();
- IPackageFragment[] pkgFrags = javaProject.getPackageFragments();
- for (int i = 0; i < pkgFrags.length; i++) {
- if ((pkgFrags[i].getElementName().equals(packageName)))
- return pkgFrags[i];
- }
- } catch (JavaModelException e) {
- //Ignore
- }
- }
- return null;
- }
-
- /**
- * Opens a Java editor for the given element if the element is a Java compilation unit or a Java
- * class file.
- *
- * @return the IEditorPart or null if wrong element type or opening failed
- */
- public static IEditorPart openInEditor(JavaClass javaClass, IProject aProject) throws JavaModelException, PartInitException {
- return openInEditor(javaClass, getJavaProject(aProject));
- }
-
- /**
- * Opens a Java editor for the given element if the element is a Java compilation unit or a Java
- * class file.
- *
- * @return the IEditorPart or null if wrong element type or opening failed
- */
- public static IEditorPart openInEditor(JavaClass javaClass, IJavaProject javaProject) throws JavaModelException, PartInitException {
- if (javaClass == null || javaProject == null)
- return null;
- IType type = getType(javaClass);
- if (type == null)
- return openInEditor(getCompilationUnit(javaClass, javaProject));
- return EditorUtility.openInEditor(type);
- }
-
-
- /**
- * Opens a Java editor for the given element if the element is a Java compilation unit or a Java
- * class file.
- *
- * @return the IEditorPart or null if wrong element type or opening failed
- */
- public static IEditorPart openInEditor(JavaClass javaClass, IJavaProject javaProject, String editorId) throws JavaModelException, PartInitException {
- return openInEditor(getCompilationUnit(javaClass, javaProject), editorId);
- }
-
- /**
- * Opens a Java editor for the given element if the element is a Java compilation unit or a Java
- * class file.
- *
- * @return the IEditorPart or null if wrong element type or opening failed
- */
- public static IEditorPart openInEditor(ICompilationUnit aCompilationUnit) throws JavaModelException, PartInitException {
- return EditorUtility.openInEditor(aCompilationUnit);
- }
-
- /**
- * Opens a Java editor for the given element if the element is a Java compilation unit or a Java
- * class file.
- *
- * @return the IEditorPart or null if wrong element type or opening failed
- */
- public static IEditorPart openInEditor(ICompilationUnit aCompilationUnit, String editorId) throws JavaModelException, PartInitException {
- return openInEditor(EditorUtility.getEditorInput(aCompilationUnit), editorId);
- }
-
- private static IEditorPart openInEditor(IEditorInput input, String editorID) throws PartInitException {
- if (input != null) {
- IWorkbenchPage p = J2EEUIPlugin.getActiveWorkbenchWindow().getActivePage();
- if (p != null)
- return p.openEditor(input, editorID, true);
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java
deleted file mode 100644
index 76e4aa35a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Created on Jun 30, 2004
- */
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.ui.actions.ILaunchable;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * @author jlanuti
- */
-public class J2EEUIAdapterFactory implements IAdapterFactory {
-
- protected static final Class ILAUNCHABLE_CLASS = ILaunchable.class;
-
- /**
- * Default Constructor
- */
- public J2EEUIAdapterFactory() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adaptableObject instanceof EObject) {
- if (adapterType == ILAUNCHABLE_CLASS)
- return adaptableObject;
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{ILAUNCHABLE_CLASS};
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java
deleted file mode 100644
index 45d86d2d0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Feb 27, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.plugin;
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public interface J2EEUIContextIds {
- //Migration Wizard
- public static final String MIGRATION_WIZARD_GENERAL = J2EEUIPlugin.PLUGIN_ID + ".migr1000"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_EAR = J2EEUIPlugin.PLUGIN_ID + ".migr1000"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_EJB = J2EEUIPlugin.PLUGIN_ID + ".migr1100"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_CMP = J2EEUIPlugin.PLUGIN_ID + ".migr1500"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_WEB = J2EEUIPlugin.PLUGIN_ID + ".migr1200"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_APP_CLIENT = J2EEUIPlugin.PLUGIN_ID + ".migr1300"; //$NON-NLS-1$
- public static final String MIGRATION_WIZARD_CONNECTOR = J2EEUIPlugin.PLUGIN_ID + ".migr1400"; //$NON-NLS-1$
-
- // Delete Enterprise Bean Dialog
- public static final String DELETE_ENTERPRISE_BEAN_DIALOG = J2EEUIPlugin.PLUGIN_ID + ".delb1000"; //$NON-NLS-1$
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java
deleted file mode 100644
index a47863cf4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.plugin;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.wst.common.frameworks.internal.Messages;
-
-
-public class J2EEUIMessages extends Messages {
-
- private static final J2EEUIMessages INSTANCE = new J2EEUIMessages();
-
- public static final String PROJECT_LOC_LBL = "1"; //$NON-NLS-1$
- public static final String TARGET_SERVER_LBL = "2"; //$NON-NLS-1$
- public static final String J2EE_VERSION_LBL = "3"; //$NON-NLS-1$
- public static final String IMAGE_LOAD_ERROR = "4"; //$NON-NLS-1$
- public static final String APP_PROJECT_WIZ_TITLE = "5"; //$NON-NLS-1$
- public static final String APP_PROJECT_MAIN_PG_TITLE = "6"; //$NON-NLS-1$
- public static final String APP_PROJECT_MAIN_PG_DESC = "7"; //$NON-NLS-1$
- public static final String APP_PROJECT_MODULES_PG_TITLE = "8"; //$NON-NLS-1$
- public static final String APP_PROJECT_MODULES_PG_DESC = "9"; //$NON-NLS-1$
- public static final String APP_PROJECT_MODULES_PG_SELECT = "10"; //$NON-NLS-1$
- public static final String APP_PROJECT_MODULES_PG_DESELECT = "11"; //$NON-NLS-1$
- public static final String APP_PROJECT_MODULES_PG_NEW = "12"; //$NON-NLS-1$
- public static final String EAR_PROJECT_FOR_MODULE_CREATION = "13"; //$NON-NLS-1$
- public static final String NEW_THREE_DOTS_E = "14"; //$NON-NLS-1$
- public static final String NEW_THREE_DOTS_W = "14a"; //$NON-NLS-1$
- public static final String LINK_MODULETO_EAR_PROJECT = "15"; //$NON-NLS-1$
- public static final String NEW_MOD_SEL_PG_TITLE = "16"; //$NON-NLS-1$
- public static final String NEW_MOD_SEL_PG_DESC = "17"; //$NON-NLS-1$
- public static final String NEW_MOD_WIZ_TITLE = "18"; //$NON-NLS-1$
- public static final String NEW_MOD_SEL_PG_DEF_BTN = "19"; //$NON-NLS-1$
- public static final String APP_CLIENT_PROJ_LBL = "20"; //$NON-NLS-1$
- public static final String EJB_PROJ_LBL = "21"; //$NON-NLS-1$
- public static final String WEB_PROJ_LBL = "22"; //$NON-NLS-1$
- public static final String JCA_PROJ_LBL = "23"; //$NON-NLS-1$
-
- public static final String APP_CLIENT_PROJECT_WIZ_TITLE = "24"; //$NON-NLS-1$
- public static final String APP_CLIENT_VERSION_LBL = "3"; //$NON-NLS-1$
- public static final String APP_CLIENT_PROJECT_MAIN_PG_TITLE = "25"; //$NON-NLS-1$
-
- public static final String APP_CLIENT_PROJECT_MAIN_PG_DESC = "26"; //$NON-NLS-1$
- public static final String MODULES_DEPENDENCY_PAGE_TITLE = "27"; //$NON-NLS-1$
-
- public static final String MODULES_DEPENDENCY_PAGE_DESC = "28"; //$NON-NLS-1$
- public static final String MODULES_DEPENDENCY_PAGE_AVAILABLE_JARS = "29"; //$NON-NLS-1$
- public static final String MODULES_DEPENDENCY_PAGE_CLASSPATH = "30"; //$NON-NLS-1$
- public static final String MODULES_DEPENDENCY_PAGE_TABLE_MODULE = "31"; //$NON-NLS-1$
- public static final String MODULES_DEPENDENCY_PAGE_TABLE_PROJECT = "32"; //$NON-NLS-1$
- public static final String NEW_LBL = "33"; //$NON-NLS-1$
- public static final String APP_CLIENT_IMPORT_MAIN_PG_DESC = "34"; //$NON-NLS-1$
- public static final String APP_CLIENT_IMPORT_MAIN_PG_TITLE = "35"; //$NON-NLS-1$
- public static final String APP_CLIENT_IMPORT_FILE_LABEL = "36"; //$NON-NLS-1$
-
- public static final String APP_CLIENT_IMPORT_PROJECT_LABEL = "37"; //$NON-NLS-1$
-
- public static final String IMPORT_WIZ_TITLE = "38"; //$NON-NLS-1$
- public static final String EAR_IMPORT_MAIN_PG_DESC = "39"; //$NON-NLS-1$
- public static final String EAR_IMPORT_MAIN_PG_TITLE = "40"; //$NON-NLS-1$
- public static final String EAR_IMPORT_FILE_LABEL = "41"; //$NON-NLS-1$
- public static final String OVERWRITE_RESOURCES = "42"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_TYPE = "43"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_TYPE_BINARY = "44"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_TYPE_SOURCE = "45"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PARTIAL_DEVELOPMENT = "46"; //$NON-NLS-1$
- public static final String EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON = "48"; //$NON-NLS-1$
- public static final String EAR_IMPORT_SELECT_ALL_UTIL_BUTTON = "47"; //$NON-NLS-1$
- public static final String EAR_IMPORT_JARS_GROUP = "49"; //$NON-NLS-1$
- public static final String EAR_IMPORT_SELECT_UTIL_JARS_TO_BE_PROJECTS = "50"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_PG_DESC = "51"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_PG_TITLE = "52"; //$NON-NLS-1$
- public static final String PROJECT_LOCATIONS_GROUP = "53"; //$NON-NLS-1$
- public static final String NEW_PROJECT_GROUP_DESCRIPTION = "54"; //$NON-NLS-1$
- public static final String USE_DEFAULT_ROOT_RADIO = "55"; //$NON-NLS-1$
- public static final String USE_ALTERNATE_ROOT_RADIO = "56"; //$NON-NLS-1$
- public static final String SELECT_DIRECTORY_DLG = "57"; //$NON-NLS-1$
- public static final String EAR_IMPORT_Modules_in_EAR = "58"; //$NON-NLS-1$
- public static final String EAR_IMPORT_New_Project_Name = "59"; //$NON-NLS-1$
- public static final String EAR_IMPORT_FILENAMES = "60"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECTNAMES = "61"; //$NON-NLS-1$
- public static final String J2EE_EXPORT_DESTINATION = "62"; //$NON-NLS-1$
- public static final String J2EE_EXPORT_OVERWRITE_CHECKBOX = "63"; //$NON-NLS-1$
- public static final String J2EE_EXPORT_SOURCE_CHECKBOX = "64"; //$NON-NLS-1$
- public static final String APP_CLIENT_EXPORT_MAIN_PG_TITLE = "65"; //$NON-NLS-1$
- public static final String APP_CLIENT_EXPORT_MAIN_PG_DESC = "66"; //$NON-NLS-1$
- public static final String EXPORT_WIZ_TITLE = "67"; //$NON-NLS-1$
- public static final String EAR_EXPORT_MAIN_PG_TITLE = "68"; //$NON-NLS-1$
- public static final String EAR_EXPORT_MAIN_PG_DESC = "69"; //$NON-NLS-1$
- public static final String EAR_EXPORT_INCLUDE_PROJECT_FILES = "70"; //$NON-NLS-1$
- public static final String EAR_EXPORT_INCLUDE_PROJECT_FILES_DESC = "71"; //$NON-NLS-1$
- public static final String EAR_IMPORT_INCLUDE_PROJECT = "72"; //$NON-NLS-1$
- public static final String EAR_IMPORT_INCLUDE_EAR_PROJECT = "73"; //$NON-NLS-1$
- public static final String EAR_IMPORT_OVERWRITE_NESTED = "74"; //$NON-NLS-1$
- public static final String DELETE_PROJECT = "75"; //$NON-NLS-1$
- public static final String EAR_IMPORT_PROJECT_LABEL = "76"; //$NON-NLS-1$
-
- //string for migration
- public static final String ERROR_OCCURRED_TITLE = "77"; //$NON-NLS-1$
- public static final String ERROR_OCCURRED_MESSAGE = "78"; //$NON-NLS-1$
- public static final String BINARY_PROJECT = "79"; //$NON-NLS-1$
- public static final String ACTION_CANNOT_BE_PERFORMED_ON_BIN_PROJECT = "80"; //$NON-NLS-1$
- public static final String INFORMATION_UI_ = "81"; //$NON-NLS-1$
- public static final String CHOSEN_OP_NOT_AVAILABLE = "82"; //$NON-NLS-1$
-
- public static final String CREATE_EJB_CLIENT_JAR = "90"; //$NON-NLS-1$
- public static final String USE_ANNOTATIONS = "91"; //$NON-NLS-1$
- public static final String USE_ANNOTATIONS_SERVLET = "98"; //$NON-NLS-1$
- public static final String ADD_ANNOTATIONS_SUPPORT = "92"; //$NON-NLS-1$
- public static final String BROWSE_LABEL = "93"; //$NON-NLS-1$
- public static final String NAME_LABEL = "94"; //$NON-NLS-1$
-
- public static final String APP_CLIENT_CREATE_MAIN = "95"; //$NON-NLS-1$
- public static final String CREATE_DEFAULT_SESSION_BEAN = "96"; //$NON-NLS-1$
-
- public static final String MODULE_NAME = "99"; //$NON-NLS-1$
-
- public static final String J2EE_UTILITY_JAR_LISTEAR_IMPORT_SELECT_UTIL_JARS_TO_BE_PROJECTS = "97"; //$NON-NLS-1$
-
- public static final String FLEXIBLE_PROJECT_WIZ_TITLE = "FlexibleProjectCreationWizard.title"; //$NON-NLS-1$
- public static final String FLEXIBLE_PROJECT_MAIN_PG_TITLE = "FlexibleProjectCreationWizard.mainPage.title"; //$NON-NLS-1$
- public static final String FLEXIBLE_PROJECT_MAIN_PG_DESC = "FlexibleProjectCreationWizard.mainPage.desc"; //$NON-NLS-1$
- public static final String EAR_COMPONENT_WIZ_TITLE = "EARComponentCreationWizard.title"; //$NON-NLS-1$
- public static final String EAR_COMPONENT_MAIN_PG_TITLE = "EARComponentCreationWizard.mainPage.title"; //$NON-NLS-1$
- public static final String EAR_COMPONENT_MAIN_PG_DESC = "EARComponentCreationWizard.mainPage.desc"; //$NON-NLS-1$
- public static final String EAR_COMPONENT_SECOND_PG_TITLE = "EARComponentCreationWizard.secondPage.title"; //$NON-NLS-1$
- public static final String EAR_COMPONENT_SECOND_PG_DESC = "EARComponentCreationWizard.secondPage.desc"; //$NON-NLS-1$
- public static final String APPCLIENT_COMPONENT_WIZ_TITLE = "AppClientComponentCreationWizard.title"; //$NON-NLS-1$
- public static final String APPCLIENT_COMPONENT_MAIN_PG_TITLE = "AppClientComponentCreationWizard.mainPage.title"; //$NON-NLS-1$
- public static final String APPCLIENT_COMPONENT_MAIN_PG_DESC = "AppClientComponentCreationWizard.mainPage.desc"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_WIZ_TITLE = "DefaultJ2EEComponentCreationWizard.title"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_TITLE = "DefaultJ2EEComponentCreationWizard.page.title"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_DESC = "DefaultJ2EEComponentCreationWizard.page.desc"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_EJB_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.ejb"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_WEB_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.web"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_JCA_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.jca"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_APPCLIENT_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.appclient"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_NEW_MOD_SEL_PG_DEF_BTN = "DefaultJ2EEComponentCreationWizard.page.button.select"; //$NON-NLS-1$
-
- public final static String EMPTY_STRING = ""; //$NON-NLS-1$
- public final static String FOLDER_LABEL = getResourceString("FOLDER_LABEL"); //$NON-NLS-1$
- public final static String BROWSE_BUTTON_LABEL = getResourceString("BROWSE_BUTTON_LABEL"); //$NON-NLS-1$
- public final static String JAVA_PACKAGE_LABEL = getResourceString("JAVA_PACKAGE_LABEL"); //$NON-NLS-1$
- public final static String CLASS_NAME_LABEL = getResourceString("CLASS_NAME_LABEL"); //$NON-NLS-1$
- public final static String SUPERCLASS_LABEL = getResourceString("SUPERCLASS_LABEL"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_TITLE = getResourceString("CONTAINER_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_DESC = getResourceString("CONTAINER_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG = getResourceString("CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_TITLE = getResourceString("PACKAGE_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_DESC = getResourceString("PACKAGE_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_MSG_NONE = getResourceString("PACKAGE_SELECTION_DIALOG_MSG_NONE"); //$NON-NLS-1$
- public final static String SUPERCLASS_SELECTION_DIALOG_TITLE = getResourceString("SUPERCLASS_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String SUPERCLASS_SELECTION_DIALOG_DESC = getResourceString("SUPERCLASS_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String JAVA_CLASS_MODIFIERS_LABEL = getResourceString("JAVA_CLASS_MODIFIERS_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_INTERFACES_LABEL = getResourceString("JAVA_CLASS_INTERFACES_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_METHOD_STUBS_LABEL = getResourceString("JAVA_CLASS_METHOD_STUBS_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_PUBLIC_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_PUBLIC_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_FINAL_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_FINAL_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_MAIN_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_MAIN_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_INHERIT_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_INHERIT_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String ADD_BUTTON_LABEL = getResourceString("ADD_BUTTON_LABEL"); //$NON-NLS-1$
- public static final String REMOVE_BUTTON = getResourceString("REMOVE_BUTTON"); //$NON-NLS-1$
- public final static String INTERFACE_SELECTION_DIALOG_TITLE = getResourceString("INTERFACE_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
-
- public static final String JAVAUTIL_COMPONENT_WIZ_TITLE="JAVAUTIL_COMPONENT_WIZ_TITLE"; //$NON-NLS-1$
- public static final String JAVAUTILITY_MAIN_PG_TITLE = "JAVAUTILITY_MAIN_PG_TITLE";//$NON-NLS-1$
- public final static String JAVAUTILITY_MAIN_PG_DESC = "JAVAUTILITY_MAIN_PG_DESC";//$NON-NLS-1$
-
-
-
- /**
- * Returns the string from the resource bundle, or 'key' if not found.
- */
- public static String getResourceString(String key) {
- return INSTANCE.doGetResourceString(key);
- }
-
- public static String getResourceString(String key, Object[] args) {
- return INSTANCE.doGetResourceString(key, args);
- }
-
- private J2EEUIMessages() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.Messages#initializeBundle()
- */
- protected void initializeBundle() {
- try {
- resourceBundle = ResourceBundle.getBundle("j2ee_ui"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- //Ignore
- }
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java
deleted file mode 100644
index 539fb8b7f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.plugin;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashSet;
-
-import org.eclipse.core.internal.boot.PlatformURLConnection;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.internal.wizard.ImportUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class J2EEUIPlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.ui"; //$NON-NLS-1$
-
- //The shared instance.
- private static J2EEUIPlugin plugin;
- private static IPath location;
-
- /**
- * The constructor.
- */
- public J2EEUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static J2EEUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public static IPath getInstallLocation() {
- if (location == null) {
- URL url = getInstallURL();
- try {
- String installLocation = ((PlatformURLConnection) url.openConnection()).getURLAsLocal().getFile();
- location = new Path(installLocation);
- } catch (IOException e) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
- }
- }
- return location;
- }
-
- public static URL getInstallURL() {
- return getDefault().getBundle().getEntry("/");
- }
-
- public static String getArchiveDefaultProjectName(Archive anArchive) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultProjectName(anArchive.getURI(), type);
- }
-
- public static String getArchiveDefaultUtilProjectName(Archive anArchive) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultUtilProjectName(anArchive.getName(), type);
- }
-
- public static String getArchiveDefaultProjectName(Archive anArchive, HashSet moduleNames) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultProjectName(anArchive.getURI(), type, moduleNames);
- }
-
- public static int getArchiveType(Archive anArchive) {
- int type = ImportUtil.UNKNOWN;
- try {
- try {
- if (anArchive.isEJBJarFile())
- type = ImportUtil.EJBJARFILE;
- else if (anArchive.isWARFile())
- type = ImportUtil.WARFILE;
- else if (anArchive.isApplicationClientFile())
- type = ImportUtil.CLIENTJARFILE;
- else if (anArchive.isRARFile())
- type = ImportUtil.RARFILE;
- else if (anArchive.isEARFile())
- type = ImportUtil.EARFILE;
- } catch (Exception e) {
- //Ignore
- }
- } finally {
- if (anArchive != null)
- anArchive.close();
- }
- return type;
- }
-
- public static String getTypeDefaultProjectName(String text, int type) {
- IPath path = new Path(text);
- text = path.makeRelative().removeFileExtension().lastSegment();
-
- boolean exists = false;
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(text);
- if (project != null && project.exists())
- exists = true;
- if (exists && text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1)
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int j = 1; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 1) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (int i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- private static String getTypeDefaultProjectName(String text, int type, HashSet moduleNames) {
- IPath path = new Path(text);
- text = path.makeRelative().removeFileExtension().lastSegment();
-
- boolean isValidName = moduleNames.add(text);
- boolean exists = false;
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(text);
- if (project != null && project.exists())
- exists = true;
- if (!isValidName || (exists && text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1))
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int j = 1; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 1) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (int i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- // the following two methods are used by web editor
-
- private static String getTypeDefaultUtilProjectName(String text, int type) {
- text = text.substring(text.lastIndexOf(java.io.File.separator) + 1);
- int i = text.lastIndexOf('.');
- if (i > 0)
- text = text.substring(0, i);
- if (text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1)
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = getWorkspace().getRoot().getProjects();
- for (int j = 0; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 0) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- /**
- * Get a .gif from the image registry.
- */
- public Image getImage(String key) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(key);
- if (image == null || image.isDisposed()) {
- ImageDescriptor descriptor = getImageDescriptor(key);
- if (descriptor != null) {
- image = descriptor.createImage();
- imageRegistry.put(key, image);
- }
- }
- return image;
- }
-
- /**
- * This gets a .gif from the icons folder.
- */
- public ImageDescriptor getImageDescriptor(String key) {
- ImageDescriptor imageDescriptor = null;
- URL gifImageURL = getImageURL(key);
- if (gifImageURL != null)
- imageDescriptor = ImageDescriptor.createFromURL(gifImageURL);
- return imageDescriptor;
- }
-
- /**
- * @param key
- * @return
- */
- private URL getImageURL(String key) {
- return J2EEPlugin.getImageURL(key, getBundle());
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Return the workbench
- *
- * This method is internal to the j2ee plugin and must not be called by any other plugins.
- */
-
- public static IWorkbench getPluginWorkbench() {
- return getDefault().getWorkbench();
-
- }
-
- public static IStructuredSelection getCurrentSelection() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null) {
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
-
- }
- return null;
- }
-
-
-
- }
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPluginIcons.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPluginIcons.java
deleted file mode 100644
index 674084238..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPluginIcons.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 10, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.plugin;
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class J2EEUIPluginIcons {
-
- public static String EAR_IMPORT_WIZARD_BANNER = "import_ear_wiz"; //$NON-NLS-1$
- public static final String JCA_IMPORT_WIZARD_BANNER = "import_rar_wiz"; //$NON-NLS-1$
- public static final String EJB_IMPORT_WIZARD_BANNER = "import_ejbjar_wiz"; //$NON-NLS-1$
- public static final String APP_CLIENT_IMPORT_WIZARD_BANNER = "import_appclient_wiz"; //$NON-NLS-1$
- public static final String WEB_IMPORT_WIZARD_BANNER = "import_war_wiz"; //$NON-NLS-1$
- public static final String EAR_WIZ_BANNER = "ear_wiz"; //$NON-NLS-1$
- public static final String APP_CLIENT_PROJECT_WIZARD_BANNER = "appclient_wiz"; //$NON-NLS-1$
- //EJB Icons
- public static final String EJB_PROJECT_WIZARD_BANNER = "ejbproject_wiz"; //$NON-NLS-1$
- //WEB Icons
- public static final String WEB_PROJECT_WIZARD_BANNER = "war_wiz"; //$NON-NLS-1$
- //JCA Icons
- public static final String JCA_PROJECT_WIZARD_BANNER = "connector_wiz"; //$NON-NLS-1$
- public static final String APP_CLIENT_EXPORT_WIZARD_BANNER = "export_appclient_wiz"; //$NON-NLS-1$
- public static final String EJB_EXPORT_WIZARD_BANNER = "export_ejbjar_obj"; //$NON-NLS-1$;
- public static final String WEB_EXPORT_WIZARD_BANNER = "export_war_wiz"; //$NON-NLS-1$;
- public static final String JCA_EXPORT_WIZARD_BANNER = "export_rar_wiz"; //$NON-NLS-1$;
- public static final String EAR_EXPORT_WIZARD_BANNER = "export_ear_wiz"; //$NON-NLS-1$;
-
- //Migration Wizard Icons
-
- public static final String WARNING_TASK = "showwarn_tsk"; //$NON-NLS-1$
-
- public static final String CLIENT_BANNER = "ejbclientjar_wizban"; //$NON-NLS-1$
-
- public static final String MIGRATION_WIZARD_BANNER = "versionmigrate3_wiz"; //$NON-NLS-1$
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java
deleted file mode 100644
index 7e507cc5a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.plugin;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.common.util.CommonUtil;
-
-public class J2EEViewerSorter extends ViewerSorter {
-
- /**
- * Constructor for J2EEViewerSorter.
- */
- public J2EEViewerSorter() {
- super();
- }
-
-
-
- /**
- * @see ViewerSorter#compare(Viewer, Object, Object)
- */
- public int compare(Viewer viewer, Object e1, Object e2) {
- if (shouldSort(e1, e2))
- return super.compare(viewer, e1, e2);
- return 0;
- }
-
- protected boolean isEnterpriseBean(Object o) {
- return o instanceof EnterpriseBean;
- }
-
- protected boolean isDeploymentDescriptorRoot(Object o) {
- return CommonUtil.isDeploymentDescriptorRoot(o);
- }
-
- protected boolean shouldSort(Object e1, Object e2) {
- return (isDeploymentDescriptorRoot(e1) && isDeploymentDescriptorRoot(e2)) || (isEnterpriseBean(e1) && isEnterpriseBean(e2)) || ((e1 instanceof IFile) && (e2 instanceof IFile));
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java
deleted file mode 100644
index c90f8608b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Feb 2, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ItemProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-/**
- * @author mdelder
- */
-public class UIProjectUtilities {
-
- /**
- * @param selection
- * The current selection
- * @return The first project (regardless of nature) in the selection
- */
- public static IProject getSelectedProject(IStructuredSelection selection) {
- return getSelectedProject(selection, (String) null);
- }
-
- /**
- * @param selection
- * The current selection
- * @param expectedNatureId
- * The required Nature ID
- * @return The first project, only if the first project has the given nature
- */
- public static IProject getSelectedProject(IStructuredSelection selection, String expectedNatureId) {
-
- if (selection != null && !selection.isEmpty()) {
- if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length == 0)
- return null;
- Object obj = selection.getFirstElement();
- IProject project = null;
- if (obj instanceof IProject)
- project = (IProject) obj;
- else if (obj instanceof IAdaptable)
- project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);
- else if (obj instanceof EObject)
- project = ProjectUtilities.getProject((EObject) obj);
- else if (obj instanceof ItemProvider) {
- Object temp = ((ItemProvider) obj).getParent(EObject.class);
- if (temp != null && temp instanceof EObject)
- project = ProjectUtilities.getProject((EObject) temp);
- }
-
- if (project != null && expectedNatureId != null) {
- try {
- if (project.hasNature(expectedNatureId))
- return project;
- } catch (CoreException e) {
- return null;
- }
- } else
- return project;
- }
- return null;
- }
-
- /**
- *
- * @param selection
- * The current selection
- * @param possibleNatureIds
- * A list of possible nature ids
- * @return The first project selected, only if it has AT LEAST ONE of the possible nature ids
- */
- public static IProject getSelectedProject(IStructuredSelection selection, String[] possibleNatureIds) {
- if (selection != null && !selection.isEmpty()) {
- Object obj = selection.getFirstElement();
- IProject project = null;
- if (obj instanceof IProject)
- project = (IProject) obj;
- else if (obj instanceof IAdaptable)
- project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);
- else if (obj instanceof EObject)
- project = ProjectUtilities.getProject((EObject) obj);
-
- if (project != null && possibleNatureIds != null && possibleNatureIds.length > 0) {
- try {
- for (int i = 0; i < possibleNatureIds.length; i++)
- if (project.hasNature(possibleNatureIds[i]))
- return project;
- } catch (CoreException e) {
- return null;
- }
- } else
- return project;
- }
- return null;
- }
-
- /**
- *
- * @param selection
- * The current selection
- * @return All selected Projects, regardless of nature
- */
- public static IProject[] getAllSelectedProjects(IStructuredSelection selection) {
- return getAllSelectedProjects(selection, (String) null);
- }
-
- /**
- *
- * @param selection
- * The current selection
- * @param expectedNatureId
- * The expected nature id
- * @return All selected Projects which have the expected nature id
- */
- public static IProject[] getAllSelectedProjects(IStructuredSelection selection, String expectedNatureId) {
- if (selection != null && !selection.isEmpty()) {
- Object obj = null;
- List projects = new ArrayList();
- Iterator selectionIterator = selection.iterator();
- while (selectionIterator.hasNext()) {
- obj = selectionIterator.next();
- IProject project = null;
- if (obj instanceof IProject)
- project = (IProject) obj;
- else if (obj instanceof IAdaptable)
- project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);
- else if (obj instanceof EObject)
- project = ProjectUtilities.getProject((EObject) obj);
-
- if (project != null && expectedNatureId != null) {
- try {
-
- if (project.hasNature(expectedNatureId))
- projects.add(project);
-
- } catch (CoreException e) {
- //Ignore
- }
- } else
- projects.add(project);
- }
- IProject[] finalProjects = new IProject[projects.size()];
- projects.toArray(finalProjects);
- return finalProjects;
- }
- return new IProject[0];
- }
-
-
- /**
- *
- * @param selection
- * The current selection
- * @param possibleNatureIds
- * a list of possible nature ids
- * @return All selected Projects which have AT LEAST ONE of the given nature ids
- */
- public static IProject[] getAllSelectedProjects(IStructuredSelection selection, String[] possibleNatureIds) {
- if (selection != null && !selection.isEmpty()) {
- Object obj = null;
- List projects = new ArrayList();
- Iterator selectionIterator = selection.iterator();
- while (selectionIterator.hasNext()) {
- obj = selectionIterator.next();
- IProject project = null;
- if (obj instanceof IProject)
- project = (IProject) obj;
- else if (obj instanceof IAdaptable)
- project = (IProject) ((IAdaptable) obj).getAdapter(IProject.class);
- else if (obj instanceof EObject)
- project = ProjectUtilities.getProject((EObject) obj);
-
- if (project != null && possibleNatureIds != null && possibleNatureIds.length > 0) {
- try {
- for (int i = 0; i < possibleNatureIds.length; i++)
- if (project.hasNature(possibleNatureIds[i]))
- projects.add(project);
-
- } catch (CoreException e) {
- //Ignore
- }
- } else
- projects.add(project);
- }
- IProject[] finalProjects = new IProject[projects.size()];
- projects.toArray(finalProjects);
- return finalProjects;
- }
- return new IProject[0];
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java
deleted file mode 100644
index 9ca88ff0b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBJarItemProvider;
-
-
-public class J2EEAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
- protected MethodsProviderDelegate methodsProviderDelegate;
- protected static final Class ITreeItemContentProviderClass = ITreeItemContentProvider.class;
- protected List roots = new ArrayList();
-
- /**
- * J2EEAdapterFactoryContentProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEAdapterFactoryContentProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- methodsProviderDelegate = new MethodsProviderDelegate(adapterFactory);
- }
-
- public Object getParent(Object object) {
-
- if (MethodsProviderDelegate.providesContentFor(object))
- return methodsProviderDelegate.getParent(object);
-
- //Added so internalExpand() in AbstractTreeViewer knows that EJB's parent is now instance
- // of J2EEItemProvider
- //rather than EJBJar only if bean is root bean
- if (object instanceof EnterpriseBean && GroupedEJBJarItemProvider.isRootBean((EnterpriseBean) object)) {
- J2EEItemProvider provider = GroupedEJBJarItemProvider.getEJBItemProvider((EnterpriseBean) object);
- if (provider != null) {
- return provider;
- }
- }
-
- Object parent = super.getParent(object);
-
- // if (parent == null) {
- // if (object instanceof EObject)
- // return J2EERoot.instance().groupFor((EObject) object);
- // }
- return parent;
- }
-
- protected boolean isEMFEditObject(Object object) {
- ITreeItemContentProvider treeItemContentProvider = (ITreeItemContentProvider) adapterFactory.adapt(object, ITreeItemContentProviderClass);
- return treeItemContentProvider != null;
- }
-
- /*
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
-
- if (MethodsProviderDelegate.providesContentFor(parentElement))
- return methodsProviderDelegate.getChildren(parentElement);
- else if (isEMFEditObject(parentElement))
- return super.getChildren(parentElement);
- else
- return null;
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- return getRoots(inputElement);
- // else if (MethodsProviderDelegate.providesContentFor(inputElement))
- // return methodsProviderDelegate.getChildren(inputElement);
- // return super.getElements(inputElement);
- }
-
- public Object[] getRoots(Object parent) {
- if (roots.isEmpty()) {
- Object[] j2eeGroups = super.getChildren(parent);
- roots.addAll(Arrays.asList(j2eeGroups));
- }
- return roots.toArray();
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (MethodsProviderDelegate.providesContentFor(element))
- return methodsProviderDelegate.hasChildren(element);
- else if (isEMFEditObject(element))
- return super.hasChildren(element);
- else
- return false;
- }
-
- /**
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- if (methodsProviderDelegate != null)
- methodsProviderDelegate.dispose();
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
- super.inputChanged(aViewer, oldInput, newInput);
- methodsProviderDelegate.inputChanged(aViewer, oldInput, newInput);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java
deleted file mode 100644
index f67990832..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jst.j2ee.internal.common.CommonPackage;
-import org.eclipse.jst.j2ee.internal.common.util.CommonUtil;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-import org.eclipse.jst.j2ee.internal.ejb.provider.AbstractMethodsContentProvider;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 10:40:41 PM)
- *
- * @author: Administrator
- */
-public class J2EEAdapterFactoryLabelProvider extends AdapterFactoryLabelProvider {
- // //$NON-NLS-1$
- protected static final Class IItemLabelProviderClass = IItemLabelProvider.class;
- private static final EStructuralFeature ROLE_NAME_SF = CommonPackage.eINSTANCE.getSecurityRole_RoleName();
- private static final EStructuralFeature ROLES_SF = EjbFactoryImpl.getPackage().getMethodPermission_Roles();
-
-
- /**
- * This is used for delegation to get labels for server objects, which don't fit into EMF edit
- */
- protected WorkbenchLabelProvider wbLabelProvider;
-
- public J2EEAdapterFactoryLabelProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- wbLabelProvider = new WorkbenchLabelProvider();
- }
-
- public Image getImage(Object object) {
- if (object instanceof J2EEJavaClassProviderHelper)
- return ((J2EEJavaClassProviderHelper) object).getImage();
- else if (isEMFEditObject(object))
- return super.getImage(object);
- else if (object instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return super.getImage(((AbstractMethodsContentProvider.EJBMethodItem) object).ejb);
- return wbLabelProvider.getImage(object);
- }
-
- public String getText(Object object) {
-
- if (object instanceof J2EEJavaClassProviderHelper)
- return ((J2EEJavaClassProviderHelper) object).getText();
- else if (isEMFEditObject(object)) {
- if (CommonUtil.isDeploymentDescriptorRoot(object))
- return J2EEUIMessages.getResourceString("Deployment_Descriptor_UI_") + ": " + super.getText(object); //$NON-NLS-1$ //$NON-NLS-2$
- return super.getText(object);
- } else if (object instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return super.getText(((AbstractMethodsContentProvider.EJBMethodItem) object).ejb);
- else if (object instanceof IFile) {
- return ((IFile) object).getProjectRelativePath().toString();
- }
- return wbLabelProvider.getText(object);
- }
-
- protected boolean isEMFEditObject(Object object) {
- IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProviderClass);
- return itemLabelProvider != null;
- }
-
- /*
- * @see INotifyChangedListener#notifyChanged(new ENotificationImpl((InternalEObject)Object,
- * int,(EStructuralFeature) Object, Object, Object, int))
- */
- public void notifyChanged(Notification notification) {
- Object feature = notification.getFeature();
- if (feature == ROLE_NAME_SF || feature == ROLES_SF)
- fireLabelProviderChanged();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java
deleted file mode 100644
index cae7caf58..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.internal.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.internal.application.impl.ApplicationFactoryImpl;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationItemProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.EARProjectMap;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EENotificationImpl;
-
-public class J2EEApplicationItemProvider extends ApplicationItemProvider implements IAdaptable {
-
- protected static final Class IRESOURCE_CLASS = IResource.class;
- protected static final Class IPROJECT_CLASS = IProject.class;
-
- protected Map children = new HashMap();
- protected List resourceAdapters = null;
-
- /**
- * Constructor for J2EEApplicationItemProvider.
- *
- * @param adapterFactory
- */
- public J2EEApplicationItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * @see ItemProviderAdapter#getChildren(Object)
- */
- public Collection getChildren(Object object) {
- List localChildren = (List) children.get(object);
- if (localChildren == null)
- return initChildren(object);
- return localChildren;
- }
-
- protected List initChildren(Object object) {
- Application app = (Application) object;
- List localChildren = new ArrayList(2);
- // MDE: changed getParent(object) to just app
- localChildren.add(new ModulesItemProvider(getAdapterFactory(), null, null, app, app.getModules()));
-
- IProject project = ProjectUtilities.getProject(app);
- EAREditModel editModel = null;
- try {
- EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
- if (runtime != null) {
- editModel = runtime.getEarEditModelForRead(this);
- EARProjectMap map = editModel.getEARProjectMap();
- localChildren.add(map);
- map.eResource().eAdapters().add(getNewAdapter(app));
- }
- } finally {
- if (editModel != null)
- editModel.releaseAccess(this);
- }
- localChildren.add(new J2EEUtilityJarItemProvider(app, getAdapterFactory(), this));
-
- children.put(object, localChildren);
- return localChildren;
- }
-
- protected ModulesItemProvider getModulesNode(Object object) {
- return (ModulesItemProvider) ((List) getChildren(object)).get(0);
- }
-
-
- /**
- * @see Adapter#notifyChanged(new ENotificationImpl((InternalEObject)Notifier,
- * int,(EStructuralFeature) EObject, Object, Object, int))
- * @deprecated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Application.class)) {
- case ApplicationPackage.APPLICATION__MODULES :
- break;
- default :
- super.notifyChanged(notification);
- }
- if (notification.getEventType() == Notification.REMOVING_ADAPTER && notification.getOldValue() == this)
- children.remove(notification.getNotifier());
- else if (notification.getFeature() == ApplicationFactoryImpl.getPackage().getApplication_Modules())
- modulesChanged((Application) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
- }
-
- protected void modulesChanged(Application app, int eventType, Object oldValue, Object newValue, int pos) {
- ModulesItemProvider provider = getModulesNode(app);
- Collection grandChildren = provider.getChildren();
- switch (eventType) {
- case Notification.ADD : {
- grandChildren.add(newValue);
- break;
- }
- case Notification.ADD_MANY : {
- grandChildren.addAll((Collection) newValue);
- break;
- }
- case Notification.REMOVE : {
- grandChildren.remove(oldValue);
- break;
- }
- case Notification.REMOVE_MANY : {
- grandChildren.removeAll((Collection) oldValue);
- break;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#dispose()
- */
- public void dispose() {
- super.dispose();
- List adapters = getResourceAdapters();
- ResourceAdapter adapter = null;
- for (int i = 0; i < adapters.size(); i++) {
- adapter = (ResourceAdapter) adapters.get(i);
- adapter.getTarget().eAdapters().remove(adapter);
- }
- }
-
- protected class ResourceAdapter extends AdapterImpl {
-
- private Application app = null;
-
- public ResourceAdapter(Application app) {
- this.app = app;
- }
-
- public void notifyChanged(Notification notification) {
-
- Resource res = (Resource) notification.getNotifier();
- if (notification.getEventType() == Notification.SET && notification.getFeatureID(null) == Resource.RESOURCE__IS_LOADED && !res.isLoaded()) {
- J2EEApplicationItemProvider.this.children.remove(app);
- res.eAdapters().remove(ResourceAdapter.this);
- fireNotifyChanged(new J2EENotificationImpl(app, Notification.MOVE, (Object) null, (Object) null, 0));
-
- }
- }
- }
-
- protected ResourceAdapter getNewAdapter(Application key) {
- ResourceAdapter adapter = new ResourceAdapter(key);
- getResourceAdapters().add(adapter);
- return adapter;
- }
-
- /**
- * @return Returns the resourceAdapters.
- */
- protected List getResourceAdapters() {
- if (resourceAdapters == null)
- resourceAdapters = new ArrayList();
- return resourceAdapters;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java
deleted file mode 100644
index 483d13097..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationItemProviderAdapterFactory;
-
-
-public class J2EEApplicationItemProviderAdapterFactory extends ApplicationItemProviderAdapterFactory {
-
- /**
- * Constructor for J2EEApplicationAdapterFactory.
- */
- public J2EEApplicationItemProviderAdapterFactory() {
- super();
- }
-
- /**
- * @see ApplicationAdapterFactory#createApplicationAdapter()
- */
- public Adapter createApplicationAdapter() {
- return new J2EEApplicationItemProvider(this);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java
deleted file mode 100644
index ab07bd12f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.emf.edit.command.CreateCopyCommand;
-import org.eclipse.emf.edit.command.DragAndDropCommand;
-import org.eclipse.emf.edit.command.InitializeCopyCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.OverrideableCommand;
-import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.ReplaceCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-
-/**
- * Custom editing domain which provides hooks for creating override commands; should not be used
- * directly but can be subclassed to override commands as necessary. All the override methods by
- * default return null, so a subclass may override only a subset of the commands.
- */
-public class J2EEEditingDomain extends AdapterFactoryEditingDomain {
- /**
- * J2EEEditingDomain constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- * @param commandStack
- * CommandStack
- */
- public J2EEEditingDomain(org.eclipse.emf.common.notify.AdapterFactory adapterFactory, CommandStack commandStack) {
- super(adapterFactory, commandStack);
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createAddOverrideCommand(AddCommand addCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createCopyToClipboardOverrideCommand(CopyToClipboardCommand copyToClipboardCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createCreateCopyOverrideCommand(CreateCopyCommand createCopyCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createDragAndDropOverrideCommand(DragAndDropCommand dragAndDropCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createInitializeCopyOverrideCommand(InitializeCopyCommand initializeCopyCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createMoveOverrideCommand(MoveCommand moveCommand) {
- return null;
- }
-
- public Command createOverrideCommand(OverrideableCommand command) {
- if (command instanceof AddCommand) {
- AddCommand addCommand = (AddCommand) command;
- return createAddOverrideCommand(addCommand);
- } else if (command instanceof RemoveCommand) {
- RemoveCommand removeCommand = (RemoveCommand) command;
- return createRemoveOverrideCommand(removeCommand);
- } else if (command instanceof SetCommand) {
- SetCommand setCommand = (SetCommand) command;
- return createSetOverrideCommand(setCommand);
- } else if (command instanceof ReplaceCommand) {
- ReplaceCommand replaceCommand = (ReplaceCommand) command;
- return createReplaceOverrideCommand(replaceCommand);
- } else if (command instanceof MoveCommand) {
- MoveCommand moveCommand = (MoveCommand) command;
- return createMoveOverrideCommand(moveCommand);
- } else if (command instanceof CreateCopyCommand) {
- CreateCopyCommand createCopyCommand = (CreateCopyCommand) command;
- return createCreateCopyOverrideCommand(createCopyCommand);
- } else if (command instanceof InitializeCopyCommand) {
- InitializeCopyCommand initializeCopyCommand = (InitializeCopyCommand) command;
- return createInitializeCopyOverrideCommand(initializeCopyCommand);
- } else if (command instanceof CopyToClipboardCommand) {
- CopyToClipboardCommand copyToClipboardCommand = (CopyToClipboardCommand) command;
- return createCopyToClipboardOverrideCommand(copyToClipboardCommand);
- } else if (command instanceof PasteFromClipboardCommand) {
- PasteFromClipboardCommand pasteFromClipboardCommand = (PasteFromClipboardCommand) command;
- return createPasteFromClipboardOverrideCommand(pasteFromClipboardCommand);
- } else if (command instanceof DragAndDropCommand) {
- DragAndDropCommand dragAndDropCommand = (DragAndDropCommand) command;
- return createDragAndDropOverrideCommand(dragAndDropCommand);
- } else {
- return null;
- }
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createRemoveOverrideCommand(RemoveCommand removeCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createReplaceOverrideCommand(ReplaceCommand replaceCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createSetOverrideCommand(SetCommand setCommand) {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java
deleted file mode 100644
index 4352701fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-
-public class J2EEModulemapItemProviderAdapterFactory extends ModulemapItemProviderAdapterFactory {
-
- /**
- * Constructor for J2EEModulemapItemProviderAdapterFactory.
- */
- public J2EEModulemapItemProviderAdapterFactory() {
- super();
- }
-
- /**
- * @see ModulemapAdapterFactory#createEARProjectMapAdapter()
- */
- public Adapter createEARProjectMapAdapter() {
- return new J2EEUtilityJavaProjectsItemProvider(this, false);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java
deleted file mode 100644
index 3839ba39c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-public class J2EEProviderUtility {
-
- private J2EEProviderUtility() {
- super();
- }
-
- public static String prependProjectName(EObject object, String label) {
- String projectName = null;
- if (object.eResource() != null) {
- IProject proj = WorkbenchResourceHelper.getProject(object.eResource());
- if (proj != null)
- projectName = proj.getName();
- }
-
- if (projectName == null || projectName.equals(label))
- return label;
- else if (label == null || label.length() == 0)
- return projectName;
- else
- return projectName + ": " + label; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java
deleted file mode 100644
index 4ce6309ac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EEClipboard;
-import org.eclipse.jst.j2ee.internal.command.J2EECopyToClipboardOverrideCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EEPasteFromClipboardOverrideCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EERemoveOverrideCommand;
-
-
-public class J2EEUIEditingDomain extends J2EEEditingDomain {
- /**
- * J2EEUIEditingDomain constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- * @param commandStack
- * CommandStack
- */
- public J2EEUIEditingDomain(org.eclipse.emf.common.notify.AdapterFactory adapterFactory, CommandStack commandStack) {
- super(adapterFactory, commandStack);
- turnTraceOnIfDebugging();
- }
-
- protected Command createCopyToClipboardOverrideCommand(CopyToClipboardCommand copyToClipboardCommand) {
-
- if (copyToClipboardCommand instanceof J2EECopyToClipboardOverrideCommand)
- return null;
- return new J2EECopyToClipboardOverrideCommand(copyToClipboardCommand);
- }
-
- protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) {
- if (pasteFromClipboardCommand instanceof J2EEPasteFromClipboardOverrideCommand)
- return null;
- if (!(getClipboard() instanceof J2EEClipboard))
- return null;
- return new J2EEPasteFromClipboardOverrideCommand(pasteFromClipboardCommand);
- }
-
- protected Command createRemoveOverrideCommand(RemoveCommand removeCommand) {
- return new J2EERemoveOverrideCommand(removeCommand);
- }
-
- public J2EEClipboard getJ2EEClipboard() {
- return (J2EEClipboard) getClipboard();
- }
-
- public Object getParent(Object object) {
- Object parent = super.getParent(object);
- if (parent != null)
- return parent;
- if (object instanceof EObject)
- return ((EObject) object).eContainer();
- return null;
- }
-
- protected void turnTraceOnIfDebugging() {
- //AbstractCommand.Trace.enable();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java
deleted file mode 100644
index baf4c921d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFolder;
-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.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider;
-
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class J2EEUtilityJarItemProvider extends J2EEItemProvider {
-
- public final static String UTILITY_JARS = J2EEUIMessages.getResourceString("Utility_JARs_UI_"); //$NON-NLS-1$
-
- private boolean childrenLoaded = false;
- private Application application = null;
-
- /**
- * Constructor for J2EEUtilityJarItemProvider.
- */
- public J2EEUtilityJarItemProvider(Application app, AdapterFactory adapterFactory, Object parent) {
- super(adapterFactory);
- setParent(parent);
- application = app;
- UtilityJarResourceChangeListener.INSTANCE.addUtilityJarItemProvider(ProjectUtilities.getProject(application), this);
- }
-
- public boolean hasChildren(Object object) {
- getChildren(object);
- return !children.isEmpty();
- }
-
- public Collection getChildren(final Object object) {
- if (!childrenLoaded) {
- try {
- disableNotification();
- org.eclipse.swt.custom.BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- computeChildren();
- }
- });
- } finally {
- enableNotification();
- }
- }
- return children;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- UtilityJarResourceChangeListener.INSTANCE.removeUtilityJarItemProvider(ProjectUtilities.getProject(application), this);
-
- }
-
- /**
- * @see ItemProvider#getChildren(Object)
- */
- private void computeChildren() {
- childrenLoaded = true;
- IProject project = ProjectUtilities.getProject(application);
- if (project != null) {
- IResource[] members;
- try {
- members = project.members();
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- return;
- }
- List list = new ArrayList();
- getJars(list, members);
- children.addAll(list);
- }
- }
-
- private Collection getJars(List list, IResource[] members) {
- for (int i = 0; i < members.length; i++) {
- if (isJarFile(members[i])) {
- list.add(members[i]);
- } else if (members[i].getType() == IResource.FOLDER) {
- try {
- getJars(list, ((IFolder) members[i]).members());
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- return list;
- }
-
- public static boolean isJarFile(IResource member) {
- return member.getType() == IResource.FILE && member.getName().toLowerCase().endsWith(".jar"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getText(Object)
- */
- public String getText(Object object) {
- return UTILITY_JARS;
- }
-
- // assume this resource is a jar resource
- public void utilityJarChanged(IResource resource, IResourceDelta delta) {
- if (childrenLoaded) {
- if (delta.getKind() == IResourceDelta.ADDED && !children.contains(resource)) {
- children.add(resource);
- } else if (delta.getKind() == IResourceDelta.REMOVED && children.contains(resource)) {
- children.remove(resource);
- }
- }
- }
-
- protected static class UtilityJarResourceChangeListener implements IResourceChangeListener, IResourceDeltaVisitor {
-
- protected static final UtilityJarResourceChangeListener INSTANCE = new UtilityJarResourceChangeListener();
-
- private boolean listening = false;
- private Map earProjectsToUtilityJarProviderMap;
-
- public void addUtilityJarItemProvider(IProject project, J2EEUtilityJarItemProvider utilityJarItemProvider) {
- List providers = getProviders(project);
- if (providers != null)
- providers.add(utilityJarItemProvider);
- if (!listening) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- listening = true;
- }
- }
-
- /**
- * @param project
- * @return
- */
- private List getProviders(IProject project) {
- List result = (List) getEarProjectsToUtilityJarProviderMap().get(project);
- if (result == null && project != null)
- getEarProjectsToUtilityJarProviderMap().put(project, (result = new ArrayList()));
- return result;
- }
-
- /**
- * @return
- */
- private Map getEarProjectsToUtilityJarProviderMap() {
- if (earProjectsToUtilityJarProviderMap == null)
- earProjectsToUtilityJarProviderMap = new HashMap();
- return earProjectsToUtilityJarProviderMap;
- }
-
- public void removeUtilityJarItemProvider(IProject project, J2EEUtilityJarItemProvider utilityJarItemProvider) {
- List providers = getProviders(project);
- providers.remove(utilityJarItemProvider);
- if (providers.isEmpty())
- getEarProjectsToUtilityJarProviderMap().remove(project);
-
- if (getEarProjectsToUtilityJarProviderMap().isEmpty()) {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- listening = false;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- event.getDelta().accept(this);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) {
- switch (delta.getResource().getType()) {
- case IResource.ROOT :
- case IResource.FOLDER :
- return true;
-
- case IResource.PROJECT :
- return getEarProjectsToUtilityJarProviderMap().containsKey(delta.getResource());
- case IResource.FILE : {
- IResource resource = delta.getResource();
- if (isJarFile(resource)) {
- List utilityJarItemProviders = getProviders(resource.getProject());
- for (int i = 0; i < utilityJarItemProviders.size(); i++)
- ((J2EEUtilityJarItemProvider) utilityJarItemProviders.get(i)).utilityJarChanged(resource, delta);
- }
- return false;
- }
-
- }
- return false;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IRESOURCE_CLASS || adapter == IPROJECT_CLASS)
- return (application != null) ? ProjectUtilities.getProject(application) : null;
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java
deleted file mode 100644
index 5c3af74e3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public class J2EEUtilityJavaProjectsItemProvider extends EARProjectMapItemProvider {
-
- public final static String UTILITY_JAVA_PROJECTS = J2EEUIMessages.getResourceString("Utility_Java_Projects_UI_"); //$NON-NLS-1$
-
- /**
- * Constructor for UtilityJARsItemProvider.
- *
- * @param adapterFactory
- */
- public J2EEUtilityJavaProjectsItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * Constructor for UtilityJARsItemProvider.
- *
- * @param adapterFactory
- * @param includeModules
- */
- public J2EEUtilityJavaProjectsItemProvider(AdapterFactory adapterFactory, boolean includeModules) {
- super(adapterFactory, includeModules);
- }
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getText(Object)
- */
- public String getText(Object object) {
- return UTILITY_JAVA_PROJECTS;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java
deleted file mode 100644
index 3682b6962..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.ejb.ExcludeList;
-import org.eclipse.jst.j2ee.ejb.MethodPermission;
-import org.eclipse.jst.j2ee.ejb.MethodTransaction;
-import org.eclipse.jst.j2ee.internal.ejb.impl.EjbFactoryImpl;
-import org.eclipse.jst.j2ee.internal.ejb.provider.AbstractMethodsContentProvider;
-import org.eclipse.jst.j2ee.internal.ejb.provider.ExcludeListContentProvider;
-import org.eclipse.jst.j2ee.internal.ejb.provider.MethodPermissionsContentProvider;
-import org.eclipse.jst.j2ee.internal.ejb.provider.MethodTransactionContentProvider;
-
-
-public class MethodsProviderDelegate implements ITreeContentProvider {
-
- protected ExcludeListContentProvider excludeListContentProvider;
- protected MethodPermissionsContentProvider methodPermissionsContentProvider;
- protected MethodTransactionContentProvider methodTransactionContentProvider;
-
- protected static EObject EL_META = EjbFactoryImpl.getPackage().getExcludeList();
- protected static EObject MP_META = EjbFactoryImpl.getPackage().getMethodPermission();
- protected static EObject MT_META = EjbFactoryImpl.getPackage().getMethodTransaction();
-
- public static boolean providesContentFor(Object object) {
- return object instanceof AbstractMethodsContentProvider.EJBMethodItem || object instanceof MethodPermission || object instanceof MethodTransaction || object instanceof ExcludeList;
- }
-
- public MethodsProviderDelegate(AdapterFactory adapterFactory) {
- super();
- excludeListContentProvider = new ExcludeListContentProvider(adapterFactory, false);
- methodPermissionsContentProvider = new MethodPermissionsContentProvider(adapterFactory, false);
- methodTransactionContentProvider = new MethodTransactionContentProvider(adapterFactory, false);
- }
-
- /**
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- if (excludeListContentProvider != null)
- excludeListContentProvider.dispose();
- if (methodPermissionsContentProvider != null)
- methodPermissionsContentProvider.dispose();
- if (methodTransactionContentProvider != null)
- methodTransactionContentProvider.dispose();
- }
-
- public AbstractMethodsContentProvider getContentProvider(Object object) {
- EObject metaClass = null;
- if (object instanceof AbstractMethodsContentProvider.EJBMethodItem)
- metaClass = ((AbstractMethodsContentProvider.EJBMethodItem) object).refObject.eClass();
- else
- metaClass = ((EObject) object).eClass();
-
- if (metaClass == EL_META)
- return excludeListContentProvider;
- else if (metaClass == MP_META)
- return methodPermissionsContentProvider;
- else if (metaClass == MT_META)
- return methodTransactionContentProvider;
-
- return null;
- }
-
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- excludeListContentProvider.inputChanged(viewer, oldInput, newInput);
- methodPermissionsContentProvider.inputChanged(viewer, oldInput, newInput);
- methodTransactionContentProvider.inputChanged(viewer, oldInput, newInput);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- AbstractMethodsContentProvider prov = getContentProvider(parentElement);
- return prov == null ? null : prov.getChildren(parentElement);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
- */
- public Object getParent(Object element) {
- AbstractMethodsContentProvider prov = getContentProvider(element);
- return prov == null ? null : prov.getParent(element);
- }
-
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- AbstractMethodsContentProvider prov = getContentProvider(element);
- return prov != null && prov.hasChildren(element);
- }
-
- /**
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- AbstractMethodsContentProvider prov = getContentProvider(inputElement);
- return prov == null ? null : prov.getElements(inputElement);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java
deleted file mode 100644
index 37fc3a501..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.provider;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-
-public class ModulesItemProvider extends J2EEItemProvider {
- public static final String MODULES = J2EEUIMessages.getResourceString("Modules_UI_"); //$NON-NLS-1$
-
- /**
- * Constructor for ModulesItemProvider.
- */
- public ModulesItemProvider() {
- super();
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param children
- */
- public ModulesItemProvider(Collection children) {
- super(children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- */
- public ModulesItemProvider(String text) {
- super(text);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- * @param children
- */
- public ModulesItemProvider(String text, Collection children) {
- super(text, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- * @param image
- */
- public ModulesItemProvider(String text, Object image) {
- super(text, image);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- * @param image
- * @param children
- */
- public ModulesItemProvider(String text, Object image, Collection children) {
- super(text, image, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- * @param image
- * @param parent
- */
- public ModulesItemProvider(String text, Object image, Object parent) {
- super(text, image, parent);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param text
- * @param image
- * @param parent
- * @param children
- */
- public ModulesItemProvider(String text, Object image, Object parent, Collection children) {
- super(text, image, parent, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- */
- public ModulesItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text) {
- super(adapterFactory, text);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text, Object image) {
- super(adapterFactory, text, image);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param parent
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent) {
- super(adapterFactory, text, image, parent);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param children
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, Collection children) {
- super(adapterFactory, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param children
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text, Collection children) {
- super(adapterFactory, text, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param children
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text, Object image, Collection children) {
- super(adapterFactory, text, image, children);
- }
-
- /**
- * Constructor for ModulesItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param parent
- * @param children
- */
- public ModulesItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- public Application getParentApplication() {
- return (Application) getParent();
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.provider.J2EEItemProvider#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IRESOURCE_CLASS || adapter == IPROJECT_CLASS)
- return ProjectUtilities.getProject(getParentApplication());
- return super.getAdapter(adapter);
- }
-
-
- /**
- * @see IItemLabelProvider#getText(Object)
- */
- public String getText(Object object) {
- return MODULES;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java
deleted file mode 100644
index 17497d8c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.ui.util;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.util.emf.workbench.JavaProjectUtilities;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.widgets.Shell;
-
-public class BinaryProjectUIHelper {
-
- public static final String DIALOG_TITLE = J2EEUIMessages.getResourceString("BINARY_PROJECT"); //$NON-NLS-1$
- public static final String DIALOG_MESSAGE = J2EEUIMessages.getResourceString("ACTION_CANNOT_BE_PERFORMED_ON_BIN_PROJECT"); //$NON-NLS-1$
-
- /**
- * Constructor for BinaryProjectUIHelper.
- */
- public BinaryProjectUIHelper() {
- super();
- }
-
- public static void displayError(Shell parent) {
- MessageDialog.openError(parent, DIALOG_TITLE, DIALOG_MESSAGE);
- return;
- }
-
- public static boolean displayErrorIfBinaryProject(Shell parent, IProject aProject) {
- boolean isBinary = JavaProjectUtilities.isBinaryProject(aProject);
- if (isBinary)
- displayError(parent);
- return isBinary;
- }
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java
deleted file mode 100644
index b9621d8c5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationWrapper;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppItemProvider;
-import org.eclipse.jst.j2ee.internal.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.internal.webservices.WebServiceEditModel;
-import org.eclipse.jst.j2ee.internal.webservices.WebServicesManager;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webservice.internal.wsclient.Webservice_clientPackage;
-import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener;
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Generation - Code and Comments
- */
-public class J2EEWebAppItemProvider extends WebAppItemProvider {
-
- private List children = new ArrayList();
- private WebServletGroupItemProvider webServletGroup;
- private WebServletMappingGroupItemProvider webServletMappingGroup;
- private WebFiltersGroupItemProvider webFiltersGroup;
- private WebFilterMappingGroupItemProvider webFilterMappingGroup;
- private WebReferencesGroupItemProvider webRefsGroup;
- private WebSecurityGroupItemProvider webSecurityGroup;
- private J2EEWebServiceClientDDManager clientMgr;
- private WebListenerGroupItemProvider webListenerGroup;
-
- /**
- * Listen and fire updates for 1.3 web service clients
- */
- private class J2EEWebServiceClientDDManager extends AdapterImpl implements EditModelListener {
- private WebApp webApp;
- private WebServicesManager webServiceMgr = WebServicesManager.getInstance();
- WebServiceEditModel editModel;
- WebServicesClient client;
-
- public J2EEWebServiceClientDDManager(WebApp webApp) {
- this.webApp = webApp;
- init();
- }
-
- public void setWebApp(WebApp webApp) {
- this.webApp = webApp;
- }
-
- public void init() {
- editModel = webServiceMgr.getWSEditModel(ProjectUtilities.getProject(webApp));
- if (editModel != null) {
- editModel.addListener(this);
- if (editModel.get13WebServicesClientResource() != null) {
- client = editModel.get13WebServicesClientResource().getWebServicesClient();
- if (client != null)
- client.eAdapters().add(this);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener#editModelChanged(org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent)
- */
- public void editModelChanged(EditModelEvent anEvent) {
- if (editModel == null)
- init();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.ADD || notification.getEventType() == Notification.ADD_MANY || notification.getEventType() == Notification.REMOVE
- || notification.getEventType() == Notification.REMOVE_MANY) {
- if (notification.getFeatureID(WebServicesClient.class) == Webservice_clientPackage.WEB_SERVICES_CLIENT__SERVICE_REFS) {
- NotificationWrapper notificationWrapper = new NotificationWrapper(webRefsGroup, notification);
- fireNotifyChanged(notificationWrapper);
- }
- }
- super.notifyChanged(notification);
- }
-
- public void dispose() {
- if (editModel != null) {
- editModel.removeListener(this);
- if (editModel.get13WebServicesClientResource() != null) {
- client = editModel.get13WebServicesClientResource().getWebServicesClient();
- if (client != null)
- client.eAdapters().remove(this);
- }
- }
- }
- }
- /**
- * Default constructor
- */
- public J2EEWebAppItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * initilaize list of children
- */
- private void initChildren(WebApp webApp) {
- if (clientMgr == null)
- clientMgr = new J2EEWebServiceClientDDManager(webApp);
- children.add(webServletGroup = new WebServletGroupItemProvider(adapterFactory, webApp));
- children.add(webServletMappingGroup = new WebServletMappingGroupItemProvider(adapterFactory, webApp));
- children.add(webFiltersGroup = new WebFiltersGroupItemProvider(adapterFactory, webApp));
- children.add(webFilterMappingGroup = new WebFilterMappingGroupItemProvider(adapterFactory, webApp));
- children.add(webRefsGroup = new WebReferencesGroupItemProvider(adapterFactory, webApp));
- children.add(webSecurityGroup = new WebSecurityGroupItemProvider(adapterFactory, webApp));
- children.add(webListenerGroup = new WebListenerGroupItemProvider(adapterFactory, webApp));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- if (object instanceof WebApp && children.isEmpty()) {
- WebApp webApp = (WebApp) object;
- initChildren(webApp);
- }
- if (object instanceof WebApp)
- setWebAppOnChildren((WebApp) object);
- return children;
- }
-
- /**
- * @param app
- */
- private void setWebAppOnChildren(WebApp app) {
- for (int i = 0; i < children.size(); i++) {
- if (children.get(i) instanceof WebGroupItemProvider) {
- WebGroupItemProvider provider = (WebGroupItemProvider) children.get(i);
- provider.setWebApp(app);
- }
- }
- if (clientMgr != null)
- clientMgr.setWebApp(app);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- // We only care about adds and removes for the different item provider
- // groups
- if (notification.getEventType() == Notification.ADD || notification.getEventType() == Notification.ADD_MANY || notification.getEventType() == Notification.REMOVE
- || notification.getEventType() == Notification.REMOVE_MANY) {
- Object notifier = null;
- switch (notification.getFeatureID(WebApp.class)) {
- case WebapplicationPackage.WEB_APP__SERVLETS :
- notifier = webServletGroup;
- break;
- case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS :
- notifier = webServletMappingGroup;
- break;
- case WebapplicationPackage.WEB_APP__FILTERS :
- notifier = webFiltersGroup;
- break;
- case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS :
- notifier = webFilterMappingGroup;
- break;
- case WebapplicationPackage.WEB_APP__EJB_LOCAL_REFS :
- case WebapplicationPackage.WEB_APP__EJB_REFS :
- case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATION_REFS :
- case WebapplicationPackage.WEB_APP__RESOURCE_ENV_REFS :
- case WebapplicationPackage.WEB_APP__RESOURCE_REFS :
- case WebapplicationPackage.WEB_APP__SERVICE_REFS :
- notifier = webRefsGroup;
- break;
- case WebapplicationPackage.WEB_APP__SECURITY_ROLES :
- case WebapplicationPackage.WEB_APP__CONSTRAINTS :
- notifier = webSecurityGroup;
- break;
- case WebapplicationPackage.WEB_APP__LISTENERS :
- notifier = webListenerGroup;
- break;
- }
- if (notifier != null) {
- NotificationWrapper notificationWrapper = new NotificationWrapper(notifier, notification);
- fireNotifyChanged(notificationWrapper);
- }
- }
- super.notifyChanged(notification);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.IDisposable#dispose()
- */
- public void dispose() {
- if (clientMgr != null)
- clientMgr.dispose();
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java
deleted file mode 100644
index 1b67ce5cd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.jst.j2ee.internal.web.providers.WebapplicationItemProviderAdapterFactory;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class J2EEWebItemProviderAdapterFactory extends WebapplicationItemProviderAdapterFactory {
-
- /**
- * Default constructor
- */
- public J2EEWebItemProviderAdapterFactory() {
- super();
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.webapplication.util.WebapplicationAdapterFactory#createWebAppAdapter()
- */
- public Adapter createWebAppAdapter() {
- if (webAppItemProvider == null)
- webAppItemProvider = new J2EEWebAppItemProvider(this);
- return webAppItemProvider;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java
deleted file mode 100644
index 66fe57daf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebFilterMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebFilterMappingGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- return webApp.getFilterMappings();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter_mapping"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("FILTER_MAPPING"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java
deleted file mode 100644
index d6b43b58b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebFiltersGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebFiltersGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /**
- * This returns Filter.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(webApp.getFilters());
- return getSortedChildren(result);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Filters_1"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java
deleted file mode 100644
index 86c6a3279..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Aug 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.common.Listener;
-import org.eclipse.jst.j2ee.internal.provider.J2EEItemProvider;
-import org.eclipse.jst.j2ee.webapplication.Filter;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-/**
- * @author jlanuti
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public abstract class WebGroupItemProvider extends J2EEItemProvider {
-
- class WebGroupComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof Servlet) {
- Servlet s1 = (Servlet) o1;
- Servlet s2 = (Servlet) o2;
- if (s1.getServletName() != null && s2.getServletName() != null)
- return s1.getServletName().compareTo(s2.getServletName());
- return -1;
- } else if (o1 instanceof Filter) {
- Filter f1 = (Filter) o1;
- Filter f2 = (Filter) o2;
- if (f1.getName() != null && f2.getName() != null)
- return f1.getName().compareTo(f2.getName());
- return -1;
- } else if (o1 instanceof Listener) {
- Listener l1 = (Listener) o1;
- Listener l2 = (Listener) o2;
- if (l1.getListenerClassName() != null && l2.getListenerClassName() != null)
- return l1.getListenerClassName().compareTo(l2.getListenerClassName());
- return -1;
- } else
- return -1;
- }
- }
-
- protected WebApp webApp = null;
-
- public WebGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory);
- this.webApp = webApp;
- }
-
- /**
- * @return Returns the webApp.
- */
- public WebApp getWebApp() {
- return webApp;
- }
-
- /**
- * @param webApp
- * The webApp to set.
- */
- public void setWebApp(WebApp webApp) {
- this.webApp = webApp;
- }
-
- public Collection getSortedChildren(List localChildren) {
- Collections.sort(localChildren, new WebGroupComparator());
- return localChildren;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java
deleted file mode 100644
index 7e7e73cb6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebListenerGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebListenerGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /**
- * This returns Filter.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getDefault().getImage("listener"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(webApp.getListeners());
- return getSortedChildren(result);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("LISTENER"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java
deleted file mode 100644
index 5347332e1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.internal.webservices.WebServicesManager;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebReferencesGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebReferencesGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (!webApp.getEjbLocalRefs().isEmpty())
- result.addAll(webApp.getEjbLocalRefs());
- if (!webApp.getEjbRefs().isEmpty())
- result.addAll(webApp.getEjbRefs());
- if (!webApp.getResourceEnvRefs().isEmpty())
- result.addAll(webApp.getResourceEnvRefs());
- if (!webApp.getResourceRefs().isEmpty())
- result.addAll(webApp.getResourceRefs());
- if (!webApp.getMessageDestinationRefs().isEmpty())
- result.addAll(webApp.getMessageDestinationRefs());
-
- Collection serviceRefs = null;
- try {
- serviceRefs = WebServicesManager.getInstance().getServiceRefs(webApp);
- } catch (RuntimeException re) {
- serviceRefs = Collections.EMPTY_LIST;
- }
-
- if (!serviceRefs.isEmpty())
- result.addAll(serviceRefs);
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getDefault().getImage("resourceRef_obj"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("References_1"); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java
deleted file mode 100644
index 47b2a0297..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebSecurityGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebSecurityGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Security_1"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (!webApp.getSecurityRoles().isEmpty())
- result.addAll(webApp.getSecurityRoles());
- if (!webApp.getConstraints().isEmpty())
- result.addAll(webApp.getConstraints());
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("security_role");//$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java
deleted file mode 100644
index ef878eefc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebServletGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebServletGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(webApp.getServlets());
- return getSortedChildren(result);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Servlets_1"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java
deleted file mode 100644
index f2defb868..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebServletMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebServletMappingGroupItemProvider(AdapterFactory adapterFactory, WebApp webApp) {
- super(adapterFactory, webApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- return webApp.getServletMappings();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet_mapping"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Servlet_Mappings_2"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return webApp;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java
deleted file mode 100644
index 7ba1d61e7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPDataModelSynchHelper;
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class AnnotationsStandaloneGroup {
-
- protected WTPOperationDataModel model;
- protected WTPDataModelSynchHelper synchHelper;
- protected Button useAnnotations;
- private boolean isForBean;
- private boolean useServletString = false;
-
- public static final String EJBTAGSET = "ejb"; //$NON-NLS-1$
- public static boolean shouldBeanDefaultUseAnnotations = false;
- public static boolean shouldProjectDefaultUseAnnotations = false;
-
-
- private class CheckboxSelectionListener implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.getSource();
- if (isForBean)
- shouldBeanDefaultUseAnnotations = button.getSelection();
- else
- shouldProjectDefaultUseAnnotations = button.getSelection();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- }
-
- private CheckboxSelectionListener checkboxSelectionListener = new CheckboxSelectionListener();
-
- /**
- * Constructor
- */
- public AnnotationsStandaloneGroup(Composite parent, WTPOperationDataModel model, boolean forBean) {
- this(parent, model, forBean, false);
- }
-
- /**
- * Constructor
- */
- public AnnotationsStandaloneGroup(Composite parent, WTPOperationDataModel model, boolean forBean, boolean useServlet) {
- super();
- this.model = model;
- this.isForBean = forBean;
- this.useServletString = useServlet;
- synchHelper = new WTPDataModelSynchHelper(model);
- buildComposites(parent);
- }
-
- /**
- * @param parent
- */
- protected void buildComposites(Composite parent) {
- // Add separator
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- separator.setLayoutData(gd);
- // Add spacer
- Label spacer = new Label(parent, SWT.NONE);
- GridData gd1 = new GridData(GridData.FILL_HORIZONTAL);
- gd1.horizontalSpan = 3;
- spacer.setLayoutData(gd1);
- // Add annotations checkbox and label
- useAnnotations = new Button(parent, SWT.CHECK);
- String labelText;
- if (useServletString)
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.USE_ANNOTATIONS_SERVLET);
- else if (isForBean)
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.USE_ANNOTATIONS);
- else
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.ADD_ANNOTATIONS_SUPPORT);
- useAnnotations.setText(labelText);
- synchHelper.synchCheckbox(useAnnotations, IAnnotationsDataModel.USE_ANNOTATIONS, null);
- useAnnotations.addSelectionListener(checkboxSelectionListener);
- GridData gd2 = new GridData(GridData.FILL_HORIZONTAL);
- gd2.horizontalSpan = 2;
- useAnnotations.setLayoutData(gd2);
- // If for project, set the global annotations supported
- if (!isForBean)
- setEnablement(null);
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- synchHelper = null;
- model = null;
- }
-
- public boolean isAnnotationsSupported(IProject project) {
- //TODO clean up to be module based, not project based
- try {
- // if (isForBean) {
- // AnnotationsController controller =
- // AnnotationsControllerManager.INSTANCE.getAnnotationsController(project);
- // return (controller !=null && controller.isTagHandlerInstalled(EJBTAGSET));
- // }
-// J2EEModuleNature nature = null;
-// if (project != null && project.hasNature(IWebNatureConstants.J2EE_NATURE_ID))
-// nature = (J2EEModuleNature) project.getNature(IWebNatureConstants.J2EE_NATURE_ID);
-// else if (project != null && project.hasNature(IEJBNatureConstants.NATURE_ID))
-// nature = (J2EEModuleNature) project.getNature(IEJBNatureConstants.NATURE_ID);
-//
-// if (!isForBean || (nature != null && nature.getJ2EEVersion() > J2EEVersionConstants.VERSION_1_2))
- return true;
-// return false;
- } catch (Throwable t) {
- t.printStackTrace();
- return false;
- }
- }
-
- public void setEnablement(IProject project) {
- //TODO
- //boolean isEnabled = isAnnotationsSupported(project);
- useAnnotations.setEnabled(true);
-// if (!isEnabled || (!isForBean && !shouldProjectDefaultUseAnnotations) || (isForBean && !shouldBeanDefaultUseAnnotations)) {
-// useAnnotations.setSelection(false);
-// model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, Boolean.FALSE);
-// } else {
-// useAnnotations.setSelection(true);
-// model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, Boolean.TRUE);
-// }
- }
-
- public void setUseServlet(boolean aBoolean) {
- useServletString = aBoolean;
- }
-
- public void setUseAnnotations(boolean aBoolean) {
- if (useAnnotations != null) {
- useAnnotations.setSelection(aBoolean);
- model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, new Boolean(aBoolean));
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizard.java
deleted file mode 100644
index 516e187ee..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizard.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Created on Mar 22, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-public class AppClientComponentCreationWizard extends J2EEComponentCreationWizard implements IExecutableExtension, INewWizard {
-
- /**
- * <p>
- * The Wizard ID of the EARComponentCreationWizard. Used for internal purposes and activities management.
- * </p>
- */
- public static final String WIZARD_ID = AppClientComponentCreationWizard.class.getName();
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection,
- * no model instance, and no operation instance. The model and
- * operation will be created as needed.
- * </p>
- */
- public AppClientComponentCreationWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls
- * and interface with the operation.
- * </p>
- * @param model The model parameter is used to pre-populate wizard controls and interface with the operation
- */
- public AppClientComponentCreationWizard(IDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default page image.
- * </p>
- *
- * @see J2EEArtifactCreationWizard#doInit()
- */
- protected void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APPCLIENT_COMPONENT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_PROJECT_WIZARD_BANNER));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Adds a {@link JCAProjectCreationPage} as the {@link J2EEComponentCreationWizard#MAIN_PG}.
- * </p>
- */
- protected void doAddPages() {
- AppClientComponentCreationWizardPage page1 = new AppClientComponentCreationWizardPage(getDataModel(), MAIN_PG);
- addPage(page1);
- super.doAddPages();
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new AppClientComponentCreationDataModelProvider();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizardPage.java
deleted file mode 100644
index 0119cfae8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentCreationWizardPage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Created on Mar 22, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentCreationWizardPage extends J2EEComponentCreationWizardPage {
-
- public Text contextRootNameField = null;
- public Label contextRootLabel = null;
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 250;
- private AnnotationsStandaloneGroup annotationsGroup;
-
- /**
- * @param model
- * @param pageName
- */
- public AppClientComponentCreationWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APPCLIENT_COMPONENT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APPCLIENT_COMPONENT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_PROJECT_WIZARD_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleCreationPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected void addToAdvancedComposite(Composite advanced) {
- super.addToAdvancedComposite(advanced);
- createAnnotationsGroup(advanced);
- }
-
- private void createAnnotationsGroup(Composite parent) {
- //annotationsGroup = new AnnotationsStandaloneGroup(parent, getJ2EEModuleCreationDataModel(), false);
- }
-
- protected String[] getValidationPropertyNames() {
- return super.getValidationPropertyNames();
- }
-
- public void dispose() {
- super.dispose();
- if (annotationsGroup != null)
- annotationsGroup.dispose();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java
deleted file mode 100644
index 31bca7a97..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleExportDataModel;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.IApplicationClientNatureConstants;
-import org.eclipse.jst.j2ee.client.ApplicationClient;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AppClientExportPage extends J2EEModuleExportPage {
- /**
- * @param model
- * @param pageName
- */
- public AppClientExportPage(J2EEModuleExportDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName, selection);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_EXPORT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_EXPORT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_EXPORT_WIZARD_BANNER));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
- */
- protected String getProjectLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_PROJECT_LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.jar"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
- */
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof ApplicationClient;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#getNatureID()
- */
- protected String getNatureID() {
-
- return IApplicationClientNatureConstants.NATURE_ID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEProjectCreationPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.EXPORT_APPCLIENT_WIZARD_P1);
- return super.createTopLevelComposite(parent);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientImportPage.java
deleted file mode 100644
index 9b5bfe02e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientImportPage.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleImportDataModel;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientModuleImportDataModel;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.IApplicationClientNatureConstants;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AppClientImportPage extends J2EEModuleImportPage {
- /**
- * @param model
- * @param pageName
- */
- public AppClientImportPage(J2EEModuleImportDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_IMPORT_WIZARD_BANNER));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_FILE_LABEL);
- }
-
- protected String getFileNamesStoreID() {
- return IApplicationClientNatureConstants.NATURE_ID;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.jar"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
- */
- protected String getProjectImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_PROJECT_LABEL);
- }
-
- protected J2EEComponentCreationDataModel getNewProjectCreationDataModel() {
- return getAppClientDataModel().getJ2eeArtifactCreationDataModel();
- }
-
- private AppClientModuleImportDataModel getAppClientDataModel() {
- return (AppClientModuleImportDataModel) model;
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.IMPORT_APPCLIENT_WIZARD_P1);
- return super.createTopLevelComposite(parent);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleExportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleExportWizard.java
deleted file mode 100644
index c4fec9072..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleExportWizard.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.AppClientModuleExportDataModel;
-import org.eclipse.jst.j2ee.internal.archive.operations.AppClientModuleExportOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * <p>
- * Wizard used to export J2EE Application Client module structures from the Eclipse Workbench to a
- * deployable Application Client Archive *.jar file.
- * </p>
- */
-public final class AppClientModuleExportWizard extends J2EEArtifactExportWizard implements IExportWizard {
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public AppClientModuleExportWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public AppClientModuleExportWizard(AppClientModuleExportDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return an {@link AppClientModuleExportDataModel}.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- return new AppClientModuleExportDataModel();
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Returns an {@link AppClientModuleExportOperation}using the model either supplied in the
- * constructor or created from {@link #createDefaultModel()}.
- * </p>
- *
- * @return Returns the operation to be executed when the Wizard completes.
- */
- protected WTPOperation createBaseOperation() {
- return new AppClientModuleExportOperation(getSpecificModel());
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link AppClientExportPage}as the main wizard page ({@link #MAIN_PG})
- * </ul>
- * </p>
- */
- public void doAddPages() {
- addPage(new AppClientExportPage(getSpecificModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_EXPORT_WIZARD_BANNER));
- }
-
- private AppClientModuleExportDataModel getSpecificModel() {
- return (AppClientModuleExportDataModel) getModel();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleImportWizard.java
deleted file mode 100644
index 1d5f89727..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientModuleImportWizard.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleImportDataModel;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientModuleImportDataModel;
-import org.eclipse.jst.j2ee.internal.archive.operations.AppClientModuleImportOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * <p>
- * Wizard used to import J2EE Application Client module structures into the Eclipse Workbench from
- * an existing Application Client *.jar file.
- * </p>
- */
-public final class AppClientModuleImportWizard extends J2EEModuleImportWizard {
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public AppClientModuleImportWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public AppClientModuleImportWizard(AppClientModuleImportDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return an {@link AppClientImportDataModel}and defaults the value of
- * {@link J2EEModuleImportDataModel#ADD_TO_EAR}to <b>true </b>
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- AppClientModuleImportDataModel aModel = new AppClientModuleImportDataModel();
- aModel.setBooleanProperty(J2EEModuleImportDataModel.ADD_TO_EAR, true);
- return aModel;
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Returns an {@link AppClientImportOperation}using the model either supplied in the
- * constructor or created from {@link #createDefaultModel()}.
- * </p>
- *
- * @return Returns the operation to be executed when the Wizard completes.
- */
- protected WTPOperation getImportOperation() {
- return new AppClientModuleImportOperation(getSpecificDataModel());
- }
-
- /**
- * <p>
- * Adds an {@link AppClientImportPage}as the main wizard page ({@link #MAIN_PG}).
- * </p>
- */
- public void doAddPages() {
- addPage(new AppClientImportPage(getSpecificDataModel(), MAIN_PG));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default wizard page image.
- * </p>
- */
- public final void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_IMPORT_WIZARD_BANNER));
- updateEARToModelFromSelection(getSpecificDataModel());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleImportWizard#getModuleValidatorStrings()
- */
- protected String[] getModuleValidatorStrings() {
- return new String[]{"org.eclipse.jst.j2ee.internal.validation.UIApplicationClientValidator"}; //$NON-NLS-1$
- }
-
- private AppClientModuleImportDataModel getSpecificDataModel() {
- return (AppClientModuleImportDataModel) getModel();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ApplicationModuleProjectsPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ApplicationModuleProjectsPage.java
deleted file mode 100644
index 59d174b24..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ApplicationModuleProjectsPage.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 5, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.AddArchiveProjectsToEARDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.DefaultModuleProjectCreationDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.earcreation.EARComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-import org.eclipse.wst.common.internal.emfworkbench.operation.EditModelOperationDataModel;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class ApplicationModuleProjectsPage extends WTPWizardPage {
- private Button selectAllButton;
- private Button deselectAllButton;
- private Button newModuleButton;
- private CheckboxTableViewer moduleProjectsViewer;
- private boolean ignoreCheckedState = false;
-
- /**
- * @param model
- * @param pageName
- */
- public ApplicationModuleProjectsPage(EARComponentCreationDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESC));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite modulesGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- modulesGroup.setLayout(layout);
- setInfopopID(IJ2EEUIContextIds.NEW_EAR_ADD_MODULES_PAGE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- modulesGroup.setLayoutData(gridData);
- createModuleProjectOptions(modulesGroup);
- createButtonsGroup(modulesGroup);
- return modulesGroup;
- }
-
- /**
- * @param modulesGroup
- */
- private void createModuleProjectOptions(Composite modulesGroup) {
- moduleProjectsViewer = CheckboxTableViewer.newCheckList(modulesGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.widthHint = 200;
- gData.heightHint = 80;
- moduleProjectsViewer.getControl().setLayoutData(gData);
- AvailableModuleProjectsProvider provider = new AvailableModuleProjectsProvider((EARComponentCreationDataModel) model);
- moduleProjectsViewer.setContentProvider(provider);
- moduleProjectsViewer.setLabelProvider(new WorkbenchLabelProvider());
- setCheckedItemsFromModel();
- moduleProjectsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (!ignoreCheckedState) {
- getModulesModel().setProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST, getCheckedElementsAsList());
- }
- }
- });
- TableLayout tableLayout = new TableLayout();
- moduleProjectsViewer.getTable().setLayout(tableLayout);
- moduleProjectsViewer.getTable().setHeaderVisible(false);
- moduleProjectsViewer.getTable().setLinesVisible(false);
- moduleProjectsViewer.setSorter(null);
- }
-
- /**
- *
- */
- private void setCheckedItemsFromModel() {
- List projects = (List) getModulesModel().getProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST);
- moduleProjectsViewer.setCheckedElements(projects.toArray());
- }
-
- private void refreshModules() {
- moduleProjectsViewer.refresh();
- setCheckedItemsFromModel();
- }
-
- protected List getCheckedElementsAsList() {
- Object[] elements = moduleProjectsViewer.getCheckedElements();
- List list;
- if (elements == null || elements.length == 0)
- list = Collections.EMPTY_LIST;
- else
- list = Arrays.asList(elements);
- return list;
- }
-
- protected void createButtonsGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_SELECT));
- selectAllButton.addListener(SWT.Selection, this);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESELECT));
- deselectAllButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- newModuleButton = new Button(buttonGroup, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_NEW));
- newModuleButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- newModuleButton.setLayoutData(gd);
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == selectAllButton)
- handleSelectAllButtonPressed();
- else if (evt.widget == deselectAllButton)
- handleDeselectAllButtonPressed();
- else if (evt.widget == newModuleButton)
- handleNewModuleButtonPressed();
- else
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleNewModuleButtonPressed() {
- DefaultModuleProjectCreationDataModel aModel = createNewModuleModel();
- DefaultModuleProjectCreationWizard wizard = new DefaultModuleProjectCreationWizard(aModel);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- if (dialog.open() != IDialogConstants.CANCEL_ID) {
- setNewModules(aModel);
- refreshModules();
- }
- validatePage();
- }
-
- /**
- * @param model
- */
- private void setNewModules(DefaultModuleProjectCreationDataModel defaultModel) {
- List newProjects = new ArrayList();
- collectNewProjects(defaultModel, newProjects);
- AddComponentToEnterpriseApplicationDataModel modModel = ((EARComponentCreationDataModel) model).addComponentToEARDataModel;
- List selectedProjects = (List) modModel.getProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST);
- newProjects.addAll(selectedProjects);
- modModel.setProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST, newProjects);
- }
-
- /**
- * @param defaultModel
- * @param newProjects
- */
- private void collectNewProjects(DefaultModuleProjectCreationDataModel defaultModel, List newProjects) {
- collectProject(defaultModel.getEjbModel(), newProjects);
- collectProject(defaultModel.getWebModel(), newProjects);
- collectProject(defaultModel.getClientModel(), newProjects);
- collectProject(defaultModel.getJCAModel(), newProjects);
- }
-
- private void collectProject(J2EEComponentCreationDataModel projModel, List newProjects) {
- if (projModel != null) {
- IProject project = projModel.getTargetProject();
- if (project != null && project.exists())
- newProjects.add(project);
- }
- }
-
- private DefaultModuleProjectCreationDataModel createNewModuleModel() {
- DefaultModuleProjectCreationDataModel defaultModel = new DefaultModuleProjectCreationDataModel();
- String earName = model.getStringProperty(EditModelOperationDataModel.PROJECT_NAME);
- Object j2eeVersion = model.getProperty(EARComponentCreationDataModel.COMPONENT_VERSION);
-// Object serverTargetID = model.getStringProperty(J2EEComponentCreationDataModel.SERVER_TARGET_ID);
- defaultModel.setProperty(DefaultModuleProjectCreationDataModel.BASE_NAME, earName);
- defaultModel.setProperty(DefaultModuleProjectCreationDataModel.J2EE_VERSION, j2eeVersion);
-// defaultModel.setProperty(ServerTargetDataModel.RUNTIME_TARGET_ID, serverTargetID);
- return defaultModel;
- }
-
- /**
- *
- */
- private void handleDeselectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(false);
- getModulesModel().setProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST, null);
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- /**
- *
- */
- private void handleSelectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(true);
- getModulesModel().setProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST, getCheckedElementsAsList());
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- private AddComponentToEnterpriseApplicationDataModel getModulesModel() {
- return ((EARComponentCreationDataModel) model).addComponentToEARDataModel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#enter()
- */
- protected void enter() {
- moduleProjectsViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
- super.enter();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJ2EEComponentsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJ2EEComponentsContentProvider.java
deleted file mode 100644
index ddd8eb114..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJ2EEComponentsContentProvider.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Created on Mar 18, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.internal.J2EEVersionUtil;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-
-public class AvailableJ2EEComponentsContentProvider implements IStructuredContentProvider, ITableLabelProvider {
- private int j2eeVersion;
-
- public AvailableJ2EEComponentsContentProvider(int j2eeVersion) {
- super();
- this.j2eeVersion = j2eeVersion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- Object[] empty = new Object[0];
- if (!(inputElement instanceof IWorkspaceRoot))
- return empty;
- IProject[] projects = ((IWorkspaceRoot) inputElement).getProjects();
- if (projects == null || projects.length == 0)
- return empty;
- List validCompList = new ArrayList();
- for (int i = 0; i < projects.length; i++) {
- // get flexible project
- IProject project = projects[i];
- StructureEdit moduleCore = null;
- try {
- if (!project.hasNature(IModuleConstants.MODULE_NATURE_ID))
- continue;
- // get all J2EE module in the project
- moduleCore = StructureEdit.getStructureEditForRead(project);
- moduleCore.prepareProjectComponentsIfNecessary();
- WorkbenchComponent[] appClientComps = moduleCore.findComponentsByType(IModuleConstants.JST_APPCLIENT_MODULE);
- for (int j = 0; j < appClientComps.length; j++) {
- String version = appClientComps[j].getComponentType().getVersion();
- int versionID = J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(version);
- if (versionID <= j2eeVersion)
- validCompList.add(appClientComps[j]);
- }
- WorkbenchComponent[] ejbComps = moduleCore.findComponentsByType(IModuleConstants.JST_EJB_MODULE);
- for (int j = 0; j < ejbComps.length; j++) {
- String version = ejbComps[j].getComponentType().getVersion();
- int versionID = J2EEVersionUtil.convertEJBVersionStringToJ2EEVersionID(version);
- if (versionID <= j2eeVersion)
- validCompList.add(ejbComps[j]);
- }
- WorkbenchComponent[] webComps = moduleCore.findComponentsByType(IModuleConstants.JST_WEB_MODULE);
- for (int j = 0; j < webComps.length; j++) {
- String version = webComps[j].getComponentType().getVersion();
- int versionID = J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(version);
- if (versionID <= j2eeVersion)
- validCompList.add(webComps[j]);
- }
- WorkbenchComponent[] connComps = moduleCore.findComponentsByType(IModuleConstants.JST_CONNECTOR_MODULE);
- for (int j = 0; j < connComps.length; j++) {
- String version = connComps[j].getComponentType().getVersion();
- int versionID = J2EEVersionUtil.convertConnectorVersionStringToJ2EEVersionID(version);
- if (versionID <= j2eeVersion)
- validCompList.add(connComps[j]);
- }
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- finally {
- if (moduleCore != null)
- moduleCore.dispose();
- }
- }
- return validCompList.toArray();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return ((IProject) element).getName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java
deleted file mode 100644
index 0933a6a7d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.frameworks.internal.ui.OverlayIcon;
-
-
-public class AvailableJarsProvider implements org.eclipse.jface.viewers.IStructuredContentProvider, org.eclipse.jface.viewers.ITableLabelProvider {
- protected static Image utilImage;
- protected static Image invalidImage;
- protected static Image ejbImage;
- protected static Image ejbClientImage;
-
- /**
- * AvailableJarsContentProvider constructor comment.
- */
- public AvailableJarsProvider() {
- super();
- }
-
- /**
- * Adds a listener to this label provider. Has no effect if an identical listener is already
- * registered.
- * <p>
- * Label provider listeners are informed about state changes that affect the rendering of the
- * viewer that uses this label provider.
- * </p>
- *
- * @param listener
- * a label provider listener
- */
- public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-
- /**
- * Disposes of this label provider. When a label provider is attached to a viewer, the viewer
- * will automatically call this method when the viewer is being closed. When label providers are
- * used outside of the context of a viewer, it is the client's responsibility to ensure that
- * this method is called when the provider is no longer needed.
- */
- public void dispose() {
- //dispose
- }
-
- /**
- * Returns the label image for the given column of the given element.
- *
- * @param element
- * the object representing the entire row, or <code>null</code> indicating that no
- * input object is set in the viewer
- * @param columnIndex
- * the zero-based index of the column in which the label appears
- */
- public org.eclipse.swt.graphics.Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex > 0)
- return null;
- ClasspathElement cp = (ClasspathElement) element;
- if (!cp.isValid())
- return getInvalidImage();
-
- switch (cp.getJarType()) {
- case ClasspathElement.EJB_JAR :
- return getEjbImage();
- case ClasspathElement.EJB_CLIENT_JAR :
- return getEjbClientImage();
- default :
- return getUtilImage();
- }
- }
-
- /**
- * Returns the label text for the given column of the given element.
- *
- * @param element
- * the object representing the entire row, or <code>null</code> indicating that no
- * input object is set in the viewer
- * @param columnIndex
- * the zero-based index of the column in which the label appears
- */
- public String getColumnText(Object element, int columnIndex) {
- String value = null;
- switch (columnIndex) {
- case 0 : {
- value = ((ClasspathElement) element).getText();
- break;
- }
- case 1 :
- value = ((ClasspathElement) element).getProjectName();
- }
- return value == null ? "" : value;//$NON-NLS-1$
- }
-
- protected static Image getEjbImage() {
- if (ejbImage == null)
- ejbImage = getImageDescriptor("EJBJar").createImage();//$NON-NLS-1$
- return ejbImage;
- }
-
- protected static Image getEjbClientImage() {
- if (ejbClientImage == null)
- ejbClientImage = getImageDescriptor("ejbclientjar_obj").createImage();//$NON-NLS-1$
- return ejbClientImage;
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(Object inputElement) {
- ClassPathSelection selection = (ClassPathSelection) inputElement;
- return filter(selection, selection.getFilterLevel()).toArray();
- }
-
- /**
- * @param list
- */
- private List filter(ClassPathSelection selection, int filterLevel) {
- List list = selection.getClasspathElements();
- List result = new ArrayList(list.size());
- for (int i = 0; i < list.size(); i++) {
- ClasspathElement element = (ClasspathElement) list.get(i);
- if (!element.isSelected()) {
- switch (filterLevel) {
- case (ClassPathSelection.FILTER_EJB_CLIENT_JARS) :
- if (element.isEJBClientJar())
- continue;
- break;
- case (ClassPathSelection.FILTER_EJB_SERVER_JARS) :
- if (element.isEJBJar() && selection.getOppositeElement(element) != null)
- continue;
- }
- }
- result.add(element);
- }
- return result;
- }
-
- /**
- * This gets a .gif from the icons folder.
- */
- protected static ImageDescriptor getImageDescriptor(String key) {
- ImageDescriptor imageDescriptor = null;
-
- URL gifImageURL = (URL) J2EEPlugin.getPlugin().getImage(key);
- imageDescriptor = ImageDescriptor.createFromURL(gifImageURL);
- return imageDescriptor;
- }
-
- protected static Image getInvalidImage() {
- if (invalidImage == null) {
- ImageDescriptor base = getImageDescriptor("jar_nonexist_obj");//$NON-NLS-1$
- ImageDescriptor overlay = getImageDescriptor("warning_co");//$NON-NLS-1$
- invalidImage = new OverlayIcon(base, new ImageDescriptor[][]{{overlay}}).createImage();
- }
- return invalidImage;
- }
-
- protected static Image getUtilImage() {
- if (utilImage == null)
- utilImage = getImageDescriptor("jar_obj").createImage();//$NON-NLS-1$
- return utilImage;
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /**
- * Returns whether the label would be affected by a change to the given property of the given
- * element. This can be used to optimize a non-structural viewer update. If the property
- * mentioned in the update does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and <code>false</code> if it
- * would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * Removes a listener to this label provider. Has no affect if an identical listener is not
- * registered.
- *
- * @param listener
- * a label provider listener
- */
- public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableModuleProjectsProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableModuleProjectsProvider.java
deleted file mode 100644
index 396ee914b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableModuleProjectsProvider.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on May 9, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.internal.earcreation.EARComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EENature;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AvailableModuleProjectsProvider implements IStructuredContentProvider, ITableLabelProvider {
- private EARComponentCreationDataModel model;
-
- public AvailableModuleProjectsProvider(EARComponentCreationDataModel dataModel) {
- super();
- model = dataModel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- List validModuleProjects = null;
- if (inputElement instanceof IWorkspaceRoot) {
- IProject[] projects = ((IWorkspaceRoot) inputElement).getProjects();
- if (projects.length > 0) {
- int j2eeVersion = model.getIntProperty(EARComponentCreationDataModel.COMPONENT_VERSION);
- for (int i = 0; i < projects.length; i++) {
- if (isValid(projects[i], j2eeVersion)) {
- if (validModuleProjects == null)
- validModuleProjects = new ArrayList();
- validModuleProjects.add(projects[i]);
- }
- }
- }
- }
- if (validModuleProjects == null)
- return new Object[0];
- return validModuleProjects.toArray();
- }
-
- private boolean isValid(IProject project, int j2eeVersion) {
- try {
- if (project.hasNature(IEARNatureConstants.NATURE_ID))
- return false;
- J2EENature j2eeNature = J2EENature.getRegisteredRuntime(project);
- if (j2eeNature != null) {
- return j2eeNature.getJ2EEVersion() <= j2eeVersion;
- } else if (project.hasNature(JavaCore.NATURE_ID))
- return true;
- } catch (CoreException e) {
- //Ignore
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return ((IProject) element).getName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- model = null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java
deleted file mode 100644
index 56c165562..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Apr 22, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.FileImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AvailableUtilJarsAndWebLibProvider implements IStructuredContentProvider, ITableLabelProvider {
-
- public AvailableUtilJarsAndWebLibProvider() {
- //Default constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof EARFile) {
- Object[] array = EnterpriseApplicationImportDataModel.getAllUtilities((EARFile) inputElement).toArray();
-
- List filteredProjects = new ArrayList();
- if (array != null && array.length != 0)
- filteredProjects = filterEJBClientJars(array, ((EARFile) inputElement));
- else
- return new Object[0];
-
- array = filteredProjects.toArray();
- Arrays.sort(array, new Comparator() {
- public int compare(Object o1, Object o2) {
- return getColumnText(o1, 0).compareTo(getColumnText(o2, 0));
- }
-
- });
- return array;
- }
- return new Object[0];
- }
-
- /**
- * @param array
- * @return
- */
- private List filterEJBClientJars(Object[] array, EARFile ear) {
- List utilities = new ArrayList(array.length);
- for (int i = 0; i < array.length; i++) {
- utilities.add(array[i]);
- }
- List ejbJars = ear.getEJBJarFiles();
- if (ejbJars != null) {
- List clientNames = new ArrayList(ejbJars.size());
- for (int j = 0; j < ejbJars.size(); j++) {
- EJBJar jar = ((EJBJarFile) ejbJars.get(j)).getDeploymentDescriptor();
- if (jar != null) {
- clientNames.add(jar.getEjbClientJar());
- }
- }
- if (clientNames != null && !clientNames.isEmpty()) {
- List toRemove = new ArrayList();
- for (int k = 0; k < clientNames.size(); k++) {
- String projectName = (String) clientNames.get(k);
- for (int l = 0; l < utilities.size(); l++) {
- File file = (File) utilities.get(l);
- if (file.getName().equals(projectName))
- toRemove.add(utilities.get(l));
- }
- }
- utilities.removeAll(toRemove);
- }
- }
- return utilities;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return AvailableJarsProvider.getUtilImage();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- FileImpl file = (FileImpl) element;
- if (file.getURI().startsWith(ArchiveConstants.WEBAPP_LIB_URI)) {
- String parentWarFileName = ((WARFile) file.eContainer()).getName();
- return parentWarFileName + "#" + file.getURI(); //$NON-NLS-1$
- }
- return file.getName();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- //Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //Auto-generated method stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //Auto-generated method stub
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java
deleted file mode 100644
index 1d0d2fbe9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Apr 22, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarListImportDataModel;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class AvailableUtilityJarsProvider implements IStructuredContentProvider, ITableLabelProvider {
-
- public AvailableUtilityJarsProvider() {
- //default constructor
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- /*
- * Object[] array = EARImportDataModel.getAllUtilities((EARFile) inputElement).toArray();
- */
- Object[] array = getJarFilesFromDirectory(inputElement);
- Arrays.sort(array, new Comparator() {
-
- public int compare(Object o1, Object o2) {
- return getColumnText(o1, 0).compareTo(getColumnText(o2, 0));
- }
-
- });
- return array;
- }
-
- /**
- * @param inputElement
- * @return
- */
- private Object[] getJarFilesFromDirectory(Object inputElement) {
-
- List collectedJars = new ArrayList();
- WTPOperationDataModel model = null;
- if (inputElement instanceof WTPOperationDataModel)
- model = (WTPOperationDataModel) inputElement;
- if (model != null) {
-
- String fileName = model.getStringProperty(J2EEUtilityJarListImportDataModel.AVAILABLE_JARS_DIRECTORY);
- File directory = new File(fileName);
- if (directory.exists() && directory.canRead() && directory.isDirectory()) {
- File[] availableFiles = directory.listFiles();
-
- if (availableFiles == null)
- return new File[0];
-
- for (int i = 0; i < availableFiles.length; i++)
- if (availableFiles[i] != null && availableFiles[i].getName().endsWith(".jar"))collectedJars.add(availableFiles[i]); //$NON-NLS-1$
- }
- }
- return collectedJars.toArray();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return AvailableJarsProvider.getUtilImage();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- /*
- * FileImpl file = (FileImpl) element; if
- * (file.getURI().startsWith(ArchiveConstants.WEBAPP_LIB_URI)) { String parentWarFileName =
- * ((WARFile) file.eContainer()).getName(); return parentWarFileName + "#" + file.getURI();
- * //$NON-NLS-1$ } else return file.getName();
- */
- return element.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- //dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java
deleted file mode 100644
index 5f37175b2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.ui.util.CoreUtility;
-import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-public class ClassesImportWizard extends Wizard implements IImportWizard {
-
- public WizardClassesImportMainPage mainPage = null;
-
- public WizardClassesImportPage1 page1 = null;
-
- private IWorkbench workbench;
-
- private IStructuredSelection selection;
-
- private IPath importedClassesPath;
-
- private IJavaProject javaProject = null;
-
- private IProject project = null;
-
- protected ArrayList fileNames = null;
-
- public ClassesImportWizard() {
- super();
- }
-
- public ClassesImportWizard(IProject project) {
- super();
- this.project = project;
-
- }
-
- public ClassesImportWizard(IProject project, String fileName, List otherFileNames) {
- this(project);
- this.fileNames = new ArrayList();
- this.fileNames.add(fileName);
- int i = fileName.lastIndexOf(java.io.File.separatorChar);
- String parentDir = fileName.substring(0, i);
- if (otherFileNames != null)
- for (int j = otherFileNames.size() - 1; j >= 0; j--) {
- if (otherFileNames.get(j) != null) {
- int k = ((String) otherFileNames.get(j)).lastIndexOf(java.io.File.separatorChar);
- if (k == i && parentDir.equals(((String) otherFileNames.get(j)).substring(0, k))) {
- fileNames.add(otherFileNames.remove(j));
- }
- }
- }
-
- }
-
- public void setFolderPath(IPath path) {
- importedClassesPath = path;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- return page1.finish();
- }
-
- public void createImportedClassesFolder(IProject aProject) {
- //Create imported_classes folder selected project
- IContainer container = aProject;
- IFolder folder = container.getFolder(new Path("imported_classes")); //$NON-NLS-1$
- javaProject = getIJavaProject(aProject);
-
- IPath importedFoldersClass = folder.getFullPath();
-
- CPListElement entry = newCPLibraryElement(folder);
- IClasspathEntry newEntry = entry.getClasspathEntry();
-
- IResource res = entry.getResource();
- if ((res instanceof IFolder) && !res.exists()) {
- try {
- CoreUtility.createFolder((IFolder) res, true, true, null);
-
- } catch (CoreException e) {
- //Ignore
- }
- }
-
- try {
- IClasspathEntry[] classpathEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newClasspath = new IClasspathEntry[classpathEntries.length + 1];
-
- for (int i = 0; i < classpathEntries.length; i++) {
- newClasspath[i] = classpathEntries[i];
- }
- newClasspath[classpathEntries.length] = newEntry;
-
- javaProject.setRawClasspath(newClasspath, null);
-
- } catch (JavaModelException e) {
- //Ignore
- }
-
- setFolderPath(importedFoldersClass);
- }
-
- private IJavaProject getIJavaProject(IProject projectHandle) {
- IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
- return javaModel.getJavaProject(projectHandle.getName());
- }
-
- private CPListElement newCPLibraryElement(IResource res) {
-
- return new CPListElement(javaProject, IClasspathEntry.CPE_LIBRARY, res.getFullPath(), res);
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
- */
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- setWindowTitle(J2EEUIMessages.getResourceString("Import_Class_Files_UI")); //$NON-NLS-1$
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
-
- workbench = aWorkbench;
- selection = aSelection;
- if (!aSelection.isEmpty() && aSelection.getFirstElement() instanceof IProject)
- project = (IProject) aSelection.getFirstElement();
-
- if (project != null)
- createImportedClassesFolder(project);
- }
-
- public void addPages() {
- try {
- super.addPages();
- mainPage = new WizardClassesImportMainPage("id", fileNames); //$NON-NLS-1$
- mainPage.setWizard(this);
- if (fileNames == null || fileNames.size() == 0)
- addPage(mainPage);
- page1 = new WizardClassesImportPage1(workbench, selection, importedClassesPath, fileNames);
- page1.setWizard(this);
- addPage(page1);
- } catch (Throwable ex) {
- ex.printStackTrace();
- }
-
-
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DataModelAnnotationsStandaloneGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DataModelAnnotationsStandaloneGroup.java
deleted file mode 100644
index 6de8b222a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DataModelAnnotationsStandaloneGroup.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004, 2005 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-
-public class DataModelAnnotationsStandaloneGroup {
-
- protected IDataModel model;
- protected DataModelSynchHelper synchHelper;
- protected Button useAnnotations;
- private boolean isForBean;
- private boolean useServletString = false;
-
- public static final String EJBTAGSET = "ejb"; //$NON-NLS-1$
- public static boolean shouldBeanDefaultUseAnnotations = false;
- public static boolean shouldProjectDefaultUseAnnotations = false;
-
-
- private class CheckboxSelectionListener implements SelectionListener {
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.getSource();
- if (isForBean)
- shouldBeanDefaultUseAnnotations = button.getSelection();
- else
- shouldProjectDefaultUseAnnotations = button.getSelection();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- }
-
- private CheckboxSelectionListener checkboxSelectionListener = new CheckboxSelectionListener();
-
- /**
- * Constructor
- */
- public DataModelAnnotationsStandaloneGroup(Composite parent, IDataModel model, boolean forBean, DataModelSynchHelper syncHelp) {
- this(parent, model, forBean, false, syncHelp);
- }
-
- /**
- * Constructor
- */
- public DataModelAnnotationsStandaloneGroup(Composite parent, IDataModel model, boolean forBean, boolean useServlet, DataModelSynchHelper syncHelp) {
- super();
- this.model = model;
- this.isForBean = forBean;
- this.useServletString = useServlet;
- synchHelper = syncHelp;
- buildComposites(parent);
- }
-
- /**
- * @param parent
- */
- protected void buildComposites(Composite parent) {
- // Add separator
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- separator.setLayoutData(gd);
- // Add spacer
- Label spacer = new Label(parent, SWT.NONE);
- GridData gd1 = new GridData(GridData.FILL_HORIZONTAL);
- gd1.horizontalSpan = 3;
- spacer.setLayoutData(gd1);
- // Add annotations checkbox and label
- useAnnotations = new Button(parent, SWT.CHECK);
- String labelText;
- if (useServletString)
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.USE_ANNOTATIONS_SERVLET);
- else if (isForBean)
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.USE_ANNOTATIONS);
- else
- labelText = J2EEUIMessages.getResourceString(J2EEUIMessages.ADD_ANNOTATIONS_SUPPORT);
- useAnnotations.setText(labelText);
- synchHelper.synchCheckbox(useAnnotations, IAnnotationsDataModel.USE_ANNOTATIONS, null);
- useAnnotations.addSelectionListener(checkboxSelectionListener);
- GridData gd2 = new GridData(GridData.FILL_HORIZONTAL);
- gd2.horizontalSpan = 2;
- useAnnotations.setLayoutData(gd2);
- // If for project, set the global annotations supported
- if (!isForBean)
- setEnablement(null);
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- synchHelper = null;
- model = null;
- }
-
- public boolean isAnnotationsSupported(IProject project) {
- //TODO clean up to be module based, not project based
- try {
- // if (isForBean) {
- // AnnotationsController controller =
- // AnnotationsControllerManager.INSTANCE.getAnnotationsController(project);
- // return (controller !=null && controller.isTagHandlerInstalled(EJBTAGSET));
- // }
-// J2EEModuleNature nature = null;
-// if (project != null && project.hasNature(IWebNatureConstants.J2EE_NATURE_ID))
-// nature = (J2EEModuleNature) project.getNature(IWebNatureConstants.J2EE_NATURE_ID);
-// else if (project != null && project.hasNature(IEJBNatureConstants.NATURE_ID))
-// nature = (J2EEModuleNature) project.getNature(IEJBNatureConstants.NATURE_ID);
-//
-// if (!isForBean || (nature != null && nature.getJ2EEVersion() > J2EEVersionConstants.VERSION_1_2))
- return true;
-// return false;
- } catch (Throwable t) {
- t.printStackTrace();
- return false;
- }
- }
-
- public void setEnablement(IProject project) {
- //TODO
- //boolean isEnabled = isAnnotationsSupported(project);
- useAnnotations.setEnabled(true);
-// if (!isEnabled || (!isForBean && !shouldProjectDefaultUseAnnotations) || (isForBean && !shouldBeanDefaultUseAnnotations)) {
-// useAnnotations.setSelection(false);
-// model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, Boolean.FALSE);
-// } else {
-// useAnnotations.setSelection(true);
-// model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, Boolean.TRUE);
-// }
- }
-
- public void setUseServlet(boolean aBoolean) {
- useServletString = aBoolean;
- }
-
- public void setUseAnnotations(boolean aBoolean) {
- if (useAnnotations != null) {
- useAnnotations.setSelection(aBoolean);
- model.setProperty(IAnnotationsDataModel.USE_ANNOTATIONS, new Boolean(aBoolean));
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java
deleted file mode 100644
index 5f3f1dcbe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Created on Mar 23, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.internal.earcreation.DefaultJ2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.DefaultJ2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-public class DefaultJ2EEComponentCreationWizard extends DataModelWizard {
- private static final String SELECTION_PG = "selection"; //$NON-NLS-1$
-
- /**
- * @param model
- */
- public DefaultJ2EEComponentCreationWizard(IDataModel model) {
- super(model);
- initialize();
- }
-
- /**
- *
- */
- public DefaultJ2EEComponentCreationWizard() {
- super();
- initialize();
- }
-
- /**
- *
- */
- private void initialize() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_WIZ_TITLE));
- String iconPath = "icons/full/"; //$NON-NLS-1$
- try {
- URL installURL = IDEWorkbenchPlugin.getDefault().getDescriptor().getInstallURL();
- URL url = new URL(installURL, iconPath + "wizban/new_wiz.gif"); //$NON-NLS-1$
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- setDefaultPageImageDescriptor(desc);
- } catch (MalformedURLException e) {
- // Should not happen. Ignore.
- }
- setNeedsProgressMonitor(true);
- setForcePreviousAndNextButtons(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void doAddPages() {
- addPage(new NewJ2EEComponentSelectionPage(getDataModel(), SELECTION_PG));
- }
-
- public boolean canFinish() {
- if (!super.canFinish()) {
- return false;
- }
- return getDataModel().getBooleanProperty(DefaultJ2EEComponentCreationDataModel.ENABLED);
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new DefaultJ2EEComponentCreationDataModelProvider();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultModuleProjectCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultModuleProjectCreationWizard.java
deleted file mode 100644
index d59ebfc58..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultModuleProjectCreationWizard.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 13, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.application.internal.operations.DefaultModuleProjectCreationDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.DefaultModuleProjectCreationOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizard;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class DefaultModuleProjectCreationWizard extends WTPWizard {
- private static final String SELECTION_PG = "selection"; //$NON-NLS-1$
-
- /**
- * @param model
- */
- public DefaultModuleProjectCreationWizard(DefaultModuleProjectCreationDataModel model) {
- super(model);
- initialize();
- }
-
- /**
- *
- */
- public DefaultModuleProjectCreationWizard() {
- super();
- initialize();
- }
-
- /**
- *
- */
- private void initialize() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_MOD_WIZ_TITLE));
- String iconPath = "icons/full/"; //$NON-NLS-1$
- try {
- URL installURL = IDEWorkbenchPlugin.getDefault().getDescriptor().getInstallURL();
- URL url = new URL(installURL, iconPath + "wizban/new_wiz.gif"); //$NON-NLS-1$
- ImageDescriptor desc = ImageDescriptor.createFromURL(url);
- setDefaultPageImageDescriptor(desc);
- } catch (MalformedURLException e) {
- // Should not happen. Ignore.
- }
- setNeedsProgressMonitor(true);
- setForcePreviousAndNextButtons(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- return new DefaultModuleProjectCreationDataModel();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createOperation()
- */
- protected WTPOperation createBaseOperation() {
- if (model.getBooleanProperty(DefaultModuleProjectCreationDataModel.ENABLED))
- return new DefaultModuleProjectCreationOperation((DefaultModuleProjectCreationDataModel) model);
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- public void doAddPages() {
- addPage(new NewModuleProjectSelectionPage((DefaultModuleProjectCreationDataModel) model, SELECTION_PG));
- }
-
- public boolean canFinish() {
- if (!super.canFinish()) {
- return false;
- }
- return model.getBooleanProperty(DefaultModuleProjectCreationDataModel.ENABLED);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondPage.java
deleted file mode 100644
index 67c43faef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondPage.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Created on Mar 18, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.AddArchiveProjectsToEARDataModel;
-import org.eclipse.jst.j2ee.datamodel.properties.IEarComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.earcreation.DefaultJ2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.IDefaultJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class EARComponentCreationSecondPage extends DataModelWizardPage implements IEarComponentCreationDataModelProperties{
- private Button selectAllButton;
- private Button deselectAllButton;
- private Button newModuleButton;
- private CheckboxTableViewer moduleProjectsViewer;
- private boolean ignoreCheckedState = false;
- /**
- * @param model
- * @param pageName
- */
- public EARComponentCreationSecondPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_SECOND_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_SECOND_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_WIZ_BANNER));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.ui.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.ui.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite modulesGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- modulesGroup.setLayout(layout);
-// setInfopopID(IJ2EEUIContextIds.NEW_EAR_ADD_MODULES_PAGE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- modulesGroup.setLayoutData(gridData);
- createModuleProjectOptions(modulesGroup);
- createButtonsGroup(modulesGroup);
- return modulesGroup;
- }
-
- /**
- * @param modulesGroup
- */
- private void createModuleProjectOptions(Composite modulesGroup) {
- moduleProjectsViewer = CheckboxTableViewer.newCheckList(modulesGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.widthHint = 200;
- gData.heightHint = 80;
- moduleProjectsViewer.getControl().setLayoutData(gData);
- int j2eeVersion = getDataModel().getIntProperty(COMPONENT_VERSION);
- AvailableJ2EEComponentsContentProvider provider = new AvailableJ2EEComponentsContentProvider(j2eeVersion);
- moduleProjectsViewer.setContentProvider(provider);
- moduleProjectsViewer.setLabelProvider(new J2EEComponentLabelProvider());
- setCheckedItemsFromModel();
- moduleProjectsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (!ignoreCheckedState) {
- (getDataModel()).setProperty(J2EE_COMPONENT_LIST, getCheckedElementsAsList());
- }
- }
- });
- TableLayout tableLayout = new TableLayout();
- moduleProjectsViewer.getTable().setLayout(tableLayout);
- moduleProjectsViewer.getTable().setHeaderVisible(false);
- moduleProjectsViewer.getTable().setLinesVisible(false);
- moduleProjectsViewer.setSorter(null);
- }
-
- /**
- *
- */
- private void setCheckedItemsFromModel() {
-// List projects = (List) getModulesModel().getProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST);
-// moduleProjectsViewer.setCheckedElements(projects.toArray());
- }
-
- private void refreshModules() {
- moduleProjectsViewer.refresh();
- setCheckedItemsFromModel();
- }
-
- protected List getCheckedElementsAsList() {
- Object[] elements = moduleProjectsViewer.getCheckedElements();
- List list;
- if (elements == null || elements.length == 0)
- list = Collections.EMPTY_LIST;
- else
- list = Arrays.asList(elements);
- return list;
- }
-
- protected void createButtonsGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_SELECT));
- selectAllButton.addListener(SWT.Selection, this);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESELECT));
- deselectAllButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- newModuleButton = new Button(buttonGroup, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_NEW));
- newModuleButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- newModuleButton.setLayoutData(gd);
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == selectAllButton)
- handleSelectAllButtonPressed();
- else if (evt.widget == deselectAllButton)
- handleDeselectAllButtonPressed();
- else if (evt.widget == newModuleButton)
- handleNewModuleButtonPressed();
- else
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleNewModuleButtonPressed() {
- IDataModel aModel = createNewModuleModel();
- DefaultJ2EEComponentCreationWizard wizard = new DefaultJ2EEComponentCreationWizard(aModel);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- if (dialog.open() != IDialogConstants.CANCEL_ID) {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- }
- }
-
- private IDataModel createNewModuleModel() {
- IDataModel defaultModel = DataModelFactory.createDataModel(new DefaultJ2EEComponentCreationDataModelProvider());
- // transfer properties, project name
- String projectName = model.getStringProperty(PROJECT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.PROJECT_NAME, projectName);
- // ear component name
- String earName = model.getStringProperty(COMPONENT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME, earName);
- // ear j2ee version
- int j2eeVersion = model.getIntProperty(COMPONENT_VERSION);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.J2EE_VERSION, new Integer(j2eeVersion));
- return defaultModel;
- }
-
- /**
- *
- */
- private void handleDeselectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(false);
- getDataModel().setProperty(J2EE_COMPONENT_LIST, null);
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- /**
- *
- */
- private void handleSelectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(true);
- getDataModel().setProperty(J2EE_COMPONENT_LIST, getCheckedElementsAsList());
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- private AddArchiveProjectsToEARDataModel getModulesModel() {
-// return ((EnterpriseApplicationCreationDataModel) model).getAddModulesToEARDataModel();
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#enter()
- */
- protected void enter() {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- super.enter();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondWizardPage.java
deleted file mode 100644
index 3804d62de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationSecondWizardPage.java
+++ /dev/null
@@ -1,238 +0,0 @@
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.AddArchiveProjectsToEARDataModel;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.earcreation.DefaultJ2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.EARComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.IDefaultJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.SWT;
-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.Event;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-public class EARComponentCreationSecondWizardPage extends DataModelWizardPage{
- private Button selectAllButton;
- private Button deselectAllButton;
- private Button newModuleButton;
- private CheckboxTableViewer moduleProjectsViewer;
- private boolean ignoreCheckedState = false;
- /**
- * @param model
- * @param pageName
- */
- public EARComponentCreationSecondWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_SECOND_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_SECOND_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_WIZ_BANNER));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.ui.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.ui.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite modulesGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- modulesGroup.setLayout(layout);
-// setInfopopID(IJ2EEUIContextIds.NEW_EAR_ADD_MODULES_PAGE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- modulesGroup.setLayoutData(gridData);
- createModuleProjectOptions(modulesGroup);
- createButtonsGroup(modulesGroup);
- return modulesGroup;
- }
-
- /**
- * @param modulesGroup
- */
- private void createModuleProjectOptions(Composite modulesGroup) {
- moduleProjectsViewer = CheckboxTableViewer.newCheckList(modulesGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.widthHint = 200;
- gData.heightHint = 80;
- moduleProjectsViewer.getControl().setLayoutData(gData);
- int j2eeVersion = getDataModel().getIntProperty(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION);
- AvailableJ2EEComponentsContentProvider provider = new AvailableJ2EEComponentsContentProvider(j2eeVersion);
- moduleProjectsViewer.setContentProvider(provider);
- moduleProjectsViewer.setLabelProvider(new J2EEComponentLabelProvider());
- setCheckedItemsFromModel();
- moduleProjectsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (!ignoreCheckedState) {
- ((EARComponentCreationDataModel)getDataModel()).setProperty(EARComponentCreationDataModel.J2EE_COMPONENT_LIST, getCheckedElementsAsList());
- }
- }
- });
- TableLayout tableLayout = new TableLayout();
- moduleProjectsViewer.getTable().setLayout(tableLayout);
- moduleProjectsViewer.getTable().setHeaderVisible(false);
- moduleProjectsViewer.getTable().setLinesVisible(false);
- moduleProjectsViewer.setSorter(null);
- }
-
- /**
- *
- */
- private void setCheckedItemsFromModel() {
-// List projects = (List) getModulesModel().getProperty(AddArchiveProjectsToEARDataModel.MODULE_LIST);
-// moduleProjectsViewer.setCheckedElements(projects.toArray());
- }
-
- private void refreshModules() {
- moduleProjectsViewer.refresh();
- setCheckedItemsFromModel();
- }
-
- protected List getCheckedElementsAsList() {
- Object[] elements = moduleProjectsViewer.getCheckedElements();
- List list;
- if (elements == null || elements.length == 0)
- list = Collections.EMPTY_LIST;
- else
- list = Arrays.asList(elements);
- return list;
- }
-
- protected void createButtonsGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_SELECT));
- selectAllButton.addListener(SWT.Selection, this);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESELECT));
- deselectAllButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- newModuleButton = new Button(buttonGroup, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_NEW));
- newModuleButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.heightHint = 22;
- gd.widthHint = 120;
- newModuleButton.setLayoutData(gd);
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == selectAllButton)
- handleSelectAllButtonPressed();
- else if (evt.widget == deselectAllButton)
- handleDeselectAllButtonPressed();
- else if (evt.widget == newModuleButton)
- handleNewModuleButtonPressed();
- else
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleNewModuleButtonPressed() {
- IDataModel aModel = createNewModuleModel();
- DefaultJ2EEComponentCreationWizard wizard = new DefaultJ2EEComponentCreationWizard(aModel);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- if (dialog.open() != IDialogConstants.CANCEL_ID) {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- }
- }
-
- private IDataModel createNewModuleModel() {
- IDataModel defaultModel = DataModelFactory.createDataModel(new DefaultJ2EEComponentCreationDataModelProvider());
- // transfer properties, project name
- String projectName = model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.PROJECT_NAME, projectName);
- // ear component name
- String earName = model.getStringProperty(IComponentCreationDataModelProperties.COMPONENT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME, earName);
- // ear j2ee version
- int j2eeVersion = model.getIntProperty(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.J2EE_VERSION, new Integer(j2eeVersion));
- return defaultModel;
- }
-
- /**
- *
- */
- private void handleDeselectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(false);
- ((EARComponentCreationDataModel)getDataModel()).setProperty(EARComponentCreationDataModel.J2EE_COMPONENT_LIST, null);
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- /**
- *
- */
- private void handleSelectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(true);
- ((EARComponentCreationDataModel)getDataModel()).setProperty(EARComponentCreationDataModel.J2EE_COMPONENT_LIST, getCheckedElementsAsList());
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- private AddArchiveProjectsToEARDataModel getModulesModel() {
-// return ((EnterpriseApplicationCreationDataModel) model).getAddModulesToEARDataModel();
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#enter()
- */
- protected void enter() {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- super.enter();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizard.java
deleted file mode 100644
index ae6229fb3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizard.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Created on Mar 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jst.j2ee.internal.earcreation.EARComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.EarComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-public class EARComponentCreationWizard extends J2EEComponentCreationWizard implements IExecutableExtension, INewWizard {
-
- /**
- * <p>
- * The Wizard ID of the EARComponentCreationWizard. Used for internal purposes and activities management.
- * </p>
- */
- public static final String WIZARD_ID = EARComponentCreationWizard.class.getName();
- protected static final String SECOND_PG = "second"; //$NON-NLS-1$
-
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection,
- * no model instance, and no operation instance. The model and
- * operation will be created as needed.
- * </p>
- */
- public EARComponentCreationWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls
- * and interface with the operation.
- * </p>
- * @param model The model parameter is used to pre-populate wizard controls and interface with the operation
- */
- public EARComponentCreationWizard(IDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return a {@link WebProjectCreationDataModel} and defaults
- * the value of {@link J2EEModuleCreationDataModelOld#ADD_TO_EAR} to <b>true</b>
- * </p>
- *
- * @return Returns the specific operation data model for the creation of J2EE Web modules
- */
- protected WTPOperationDataModel createDefaultModel() {
- EARComponentCreationDataModel aModel = new EARComponentCreationDataModel();
- return aModel;
- }
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default page image.
- * </p>
- *
- * @see J2EEArtifactCreationWizard#doInit()
- */
- protected void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_WIZ_BANNER));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Adds a {@link JCAProjectCreationPage} as the {@link J2EEComponentCreationWizard#MAIN_PG}.
- * </p>
- */
- protected void doAddPages() {
- EARComponentCreationWizardPage page1 = new EARComponentCreationWizardPage(getDataModel(), MAIN_PG);
-// page.setInfopopID("org.eclipse.jst.j2ee.ui.webw1000"); //$NON-NLS-1$
- addPage(page1);
- EARComponentCreationSecondPage page2 = new EARComponentCreationSecondPage(getDataModel(), SECOND_PG);
- addPage(page2);
- super.doAddPages();
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new EarComponentCreationDataModelProvider();
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizardPage.java
deleted file mode 100644
index 21eaa6acf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentCreationWizardPage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Created on Mar 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.datamodel.properties.IEarComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentCreationWizardPage extends J2EEComponentCreationWizardPage {
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 250;
-
- /**
- * @param model
- * @param pageName
- */
- public EARComponentCreationWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_WIZ_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleCreationPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected void addToAdvancedComposite(Composite advanced) {
- super.addToAdvancedComposite(advanced);
- }
-
- //TODO: utility to handle additions
- protected String[] getValidationPropertyNames() {
- return new String[] { IEarComponentCreationDataModelProperties.PROJECT_NAME, COMPONENT_NAME, COMPONENT_VERSION };
- }
-
- public void dispose() {
- super.dispose();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARExportPage.java
deleted file mode 100644
index b954ee244..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARExportPage.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationExportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactExportDataModel;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARExportPage extends J2EEExportPage {
-
- private Button includeProjectFilesCheckbox;
-
- /**
- * @param model
- * @param pageName
- */
- public EARExportPage(EnterpriseApplicationExportDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName, selection);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_EXPORT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_EXPORT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_EXPORT_WIZARD_BANNER));
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
- */
- protected String getProjectLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_PROJECT_FOR_MODULE_CREATION);
- }
-
- protected void createProjectFilesCheckbox(Composite composite) {
-
- includeProjectFilesCheckbox = new Button(composite, SWT.CHECK | SWT.LEFT);
- includeProjectFilesCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_EXPORT_INCLUDE_PROJECT_FILES)); //$NON-NLS-1$
- includeProjectFilesCheckbox.setEnabled(true);
- synchHelper.synchCheckbox(includeProjectFilesCheckbox, EnterpriseApplicationExportDataModel.INCLUDE_BUILD_PATH_AND_META_FILES, null);
-
-
- Label includeProjectFilesDesc = new Label(composite, SWT.WRAP);
- includeProjectFilesDesc.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_EXPORT_INCLUDE_PROJECT_FILES_DESC)); //$NON-NLS-1$
- GridData gd = new GridData();
- gd.horizontalIndent = 20;
- gd.widthHint = 400;
- includeProjectFilesDesc.setLayoutData(gd);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- /**
- * @return
- */
- protected boolean shouldShowProjectFilesCheckbox() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
- */
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof Application;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#getNatureID()
- */
- protected String getNatureID() {
-
- return IEARNatureConstants.NATURE_ID;
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEArtifactExportDataModel.PROJECT_NAME, J2EEArtifactExportDataModel.ARCHIVE_DESTINATION, J2EEArtifactExportDataModel.OVERWRITE_EXISTING};
- }
-
- protected String getInfopopID() {
- return IJ2EEUIContextIds.EXPORT_EAR_WIZARD_P1;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java
deleted file mode 100644
index 4f80c3aad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-
-
-
-/**
- * Insert the type's description here. Creation date: (5/7/2001 11:39:11 AM)
- *
- * @author: Administrator
- */
-public class EARImportListContentProvider extends LabelProvider implements IStructuredContentProvider, ITableLabelProvider {
- /**
- * EARImportListContentProvider constructor comment.
- */
- public EARImportListContentProvider() {
- super();
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(Object inputElement) {
- if (inputElement instanceof TableObjects) {
- Object[] array = ((TableObjects) inputElement).getTableObjects().toArray();
- Arrays.sort(array, new Comparator() {
- public int compare(Object o1, Object o2) {
- return getColumnText(o1, 0).compareTo(getColumnText(o2, 0));
- }
- });
- return array;
- }
- return new Object[0]; //should throw exception instead
- }
-
- /**
- * Returns the label image for the given column of the given element.
- *
- * @param element
- * the object representing the entire row, or <code>null</code> indicating that no
- * input object is set in the viewer
- * @param columnIndex
- * the zero-based index of the column in which the label appears
- */
- public org.eclipse.swt.graphics.Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /**
- * Returns the label text for the given column of the given element.
- *
- * @param element
- * the object representing the entire row, or <code>null</code> indicating that no
- * input object is set in the viewer
- * @param columnIndex
- * the zero-based index of the column in which the label appears
- */
- public String getColumnText(Object element, int columnIndex) {
- J2EEArtifactImportDataModel dataModel = (J2EEArtifactImportDataModel) element;
- if (columnIndex == 0) {
- return dataModel.getArchiveFile().getURI();
- } else if (columnIndex == 1) {
- return dataModel.getStringProperty(J2EEArtifactImportDataModel.PROJECT_NAME);
- }
- return ""; //$NON-NLS-1$
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- public void dispose() {
- //dispose
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportOptionsPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportOptionsPage.java
deleted file mode 100644
index 17828f961..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportOptionsPage.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 8, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelListener;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPDataModelSynchHelper;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARImportOptionsPage extends J2EEImportPage {
- private Button useProjectMetaCheckbox;
-
- private Button deselectAllButton;
- private Button selectAllButton;
- private Label moduleProjectLocationLabel;
- protected Button browseButton;
- protected Button useAlternateRootBtn;
- protected Text systemDefaultText;
- protected EARFile earFile;
- public CheckboxTableViewer availableJARsViewer;
- public boolean utilJarSelectionChanged = false;
-
- /**
- * @param model
- * @param pageName
- */
- public EARImportOptionsPage(J2EEArtifactImportDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- setInfopopID(IJ2EEUIContextIds.IMPORT_EAR_WIZARD_P2);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- createNestedProjectOverwriteCheckbox(synchHelper, composite);
- createProjectMetaCheckbox(composite);
- createJARsComposite(composite);
- createProjectRootComposite(composite);
-
- return composite;
- }
-
- /*
- * Updates the enable state of the all buttons
- */
- protected void updateButtonEnablements() {
- utilJarSelectionChanged = true;
- }
-
- protected void createAvailableJarsList(Composite listGroup) {
- availableJARsViewer = CheckboxTableViewer.newCheckList(listGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gData.widthHint = 200;
- gData.heightHint = 80;
- availableJARsViewer.getControl().setLayoutData(gData);
- AvailableUtilJarsAndWebLibProvider availableUtilJARsProvider = new AvailableUtilJarsAndWebLibProvider();
- availableJARsViewer.setContentProvider(availableUtilJARsProvider);
- availableJARsViewer.setLabelProvider(availableUtilJARsProvider);
- availableJARsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- availableJARCheckStateChanged(event);
- }
- });
- availableJARsViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- updateButtonEnablements();
- }
- });
- TableLayout tableLayout = new TableLayout();
- availableJARsViewer.getTable().setLayout(tableLayout);
- availableJARsViewer.getTable().setHeaderVisible(false);
- availableJARsViewer.getTable().setLinesVisible(false);
-
- getEARImportDataModel().addListener(new WTPOperationDataModelListener() {
- public void propertyChanged(WTPOperationDataModelEvent event) {
- if (event.getPropertyName().equals(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA)) {
- boolean partialDevelopmentMode = getEARImportDataModel().getBooleanProperty(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA);
- availableJARsViewer.getControl().setEnabled(!partialDevelopmentMode);
- selectAllButton.setEnabled(!partialDevelopmentMode);
- deselectAllButton.setEnabled(!partialDevelopmentMode);
- } else if (event.getPropertyName().equals(EnterpriseApplicationImportDataModel.UTILITY_LIST)) {
- availableJARsViewer.setCheckedElements(((List) getEARImportDataModel().getProperty(EnterpriseApplicationImportDataModel.UTILITY_LIST)).toArray());
- }
- }
- });
- }
-
- private void handleDeselectAllButtonPressed() {
- ArrayList emptySelection = new ArrayList(2);
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.UTILITY_LIST, emptySelection);
- }
-
- private void handleSelectAllButtonPressed() {
- ArrayList allSelection = new ArrayList(2);
- Object selection = null;
- for (int i = 0; (null != (selection = availableJARsViewer.getElementAt(i))); i++) {
- allSelection.add(selection);
- }
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.UTILITY_LIST, allSelection);
- }
-
- /**
- * Open an appropriate directory browser
- */
- protected void handleBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(browseButton.getShell());
- dialog.setMessage(J2EEUIMessages.getResourceString(J2EEUIMessages.SELECT_DIRECTORY_DLG));
-
- String dirName = getBrowseStartLocation();
-
- if (!isNullOrEmpty(dirName)) {
- File path = new File(dirName);
- if (path.exists())
- dialog.setFilterPath(dirName);
- }
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null)
- systemDefaultText.setText(selectedDirectory);
-
- }
-
- protected String getBrowseStartLocation() {
- String text = systemDefaultText.getText();
- return text;
- }
-
- protected void createButtonsGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_SELECT_ALL_UTIL_BUTTON)); //$NON-NLS-1$ = "Select All"
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON)); //$NON-NLS-1$ = "Deselect All"
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleDeselectAllButtonPressed();
- }
- });
- }
-
- public static void createNestedProjectOverwriteCheckbox(WTPDataModelSynchHelper synchHelper, Composite parent) {
- Button allowNestedOverwriteCheckbox;
- allowNestedOverwriteCheckbox = new Button(parent, SWT.CHECK);
- allowNestedOverwriteCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_OVERWRITE_NESTED));
- synchHelper.synchCheckbox(allowNestedOverwriteCheckbox, EnterpriseApplicationImportDataModel.OVERWRITE_NESTED_PROJECTS, null);
- }
-
- protected void createProjectMetaCheckbox(Composite parent) {
- useProjectMetaCheckbox = new Button(parent, SWT.CHECK);
- useProjectMetaCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_PARTIAL_DEVELOPMENT));
- synchHelper.synchCheckbox(useProjectMetaCheckbox, J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA, null);
- }
-
- protected void createJARsComposite(Composite parent) {
- Group group = new Group(parent, SWT.NULL);
- group.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_JARS_GROUP));
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label description = new Label(group, SWT.NULL);
- description.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_SELECT_UTIL_JARS_TO_BE_PROJECTS));
- GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd2.horizontalSpan = 3;
- description.setLayoutData(gd2);
-
- //create jars check box viewer
- createAvailableJarsList(group);
- createButtonsGroup(group);
- }
-
- protected void createProjectRootComposite(Composite parent) {
- Group group = new Group(parent, SWT.NULL);
- group.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.PROJECT_LOCATIONS_GROUP));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label description = new Label(group, SWT.NULL);
- description.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_PROJECT_GROUP_DESCRIPTION));
- GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd2.horizontalSpan = 3;
- description.setLayoutData(gd2);
-
- moduleProjectLocationLabel = new Label(group, SWT.NULL);
- moduleProjectLocationLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.USE_DEFAULT_ROOT_RADIO));
- moduleProjectLocationLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- systemDefaultText = new Text(group, SWT.READ_ONLY | SWT.WRAP | SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- systemDefaultText.setLayoutData(gd);
- synchHelper.synchText(systemDefaultText, EnterpriseApplicationImportDataModel.NESTED_MODULE_ROOT, null);
-
- browseButton = new Button(group, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- browseButton.setLayoutData(gd);
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowseButtonPressed();
- }
- });
- }
-
- private void refreshEARFileIfNecessary() {
- if (isEARFileChanged()) {
- earFile = getEARImportDataModel().getEARFile();
- if (!getEARImportDataModel().isEnabled(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA).booleanValue()) {
- disableUseProjectMetaCheckbox();
- setJARsCompositeEnabled(true);
- } else {
- useProjectMetaCheckbox.setEnabled(true);
- getEARImportDataModel().setBooleanProperty(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA, false);
- setJARsCompositeEnabled(true);
- }
- refresh();
- }
- }
-
- protected void setJARsCompositeEnabled(boolean enabled) {
- availableJARsViewer.getTable().setEnabled(enabled);
- availableJARsViewer.setAllChecked(false);
- availableJARsViewer.setAllGrayed(!enabled);
- selectAllButton.setEnabled(enabled);
- deselectAllButton.setEnabled(enabled);
- }
-
- private void refresh() {
- availableJARsViewer.setInput(earFile);
- }
-
- public boolean isEARFileChanged() {
- return earFile != getEARImportDataModel().getEARFile();
- }
-
- protected void enter() {
- super.enter();
- refreshEARFileIfNecessary();
- }
-
- protected void disableUseProjectMetaCheckbox() {
- getEARImportDataModel().setBooleanProperty(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA, false);
- useProjectMetaCheckbox.setEnabled(false);
- }
-
- public void availableJARCheckStateChanged(CheckStateChangedEvent event) {
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.UTILITY_LIST, getJARsForProjects());
- validatePage();
- }
-
- public List getJARsForProjects() {
- refreshEARFileIfNecessary();
- List result = new ArrayList();
- result.addAll(Arrays.asList(availableJARsViewer.getCheckedElements()));
- return result;
- }
-
- private EnterpriseApplicationImportDataModel getEARImportDataModel() {
- return (EnterpriseApplicationImportDataModel) model;
- }
-
- protected boolean isNullOrEmpty(String aString) {
- return aString == null || aString.length() == 0;
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA, EnterpriseApplicationImportDataModel.OVERWRITE_NESTED_PROJECTS};
- }
-
- protected void restoreWidgetValues() {
- // This page doesn't implement...
- }
-
- public void storeDefaultSettings() {
- // This page doesn't implement...
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportPage.java
deleted file mode 100644
index d73c66d83..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportPage.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 8, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.earcreation.EARComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.jst.j2ee.internal.servertarget.ServerTargetDataModel;
-import org.eclipse.swt.SWT;
-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.Label;
-import org.eclipse.wst.common.componentcore.internal.operation.ComponentCreationDataModel;
-import org.eclipse.wst.common.internal.emfworkbench.operation.EditModelOperationDataModel;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARImportPage extends J2EEImportPage {
- protected Combo serverTargetCombo;
-
- /**
- * @param model
- * @param pageName
- */
- public EARImportPage(EnterpriseApplicationImportDataModel earModel, String pageName) {
- super(earModel, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- setInfopopID(IJ2EEUIContextIds.IMPORT_EAR_WIZARD_P1);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createFileNameComposite(composite);
- createProjectNameComposite(composite);
- createImportEARComposite(10, composite);
- createOverwriteComposite(10, 20, composite, synchHelper);
- createServerTargetComposite(composite);
- createAnnotationsStandaloneGroup(composite);
- restoreWidgetValues();
- return composite;
- }
-
- protected J2EEComponentCreationDataModel getNewProjectCreationDataModel() {
- EnterpriseApplicationImportDataModel importModel = (EnterpriseApplicationImportDataModel) model;
- EARComponentCreationDataModel earModel = new EARComponentCreationDataModel();
- earModel.setIntProperty(ComponentCreationDataModel.COMPONENT_VERSION, importModel.getJ2EEVersion());
- earModel.setProperty(EditModelOperationDataModel.PROJECT_NAME, importModel.getProperty(J2EEArtifactImportDataModel.PROJECT_NAME));
-// earModel.setProperty(J2EEComponentCreationDataModel.SERVER_TARGET_ID, importModel.getProperty(J2EEArtifactImportDataModel.SERVER_TARGET_ID));
-// earModel.setBooleanProperty(EARComponentCreationDataModel.UI_SHOW_FIRST_PAGE_ONLY, true);
- return earModel;
- }
-
- protected String getProjectImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_PROJECT_LABEL);
- }
-
- /**
- * @param composite
- */
- private void createImportEARComposite(int indent, Composite parent) {
- importEARButton = new Button(parent, SWT.CHECK);
- importEARButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_INCLUDE_EAR_PROJECT));
- importEARButton.setSelection(true);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = indent;
- gd.horizontalSpan = 3;
- importEARButton.setLayoutData(gd);
- synchHelper.synchCheckbox(importEARButton, EnterpriseApplicationImportDataModel.IMPORT_EAR_PROJECT, null);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_FILE_LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetCombo.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- // if (!org.eclipse.jst.j2ee.internal.internal.plugin.J2EEPlugin.hasDevelopmentRole()) {
- // serverTargetCombo.setEnabled(false);
- // }
-
- Button newServerTargetButton = new Button(parent, SWT.NONE);
- newServerTargetButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newServerTargetButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E));
-// newServerTargetButton.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// FlexibleProjectCreationWizardPage.launchNewRuntimeWizard(getShell(), getJ2EEProjectCreationDataModel().getServerTargetDataModel());
-// }
-// });
- Control[] deps = new Control[]{label, newServerTargetButton};
- synchHelper.synchCombo(serverTargetCombo, ServerTargetDataModel.RUNTIME_TARGET_ID, deps);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleImportPage#createAnnotationsStandaloneGroup(org.eclipse.swt.widgets.Composite)
- */
- protected void createAnnotationsStandaloneGroup(Composite composite) {
- //new AnnotationsStandaloneGroup(composite, model, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEArtifactImportDataModel.FILE_NAME, J2EEArtifactImportDataModel.PROJECT_NAME, J2EEArtifactImportDataModel.SERVER_TARGET_ID, J2EEArtifactImportDataModel.OVERWRITE_PROJECT, EnterpriseApplicationImportDataModel.IMPORT_EAR_PROJECT, IAnnotationsDataModel.USE_ANNOTATIONS};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileNamesStoreID()
- */
- protected String getFileNamesStoreID() {
- return IEARNatureConstants.NATURE_ID;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportProjectsPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportProjectsPage.java
deleted file mode 100644
index fda78697f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportProjectsPage.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 8, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jem.util.emf.workbench.JavaProjectUtilities;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARImportProjectsPage extends J2EEImportPage implements ICellModifier {
-
- private CheckboxTableViewer earFileListViewer;
-
- public static final String INCLUDE_COLUMN = J2EEUIMessages.getResourceString("EARImportProjectsPage_UI_0"); //$NON-NLS-1$
- public static final String FILE_COLUMN = J2EEUIMessages.getResourceString("EARImportProjectsPage_UI_1"); //$NON-NLS-1$
- public static final String PROJECT_COLUMN = J2EEUIMessages.getResourceString("EARImportProjectsPage_UI_2"); //$NON-NLS-1$
-
- /**
- * @param model
- * @param pageName
- */
- public EARImportProjectsPage(J2EEArtifactImportDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_PROJECT_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_PROJECT_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- setInfopopID(IJ2EEUIContextIds.IMPORT_EAR_WIZARD_P3);
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- EARImportOptionsPage.createNestedProjectOverwriteCheckbox(synchHelper, composite);
- createListGroup(composite);
- createButtonsGroup(composite);
-
- return composite;
- }
-
- protected void setColumnEditors() {
- Table t = earFileListViewer.getTable();
- CellEditor[] columnEditors = new CellEditor[t.getColumnCount()];
- columnEditors[1] = new TextCellEditor(t);
-
- earFileListViewer.setCellEditors(columnEditors);
- }
-
- protected void createButtonsGroup(Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Button selectNotInWorkspace = new Button(buttonGroup, SWT.PUSH);
- selectNotInWorkspace.setText(J2EEUIMessages.getResourceString("EARImportProjectsPage_UI_3")); //$NON-NLS-1$
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectNotInWorkspace.setLayoutData(gd);
- selectNotInWorkspace.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List list = getEARImportDataModel().getProjectModels();
- List selectedList = getEARImportDataModel().getSelectedModels();
- List newList = new ArrayList();
- newList.addAll(selectedList);
- J2EEArtifactImportDataModel importDM = null;
- for (int i = 0; i < list.size(); i++) {
- importDM = (J2EEArtifactImportDataModel) list.get(i);
- if (!newList.contains(importDM) && !importDM.getProject().exists()) {
- newList.add(importDM);
- }
- }
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST, newList);
- }
- });
-
- Button selectBinary = new Button(buttonGroup, SWT.PUSH);
- selectBinary.setText(J2EEUIMessages.getResourceString("EARImportProjectsPage_UI_4")); //$NON-NLS-1$
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectBinary.setLayoutData(gd);
- selectBinary.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List list = getEARImportDataModel().getProjectModels();
- List selectedList = getEARImportDataModel().getSelectedModels();
- List newList = new ArrayList();
- newList.addAll(selectedList);
- J2EEArtifactImportDataModel importDM = null;
- for (int i = 0; i < list.size(); i++) {
- importDM = (J2EEArtifactImportDataModel) list.get(i);
- if (!newList.contains(importDM) && JavaProjectUtilities.isBinaryProject(importDM.getProject())) {
- newList.add(importDM);
- }
- }
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST, newList);
- }
- });
-
- Button selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_SELECT_ALL_UTIL_BUTTON));
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List list = getEARImportDataModel().getProjectModels();
- List newList = new ArrayList();
- newList.addAll(list);
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST, newList);
- }
- });
-
- Button deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON));
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- List newList = new ArrayList();
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST, newList);
- }
- });
- }
-
- public void propertyChanged(WTPOperationDataModelEvent event) {
- if (event.getPropertyName().equals(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST)) {
- updateGUICheckSelection();
- }
- super.propertyChanged(event);
- }
-
- public void setFileListViewerInput() {
- TableObjects files = new TableObjects();
- Iterator iterator = getEARImportDataModel().getProjectModels().iterator();
- while (iterator.hasNext()) {
- files.tableObjectsList.add(iterator.next());
- }
- earFileListViewer.setInput(files);
- updateGUICheckSelection();
- }
-
- private void updateGUICheckSelection() {
- List selectedList = getEARImportDataModel().getSelectedModels();
- List projectList = getEARImportDataModel().getProjectModels();
- Object currentElement = null;
- for (int i = 0; i < projectList.size(); i++) {
- currentElement = projectList.get(i);
- earFileListViewer.setChecked(currentElement, selectedList.contains(currentElement));
- }
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.internal.wizard.J2EEWizardPage#enter()
- */
- protected void enter() {
- super.enter();
- setFileListViewerInput();
- validatePage();
- }
-
- /**
- * Creates the import source specification widgets. <b>Subclasses </b> must override this hook
- * method.
- *
- * @param parent
- * a <code>Composite</code> that is to be used as the parent of this group's
- * collection of visual components
- * @see org.eclipse.swt.widgets.Composite
- */
- protected void createListGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite listGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- listGroup.setLayout(layout);
- GridData gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
- listGroup.setLayoutData(gd);
-
- earFileListViewer = CheckboxTableViewer.newCheckList(listGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
- EARImportListContentProvider provider = new EARImportListContentProvider();
- earFileListViewer.setContentProvider(provider);
- earFileListViewer.setLabelProvider(provider);
- earFileListViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- J2EEArtifactImportDataModel aModel = (J2EEArtifactImportDataModel) event.getElement();
- J2EEArtifactImportDataModel matchingModel = getEARImportDataModel().getMatchingEJBJarOrClient(aModel);
- if (null != matchingModel) {
- earFileListViewer.setChecked(matchingModel, event.getChecked());
- }
- List result = new ArrayList();
- result.addAll(Arrays.asList(earFileListViewer.getCheckedElements()));
- getEARImportDataModel().setProperty(EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST, result);
-
- }
- });
-
- Table earFileListTable = (Table) earFileListViewer.getControl();
- earFileListTable.setHeaderVisible(true);
- earFileListTable.setLinesVisible(true);
- // set up table layout
- TableLayout tableLayout = new org.eclipse.jface.viewers.TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(100, true));
- tableLayout.addColumnData(new ColumnWeightData(200, true));
- earFileListTable.setLayout(tableLayout);
-
- gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gd.widthHint = 400;
- earFileListTable.setLayoutData(gd);
-
-
- TableColumn fileNameColumns = new TableColumn(earFileListTable, SWT.NONE);
- fileNameColumns.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_Modules_in_EAR)); //$NON-NLS-1$ = "Modules in EAR"
- fileNameColumns.setResizable(true);
-
- TableColumn importNameColumn = new TableColumn(earFileListTable, SWT.NONE);
- importNameColumn.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_New_Project_Name)); //$NON-NLS-1$ = "New Project Name"
- importNameColumn.setResizable(true);
-
- String[] columnProperties = new String[2];
- columnProperties[0] = FILE_COLUMN;
- columnProperties[1] = PROJECT_COLUMN;
- earFileListViewer.setColumnProperties(columnProperties);
-
- setColumnEditors();
- earFileListViewer.setCellModifier(this);
- }
-
- private EnterpriseApplicationImportDataModel getEARImportDataModel() {
- return (EnterpriseApplicationImportDataModel) model;
- }
-
- public boolean canModify(Object element, String property) {
- return !getEARImportDataModel().getBooleanProperty(J2EEArtifactImportDataModel.PRESERVE_PROJECT_METADATA);
- }
-
- public java.lang.Object getValue(java.lang.Object element, java.lang.String property) {
- TableItem[] items = earFileListViewer.getTable().getSelection();
- TableItem item = items[0];
- return item.getText(1);
- }
-
- public void modify(Object element, String property, Object value) {
- TableItem elementHolder = (TableItem) element;
- if (property.equals(PROJECT_COLUMN)) {
- elementHolder.setText(1, (String) value);
- ((J2EEArtifactImportDataModel) elementHolder.getData()).setProperty(J2EEArtifactImportDataModel.PROJECT_NAME, value);
- }
- }
-
- protected void restoreWidgetValues() {
- // This page doesn't implement...
- }
-
- public void storeDefaultSettings() {
- // This page doesn't implement...
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{EnterpriseApplicationImportDataModel.NESTED_PROJECTS_VALIDATION, EnterpriseApplicationImportDataModel.OVERWRITE_NESTED_PROJECTS, EnterpriseApplicationImportDataModel.SELECTED_MODELS_LIST};
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java
deleted file mode 100644
index 251d93aca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jst.j2ee.internal.earcreation.EAREditModel;
-import org.eclipse.jst.j2ee.internal.earcreation.EARNatureRuntime;
-import org.eclipse.jst.j2ee.internal.validation.UIEarValidator;
-import org.eclipse.wst.common.frameworks.internal.ui.RunnableWithProgressWrapper;
-import org.eclipse.wst.validation.internal.operations.OneValidatorOperation;
-import org.eclipse.wst.validation.internal.operations.ValidatorManager;
-
-public class EARValidationHelper {
-
- /**
- * Constructor for EARValidationHelper.
- */
- private EARValidationHelper() {
- super();
- }
-
- /**
- * Return a list of runnable validation operations for all EAR projects which have auto validate
- * enabled, and are impacted by the list of projects; If the ear project itself is in the list,
- * then it is skipped.
- */
- public static IRunnableWithProgress[] getEARValidationOperations(List modifiedProjects) {
- List earProjects = EARNatureRuntime.getAllEARProjectsInWorkbench();
- List result = new ArrayList(earProjects.size());
- for (int i = 0; i < earProjects.size(); i++) {
- IProject earProj = (IProject) earProjects.get(i);
- if (willEARProjectNeedValidation(earProj, modifiedProjects)) {
- result.add(createValidationRunnable(earProj));
- }
- }
- return (IRunnableWithProgress[]) result.toArray(new IRunnableWithProgress[result.size()]);
- }
-
- /**
- * Return a list of runnable validation operations for all EAR projects which have auto validate
- * enabled, and are impacted by the j2ee project
- */
- public static IRunnableWithProgress[] getEARValidationOperations(IProject modifiedJ2EEProject) {
- return getEARValidationOperations(Collections.singletonList(modifiedJ2EEProject));
- }
-
- public static boolean isEARValidationAutoEnabled(IProject earProj) {
- return ValidatorManager.getManager().isAutoValidate(earProj) && ValidatorManager.getManager().isEnabled(earProj, UIEarValidator.VALIDATOR_ID);
- }
-
- private static boolean willEARProjectNeedValidation(IProject earProj, List modifiedProjects) {
- if (modifiedProjects.contains(earProj) || !isEARValidationAutoEnabled(earProj))
- return false;
- Object accessorKey = new Object();
- EARNatureRuntime runtime = EARNatureRuntime.getRuntime(earProj);
- EAREditModel editModel = runtime.getEarEditModelForRead(accessorKey);
- try {
- for (int i = 0; i < modifiedProjects.size(); i++) {
- if (editModel.hasMappingToProject((IProject) modifiedProjects.get(i)))
- return true;
- }
- } finally {
- if (editModel != null)
- editModel.releaseAccess(accessorKey);
- }
- return false;
- }
-
- /**
- * Creates a new IRunnableWithProgress which runs a one validator operation on the EAR project
- */
- public static IRunnableWithProgress createValidationRunnable(IProject earProj) {
- OneValidatorOperation op = new OneValidatorOperation(earProj, UIEarValidator.VALIDATOR_ID, true, false);
-
- return new RunnableWithProgressWrapper(op);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationExportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationExportWizard.java
deleted file mode 100644
index 7b14b25db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationExportWizard.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationExportDataModel;
-import org.eclipse.jst.j2ee.internal.archive.operations.EnterpriseApplicationExportOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * <p>
- * Wizard used to export J2EE Enterprise Application structures from the Eclipse Workbench to a
- * deployable Enterprise Application Archive *.ear file.
- * </p>
- */
-public final class EnterpriseApplicationExportWizard extends J2EEArtifactExportWizard implements IExportWizard {
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public EnterpriseApplicationExportWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public EnterpriseApplicationExportWizard(EnterpriseApplicationExportDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return an {@link EnterpriseApplicationImportDataModel}.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- return new EnterpriseApplicationExportDataModel();
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Returns an {@link EnterpriseApplicationExportOperation}using the model either supplied in
- * the constructor or created from {@link #createDefaultModel()}.
- * </p>
- *
- * @return Returns the operation to be executed when the Wizard completes.
- */
- protected WTPOperation createBaseOperation() {
- return new EnterpriseApplicationExportOperation(getSpecificModel());
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link EARExportPage}as the main wizard page ({@link #MAIN_PG})
- * </ul>
- * </p>
- */
- public void doAddPages() {
- addPage(new EARExportPage(getSpecificModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_EXPORT_WIZARD_BANNER));
- }
-
- private EnterpriseApplicationExportDataModel getSpecificModel() {
- return (EnterpriseApplicationExportDataModel) getModel();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationImportWizard.java
deleted file mode 100644
index afa7633ce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EnterpriseApplicationImportWizard.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationImportDataModel;
-import org.eclipse.jst.j2ee.internal.archive.operations.EnterpriseApplicationImportOperation;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * <p>
- * Wizard used to import J2EE Application structures into the Eclipse Workbench from an existing
- * Enterprise Application Archive *.ear file.
- * </p>
- */
-public final class EnterpriseApplicationImportWizard extends J2EEArtifactImportWizard implements IExecutableExtension, IImportWizard {
-
- /**
- * <p>
- * Constant used to identify the key of the Projects page of the Wizard.
- * </p>
- */
- protected static final String PROJECT_PG = "projects"; //$NON-NLS-1$
-
- /**
- * <p>
- * Constant used to identify the key of the Options page of the Wizard.
- * </p>
- */
- protected static final String OPTIONS_PG = "options"; //$NON-NLS-1$
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public EnterpriseApplicationImportWizard() {
- super();
- setWindowTitle(J2EEUIMessages.getResourceString("38")); //$NON-NLS-1$
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public EnterpriseApplicationImportWizard(EnterpriseApplicationImportDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("38")); //$NON-NLS-1$
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link EARImportPage}as the main wizard page ({@link #MAIN_PG})
- * <li>{@link EARImportOptionsPage}as the options wizard page ({@link #OPTIONS_PG})
- * <li>{@link EARImportProjectsPage}as the project wizard page ({@link #PROJECT_PG})
- * </ul>
- *
- * </p>
- */
- public void doAddPages() {
- addPage(new EARImportPage(getSpecificDataModel(), MAIN_PG));
- addPage(new EARImportOptionsPage(getSpecificDataModel(), OPTIONS_PG));
- addPage(new EARImportProjectsPage(getSpecificDataModel(), PROJECT_PG));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return an {@link EnterpriseApplicationImportDataModel}.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- return new EnterpriseApplicationImportDataModel();
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Returns an {@link EnterpriseApplicationImportOperation}using the model either supplied in
- * the constructor or created from {@link #createDefaultModel()}.
- * </p>
- *
- * @return Returns the operation to be executed when the Wizard completes.
- */
- protected WTPOperation createBaseOperation() {
- return new EnterpriseApplicationImportOperation(getSpecificDataModel());
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default wizard page image.
- * </p>
- */
- protected void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- private EnterpriseApplicationImportDataModel getSpecificDataModel() {
- return (EnterpriseApplicationImportDataModel) model;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizard.java
deleted file mode 100644
index 394b5f9b8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizard.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Created on Mar 14, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.FlexibleJavaProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.properties.IFlexibleProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-public class FlexibleProjectCreationWizard extends DataModelWizard implements INewWizard, IExecutableExtension, IFlexibleProjectCreationDataModelProperties {
-
- /**
- * <p>
- * Constant used to identify the key of the main page of the Wizard.
- * </p>
- */
- protected static final String MAIN_PG = "main"; //$NON-NLS-1$
- private IStructuredSelection selection;
- private IConfigurationElement configurationElement;
- public static final String WIZARD_ID = FlexibleProjectCreationWizard.class.getName();
-
- /**
- * <p>
- * Creates a default instance of the wizard with no configuration data, no selection, and no
- * operation data model.
- * </p>
- */
- public FlexibleProjectCreationWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate wizard controls and to collect data from the user. The model
- * will eventually be used to run the operation, if the user does not cancel the Wizard.
- * </p>
- *
- * @param model
- * used to collect information and interface with the WTP Operation
- */
- public FlexibleProjectCreationWizard(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.FLEXIBLE_PROJECT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_WIZ_BANNER));
- setHelpAvailable(false);
- }
-
- /**
- * <p>
- * The selection is used to pre-populate values in the Wizard dialog controls.
- * </p>
- *
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
- * org.eclipse.jface.viewers.IStructuredSelection)
- *
- * @param workbench
- * the current workbench parent of the wizard
- * @param aSelection
- * the selection from the view used to start the wizard (if any)
- */
- public final void init(IWorkbench workbench, IStructuredSelection aSelection) {
- setNeedsProgressMonitor(true);
- this.selection = aSelection;
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * The configuration element is saved to use when the wizard completes in order to change the
- * current perspective using either (1) the value specified by {@link #getFinalPerspectiveID()}
- * or (2) the value specified by the finalPerspective attribute in the Wizard's configuration
- * element.
- * </p>
- *
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
- * java.lang.String, java.lang.Object)
- */
- public final void setInitializationData(IConfigurationElement aConfigurationElement, String aPropertyName, Object theData) throws CoreException {
- configurationElement = aConfigurationElement;
-// doSetInitializeData(aConfigurationElement, aPropertyName, theData);
-
- }
-
- /**
- * <p>
- * Returns the value specified by {@link #getWizardId()}
- * </p>
- *
- * @return Returns the an id component used for Activity filtering.
- */
- public final String getLocalId() {
- return getWizardID();
- }
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.wizard.Wizard#addPages()
- */
- protected void doAddPages() {
- addPage(new FlexibleProjectCreationWizardPage(getDataModel(), MAIN_PG));
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new FlexibleJavaProjectCreationDataModelProvider();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizardPage.java
deleted file mode 100644
index adaa98e65..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/FlexibleProjectCreationWizardPage.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Created on Mar 14, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IFlexibleJavaProjectCreationDataModelProperties;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IJ2EEProjectServerTargetDataModelProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-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.events.SelectionListener;
-import org.eclipse.swt.graphics.Cursor;
-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.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.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.server.ui.ServerUIUtil;
-
-public class FlexibleProjectCreationWizardPage extends DataModelWizardPage implements IFlexibleJavaProjectCreationDataModelProperties, IJ2EEProjectServerTargetDataModelProperties {
- private static final boolean isWindows = SWT.getPlatform().toLowerCase().startsWith("win"); //$NON-NLS-1$
-
- protected NewFlexibleProjectGroup projectNameGroup;
- protected Composite advancedComposite;
- protected Button advancedButton;
- protected boolean showAdvanced = false;
- protected AdvancedSizeController advancedController;
- protected boolean advancedControlsBuilt = false;
- protected Combo serverTargetCombo;
-
- private class AdvancedSizeController implements ControlListener {
- private int advancedHeight = -1;
- private Point originalSize;
- private boolean ignoreShellResize = false;
-
- private AdvancedSizeController(Shell aShell) {
- originalSize = aShell.getSize();
- aShell.addControlListener(this);
- }
-
- public void controlMoved(ControlEvent e) {
- //do nothing
- }
-
- public void controlResized(ControlEvent e) {
- if (!ignoreShellResize) {
- Control control = (Control) e.getSource();
- if (control.isVisible()) {
- originalSize = control.getSize();
- if (advancedHeight == -1)
- setShellSizeForAdvanced();
- }
- }
- }
-
- protected void resetOriginalShellSize() {
- setShellSize(originalSize.x, originalSize.y);
- }
-
- private void setShellSize(int x, int y) {
- ignoreShellResize = true;
- try {
- getShell().setSize(x, y);
- } finally {
- ignoreShellResize = false;
- }
- }
-
- protected void setShellSizeForAdvanced() {
- int height = calculateAdvancedShellHeight();
- if (height != -1)
- setShellSize(getShell().getSize().x, height);
- }
-
- private int calculateAdvancedShellHeight() {
- Point advancedCompSize = advancedComposite.getSize();
- if (advancedCompSize.x == 0)
- return -1;
- int height = computeAdvancedHeight();
- if (!showAdvanced && height != -1)
- height = height - advancedComposite.getSize().y;
- return height;
- }
-
- /*
- * Compute the height with the advanced section showing. @return
- */
- private int computeAdvancedHeight() {
- if (advancedHeight == -1) {
- Point controlSize = getControl().getSize();
- if (controlSize.x != 0) {
- int minHeight = originalSize.y - controlSize.y;
- Point pageSize = getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- advancedHeight = pageSize.y + minHeight;
- }
- }
- return advancedHeight;
- }
- }
-
- /**
- * @param model
- * @param pageName
- */
- public FlexibleProjectCreationWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.FLEXIBLE_PROJECT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.FLEXIBLE_PROJECT_MAIN_PG_DESC));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEProjectCreationPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.NEW_EAR_WIZARD_P1);
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- top.setData(new GridData(GridData.FILL_BOTH));
- Composite composite = new Composite(top, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createProjectNameGroup(composite);
- Composite detail = new Composite(top, SWT.NONE);
- detail.setLayout(new GridLayout());
- detail.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- createAdvancedComposite(detail);
- return top;
- }
-
- protected void createProjectNameGroup(Composite parent) {
- projectNameGroup = new NewFlexibleProjectGroup(parent, SWT.NULL, model, synchHelper);
- }
-
- /**
- * @param parent
- */
- protected Composite createAdvancedComposite(Composite parent) {
- advancedControlsBuilt = true;
- advancedButton = new Button(parent, SWT.TOGGLE);
- setAdvancedLabelText();
- final Cursor hand = new Cursor(advancedButton.getDisplay(), SWT.CURSOR_HAND);
- advancedButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- hand.dispose();
- }
- });
- advancedButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- toggleAdvanced(true);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- });
- advancedButton.addListener(SWT.MouseHover, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.MouseHover)
- advancedButton.setCursor(hand);
- }
- });
- advancedComposite = new Composite(parent, SWT.NONE);
- //toggleAdvanced(false);
- GridLayout layout = new GridLayout(3, false);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- advancedComposite.setLayoutData(data);
- advancedComposite.setLayout(layout);
- addToAdvancedComposite(advancedComposite);
- return advancedComposite;
- }
-
- /**
- * @param advancedLabel
- */
- private void setAdvancedLabelText() {
- if (advancedControlsBuilt) {
- if (showAdvanced)
- advancedButton.setText(J2EEUIMessages.getResourceString("J2EEProjectCreationPage_UI_0")); //$NON-NLS-1$
- else
- advancedButton.setText(J2EEUIMessages.getResourceString("J2EEProjectCreationPage_UI_1")); //$NON-NLS-1$
- }
- }
-
- /**
- * @param advancedLabel
- */
- protected void toggleAdvanced(boolean setSize) {
- if (advancedControlsBuilt) {
- showAdvanced = !showAdvanced;
- advancedComposite.setVisible(showAdvanced);
- setAdvancedLabelText();
- if (setSize && isWindows)
- advancedController.setShellSizeForAdvanced();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- protected void enter() {
- if (advancedControlsBuilt) {
- if (isFirstTimeToPage)
- initializeAdvancedController();
- if (isWindows) {
- advancedController.setShellSizeForAdvanced();
- }
- }
- super.enter();
- }
-
- private void initializeAdvancedController() {
- advancedController = new AdvancedSizeController(getShell());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#exit()
- */
- protected void exit() {
- if (advancedControlsBuilt && isWindows) {
- advancedController.resetOriginalShellSize();
- }
- super.exit();
- }
-
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button newServerTargetButton = new Button(parent, SWT.NONE);
- newServerTargetButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E));
- newServerTargetButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- FlexibleProjectCreationWizardPage.launchNewRuntimeWizard(getShell(), model.getNestedModel(NESTED_MODEL_SERVER_TARGET));
- }
- });
- Control[] deps = new Control[]{label, newServerTargetButton};
- synchHelper.synchCombo(serverTargetCombo, RUNTIME_TARGET_ID, deps);
- if(serverTargetCombo.getVisibleItemCount() != 0)
- serverTargetCombo.select(0);
- }
-
- protected void addToAdvancedComposite(Composite parent) {
- createServerTargetComposite(parent);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{IFlexibleJavaProjectCreationDataModelProperties.PROJECT_NAME, PROJECT_LOCATION, SERVER_TARGET_ID};
- }
-
- public static boolean launchNewRuntimeWizard(Shell shell, IDataModel model) {
- DataModelPropertyDescriptor[] preAdditionDescriptors = model.getValidPropertyDescriptors(RUNTIME_TARGET_ID);
- boolean isOK = ServerUIUtil.showNewRuntimeWizard(shell, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if (isOK && model != null) {
- model.notifyPropertyChange(RUNTIME_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- DataModelPropertyDescriptor[] postAdditionDescriptors = model.getValidPropertyDescriptors(RUNTIME_TARGET_ID);
- Object[] preAddition = new Object[preAdditionDescriptors.length];
- for (int i = 0; i < preAddition.length; i++) {
- preAddition[i] = preAdditionDescriptors[i].getPropertyValue();
- }
- Object[] postAddition = new Object[postAdditionDescriptors.length];
- for (int i = 0; i < postAddition.length; i++) {
- postAddition[i] = postAdditionDescriptors[i].getPropertyValue();
- }
- Object newAddition = ProjectUtilities.getNewObject(preAddition, postAddition);
-
- model.notifyPropertyChange(RUNTIME_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- if (newAddition != null)
- model.setProperty(RUNTIME_TARGET_ID, newAddition);
- }
- return isOK;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java
deleted file mode 100644
index f7b7aa6fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-
-import org.eclipse.core.internal.localstore.CoreFileSystemLibrary;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.client.ApplicationClient;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ApplicationClientFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-
-/**
- * @author Sachin
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class ImportUtil {
-
- public static final int UNKNOWN = 0;
- public static final int EARFILE = 1;
- public static final int EJBJARFILE = 2;
- public static final int WARFILE = 3;
- public static final int CLIENTJARFILE = 4;
- public static final int RARFILE = 5;
- public static final int IMPORTCLASSTYPE = 6;
- public static final int J2EE14 = 256;
- public static final int J2EE13 = 128;
- public static final int J2EE12 = 64;
- public static final int J2EESpec = J2EE12 + J2EE13 + J2EE14;
- public static final String EAR = "EAR"; //$NON-NLS-1$
- public static final String EJB = "EJB"; //$NON-NLS-1$
- public static final String WAR = "WEB"; //$NON-NLS-1$
- public static final String JAR = "CLIENT"; //$NON-NLS-1$
- public static final String RAR = "RAR"; //$NON-NLS-1$
- public static final String[] SUFFIXES = {"", EAR, EJB, WAR, JAR, RAR, ""}; //$NON-NLS-1$ //$NON-NLS-2$
-
- public static int getFileType(String fileName) {
- Archive anArchive = null;
- try {
- try {
- anArchive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName);
- int archiveType = getArchiveType(anArchive);
- if (archiveType == UNKNOWN && isImportClassType(fileName))
- return IMPORTCLASSTYPE;
- return archiveType;
- } catch (Exception e) {
- if (isImportClassType(fileName))
- return IMPORTCLASSTYPE;
- return UNKNOWN;
- }
- } finally {
- if (anArchive != null && anArchive.isOpen())
- anArchive.close();
- }
- }
-
- //TODO: use new getJ2EEVerions switch statements
- public static int getVersionedFileType(String fileName) {
- Archive anArchive = null;
- try {
- int archiveType = UNKNOWN;
- try {
- anArchive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName);
- try {
- if (anArchive.isEJBJarFile()) {
- archiveType = EJBJARFILE;
- EJBJar ejbJar = ((EJBJarFile) anArchive).getDeploymentDescriptor();
- if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_1_1_ID)
- archiveType |= J2EE12;
- else if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_2_0_ID)
- archiveType |= J2EE13;
- else if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_2_1_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isWARFile()) {
- archiveType = WARFILE;
- WebApp war = ((WARFile) anArchive).getDeploymentDescriptor();
- if (war.getVersionID() == J2EEVersionConstants.WEB_2_2_ID)
- archiveType |= J2EE12;
- else if (war.getVersionID() == J2EEVersionConstants.WEB_2_3_ID)
- archiveType |= J2EE13;
- else if (war.getVersionID() == J2EEVersionConstants.WEB_2_4_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isApplicationClientFile()) {
- archiveType = CLIENTJARFILE;
- ApplicationClient appClient = ((ApplicationClientFile) anArchive).getDeploymentDescriptor();
- if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID)
- archiveType |= J2EE12;
- else if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID)
- archiveType |= J2EE13;
- else if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isRARFile()) {
- archiveType = RARFILE | J2EE13;
- } else if (anArchive.isEARFile()) {
- archiveType = EARFILE;
- Application app = ((EARFile) anArchive).getDeploymentDescriptor();
- if (app.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID)
- archiveType |= J2EE12;
- else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID)
- archiveType |= J2EE13;
- else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID)
- archiveType |= J2EE14;
- }
- } catch (Exception e) {
- //Ignore
- }
-
- } catch (Exception e) {
- //Ignore
- }
- if (archiveType == UNKNOWN && isImportClassType(fileName))
- archiveType = IMPORTCLASSTYPE;
- return archiveType;
- } finally {
- if (anArchive != null && anArchive.isOpen())
- anArchive.close();
- }
- }
-
- public static int getArchiveType(Archive anArchive) {
- int type = UNKNOWN;
- try {
- if (anArchive.isEJBJarFile())
- type = EJBJARFILE;
- else if (anArchive.isWARFile())
- type = WARFILE;
- else if (anArchive.isApplicationClientFile())
- type = CLIENTJARFILE;
- else if (anArchive.isRARFile())
- type = RARFILE;
- else if (anArchive.isEARFile())
- type = EARFILE;
- } catch (Exception e) {
- //Ignore
- }
- return type;
- }
-
- public static boolean isImportClassType(String fileName) {
- File file = new File(fileName);
- String fileExtension = getExtension(file);
- if (file.isFile()) {
- if (fileExtension.equalsIgnoreCase("jar") || //$NON-NLS-1$
- fileExtension.equalsIgnoreCase("zip") || //$NON-NLS-1$
- fileExtension.equalsIgnoreCase("class")) //$NON-NLS-1$
- return true;
- } else if (file.isDirectory()) { //disable/enable drag/drop directories
- return false;
- }
- return false;
- }
-
- public static String getExtension(File f) {
- String ext = null;
- String s = f.getName();
- int i = s.lastIndexOf('.');
-
- if (i > 0 && i < s.length() - 1) {
- ext = s.substring(i + 1).toLowerCase();
- }
- return ext;
- }
-
-
- public static String findMatchingProjectName(String projectName) {
- if (projectName.trim().length() > 0) {
- IWorkspaceRoot root = J2EEPlugin.getWorkspace().getRoot();
- IProject[] projects = root.getProjects();
- String lowerCaseName = projectName.toLowerCase();
- // iterate through all projects a compare lowercase names
- if (projectName == null || projectName.length() == 0) {
- if (projects.length == 1)
- return projects[0].getName();
- return null;
- }
- for (int i = 0; i < projects.length; i++) {
- if (projects[i].exists()) {
- if (CoreFileSystemLibrary.isCaseSensitive()) {
- if (projects[i].getName().equals(projectName))
- return projects[i].getName();
- } else {
- if (projects[i].getName().toLowerCase().equals(lowerCaseName))
- return projects[i].getName();
- }
- }
- }
- }
- return projectName;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactCreationWizard.java
deleted file mode 100644
index 2091f9bca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactCreationWizard.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.DelegateConfigurationElement;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IPluginContribution;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
-import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-/**
- * <p>
- * Serves as a base class for the Wizards which create J2EE artifact structures. An Artifact can be
- * a J2EE application, module, or utility component.
- * </p>
- * <p>
- * Creation wizards must define the abstract methods from
- * {@link org.eclipse.wst.common.frameworks.ui.ExtendableWizard}which include the following:
- * <ul>
- * <li> {@link org.eclipse.wst.common.frameworks.ui.ExtendableWizard#doAddPages()}
- * <li> {@link org.eclipse.wst.common.frameworks.ui.ExtendableWizard#canFinish()}
- * <li> {@link org.eclipse.wst.common.frameworks.ui.ExtendableWizard#createBaseOperation()}
- * <li>{@link org.eclipse.wst.common.frameworks.internal.ui.WTPWizard#createDefaultModel()}
- * </ul>
- * </p>
- * <p>
- * And optionally, they can override the following methods:
- * <ul>
- * <li>{@link #getFinalPerspectiveID()}
- * <li>{@link #doInit()}
- * <li>{@link #doDispose()}
- * <li>{@link #doSetInitializeData(IConfigurationElement, String, Object)}
- * </ul>
- *
- * @see org.eclipse.wst.common.frameworks.ui.ExtendableWizard
- */
-public abstract class J2EEArtifactCreationWizard extends DataModelWizard implements INewWizard, IExecutableExtension, IPluginContribution {
-
- /**
- * <p>
- * Constant used to identify the key of the main page of the Wizard.
- * </p>
- */
- protected static final String MAIN_PG = "main"; //$NON-NLS-1$
-
- private IStructuredSelection selection;
- private IConfigurationElement configurationElement;
-
- /**
- * <p>
- * Creates a default instance of the wizard with no configuration data, no selection, and no
- * operation data model.
- * </p>
- */
- public J2EEArtifactCreationWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate wizard controls and to collect data from the user. The model
- * will eventually be used to run the operation, if the user does not cancel the Wizard.
- * </p>
- *
- * @param model
- * used to collect information and interface with the WTP Operation
- */
- public J2EEArtifactCreationWizard(IDataModel model) {
- super(model);
- }
-
-
- /**
- * <p>
- * The selection is used to pre-populate values in the Wizard dialog controls.
- * </p>
- *
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
- * org.eclipse.jface.viewers.IStructuredSelection)
- *
- * @param workbench
- * the current workbench parent of the wizard
- * @param aSelection
- * the selection from the view used to start the wizard (if any)
- */
- public final void init(IWorkbench workbench, IStructuredSelection aSelection) {
- setNeedsProgressMonitor(true);
- this.selection = aSelection;
- doInit();
- }
-
- /**
- * <p>
- * Calls {@link #doDispose()}and then nulls out fields that are no longer needed once the
- * wizard completes.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.WTPWizard#dispose()
- */
- public final void dispose() {
- super.dispose();
- doDispose();
- this.selection = null;
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * The configuration element is saved to use when the wizard completes in order to change the
- * current perspective using either (1) the value specified by {@link #getFinalPerspectiveID()}
- * or (2) the value specified by the finalPerspective attribute in the Wizard's configuration
- * element.
- * </p>
- *
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
- * java.lang.String, java.lang.Object)
- */
- public final void setInitializationData(IConfigurationElement aConfigurationElement, String aPropertyName, Object theData) throws CoreException {
- configurationElement = aConfigurationElement;
- doSetInitializeData(aConfigurationElement, aPropertyName, theData);
-
- }
-
- /**
- * <p>
- * Override method for clients that wish to take advantage of the information provided by
- * {@see #setInitializationData(IConfigurationElement, String, Object)}.
- * </p>
- *
- * @param aConfigurationElement
- * The configuration element provided from the templated method.
- * @param aPropertyName
- * The property name provided from the templated method.
- * @param theData
- * The data provided from the templated method.
- */
- protected void doSetInitializeData(IConfigurationElement aConfigurationElement, String aPropertyName, Object theData) {
- // Default do nothing
- }
-
- /**
- * <p>
- * Invoked from init(IWorkbench, IStructuredSelection) once the workbench and selection have
- * been safely stored away.
- * </p>
- * <p>
- * No-op by default.
- * </p>
- */
- protected void doInit() {
- // init
- }
-
- /**
- * <p>
- * Invoked from {@link #dispose()}. Should be used to handle any specific Wizard disposal.
- * </p>
- */
- protected void doDispose() {
- // dispose
- }
-
- /**
- * <p>
- * Override to return the final perspective ID (if any). The final perspective ID can be
- * hardcoded by the subclass or determined programmatically (possibly using the value of a field
- * on the Wizard's WTP Operation Data Model).
- * </p>
- * <p>
- * Default return value is <b>null </b>.
- * </p>
- *
- * @return Returns the ID of the Perspective which is preferred by this wizard upon completion.
- */
- protected String getFinalPerspectiveID() {
- return null;
- }
-
- /**
- *
- * <p>
- * Invoked after the user has clicked the "Finish" button of the wizard. The default
- * implementation will attempt to update the final perspective to the value specified by
- * {@link #getFinalPerspectiveID() }
- * </p>
- *
- * @throws InvocationTargetException
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#postPerformFinish()
- */
- protected final void postPerformFinish() throws InvocationTargetException {
- super.postPerformFinish();
- if (getFinalPerspectiveID() != null && getFinalPerspectiveID().length() > 0) {
-
- IConfigurationElement element = new DelegateConfigurationElement(configurationElement) {
- public String getAttribute(String aName) {
- if (aName.equals("finalPerspective")) { //$NON-NLS-1$
- return getFinalPerspectiveID();
- }
- return super.getAttribute(aName);
- }
- };
- BasicNewProjectResourceWizard.updatePerspective(element);
- } else
- BasicNewProjectResourceWizard.updatePerspective(configurationElement);
- String projName = getDataModel().getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME);
- BasicNewResourceWizard.selectAndReveal(ProjectUtilities.getProject(projName), J2EEUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow());
- }
-
-
- /**
- * {@inheritDoc}
- *
- * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
- * @return Returns the saved settings from the previous use of the Wizard
- */
- public final IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- /**
- * @return Returns the selection from the current view used to spawn the wizard
- */
- protected final IStructuredSelection getSelection() {
- return selection;
- }
-
-
- /**
- * <p>
- * Returns the value specified by {@link #getWizardId()}
- * </p>
- *
- * @return Returns the an id component used for Activity filtering.
- */
- public final String getLocalId() {
- return getWizardID();
- }
-
- /**
- * <p>
- * Returns the an id component used for Activity filtering.
- * </p>
- *
- * <p>
- * The Plugin ID is determined from the configuration element specified in
- * {@see #setInitializationData(IConfigurationElement, String, Object)}.
- * </p>
- *
- * @return Returns the plugin id associated with this wizard
- */
- public final String getPluginId() {
- return (configurationElement != null) ? configurationElement.getDeclaringExtension().getDeclaringPluginDescriptor().getUniqueIdentifier() : ""; //$NON-NLS-1$
- }
-
- /**
- * @return Returns the EAR module selected in the view used to launch the wizard.
- */
- protected final WorkbenchComponent getSelectedEARModule() {
- //TODO return the selected ear module if applicable
- return null;
- }
-
- protected final IConfigurationElement getConfigurationElement() {
- return configurationElement;
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java
deleted file mode 100644
index e658ef501..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactExportDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizard;
-
-/**
- * <p>
- * Serves as a base class for Wizards which export J2EE artifact structures from Eclipse projects
- * into a deployable form.
- * </p>
- * <p>
- * Subclasses must provide the methods that are required by
- * {@link org.eclipse.wst.common.frameworks.internal.ui.WTPWizard}.
- * </p>
- * <p>
- * Optionally, subclasses may also override the following methods:
- * <ul>
- * <li>{@link #doInit()()}
- * <li>{@link #doDispose()()}
- * </ul>
- * </p>
- * <p>
- * The base class will ensure that the Wizard is not spawned unless all open editors are in a
- * non-dirty state. Additionally, the selection from the active view which spanwed the wizard will
- * be made available to subclasses via {@link #getSelection()}.
- * </p>
- */
-public abstract class J2EEArtifactExportWizard extends WTPWizard {
-
- /**
- * <p>
- * Constant used to identify the key of the main page of the Wizard.
- * </p>
- */
- protected static final String MAIN_PG = "main"; //$NON-NLS-1$
-
- private IStructuredSelection currentSelection;
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public J2EEArtifactExportWizard() {
- super();
- setWindowTitle(J2EEUIMessages.getResourceString("67"));//$NON-NLS-1$
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEArtifactExportWizard(WTPOperationDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("67"));//$NON-NLS-1$
- }
-
- /**
- * <p>
- * Invoked from init(IWorkbench, IStructuredSelection) once the workbench and selection have
- * been safely stored away.
- * </p>
- * <p>
- * No-op by default.
- * </p>
- */
- protected void doInit() {
- //init
- }
-
- /**
- * <p>
- * Invoked from {@link #dispose()}. Should be used to handle any specific Wizard disposal.
- * </p>
- */
- private void doDispose() {
- //dispose
- }
-
- /**
- * <p>
- * The selection is used to pre-populate values in the Wizard dialog controls.
- * </p>
- *
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
- * org.eclipse.jface.viewers.IStructuredSelection)
- *
- * @param workbench
- * the current workbench parent of the wizard
- * @param aSelection
- * the selection from the view used to start the wizard (if any)
- */
- public final void init(IWorkbench workbench, IStructuredSelection selection) {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EXPORT_WIZ_TITLE));
- this.currentSelection = selection;
-
- if (this.currentSelection.size() > 0) {
- Object element = this.currentSelection.getFirstElement();
- IProject project = ProjectUtilities.getProject(element);
- if (project != null) {
- J2EEArtifactExportDataModel m = getJ2EEExportDataModel();
- Object originalProjectName = m.getProperty(J2EEArtifactExportDataModel.PROJECT_NAME);
- m.setProperty(J2EEArtifactExportDataModel.PROJECT_NAME, project.getName());
- if (!m.validateProperty(J2EEArtifactExportDataModel.PROJECT_NAME).isOK()) {
- m.setProperty(J2EEArtifactExportDataModel.PROJECT_NAME, originalProjectName);
- }
- }
- }
- doInit();
- }
-
- /**
- * <p>
- * Calls {@link #doDispose()}and then nulls out fields that are no longer needed once the
- * wizard completes.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.WTPWizard#dispose()
- */
- public final void dispose() {
- super.dispose();
- doDispose();
- this.currentSelection = null;
- }
-
- protected final boolean prePerformFinish() {
- if (!CommonEditorUtility.promptToSaveAllDirtyEditors()) {
- return false;
- }
- if (CommonEditorUtility.getDirtyEditors().length != 0) { // all checkboxes were not selected
- return false;
- }
- return super.prePerformFinish();
- }
-
- /**
- * @return Returns the currentSelection.
- */
- protected final IStructuredSelection getSelection() {
- return currentSelection;
- }
-
- /**
- * @return
- */
- private J2EEArtifactExportDataModel getJ2EEExportDataModel() {
- return (J2EEArtifactExportDataModel) getModel();
- }
-
- /**
- * @return
- */
- protected final J2EEExportPage getMainPage() {
- return (J2EEExportPage) getPage(MAIN_PG);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java
deleted file mode 100644
index 2e8423db1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.internal.DelegateConfigurationElement;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizard;
-
-/**
- * <p>
- * Serves as a base class for Wizards which import J2EE artifact structures into Eclipse projects.
- * </p>
- * <p>
- * Subclasses must provide the methods that are required by
- * {@see org.eclipse.wst.common.frameworks.internal.ui.WTPWizard}.
- * </p>
- * <p>
- * Optionally, subclasses may also override the following methods:
- * <ul>
- * <li>{@link #getFinalPerspectiveID()}
- * <li>{@link #doInit()()}
- * <li>{@link #doDispose()()}
- * </ul>
- * </p>
- * <p>
- * The base class will ensure that the Wizard is not spawned unless all open editors are in a
- * non-dirty state. Additionally, the selection from the active view which spanwed the wizard will
- * be made available to subclasses via {@link #getCurrentSelection()}.
- * </p>
- */
-public abstract class J2EEArtifactImportWizard extends WTPWizard implements IImportWizard, IExecutableExtension {
-
- /**
- * <p>
- * Constant used to identify the key of the main page of the Wizard.
- * </p>
- */
- protected static final String MAIN_PG = "main"; //$NON-NLS-1$
-
- private static final String FINAL_PERSPECTIVE_ID = "org.eclipse.jst.j2ee.J2EEPerspective"; //$NON-NLS-1$
-
- private IConfigurationElement configurationElement;
- private IStructuredSelection selection;
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public J2EEArtifactImportWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEArtifactImportWizard(J2EEArtifactImportDataModel model) {
- super(model);
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEArtifactImportWizard(WTPOperationDataModel model) {
- super(model);
- }
-
- /**
- * <p>
- * The selection is used to pre-populate values in the Wizard dialog controls.
- * </p>
- *
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
- * org.eclipse.jface.viewers.IStructuredSelection)
- *
- * @param workbench
- * the current workbench parent of the wizard
- * @param aSelection
- * the selection from the view used to start the wizard (if any)
- */
- public final void init(IWorkbench workbench, IStructuredSelection aSelection) {
- this.selection = aSelection;
- doInit();
- }
-
- /**
- * <p>
- * Calls {@link #doDispose()}and then nulls out fields that are no longer needed once the
- * wizard completes.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.WTPWizard#dispose()
- */
- public final void dispose() {
- super.dispose();
- doDispose();
- this.selection = null;
- this.configurationElement = null;
- }
-
-
- /**
- * <p>
- * Invoked after the selection has been saved off in
- * {@link #init(IWorkbench, IStructuredSelection)}. Should be used to handle any specific
- * Wizard initialization.
- * </p>
- */
- protected void doInit() {
- //init
- }
-
- /**
- * <p>
- * Invoked from {@link #dispose()}. Should be used to handle any specific Wizard disposal.
- * </p>
- */
- protected void doDispose() {
- //dispose
- }
-
- /**
- * <p>
- * The return value of this method will be used to suggest a final perspective to the user once
- * the wizard completes.
- * </p>
- *
- * @return Returns the J2EE Perpsective ID by default
- */
- protected String getFinalPerspectiveID() {
- return FINAL_PERSPECTIVE_ID;
- }
-
- /**
- * <p>
- * Prompts the user to save open, dirty editors.
- * </p>
- *
- * @return true only if all editors are saved
- */
- protected final boolean prePerformFinish() {
- if (!CommonEditorUtility.promptToSaveAllDirtyEditors()) {
- return false;
- }
- if (CommonEditorUtility.getDirtyEditors().length != 0) { // all checkboxes were not selected
- return false;
- }
- return super.prePerformFinish();
- }
-
- /**
- * <p>
- * Invoked after the user has clicked the "Finish" button of the wizard. The default
- * implementation will attempt to update the final perspective to the value specified by
- * {@link #getFinalPerspectiveID() }
- * </p>
- *
- * @throws InvocationTargetException
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#postPerformFinish()
- */
- protected final void postPerformFinish() throws InvocationTargetException {
- super.postPerformFinish();
- if (getFinalPerspectiveID() != null && getFinalPerspectiveID().length() > 0) {
-
- IConfigurationElement element = new DelegateConfigurationElement(configurationElement) {
- public String getAttribute(String aName) {
- if (aName.equals("finalPerspective")) { //$NON-NLS-1$
- return getFinalPerspectiveID();
- }
- return super.getAttribute(aName);
- }
-
- };
- BasicNewProjectResourceWizard.updatePerspective(element);
- } else
- BasicNewProjectResourceWizard.updatePerspective(configurationElement);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * The configuration element is saved to use when the wizard completes in order to change the
- * current perspective using either (1) the value specified by {@see #getFinalPerspectiveID()}
- * or (2) the value specified by the finalPerspective attribute in the Wizard's configuration
- * element.
- * </p>
- *
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
- * java.lang.String, java.lang.Object)
- */
- public final void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- this.configurationElement = config;
- }
-
-
- /**
- * @return Returns the selection.
- */
- protected final IStructuredSelection getSelection() {
- return selection;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizard.java
deleted file mode 100644
index c4c671648..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizard.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.servertarget.ServerTargetDataModel;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.resources.ComponentHandle;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * <p>
- * Serves as a base class for Wizards which create J2EE module structures in Eclipse projects.
- * </p>
- * <p>
- * The EAR will be pre-populated in the Wizard controls if any selection was provided to the Wizard.
- * </p>
- * <p>
- * Refer to {@link org.eclipse.jst.j2ee.internal.wizard.J2EEArtifactCreationWizard}for information
- * on how to extend this class.
- * </p>
- *
- * @see org.eclipse.jst.j2ee.internal.wizard.J2EEArtifactCreationWizard
- */
-public abstract class J2EEComponentCreationWizard extends J2EEArtifactCreationWizard implements IJ2EEComponentCreationDataModelProperties{
-
- /**
- * <p>
- * Constant used to identify the key of the main page of the Wizard.
- * </p>
- */
- protected static final String MODULE_PG = "module"; //$NON-NLS-1$
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public J2EEComponentCreationWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEComponentCreationWizard(IDataModel model) {
- super(model);
- }
-
- /**
- * <p>
- * The selection stored in
- * {@link J2EEArtifactCreationWizard#init(IWorkbench, IStructuredSelection)}is used to
- * pre-populate the EAR project in the Wizard dialog controls.
- * </p>
- *
- * @see J2EEArtifactCreationWizard#init(IWorkbench, IStructuredSelection)
- * @see J2EEArtifactCreationWizard#doInit()
- */
- protected void doInit() {
- preFillSelectedEARProject();
- }
-
- /**
- * <p>
- * Subclasses which override this method should always call super.addModulesPageIfNecessary()
- * ahead of before their own pages.
- * </p>
- *
- */
- protected void addModulesPageIfNecessary() {
- if (getDataModel().getBooleanProperty(UI_SHOW_EAR_SECTION)) {
- addPage(new J2EEModulesDependencyPage(getDataModel(), MODULE_PG));
- }
- }
-
- /**
- * @inheritDoc
- *
- * @see org.eclipse.jface.wizard.IWizard#addPages()
- */
- protected void doAddPages() {
- addModulesPageIfNecessary();
- }
-
- /**
- * <p>
- * Skips the page identified by the MODULE_PG name if
- * {@link J2EEComponentCreationWizard#shouldShowModulesPage()}is false.
- * </p>
- *
- * @see org.eclipse.jface.wizard.IWizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getPreviousPage(IWizardPage page) {
- IWizardPage previous = super.getPreviousPage(page);
- if (previous != null && previous.getName().equals(MODULE_PG)) {
- if (!shouldShowModulesPage()) {
- previous = super.getPreviousPage(previous);
- }
- }
- return previous;
- }
-
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Skips the page identified by the MODULE_PG name if
- * {@link J2EEModuleProjectCreationWizard#shouldShowModulesPage()}is false.
- * </p>
- *
- * @see org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- public IWizardPage getNextPage(IWizardPage page) {
- IWizardPage next = super.getNextPage(page);
- if (next != null && next.getName().equals(MODULE_PG)) {
- if (!shouldShowModulesPage()) {
- next = super.getNextPage(next);
- }
- }
- return next;
- }
-
- /**
- * <p>
- * Uses the model to determine if the module page should be shown. The default is to AND the
- * values of model.getBooleanProperty(J2EEModuleCreationDataModel.ADD_TO_EAR) and
- * shouldShowModulesPageForEAR().
- * </p>
- *
- * @return Returns a boolean true if the module page should be shown.
- */
- protected final boolean shouldShowModulesPage() {
- return getDataModel().getBooleanProperty(ADD_TO_EAR) && shouldShowModulesPageForEAR();
- }
-
- /**
- * <p>
- * Uses the model to determine if the module page should be shown for the EAR. If no modules are
- * present in the classpath selection of the model, the method will return false.
- * </p>
- *
- * @return true only if the
- * @see J2EEModuleCreationDataModelOld#getClassPathSelection() is non-empty.
- */
- protected final boolean shouldShowModulesPageForEAR() {
- //TODO is this what we want here?
- return true;
- }
-
- private void preFillSelectedEARProject() {
- WorkbenchComponent earModule = getSelectedEARModule();
- EARArtifactEdit earEdit = null;
- int j2eeVersion = 0;
- if (earModule != null && getDataModel() != null) {
- try {
- ComponentHandle handle = ComponentHandle.create(StructureEdit.getContainingProject(earModule),earModule.getName());
- earEdit = EARArtifactEdit.getEARArtifactEditForRead(handle);
- j2eeVersion = earEdit.getJ2EEVersion();
- } finally {
- if (earEdit != null)
- earEdit.dispose();
- }
- getDataModel().setIntProperty(ServerTargetDataModel.J2EE_VERSION_ID, j2eeVersion);
- getDataModel().setIntProperty(COMPONENT_VERSION, j2eeVersion);
- getDataModel().setProperty(EAR_COMPONENT_NAME, earModule.getName());
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizardPage.java
deleted file mode 100644
index 31f23eba8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentCreationWizardPage.java
+++ /dev/null
@@ -1,413 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 10, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.servertarget.ServerTargetDataModel;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IJ2EEProjectServerTargetDataModelProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-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.events.SelectionListener;
-import org.eclipse.swt.graphics.Cursor;
-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.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.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPPropertyDescriptor;
-import org.eclipse.wst.server.ui.ServerUIUtil;
-
-
-public abstract class J2EEComponentCreationWizardPage extends DataModelWizardPage implements IJ2EEComponentCreationDataModelProperties, IJ2EEProjectServerTargetDataModelProperties{
-
- private static final boolean isWindows = SWT.getPlatform().toLowerCase().startsWith("win"); //$NON-NLS-1$
- protected static final String MODULE_VERSION = "Module Version:";
- protected NewModuleGroup projectNameGroup;
- protected Composite advancedComposite;
- protected Button advancedButton;
- protected boolean showAdvanced = false;
- protected AdvancedSizeController advancedController;
- protected boolean advancedControlsBuilt = false;
- private ServerEarAndStandaloneGroup earGroup;
- protected Combo serverTargetCombo;
- protected Text moduleNameText = null;
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- private static final String NEW_LABEL_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E); //$NON-NLS-1$
- private static final String MODULE_NAME_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.NAME_LABEL); //$NON-NLS-1$
-
- /**
- * This type is responsible for setting the Shell size based on the showAdvanced flag. It will
- * track the original size of the Shell even if the user resizes it. One problem that we may
- * face is that the Shell size could change by the framework prior to the Shell being made
- * visible but the page will already get an enter call. This means that we will need to set the
- * Shell size based on the showAdvanced flag when the Shell resize event is called and the Shell
- * is visible.
- */
- private class AdvancedSizeController implements ControlListener {
- private int advancedHeight = -1;
- private Point originalSize;
- private boolean ignoreShellResize = false;
-
- private AdvancedSizeController(Shell aShell) {
- originalSize = aShell.getSize();
- aShell.addControlListener(this);
- }
-
- public void controlMoved(ControlEvent e) {
- //do nothing
- }
-
- public void controlResized(ControlEvent e) {
- if (!ignoreShellResize) {
- Control control = (Control) e.getSource();
- if (control.isVisible()) {
- originalSize = control.getSize();
- if (advancedHeight == -1)
- setShellSizeForAdvanced();
- }
- }
- }
-
- protected void resetOriginalShellSize() {
- setShellSize(originalSize.x, originalSize.y);
- }
-
- private void setShellSize(int x, int y) {
- ignoreShellResize = true;
- try {
- getShell().setSize(x, y);
- } finally {
- ignoreShellResize = false;
- }
- }
-
- protected void setShellSizeForAdvanced() {
- int height = calculateAdvancedShellHeight();
- if (height != -1)
- setShellSize(getShell().getSize().x, height);
- }
-
- private int calculateAdvancedShellHeight() {
- Point advancedCompSize = advancedComposite.getSize();
- if (advancedCompSize.x == 0)
- return -1;
- int height = computeAdvancedHeight();
- if (!showAdvanced && height != -1)
- height = height - advancedComposite.getSize().y;
- return height;
- }
-
- /*
- * Compute the height with the advanced section showing. @return
- */
- private int computeAdvancedHeight() {
- if (advancedHeight == -1) {
- Point controlSize = getControl().getSize();
- if (controlSize.x != 0) {
- int minHeight = originalSize.y - controlSize.y;
- Point pageSize = getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- advancedHeight = pageSize.y + minHeight;
- }
- }
- return advancedHeight;
- }
- }
-
- public J2EEComponentCreationWizardPage(IDataModel dataModel, String pageName) {
- super(dataModel, pageName);
- }
-
- private void createModuleGroup(Composite parent) {
- GridData data = new GridData();
- // Add the module name label
- Label moduleNameLabel = new Label(parent, SWT.NONE);
- moduleNameLabel.setText(MODULE_NAME_UI + " ");
- // Add the module name entry field
- moduleNameText = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- moduleNameText.setLayoutData(data);
- synchHelper.synchText(moduleNameText,COMPONENT_NAME,new Control[] {});
- new Label(parent,SWT.NONE);
- }
-
- protected void addToAdvancedComposite(Composite advanced) {
- createServerTargetComposite(advanced);
- createVersionComposite(advanced);
- createServerEarAndStandaloneGroup(advanced);
- }
-
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- Button newServerTargetButton = new Button(parent, SWT.NONE);
- newServerTargetButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E));
- newServerTargetButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- J2EEComponentCreationWizardPage.launchNewRuntimeWizard(getShell(), (IDataModel)model.getNestedModel(NESTED_PROJECT_CREATION_DM));
- }
- });
- Control[] deps = new Control[]{label, newServerTargetButton};
- synchHelper.synchCombo(serverTargetCombo, RUNTIME_TARGET_ID, deps);
- if(serverTargetCombo.getVisibleItemCount() != 0)
- serverTargetCombo.select(0);
- }
-
- protected void createServerEarAndStandaloneGroup(Composite parent) {
- earGroup = new ServerEarAndStandaloneGroup(parent, getDataModel(), synchHelper);
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentCreationDataModelProperties.PROJECT_NAME, COMPONENT_VERSION, COMPONENT_NAME, EAR_COMPONENT_NAME, ADD_TO_EAR};
- }
-
- protected void createVersionComposite(Composite parent) {
- createVersionComposite(parent, getVersionLabel(), COMPONENT_VERSION);
- }
-
- protected String getVersionLabel() {
- return MODULE_VERSION;
- }
-
- public void dispose() {
- super.dispose();
- if (earGroup != null)
- earGroup.dispose();
- if (projectNameGroup != null)
- projectNameGroup.dispose();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- protected void enter() {
-// if (advancedControlsBuilt) {
-// if (isFirstTimeToPage)
-// initializeAdvancedController();
-// if (isWindows) {
-// advancedController.setShellSizeForAdvanced();
-// }
-// }
- super.enter();
- }
-
- private void initializeAdvancedController() {
- advancedController = new AdvancedSizeController(getShell());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#exit()
- */
- protected void exit() {
- if (advancedControlsBuilt && isWindows && advancedController!=null) {
- advancedController.resetOriginalShellSize();
- }
- super.exit();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#storeDefaultSettings()
- */
- public void storeDefaultSettings() {
- super.storeDefaultSettings();
- if (advancedControlsBuilt) {
- IDialogSettings settings = getDialogSettings();
- if (settings != null)
- settings.put(getShowAdvancedKey(), showAdvanced);
- }
- }
-
- protected String getShowAdvancedKey() {
- return getClass().getName() + "_SHOW_ADVANCED"; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#restoreDefaultSettings()
- */
- protected void restoreDefaultSettings() {
- super.restoreDefaultSettings();
- if (advancedControlsBuilt) {
- IDialogSettings settings = getDialogSettings();
- if (settings != null)
- showAdvanced = !settings.getBoolean(getShowAdvancedKey());
- advancedButton.setSelection(!showAdvanced); //set opposite b/c toggleAdvanced(boolean)
- // will flip it
- toggleAdvanced(false);
- }
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(top, getInfopopID());
- top.setLayout(new GridLayout());
- top.setData(new GridData(GridData.FILL_BOTH));
- Composite composite = new Composite(top, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createModuleGroup(composite);
- Composite detail = new Composite(top, SWT.NONE);
- detail.setLayout(new GridLayout());
- detail.setData(new GridData(GridData.FILL_BOTH));
- createAdvancedComposite(detail);
- return top;
- }
-
- /**
- * @param parent
- */
- protected Composite createAdvancedComposite(Composite parent) {
- advancedControlsBuilt = true;
- advancedButton = new Button(parent, SWT.TOGGLE);
- setAdvancedLabelText();
- final Cursor hand = new Cursor(advancedButton.getDisplay(), SWT.CURSOR_HAND);
- advancedButton.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- hand.dispose();
- }
- });
- advancedComposite = new Composite(parent, SWT.NONE);
- //toggleAdvanced(false);
- GridLayout layout = new GridLayout(3, false);
- GridData data = new GridData();
- advancedComposite.setData(data);
- advancedComposite.setLayout(layout);
- advancedButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- toggleAdvanced(true);
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- });
- advancedButton.addListener(SWT.MouseHover, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.MouseHover)
- advancedButton.setCursor(hand);
- }
- });
- addToAdvancedComposite(advancedComposite);
- return advancedComposite;
- }
-
- /**
- * @param advancedLabel
- */
- private void setAdvancedLabelText() {
- if (advancedControlsBuilt) {
- if (showAdvanced)
- advancedButton.setText(J2EEUIMessages.getResourceString("J2EEProjectCreationPage_UI_0")); //$NON-NLS-1$
- else
- advancedButton.setText(J2EEUIMessages.getResourceString("J2EEProjectCreationPage_UI_1")); //$NON-NLS-1$
- }
- }
-
- /**
- * @param advancedLabel
- */
- protected void toggleAdvanced(boolean setSize) {
- if (advancedControlsBuilt) {
- showAdvanced = !showAdvanced;
- advancedComposite.setVisible(showAdvanced);
- setAdvancedLabelText();
- if (setSize && isWindows) {
- if (advancedControlsBuilt) {
- if (advancedController == null)
- initializeAdvancedController();
- if (isWindows) {
- advancedController.setShellSizeForAdvanced();
- }
- }
- advancedController.setShellSizeForAdvanced();
- }
- }
- }
-
- protected void createVersionComposite(Composite parent, String labelText, String versionProp) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(labelText);
- Combo versionCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.widthHint = 305;
- versionCombo.setLayoutData(gridData);
- Control[] deps = new Control[]{label};
- synchHelper.synchCombo(versionCombo, versionProp, deps);
- String[] items = versionCombo.getItems();
- if (items != null && items.length > 0)
- versionCombo.select(items.length - 1);
- new Label(parent, SWT.NONE); //pad
- }
-
-
- public static boolean launchNewRuntimeWizard(Shell shell, IDataModel model) {
- DataModelPropertyDescriptor[] preAdditionDescriptors = model.getValidPropertyDescriptors(RUNTIME_TARGET_ID);
- boolean isOK = ServerUIUtil.showNewRuntimeWizard(shell, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if (isOK && model != null) {
- //model.notifyPropertyChange(SERVER_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- model.notifyPropertyChange(RUNTIME_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- DataModelPropertyDescriptor[] postAdditionDescriptors = model.getValidPropertyDescriptors(RUNTIME_TARGET_ID);
- Object[] preAddition = new Object[preAdditionDescriptors.length];
- for (int i = 0; i < preAddition.length; i++) {
- preAddition[i] = preAdditionDescriptors[i].getPropertyValue();
- }
- Object[] postAddition = new Object[postAdditionDescriptors.length];
- for (int i = 0; i < postAddition.length; i++) {
- postAddition[i] = postAdditionDescriptors[i].getPropertyValue();
- }
- Object newAddition = ProjectUtilities.getNewObject(preAddition, postAddition);
-
- //model.notifyPropertyChange(SERVER_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- model.notifyPropertyChange(RUNTIME_TARGET_ID, IDataModel.VALID_VALUES_CHG);
- if (newAddition != null)
- model.setProperty(RUNTIME_TARGET_ID, newAddition);
- }
- return isOK;
- }
-
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java
deleted file mode 100644
index ec9a6cc11..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Created on Mar 21, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class J2EEComponentLabelProvider implements ILabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (element instanceof WorkbenchComponent) {
- return ((WorkbenchComponent)element).getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java
deleted file mode 100644
index 3b9fd3ba2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.emf.workbench.nature.EMFNature;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.EnterpriseApplicationExportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactExportDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.IWebNatureConstants;
-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.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.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.help.WorkbenchHelp;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public abstract class J2EEExportPage extends WTPWizardPage {
-
- public static boolean isWindows = SWT.getPlatform().toLowerCase().startsWith("win"); //$NON-NLS-1$
-
- protected IStructuredSelection currentResourceSelection;
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- private static final String STORE_LABEL = "J2EE_EXPORT_"; //$NON-NLS-1$
- private static final String OVERWRITE_LABEL = "OVERWRITE"; //$NON-NLS-1$
- private static final String SOURCE_LABEL = "SOURCE"; //$NON-NLS-1$
- private static final String META_LABEL = "META"; //$NON-NLS-1$
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL);
- protected String LABEL_DESTINATION = J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_DESTINATION);
- private Combo resourceNameCombo;
- private Combo destinationNameCombo;
- private Button destinationBrowseButton;
- protected Button overwriteExistingFilesCheckbox;
- private Button sourceFilesCheckbox;
-
- /**
- * @param model
- * @param pageName
- */
- public J2EEExportPage(J2EEArtifactExportDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName);
- currentResourceSelection = selection;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NULL);
- WorkbenchHelp.setHelp(composite, getInfopopID());
- GridLayout layout = new GridLayout(1, false);
- composite.setLayout(layout);
-
- createSourceAndDestinationGroup(composite);
- createOptionsGroup(composite);
-
- //setupBasedOnInitialSelections();
- setupInfopop(composite);
- return composite;
- }
-
- /**
- * @param composite
- */
- private void createSourceAndDestinationGroup(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createExportProjectGroup(composite);
- createDestinationGroup(composite);
-
- }
-
- protected void createOverwriteExistingFilesCheckbox(Composite optionsGroup) {
- //Overwrite checkbox
- overwriteExistingFilesCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
- overwriteExistingFilesCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_OVERWRITE_CHECKBOX)); //$NON-NLS-1$ = "Overwrite existing files without warning"
- overwriteExistingFilesCheckbox.setEnabled(true);
- synchHelper.synchCheckbox(overwriteExistingFilesCheckbox, J2EEArtifactExportDataModel.OVERWRITE_EXISTING, null);
- }
-
- protected void createSourceFilesCheckbox(Composite optionsGroup) {
- sourceFilesCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
- sourceFilesCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_SOURCE_CHECKBOX)); //$NON-NLS-1$
- synchHelper.synchCheckbox(sourceFilesCheckbox, J2EEArtifactExportDataModel.EXPORT_SOURCE_FILES, null);
- }
-
- /**
- * Create the export options specification widgets.
- *
- * @param parent
- * org.eclipse.swt.widgets.Composite
- */
- protected void createOptionsGroup(Composite parent) {
-
- // options group
- Composite optionsGroup = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- optionsGroup.setLayout(layout);
-
-
- // source files... checkbox
- createSourceFilesCheckbox(optionsGroup);
-
- // overwrite... checkbox
- createOverwriteExistingFilesCheckbox(optionsGroup);
-
- // advanced button
- if (shouldShowProjectFilesCheckbox()) {
- createProjectFilesCheckbox(optionsGroup);
- }
- }
-
- /**
- * @return
- */
- protected boolean shouldShowProjectFilesCheckbox() {
- return false;
- }
-
- protected void createProjectFilesCheckbox(Composite composite) {
- //do nothing
- }
-
- /**
- * Populates the resource name field based upon the currently-selected resources.
- */
- protected void setupBasedOnInitialSelections() {
-
- if (currentResourceSelection.isEmpty() || setupBasedOnRefObjectSelection())
- return; // no setup needed
-
- java.util.List selections = new ArrayList();
- Iterator aenum = currentResourceSelection.iterator();
- while (aenum.hasNext()) {
- IResource currentResource = (IResource) aenum.next();
- // do not add inaccessible elements
- if (currentResource.isAccessible())
- selections.add(currentResource);
- }
- if (selections.isEmpty())
- return; // setup not needed anymore
-
- int selectedResourceCount = selections.size();
- if (selectedResourceCount == 1) {
- IResource resource = (IResource) selections.get(0);
- if ((resource instanceof IProject) && checkForNature((IProject) resource)) {
- resourceNameCombo.setText(resource.getName().toString());
- }
- }
- }
-
- /**
- * @return
- */
- protected String getProjectImportLabel() {
- return null;
- }
-
- /**
- *
- */
- protected void handleDestinationBrowseButtonPressed() {
-
- FileDialog dialog = new FileDialog(destinationNameCombo.getShell(), SWT.SAVE);
- String fileName = getJ2EEExportDataModel().getStringProperty(J2EEArtifactExportDataModel.PROJECT_NAME);
- String[] filters = getFilterExpression();
- if (!isWindows) {
- if (filters.length != 0 && filters[0] != null && filters[0].indexOf('.') != -1) {
- fileName += filters[0].substring(filters[0].indexOf('.'));
- }
- }
- dialog.setFileName(fileName);
- if (isWindows) {
- dialog.setFilterExtensions(filters);
- }
- String filename = dialog.open();
- if (filename != null)
- destinationNameCombo.setText(filename);
- }
-
- protected void restoreWidgetValues() {
-
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null)
- return; // ie.- no settings stored
- for (int i = 0; i < sourceNames.length; i++) {
- if (sourceNames[i] == null)
- sourceNames[i] = ""; //$NON-NLS-1$
- }
- destinationNameCombo.setItems(sourceNames);
- boolean overwrite = settings.getBoolean(STORE_LABEL + OVERWRITE_LABEL);
- model.setBooleanProperty(J2EEArtifactExportDataModel.OVERWRITE_EXISTING, overwrite);
- boolean includeSource = settings.getBoolean(STORE_LABEL + SOURCE_LABEL);
- model.setBooleanProperty(J2EEArtifactExportDataModel.EXPORT_SOURCE_FILES, includeSource);
- if (model.isProperty(EnterpriseApplicationExportDataModel.INCLUDE_BUILD_PATH_AND_META_FILES)) {
- boolean includeMeta = settings.getBoolean(STORE_LABEL + META_LABEL);
- model.setBooleanProperty(EnterpriseApplicationExportDataModel.INCLUDE_BUILD_PATH_AND_META_FILES, includeMeta);
- }
- }
- }
-
- public void storeDefaultSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null) {
- sourceNames = new String[0];
- }
-
- String newName = destinationNameCombo.getText();
-
- //rip out any empty filenames and trim length to 5
- ArrayList newNames = new ArrayList();
- for (int i = 0; i < sourceNames.length && i < 5; i++) {
- if (sourceNames[i].trim().length() > 0 && !newName.equals(sourceNames[i])) {
- newNames.add(sourceNames[i]);
- }
- }
- newNames.add(0, destinationNameCombo.getText());
- sourceNames = new String[newNames.size()];
- newNames.toArray(sourceNames);
-
- settings.put(STORE_LABEL + getFileNamesStoreID(), sourceNames);
- settings.put(STORE_LABEL + OVERWRITE_LABEL, model.getBooleanProperty(J2EEArtifactExportDataModel.OVERWRITE_EXISTING));
- settings.put(STORE_LABEL + SOURCE_LABEL, model.getBooleanProperty(J2EEArtifactExportDataModel.EXPORT_SOURCE_FILES));
- if (model.isProperty(EnterpriseApplicationExportDataModel.INCLUDE_BUILD_PATH_AND_META_FILES)) {
- boolean includeMeta = model.getBooleanProperty(EnterpriseApplicationExportDataModel.INCLUDE_BUILD_PATH_AND_META_FILES);
- settings.put(STORE_LABEL + META_LABEL, includeMeta);
- }
- }
- }
-
- /**
- * Creates the export source resource specification widgets.
- *
- * @param parent
- * a <code>Composite</code> that is to be used as the parent of this group's
- * collection of visual components
- * @see org.eclipse.swt.widgets.Composite
- */
- protected void createExportProjectGroup(Composite parent) {
- //Project label
- Label projectLabel = new Label(parent, SWT.NONE);
- projectLabel.setText(getProjectLabel());
- //Project combo
- resourceNameCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- resourceNameCombo.setLayoutData(data);
- synchHelper.synchCombo(resourceNameCombo, J2EEArtifactExportDataModel.PROJECT_NAME, null);
- new Label(parent, SWT.NONE);//Pad label
- }
-
- /**
- * @return
- */
- protected abstract String getProjectLabel();
-
- protected void createDestinationGroup(org.eclipse.swt.widgets.Composite parent) {
-
- //Destination label
- Label destinationLabel = new Label(parent, SWT.NONE);
- destinationLabel.setText(LABEL_DESTINATION);
- // destination name combo field
- destinationNameCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER);
- destinationNameCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- synchHelper.synchCombo(destinationNameCombo, J2EEArtifactExportDataModel.ARCHIVE_DESTINATION, null);
-
- // destination browse button
- destinationBrowseButton = new Button(parent, SWT.PUSH);
- destinationBrowseButton.setText(defBrowseButtonLabel); //$NON-NLS-1$
- destinationBrowseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- destinationBrowseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleDestinationBrowseButtonPressed();
- }
- });
- destinationBrowseButton.setEnabled(true);
-
- }
-
- /**
- *
- */
- private J2EEArtifactExportDataModel getJ2EEExportDataModel() {
- return (J2EEArtifactExportDataModel) model;
- }
-
- /**
- * @return
- */
- protected String getFileNamesStoreID() {
- return getNatureID();
- }
-
- protected String getNatureID() {
- return IWebNatureConstants.J2EE_NATURE_ID;
- }
-
- /**
- * @return
- */
- protected String[] getFilterExpression() {
- return new String[0];
- }
-
- protected boolean checkForNature(IProject project) {
- return EMFNature.hasRuntime(project, getNatureID());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- protected void enter() {
- super.enter();
- restoreWidgetValues();
- }
-
- /**
- * @return
- */
- //protected abstract String getNatureID();
-
- protected abstract boolean isMetaTypeSupported(Object o);
-
- /**
- * Populates the resource name field based upon the currently-selected resources.
- */
- protected boolean setupBasedOnRefObjectSelection() {
-
- if (currentResourceSelection.size() != 1)
- return false;
-
- Object o = currentResourceSelection.getFirstElement();
- if (!isMetaTypeSupported(o))
- return false;
-
- EObject ref = (EObject) o;
- IResource resource = ProjectUtilities.getProject(ref);
- if (resource != null) {
- resourceNameCombo.setText(resource.getName().toString());
- }
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
- */
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java
deleted file mode 100644
index ba387cfed..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 3, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-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.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.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelListener;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPDataModelSynchHelper;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizard;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-import org.eclipse.wst.common.internal.emfworkbench.operation.EditModelOperationDataModel;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public abstract class J2EEImportPage extends WTPWizardPage {
-
- private Combo projectCombo;
- private Combo fileNameCombo;
- private static final String STORE_LABEL = "J2EE_IMPORT_"; //$NON-NLS-1$
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL); //$NON-NLS-1$
- private static final String defNewButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E); //$NON-NLS-1$
-
- /**
- * @param model
- * @param pageName
- */
- public J2EEImportPage(WTPOperationDataModel model, String pageName) {
- super(model, pageName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createFileNameComposite(composite);
- createProjectNameComposite(composite);
- createOverwriteComposite(10, 20, composite, synchHelper);
- restoreWidgetValues();
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createProjectNameComposite(Composite parent) {
-
- Label projectLabel = new Label(parent, SWT.NONE);
-
- projectLabel.setText(getProjectImportLabel());
- projectLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- // setting up combo
- projectCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- projectCombo.setLayoutData(data);
-
- // setting up button
- Button newProjectButton = new Button(parent, SWT.PUSH);
- newProjectButton.setText(defNewButtonLabel); //$NON-NLS-1$
- newProjectButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- newProjectButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleNewProjectButtonPressed();
- }
- });
- newProjectButton.setEnabled(true);
-
- synchHelper.synchCombo(projectCombo, J2EEArtifactImportDataModel.PROJECT_NAME, new Control[]{projectLabel, newProjectButton});
- }
-
- /**
- *
- */
- protected void handleNewProjectButtonPressed() {
- J2EEComponentCreationDataModel dm = getNewProjectCreationDataModel();
-
- WizardDialog dialog = new WizardDialog(projectCombo.getShell(), getNewProjectWizard(dm));
- dialog.create();
- dialog.getShell().setSize(500, 500);
- if (dialog.open() == Window.OK) {
- model.notifyValidValuesChange(J2EEArtifactImportDataModel.PROJECT_NAME);
- String projectName = dm.getStringProperty(EditModelOperationDataModel.PROJECT_NAME);
- model.setProperty(J2EEArtifactImportDataModel.PROJECT_NAME, projectName);
- model.setBooleanProperty(J2EEArtifactImportDataModel.OVERWRITE_PROJECT, true);
- }
- }
-
- protected J2EEComponentCreationDataModel getNewProjectCreationDataModel() {
- return null;
- }
-
- protected WTPWizard getNewProjectWizard(J2EEComponentCreationDataModel aModel) {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
- */
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- /**
- * @return
- */
- protected String getProjectImportLabel() {
- return null;
- }
-
- /**
- * @param composite
- */
- protected void createFileNameComposite(Composite parent) {
- Label fileLabel = new Label(parent, SWT.NONE);
- fileLabel.setText(getFileImportLabel());
-
- // setup combo
- fileNameCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER);
- fileNameCombo.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
-
- // setup browse button
- Button browseButton = new Button(parent, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- browseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleFileBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
-
- synchHelper.synchCombo(fileNameCombo, J2EEArtifactImportDataModel.FILE_NAME, new Control[]{fileLabel, browseButton});
- }
-
- /**
- *
- */
- protected void handleFileBrowseButtonPressed() {
-
- FileDialog dialog = new FileDialog(fileNameCombo.getShell());
- dialog.setFilterExtensions(getFilterExpression());
- String filename = dialog.open();
- if (filename != null)
- model.setProperty(J2EEArtifactImportDataModel.FILE_NAME, filename);
- }
-
- /**
- * @return
- */
- protected String[] getFilterExpression() {
- return new String[0];
- }
-
- protected void restoreWidgetValues() {
-
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null)
- return; // ie.- no settings stored
- for (int i = 0; i < sourceNames.length; i++) {
- if (sourceNames[i] == null)
- sourceNames[i] = ""; //$NON-NLS-1$
- }
- model.setProperty(J2EEArtifactImportDataModel.FILE_SELECTION_HISTORY, sourceNames);
- }
- }
-
- public void storeDefaultSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null) {
- sourceNames = new String[0];
- }
- //rip out any empty filenames and trim length to 5
- ArrayList newNames = new ArrayList();
- for (int i = 0; i < sourceNames.length && i < 5; i++) {
- if (sourceNames[i].trim().length() > 0) {
- newNames.add(sourceNames[i]);
- }
- }
- String text = fileNameCombo.getText();
- newNames.remove(text);
- newNames.add(0, text);
- sourceNames = new String[newNames.size()];
- newNames.toArray(sourceNames);
-
- //sourceNames = addToHistory(sourceNames,
- // getJ2EEImportDataModel().getStringProperty(J2EEImportDataModel.FILE_NAME));
- settings.put(STORE_LABEL + getFileNamesStoreID(), sourceNames);
- }
- }
-
- /**
- * @param composite
- */
- protected static Button[] createOverwriteComposite(int indent1, int indent2, Composite parent, WTPDataModelSynchHelper sHelper) {
- final Button overwrite = new Button(parent, SWT.CHECK);
- IProject project = ((J2EEArtifactImportDataModel) sHelper.getDataModel()).getProject();
- overwrite.setEnabled(null != project && project.exists());
- overwrite.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.OVERWRITE_RESOURCES));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = indent1;
- gd.horizontalSpan = 3;
- overwrite.setLayoutData(gd);
- sHelper.synchCheckbox(overwrite, J2EEArtifactImportDataModel.OVERWRITE_PROJECT, null);
-
- final Button delete = new Button(parent, SWT.CHECK);
- delete.setEnabled(overwrite.getEnabled() && sHelper.getDataModel().getBooleanProperty(J2EEArtifactImportDataModel.OVERWRITE_PROJECT));
- delete.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.DELETE_PROJECT));
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = indent2;
- gd.horizontalSpan = 3;
- delete.setLayoutData(gd);
- sHelper.synchCheckbox(delete, J2EEArtifactImportDataModel.DELETE_BEFORE_OVERWRITE_PROJECT, null);
-
- sHelper.getDataModel().addListener(new WTPOperationDataModelListener() {
- public void propertyChanged(WTPOperationDataModelEvent event) {
- if (event.getPropertyName().equals(J2EEArtifactImportDataModel.OVERWRITE_PROJECT)) {
- delete.setEnabled(((Boolean) event.getProperty()).booleanValue());
- } else if (event.getPropertyName().equals(J2EEArtifactImportDataModel.PROJECT_NAME)) {
- IProject aProject = ((J2EEArtifactImportDataModel) event.getDataModel()).getProject();
- boolean exists = null != aProject && aProject.exists();
- overwrite.setEnabled(exists);
- delete.setEnabled(exists && event.getDataModel().getBooleanProperty(J2EEArtifactImportDataModel.OVERWRITE_PROJECT));
- }
- }
- });
- return new Button[]{overwrite, delete};
- }
-
- /**
- * @return
- */
- protected String getFileNamesStoreID() {
- return null;
- }
-
- /**
- * Must override
- */
- protected String getFileImportLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- protected void enter() {
- super.enter();
- }
-
- protected Button importEARButton;
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java
deleted file mode 100644
index 32062bfa8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 4, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactExportDataModel;
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public abstract class J2EEModuleExportPage extends J2EEExportPage {
- /**
- * @param model
- * @param pageName
- */
- public J2EEModuleExportPage(J2EEArtifactExportDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName, selection);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEArtifactExportDataModel.PROJECT_NAME, J2EEArtifactExportDataModel.ARCHIVE_DESTINATION, J2EEArtifactExportDataModel.OVERWRITE_EXISTING};
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java
deleted file mode 100644
index c11155c16..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 4, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleImportDataModel;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.help.WorkbenchHelp;
-
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public abstract class J2EEModuleImportPage extends J2EEImportPage {
- /**
- * @param model
- * @param pageName
- */
- public J2EEModuleImportPage(J2EEArtifactImportDataModel model, String pageName) {
- super(model, pageName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = super.createTopLevelComposite(parent);
- WorkbenchHelp.setHelp(composite, getInfopopID());
- createServerEarAndStandaloneGroup(composite);
- createAnnotationsStandaloneGroup(composite);
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createAnnotationsStandaloneGroup(Composite composite) {
- // DO nohing by default
- }
-
- /**
- * @param composite
- */
- private void createServerEarAndStandaloneGroup(Composite composite) {
- //TODO use flexible project stuff
- //new ServerEarAndStandaloneGroup(composite, getJ2EEModuleImportDataModel().getJ2EEModuleCreationDataModel());
- }
-
- /**
- *
- */
- private J2EEModuleImportDataModel getJ2EEModuleImportDataModel() {
- return (J2EEModuleImportDataModel) model;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEArtifactImportDataModel.FILE_NAME, J2EEArtifactImportDataModel.PROJECT_NAME, J2EEArtifactImportDataModel.OVERWRITE_PROJECT, J2EEArtifactImportDataModel.DELETE_BEFORE_OVERWRITE_PROJECT, J2EEModuleImportDataModel.EAR_NAME, J2EEArtifactImportDataModel.SERVER_TARGET_ID, J2EEModuleImportDataModel.ADD_TO_EAR};
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportWizard.java
deleted file mode 100644
index f4b22ac28..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportWizard.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEModuleImportDataModel;
-import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.validation.internal.operations.ValidatorSubsetOperation;
-
-/**
- * <p>
- * Serves as a base class for Wizards which import J2EE module structures into Eclipse projects.
- * </p>
- * <p>
- * Import wizards must define the following methods:
- * <ul>
- * <li>{@link #getImportOperation()}
- * <li>{@link #getModuleValidatorStrings()}
- * </ul>
- * </p>
- * <p>
- * And optionally, they may override the following methods from
- * {@see org.eclipse.jst.j2ee.internal.wizard.J2EEArtifactImportWizard}:
- * <ul>
- * <li>{@link #getFinalPerspectiveID()}
- * <li>{@link #doInit()()}
- * <li>{@link #doDispose()()}
- * </ul>
- */
-public abstract class J2EEModuleImportWizard extends J2EEArtifactImportWizard implements IImportWizard, IExecutableExtension {
-
- private static final String[] VALIDATOR_STRINGS = new String[]{"org.eclipse.jst.j2ee.internal.validation.UIEarValidator"}; //$NON-NLS-1$
-
- private static final Class IPROJECT_CLASS = IProject.class;
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public J2EEModuleImportWizard() {
- super();
- setWindowTitle(J2EEUIMessages.getResourceString("38")); //$NON-NLS-1$
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEModuleImportWizard(J2EEModuleImportDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("38"));//$NON-NLS-1$
- }
-
-
-
- /**
- * <p>
- * Creates an Import Operation using {@link #getImportOperation()}and wraps it to run
- * validation once the module has been imported.
- * </p>
- *
- * @return Returns a wrapper operation around the result of getImportOperation() that also runs
- * validation as defined in getModuleValidatorStrings()
- * @see #getImportOperation()
- * @see #getModuleValidatorStrings()
- */
- protected final WTPOperation createBaseOperation() {
- return new WTPOperation() {
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
- WTPOperation importOp = getImportOperation();
- if (importOp == null)
- return;
- importOp.run(monitor);
-
- J2EEModuleImportDataModel importModel = (J2EEModuleImportDataModel) getImportOperation().getOperationDataModel();
- IProject moduleProject = importModel.getProject();
- ValidatorSubsetOperation moduleValidator = new ValidatorSubsetOperation(moduleProject, true, false);
- moduleValidator.setValidators(getModuleValidatorStrings());
- moduleValidator.run(monitor);
-
- if (importModel.getBooleanProperty(J2EEModuleImportDataModel.ADD_TO_EAR)) {
- IProject earProject = importModel.getJ2EEModuleCreationDataModel().getEarComponentCreationDataModel().getTargetProject();
- ValidatorSubsetOperation earValidator = new ValidatorSubsetOperation(earProject, true, false);
- earValidator.setValidators(getEarValidatorStrings());
- earValidator.run(monitor);
- }
- }
- };
- }
-
- /**
- *
- * @return The appropriate import operation for the specific J2EE model type
- */
- protected abstract WTPOperation getImportOperation();
-
- /**
- * <p>
- * The Import Wizards can run arbitrary validators once the module has been created. These
- * validators ensure that the structure created by the Import operation and the contents of that
- * structure are valid. Any errors will be announced to the Problems view in Eclipse.
- * </p>
- *
- * @return An array of validator IDs that should be used for this module type
- */
- protected abstract String[] getModuleValidatorStrings();
-
- /**
- * <p>
- * Uses the selection supplied from the {@link #init(IWorkbench, IStructuredSelection)}method
- * to set the associated EAR Module if an EAR artifact was selected.
- * </p>
- *
- * @param importModel
- * The Module Import data model to have its J2EEModuleImportDataModel.EAR_PROJECT
- * field set.
- */
- protected final void updateEARToModelFromSelection(J2EEModuleImportDataModel importModel) {
- /* Set the default ear selected if a ear is selected */
- try {
- if (getSelection() != null && !getSelection().isEmpty()) {
- IProject targetEARProject = (IProject) AdaptabilityUtility.getAdapter(getSelection().getFirstElement(), IPROJECT_CLASS);
- if (targetEARProject != null && targetEARProject.hasNature(IEARNatureConstants.NATURE_ID))
- importModel.setProperty(J2EEModuleImportDataModel.EAR_NAME, targetEARProject.getName());
- }
- } catch (Exception e) {
- //Ignore
- }
- }
-
- private String[] getEarValidatorStrings() {
- return VALIDATOR_STRINGS;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModulesDependencyPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModulesDependencyPage.java
deleted file mode 100644
index 0b8e6e833..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModulesDependencyPage.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.List;
-
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement;
-import org.eclipse.jst.j2ee.application.internal.operations.UpdateManifestDataModel;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.graphics.Point;
-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.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-
-/*
- * Created on Nov 13, 2003
- *
- * To change the template for this generated file go to Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and
- * Comments
- */
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-public class J2EEModulesDependencyPage extends DataModelWizardPage implements IJ2EEComponentCreationDataModelProperties{
-
- private CheckboxTableViewer availableJarsViewer;
-
- public J2EEModulesDependencyPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_DESC));
- }
-
- protected void enter() {
- super.enter();
- updateJarViewer();
- }
-
-
- private void updateJarViewer() {
- ClassPathSelection classPathSelection = (ClassPathSelection)getDataModel().getProperty(CLASSPATH_SELECTION);
-
- if (availableJarsViewer.getInput() != classPathSelection) {
- availableJarsViewer.setInput(classPathSelection);
- }
- }
-
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(2, false);
- composite.setLayout(layout);
- setInfopopID(IJ2EEUIContextIds.NEW_EJB_WIZARD_P3);
- Label projectLabel = new Label(composite, SWT.NONE);
- projectLabel.setText(WorkbenchMessages.NewProject_title); //$NON-NLS-1$
- Text projectText = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- synchHelper.synchText(projectText, PROJECT_NAME, null);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- projectText.setLayoutData(gd);
-
- Label earLabel = new Label(composite, SWT.NONE);
- earLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_PROJECT_FOR_MODULE_CREATION));
- Text earText = new Text(composite, SWT.BORDER | SWT.READ_ONLY);
- synchHelper.synchText(earText, EAR_COMPONENT_NAME, null);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- earText.setLayoutData(gd);
-
- Label spacerLabel = new Label(composite, SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- spacerLabel.setLayoutData(gd);
-
- Label jarsLabel = new Label(composite, SWT.NONE);
- jarsLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_AVAILABLE_JARS));
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- jarsLabel.setLayoutData(gd);
-
- Composite tableComposite = new Composite(composite, SWT.NONE);
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- gd.horizontalIndent = 0;
- gd.heightHint = 60;
- gd.widthHint = 200;
- tableComposite.setLayoutData(gd);
- GridLayout tableLayout = new GridLayout();
- tableLayout.marginWidth = 0;
- tableComposite.setLayout(tableLayout);
- createAvailableJarsList(tableComposite);
-
- spacerLabel = new Label(composite, SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- spacerLabel.setLayoutData(gd);
-
- Label classpathLabel = new Label(composite, SWT.NONE);
- classpathLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_CLASSPATH));
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- classpathLabel.setLayoutData(gd);
-
- Text classpathText = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
- //TODO synchhelper work with flexible project
- //synchHelper.synchText(classpathText, FlexibleJ2EEModuleCreationDataModel.JAR_LIST_TEXT_UI, null);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- gd.heightHint = 30;
- classpathText.setLayoutData(gd);
-
- return composite;
- }
-
- protected void createAvailableJarsList(Composite listGroup) {
- availableJarsViewer = CheckboxTableViewer.newCheckList(listGroup, SWT.CHECK | SWT.FULL_SELECTION | SWT.BORDER);
- addResizeListenerToTable();
- AvailableJarsProvider provider = new AvailableJarsProvider();
- availableJarsViewer.setContentProvider(provider);
- availableJarsViewer.setLabelProvider(provider);
- availableJarsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- availableJARCheckStateChanged(event);
- }
- });
- Table table = availableJarsViewer.getTable();
- // set up table layout
- TableLayout tableLayout = new org.eclipse.jface.viewers.TableLayout();
- tableLayout.addColumnData(new ColumnWeightData(200, true));
- tableLayout.addColumnData(new ColumnWeightData(200, true));
- table.setLayout(tableLayout);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- availableJarsViewer.setSorter(null);
- GridData gd = new GridData(GridData.FILL_BOTH);
- table.setLayoutData(gd);
-
- // table columns
- TableColumn fileNameColumn = new TableColumn(table, SWT.NONE);
- fileNameColumn.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_MODULE));
- fileNameColumn.setResizable(true);
-
- TableColumn projectColumn = new TableColumn(table, SWT.NONE);
- projectColumn.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_PROJECT));
- projectColumn.setResizable(true);
-
- updateJarViewer();
- }
-
- public void availableJARCheckStateChanged(CheckStateChangedEvent event) {
- ClasspathElement element = (ClasspathElement) event.getElement();
- element.setSelected(event.getChecked());
- String classEntry = element.getText();
- UpdateManifestDataModel updateManifest = (UpdateManifestDataModel)model.getProperty(NESTED_UPDATE_MANIFEST_DM);
- List classpathList = (List) updateManifest.getProperty(UpdateManifestDataModel.JAR_LIST);
- if (event.getChecked()) {
- if (!classpathList.contains(classEntry)) {
- classpathList.add(classEntry);
- }
- } else if (classpathList.contains(classEntry)) {
- classpathList.remove(classEntry);
- }
- updateManifest.setProperty(UpdateManifestDataModel.JAR_LIST, classpathList);
- updateManifest.propertyChanged(new WTPOperationDataModelEvent(updateManifest, UpdateManifestDataModel.JAR_LIST, WTPOperationDataModelEvent.PROPERTY_CHG));
- }
-
- protected void addResizeListenerToTable() {
- Table aTable = availableJarsViewer.getTable();
- aTable.addControlListener(new ControlAdapter() {
- boolean fResized = false;
-
- public void controlResized(ControlEvent e) {
- if (e.widget instanceof Table && !fResized) {
- final Table table = (Table) e.widget;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (table.isDisposed() || fResized)
- return;
- Point size = table.getSize();
- if (size.x > 4) {
- setResized(table);
- int newSize = size.x / 2 - 2;
- TableColumn column = table.getColumn(0);
- if (column != null && !column.isDisposed())
- column.setWidth(newSize);
- column = table.getColumn(1);
- if (column != null && !column.isDisposed())
- column.setWidth(newSize);
- }
- }
- });
- }
- }
-
- public void setResized(Table table) {
- fResized = true;
- table.removeControlListener(this);
- }
- });
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPage.java
deleted file mode 100644
index 30dc91a46..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPage.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Dec 8, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarListImportDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-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.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.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelListener;
-
-/**
- * @author mdelder
- */
-public class J2EEUtilityJarImportPage extends J2EEImportPage {
-
- private static final String STORE_LABEL = "J2EE_UTILITY_JAR_LIST_IMPORT_"; //$NON-NLS-1$
- // private static final int SIZING_TEXT_FIELD_WIDTH = 305;
-
- private Button deselectAllButton;
-
- private Button selectAllButton;
-
- protected Button browseButton;
-
- protected Button useAlternateRootBtn;
-
- private Button overwriteProjectCheckbox;
-
- protected CheckboxTableViewer availableJARsViewer;
-
- protected boolean utilJarSelectionChanged = false;
-
- private Combo availableJarsCombo;
-
- protected Button linkedPathCheckbox;
-
- /**
- * @param model
- * @param pageName
- */
- public J2EEUtilityJarImportPage(WTPOperationDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_0")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_1")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createUtilityJarFileNameComposite(composite);
- createLinkedPathVariable(composite);
- createJARsComposite(composite);
- /* createOverwriteCheckbox(composite); */
-
- restoreWidgetValues();
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createUtilityJarFileNameComposite(Composite parent) {
- Group fileNameGroup = new Group(parent, SWT.NULL);
- fileNameGroup.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_2")); //$NON-NLS-1$
- GridLayout layout = new GridLayout(3, false);
- fileNameGroup.setLayout(layout);
- fileNameGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label fileLabel = new Label(fileNameGroup, SWT.NONE);
- fileLabel.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_3")); //$NON-NLS-1$
- fileLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- // setup combo
- availableJarsCombo = new Combo(fileNameGroup, SWT.SINGLE | SWT.BORDER);
- availableJarsCombo.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
-
- // setup browse button
- browseButton = new Button(fileNameGroup, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- browseButton.setLayoutData((new GridData(GridData.HORIZONTAL_ALIGN_END)));
- browseButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
-
- synchHelper.synchCombo(availableJarsCombo, J2EEUtilityJarListImportDataModel.AVAILABLE_JARS_DIRECTORY, new Control[]{fileLabel, browseButton});
- }
-
- protected void createLinkedPathVariable(Composite parent) {
-
-
- Group linkedPathGroup = new Group(parent, SWT.NULL);
- linkedPathGroup.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_4")); //$NON-NLS-1$
-
- GridLayout layout = new GridLayout(1, true);
- linkedPathGroup.setLayout(layout);
- linkedPathGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Composite checkboxGroup = new Composite(linkedPathGroup, SWT.NULL);
- GridLayout checkboxLayout = new GridLayout(2, false);
- checkboxGroup.setLayout(checkboxLayout);
- checkboxGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- linkedPathCheckbox = new Button(checkboxGroup, SWT.CHECK);
- linkedPathCheckbox.setText(" "); //$NON-NLS-1$
- Text linkedPathText = new Text(checkboxGroup, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- linkedPathText.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_5")); //$NON-NLS-1$
- GridData textGridData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);
- textGridData.heightHint = 50;
- textGridData.widthHint = 350;
- linkedPathText.setLayoutData(textGridData);
- linkedPathText.setBackground(checkboxGroup.getBackground());
-
- // setup combo
- Combo availableLinkedPathsCombo = new Combo(linkedPathGroup, SWT.SINGLE | SWT.BORDER);
- availableLinkedPathsCombo.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
-
- synchHelper.synchCombo(availableLinkedPathsCombo, J2EEUtilityJarListImportDataModel.LINKED_PATH_VARIABLE, new Control[]{availableLinkedPathsCombo});
-
- synchHelper.synchCheckbox(linkedPathCheckbox, J2EEUtilityJarListImportDataModel.CREATE_LINKED_PATH_VARIABLE, new Control[]{availableLinkedPathsCombo});
-
- }
-
- /**
- * Open an appropriate directory browser
- */
- protected void handleBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(browseButton.getShell());
- dialog.setMessage(J2EEUIMessages.getResourceString(J2EEUIMessages.SELECT_DIRECTORY_DLG));
-
- String dirName = getBrowseStartLocation();
-
- if (!isNullOrEmpty(dirName)) {
- File path = new File(dirName);
- if (path.exists())
- dialog.setFilterPath(dirName);
- }
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null)
- availableJarsCombo.setText(selectedDirectory);
- }
-
- /**
- * @return
- */
- protected String getBrowseStartLocation() {
- if (availableJarsCombo.getText() != null && availableJarsCombo.getText().length() > 0)
- return availableJarsCombo.getText();
- return null;
- }
-
- protected boolean isNullOrEmpty(String aString) {
- return aString == null || aString.length() == 0;
- }
-
- /*
- * Updates the enable state of the all buttons
- */
- protected void updateButtonEnablements() {
-
- utilJarSelectionChanged = true;
- }
-
- protected void createAvailableJarsList(Composite listGroup) {
- availableJARsViewer = CheckboxTableViewer.newCheckList(listGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
-
- GridData gData = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
- gData.widthHint = 200;
- gData.heightHint = 80;
- availableJARsViewer.getControl().setLayoutData(gData);
- AvailableUtilityJarsProvider availableUtilJARsProvider = new AvailableUtilityJarsProvider();
- availableJARsViewer.setContentProvider(availableUtilJARsProvider);
- availableJARsViewer.setLabelProvider(availableUtilJARsProvider);
-
- availableJARsViewer.getTable().setHeaderVisible(false);
- availableJARsViewer.getTable().setLinesVisible(false);
-
- availableJARsViewer.setInput(getModel());
-
- /* getModel().addListener(getOperationDataModelListener()); */
- synchHelper.synchCheckBoxTableViewer(availableJARsViewer, J2EEUtilityJarListImportDataModel.UTILITY_JAR_LIST, null);
-
-
- getModel().addListener(new WTPOperationDataModelListener() {
-
- public void propertyChanged(WTPOperationDataModelEvent event) {
- if (J2EEUtilityJarListImportDataModel.AVAILABLE_JARS_DIRECTORY.equals(event.getPropertyName()))
- availableJARsViewer.setInput(getModel());
- }
- });
- }
-
- private void handleDeselectAllButtonPressed() {
- getModel().setProperty(J2EEUtilityJarListImportDataModel.UTILITY_JAR_LIST, new Object[0]);
- }
-
- private void handleSelectAllButtonPressed() {
- Object[] selection = new Object[availableJARsViewer.getTable().getItemCount()];
- for (int i = 0; i < selection.length; i++) {
- selection[i] = availableJARsViewer.getElementAt(i);
- }
- getModel().setProperty(J2EEUtilityJarListImportDataModel.UTILITY_JAR_LIST, selection);
- }
-
- protected void createButtonsGroup(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_SELECT_ALL_UTIL_BUTTON)); //$NON-NLS-1$ = "Select All"
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON)); //$NON-NLS-1$ = "Deselect All"
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleDeselectAllButtonPressed();
- }
- });
- }
-
- public void createNestedProjectOverwriteCheckbox(Composite parent) {
- Button allowNestedOverwriteCheckbox;
- allowNestedOverwriteCheckbox = new Button(parent, SWT.CHECK);
- allowNestedOverwriteCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_OVERWRITE_NESTED));
- synchHelper.synchCheckbox(allowNestedOverwriteCheckbox, J2EEUtilityJarListImportDataModel.OVERWRITE_IF_NECESSARY, null);
- }
-
- protected void createJARsComposite(Composite parent) {
- Group group = new Group(parent, SWT.NULL);
- group.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_JARS_GROUP));
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- group.setLayout(layout);
- group.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label description = new Label(group, SWT.NULL);
- description.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_UTILITY_JAR_LISTEAR_IMPORT_SELECT_UTIL_JARS_TO_BE_PROJECTS));
- GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd2.horizontalSpan = 2;
- description.setLayoutData(gd2);
-
- //create jars check box viewer
- createAvailableJarsList(group);
- createButtonsGroup(group);
- }
-
- /**
- * @param projectOptionsGroup
- */
- protected void createOverwriteCheckbox(Composite parent) {
-
- overwriteProjectCheckbox = new Button(parent, SWT.CHECK);
- overwriteProjectCheckbox.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_6")); //$NON-NLS-1$
- synchHelper.synchCheckbox(overwriteProjectCheckbox, J2EEUtilityJarListImportDataModel.OVERWRITE_IF_NECESSARY, null);
- }
-
- protected void setJARsCompositeEnabled(boolean enabled) {
- availableJARsViewer.getTable().setEnabled(enabled);
- availableJARsViewer.setAllChecked(false);
- availableJARsViewer.setAllGrayed(!enabled);
- selectAllButton.setEnabled(enabled);
- deselectAllButton.setEnabled(enabled);
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEUtilityJarListImportDataModel.UTILITY_JAR_LIST, J2EEUtilityJarListImportDataModel.OVERWRITE_IF_NECESSARY, J2EEUtilityJarListImportDataModel.LINKED_PATH_VARIABLE};
- }
-
- protected void restoreWidgetValues() {
-
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null)
- return; // ie.- no settings stored
- for (int i = 0; i < sourceNames.length; i++) {
- if (sourceNames[i] == null)
- sourceNames[i] = ""; //$NON-NLS-1$
- }
- availableJarsCombo.setItems(sourceNames);
- }
- }
-
- public void storeDefaultSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null) {
- sourceNames = new String[0];
- }
-
- String newName = availableJarsCombo.getText();
-
- //rip out any empty filenames and trim length to 5
- ArrayList newNames = new ArrayList();
- for (int i = 0; i < sourceNames.length && i < 5; i++) {
- if (sourceNames[i].trim().length() > 0 && !newName.equals(sourceNames[i])) {
- newNames.add(sourceNames[i]);
- }
- }
- newNames.add(0, availableJarsCombo.getText());
- sourceNames = new String[newNames.size()];
- newNames.toArray(sourceNames);
-
- settings.put(STORE_LABEL + getFileNamesStoreID(), sourceNames);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileNamesStoreID()
- */
- protected String getFileNamesStoreID() {
- return "UTILITY_JAR_DIRECTORY"; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_7"); //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePage.java
deleted file mode 100644
index a673a4b4d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePage.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on May 13, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.emf.workbench.nature.EMFNature;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarListImportDataModel;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.internal.earcreation.IEARNatureConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-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.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.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModelEvent;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class J2EEUtilityJarImportTypePage extends WTPWizardPage {
-
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL); //$NON-NLS-1$
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
-
- protected IStructuredSelection currentResourceSelection;
-
- private Combo resourceNameCombo;
-
- private Button copyJarIntoEAR;
-
- private Button linkJarIntoEAR;
-
- private Button createLinkedProjects;
-
- private Button createProjects;
-
- protected Button browseButton;
-
- private Button binaryImportCheckbox;
-
- private Button overrideProjectRootCheckbox;
-
-
- protected Text projectRootLocationText;
-
- private Label moduleProjectLocationLabel;
-
- protected boolean synching;
-
- public static final String TITLE = J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_0"); //$NON-NLS-1$
- public static final String DESCRIPTION = J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_1"); //$NON-NLS-1$
-
- private Group projectRootComposite;
-
-
- /**
- * @param model
- * @param pageName
- * @param title
- * @param titleImage
- */
- public J2EEUtilityJarImportTypePage(WTPOperationDataModel model, String pageName, String title, ImageDescriptor titleImage) {
- super(model, pageName, title, titleImage);
- setTitle(""); //$NON-NLS-1$
- setDescription(""); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- public J2EEUtilityJarImportTypePage(WTPOperationDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName);
- this.currentResourceSelection = selection;
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- public J2EEUtilityJarImportTypePage(WTPOperationDataModel model, String pageName) {
- super(model, pageName);
- setTitle(TITLE);
- setDescription(DESCRIPTION);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{J2EEUtilityJarListImportDataModel.EAR_PROJECT, J2EEUtilityJarListImportDataModel.PROJECT_ROOT};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createEARProjectGroup(composite);
- createUtilityJarImportTypes(composite);
- createProjectCreationOptions(composite);
-
- setupBasedOnInitialSelections();
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createUtilityJarImportTypes(Composite parent) {
- Group typesGroup = new Group(parent, SWT.NULL);
- typesGroup.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_2")); //$NON-NLS-1$
-
- GridLayout layout = new GridLayout(1, false);
- typesGroup.setLayout(layout);
- typesGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createProjects = new Button(typesGroup, SWT.RADIO);
- createProjects.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_3")); //$NON-NLS-1$
- synchHelper.synchRadio(createProjects, J2EEUtilityJarListImportDataModel.CREATE_PROJECT, null);
-
- createLinkedProjects = new Button(typesGroup, SWT.RADIO);
- createLinkedProjects.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_4")); //$NON-NLS-1$
- synchHelper.synchRadio(createLinkedProjects, J2EEUtilityJarListImportDataModel.CREATE_LINKED_PROJECT, null);
-
- copyJarIntoEAR = new Button(typesGroup, SWT.RADIO);
- copyJarIntoEAR.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_5")); //$NON-NLS-1$
- synchHelper.synchRadio(copyJarIntoEAR, J2EEUtilityJarListImportDataModel.COPY, null);
-
- linkJarIntoEAR = new Button(typesGroup, SWT.RADIO);
- linkJarIntoEAR.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_6")); //$NON-NLS-1$
- /* linkJarIntoEAR.addSelectionListener(getTypeSelectionListener()); */
- synchHelper.synchRadio(linkJarIntoEAR, J2EEUtilityJarListImportDataModel.LINK_IMPORT, null);
-
- }
-
- protected void createProjectCreationOptions(Composite parent) {
-
- Group projectOptionsGroup = new Group(parent, SWT.NULL);
- projectOptionsGroup.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_7")); //$NON-NLS-1$
-
- GridLayout layout = new GridLayout(1, false);
- projectOptionsGroup.setLayout(layout);
- projectOptionsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- createBinaryImportCheckbox(projectOptionsGroup);
-
- overrideProjectRootCheckbox = new Button(projectOptionsGroup, SWT.CHECK);
- overrideProjectRootCheckbox.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_11")); //$NON-NLS-1$
- createProjectRootComposite(projectOptionsGroup);
-
- synchHelper.synchCheckbox(overrideProjectRootCheckbox, J2EEUtilityJarListImportDataModel.OVERRIDE_PROJECT_ROOT, new Control[]{/*
- * moduleProjectLocationLabel,
- * projectRootLocationText,
- * browseButton
- */});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#propertyChanged(org.eclipse.wst.common.frameworks.internal.operation.WTPOperationDataModelEvent)
- */
- public void propertyChanged(WTPOperationDataModelEvent event) {
- // if (synching) return;
- // synching = true;
- // if (J2EEUtilityJarListImportDataModel.CREATE_PROJECT.equals(event.getPropertyName())
- // || J2EEUtilityJarListImportDataModel.LINK_IMPORT.equals(event.getPropertyName())) {
- //
- // boolean shouldCreateProject =
- // getModel().getBooleanProperty(J2EEUtilityJarListImportDataModel.CREATE_PROJECT);
- // boolean linkImportedContent =
- // getModel().getBooleanProperty(J2EEUtilityJarListImportDataModel.LINK_IMPORT);
- //
- // createProjects.setSelection(shouldCreateProject && !linkImportedContent);
- // createLinkedProjects.setSelection(shouldCreateProject && linkImportedContent);
- // linkJarIntoEAR.setSelection(!shouldCreateProject && linkImportedContent);
- // copyJarIntoEAR.setSelection(!shouldCreateProject && !linkImportedContent);
- //
- // enableProjectOptions(shouldCreateProject);
- //
- // } else
- // if(J2EEUtilityJarListImportDataModel.OVERRIDE_PROJECT_ROOT.equals(event.getPropertyName()))
- // {
- // boolean overrideProjectRoot =
- // getModel().getBooleanProperty(J2EEUtilityJarListImportDataModel.OVERRIDE_PROJECT_ROOT);
- // projectRootLocationText.setEnabled(overrideProjectRoot);
- // }
- // synching = false;
- super.propertyChanged(event);
- }
-
- /**
- *
- * @param parent
- * a <code>Composite</code> that is to be used as the parent of this group's
- * collection of visual components
- * @see org.eclipse.swt.widgets.Composite
- */
- protected void createEARProjectGroup(Composite parent) {
-
- Group earGroup = new Group(parent, SWT.NULL);
- earGroup.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_8")); //$NON-NLS-1$
-
- GridLayout layout = new GridLayout(2, false);
- earGroup.setLayout(layout);
- earGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- //Project label
- Label projectLabel = new Label(earGroup, SWT.NONE);
- projectLabel.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_9")); //$NON-NLS-1$
- //Project combo
- resourceNameCombo = new Combo(earGroup, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- resourceNameCombo.setLayoutData(data);
- synchHelper.synchCombo(resourceNameCombo, J2EEUtilityJarListImportDataModel.EAR_PROJECT, null);
-
- }
-
- protected void createProjectRootComposite(Composite parent) {
- projectRootComposite = new Group(parent, SWT.NULL);
- projectRootComposite.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.PROJECT_LOCATIONS_GROUP));
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- projectRootComposite.setLayout(layout);
- projectRootComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label description = new Label(projectRootComposite, SWT.NULL);
- description.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_PROJECT_GROUP_DESCRIPTION));
- GridData gd2 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd2.horizontalSpan = 3;
- description.setLayoutData(gd2);
-
- moduleProjectLocationLabel = new Label(projectRootComposite, SWT.NULL);
- moduleProjectLocationLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.USE_DEFAULT_ROOT_RADIO));
- moduleProjectLocationLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- projectRootLocationText = new Text(projectRootComposite, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- projectRootLocationText.setLayoutData(gd);
- projectRootLocationText.setText(ResourcesPlugin.getWorkspace().getRoot().getFullPath().toOSString());
- projectRootLocationText.setEnabled(false); /* disabled by default */
-
- browseButton = new Button(projectRootComposite, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- browseButton.setLayoutData(gd);
- browseButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleRootProjectBrowseButtonPressed();
- }
- });
-
- synchHelper.synchText(projectRootLocationText, J2EEUtilityJarListImportDataModel.PROJECT_ROOT, new Control[]{moduleProjectLocationLabel, projectRootLocationText, browseButton});
- }
-
- protected void createBinaryImportCheckbox(Composite parent) {
- binaryImportCheckbox = new Button(parent, SWT.CHECK);
- binaryImportCheckbox.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_10")); //$NON-NLS-1$
- synchHelper.synchCheckbox(binaryImportCheckbox, J2EEUtilityJarListImportDataModel.BINARY_IMPORT, null);
- }
-
- /**
- * Open an appropriate directory browser
- */
- protected void handleRootProjectBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(browseButton.getShell());
- dialog.setMessage(J2EEUIMessages.getResourceString(J2EEUIMessages.SELECT_DIRECTORY_DLG));
-
- String dirName = getBrowseStartLocation();
-
- if (!isNullOrEmpty(dirName)) {
- File path = new File(dirName);
- if (path.exists())
- dialog.setFilterPath(dirName);
- }
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null)
- projectRootLocationText.setText(selectedDirectory);
-
- }
-
- protected String getBrowseStartLocation() {
- String text = projectRootLocationText.getText();
- return text;
- }
-
-
- protected boolean isNullOrEmpty(String aString) {
- return aString == null || aString.length() == 0;
- }
-
- /**
- * Populates the resource name field based upon the currently-selected resources.
- */
- protected void setupBasedOnInitialSelections() {
-
- if (null == currentResourceSelection || currentResourceSelection.isEmpty() || setupBasedOnRefObjectSelection())
- return; // no
- // setup
- // needed
-
- java.util.List selections = new ArrayList();
- Iterator aenum = currentResourceSelection.iterator();
- while (aenum.hasNext()) {
- IResource currentResource = (IResource) aenum.next();
- // do not add inaccessible elements
- if (currentResource.isAccessible())
- selections.add(currentResource);
- }
- if (selections.isEmpty())
- return; // setup not needed anymore
-
- int selectedResourceCount = selections.size();
- if (selectedResourceCount == 1) {
- IResource resource = (IResource) selections.get(0);
- if ((resource instanceof IProject) && checkForNature((IProject) resource)) {
- resourceNameCombo.setText(resource.getName().toString());
- }
- }
- }
-
- /**
- * Populates the resource name field based upon the currently-selected resources.
- */
- protected boolean setupBasedOnRefObjectSelection() {
-
- if (currentResourceSelection.size() != 1)
- return false;
-
- Object o = currentResourceSelection.getFirstElement();
- if (!isMetaTypeSupported(o))
- return false;
-
- EObject ref = (EObject) o;
- IResource resource = ProjectUtilities.getProject(ref);
- if (resource != null)
- resourceNameCombo.setText(resource.getName().toString());
- return true;
- }
-
- protected boolean checkForNature(IProject project) {
- return EMFNature.hasRuntime(project, getNatureID());
- }
-
- /**
- * @return
- */
- protected String getNatureID() {
- return IEARNatureConstants.NATURE_ID;
- }
-
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof EARFile || o instanceof Application;
- }
-
- protected void enableProjectOptions(boolean enabled) {
- //getModel().setBooleanProperty(J2EEUtilityJarListImportDataModel.BINARY_IMPORT, enabled);
- binaryImportCheckbox.setEnabled(enabled);
- overrideProjectRootCheckbox.setEnabled(enabled);
-
- if (overrideProjectRootCheckbox.getSelection() && enabled)
- projectRootLocationText.setEnabled(true);
- else
- projectRootLocationText.setEnabled(false);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- */
- public boolean isPageComplete() {
- return getModel().validateProperty(J2EEUtilityJarListImportDataModel.EAR_PROJECT).isOK();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizard.java
deleted file mode 100644
index ba367fdf8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizard.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarListImportDataModel;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperation;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-
-/**
- * <p>
- * Used to import Utility Jars into several Eclipse workbench configurations. These can be extracted
- * as editable projects, binary projects, linked resources in the EAR module or actual resources in
- * the EAR module.
- * </p>
- */
-public final class J2EEUtilityJarImportWizard extends J2EEArtifactImportWizard implements IImportWizard {
-
- /**
- * <p>
- * Constant used to identify the key of the page of the Wizard which allows users to define the
- * type of import they would like to carry out.
- * </p>
- */
- private static final String IMPORT_TYPE = "IMPORT_TYPE"; //$NON-NLS-1$
-
- /**
- * <p>
- * Constant used to identify the key of the page of the Wizard that allows users to select jar
- * files for import
- * </p>
- */
- private static final String SELECT_JARS = "SELECT_JARS"; //$NON-NLS-1$
-
- private IStructuredSelection selection;
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public J2EEUtilityJarImportWizard() {
- super();
- }
-
- /**
- * <p>
- * The model is used to prepopulate the wizard controls and interface with the operation.
- * </p>
- *
- * @param model
- * The model parameter is used to pre-populate wizard controls and interface with the
- * operation
- */
- public J2EEUtilityJarImportWizard(WTPOperationDataModel model) {
- super(model);
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Overridden to return an {@link J2EEUtilityJarListImportDataModel}.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizard#createDefaultModel()
- */
- protected WTPOperationDataModel createDefaultModel() {
- return new J2EEUtilityJarListImportDataModel();
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Returns an {@link J2EEUtilityJarImportWizard}using the model either supplied in the
- * constructor or created from {@link #createDefaultModel()}.
- * </p>
- *
- * @return Returns the operation to be executed when the Wizard completes.
- */
- protected WTPOperation createBaseOperation() {
- return getModel().getDefaultOperation();
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link J2EEUtilityJarImportTypePage}as the main wizard page ({@link #IMPORT_TYPE})
- * <li>{@link J2EEUtilityJarImportPage}as the main wizard page ({@link #SELECT_JARS})
- * </ul>
- * </p>
- */
- public void doAddPages() {
- this.addPage(new J2EEUtilityJarImportTypePage(getUtilityJarImportModel(), IMPORT_TYPE, selection));
- this.addPage(new J2EEUtilityJarImportPage(getUtilityJarImportModel(), SELECT_JARS));
- }
-
- private J2EEUtilityJarListImportDataModel getUtilityJarImportModel() {
- return (J2EEUtilityJarListImportDataModel) getModel();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizard.java
deleted file mode 100644
index 2daafc8dd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizard.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.ejb.archiveoperations.EjbComponentCreationDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPluginIcons;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-/**
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class JavaUtilityComponentCreationWizard extends DataModelWizard implements INewWizard, IExecutableExtension{
-
- private IConfigurationElement configurationElement;
-
- public JavaUtilityComponentCreationWizard() {
- super();
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVAUTIL_COMPONENT_WIZ_TITLE));
- //setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_PROJECT_WIZARD_BANNER));
- }
-
- public void doAddPages() {
- addPage(new JavaUtilityComponentCreationWizardPage(getDataModel(), JavaUtilityComponentCreationWizardPage.PAGE_NAME));
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.datamodel.ui.DataModelWizard#getDefaultProvider()
- */
- protected IDataModelProvider getDefaultProvider() {
- return new JavaComponentCreationDataModelProvider();
- }
-
- public final void setInitializationData(IConfigurationElement aConfigurationElement, String aPropertyName, Object theData) throws CoreException {
- configurationElement = aConfigurationElement;
-// doSetInitializeData(aConfigurationElement, aPropertyName, theData);
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // TODO Auto-generated method stub
-
- }
- public boolean canFinish() {
- return super.canFinish();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizardPage.java
deleted file mode 100644
index e2e32b533..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/JavaUtilityComponentCreationWizardPage.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004, 2005 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.web.internal.WSTWebPlugin;
-
-
-
-/**
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class JavaUtilityComponentCreationWizardPage extends DataModelWizardPage {
- public static final String PAGE_NAME = "JavaUtilityComponentCreationWizardPage";
- protected NewModuleGroupEx projectNameGroup;
-
- /**
- * @param model
- * @param pageName
- */
- protected JavaUtilityComponentCreationWizardPage(IDataModel model, String pageName) {
- super(model, pageName);
-
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVAUTILITY_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVAUTILITY_MAIN_PG_DESC));
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(WSTWebPlugin.PLUGIN_ID, "icons/full/wizban/newwprj_wiz.gif"); //$NON-NLS-1$
- setImageDescriptor(desc);
- setPageComplete(true);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.datamodel.ui.DataModelWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{IComponentCreationDataModelProperties.COMPONENT_NAME};
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.common.frameworks.datamodel.ui.DataModelWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite top = new Composite(parent, SWT.NONE);
- top.setLayout(new GridLayout());
- top.setData(new GridData(GridData.FILL_BOTH));
- Composite composite = new Composite(top, SWT.NONE);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
-
- createProjectNameGroup(composite);
- Composite detail = new Composite(top, SWT.NONE);
- detail.setLayout(new GridLayout());
- detail.setData(new GridData(GridData.FILL_BOTH));
-
-
- return top;
- }
-
- protected void createProjectNameGroup(Composite parent) {
- projectNameGroup = new NewModuleGroupEx(parent, SWT.NULL, model);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java
deleted file mode 100644
index eb878c0bf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.ui.dialogs.FileSystemElement;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
-
-/**
- * The <code>MinimizedFileSystemElement</code> is a <code>FileSystemElement</code> that knows if
- * it has been populated or not.
- */
-class MinimizedFileSystemElement extends FileSystemElement {
- private boolean populated = false;
- private String packageBaseDirName = null;
-
-
- /**
- * Create a <code>MinimizedFileSystemElement</code> with the supplied name and parent.
- *
- * @param name
- * the name of the file element this represents
- * @param parent
- * the containing parent
- * @param isDirectory
- * indicated if this could have children or not
- */
- MinimizedFileSystemElement(String name, org.eclipse.ui.dialogs.FileSystemElement parent, boolean isDirectory) {
- super(name, parent, isDirectory);
- }
-
- public void setPackageBaseDirName(String s) {
- packageBaseDirName = s;
- }
-
- public void addChild(FileSystemElement child) {
- if (child.isDirectory()) {
- super.addChild(child);
- } else {
- if (child.getFileNameExtension().equals("class")) { //$NON-NLS-1$
- super.addChild(child);
- }
- }
- }
-
- /**
- * Returns a list of the files that are immediate children. Use the supplied provider if it
- * needs to be populated. of this folder.
- */
- public AdaptableList getFiles(IImportStructureProvider provider) {
- if (!populated)
- populate(provider);
-
- return super.getFiles();
-
- }
-
- /**
- * Returns a list of the folders that are immediate children. Use the supplied provider if it
- * needs to be populated. of this folder.
- */
- public AdaptableList getFolders(IImportStructureProvider provider) {
- if (!populated)
- populate(provider);
-
- return super.getFolders();
-
- }
-
- /**
- * Return whether or not population has happened for the receiver.
- */
- boolean isPopulated() {
- return this.populated;
- }
-
- /**
- * Return whether or not population has not happened for the receiver.
- */
- boolean notPopulated() {
- return !this.populated;
- }
-
- /**
- * Populate the files and folders of the receiver using the suppliec structure provider.
- *
- * @param provider
- * org.eclipse.ui.wizards.datatransfer.IImportStructureProvider
- */
- private void populate(IImportStructureProvider provider) {
-
- Object fileSystemObject = getFileSystemObject();
-
- List children = provider.getChildren(fileSystemObject);
- if (children == null)
- children = new ArrayList(1);
- Iterator childrenEnum = children.iterator();
- while (childrenEnum.hasNext()) {
- Object child = childrenEnum.next();
-
- String elementLabel = provider.getLabel(child);
- if (elementLabel.equals(packageBaseDirName) || packageBaseDirName == null) {
- //Create one level below
-
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, this, provider.isFolder(child));
- result.setFileSystemObject(child);
- }
- }
- setPopulated();
-
- }
-
- /**
- * Set whether or not population has happened for the receiver to true.
- */
- void setPopulated() {
- this.populated = true;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewFlexibleProjectGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewFlexibleProjectGroup.java
deleted file mode 100644
index b24956fa0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewFlexibleProjectGroup.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Created on Mar 14, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IFlexibleJavaProjectCreationDataModelProperties;
-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.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-
-public class NewFlexibleProjectGroup implements IFlexibleJavaProjectCreationDataModelProperties{
- private IDataModel model;
- public Text projectNameField = null;
- protected Text locationPathField = null;
- protected Button browseButton = null;
- // constants
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- // default values
- private String defProjectNameLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.NAME_LABEL); //$NON-NLS-1$
- private String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL); //$NON-NLS-1$
- private static final String defDirDialogLabel = "Directory"; //$NON-NLS-1$
-
- private DataModelSynchHelper synchHelper;
-
- /**
- * @param parent
- * @param style
- */
- public NewFlexibleProjectGroup(Composite parent, int style, IDataModel model, DataModelSynchHelper aHelper) {
- this.model = model;
- synchHelper = aHelper;
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- createProjectNameGroup(parent);
- createProjectLocationGroup(parent);
- projectNameField.setFocus();
- }
-
- /**
- *
- */
- private void createProjectNameGroup(Composite parent) {
- // set up project name label
- Label projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(defProjectNameLabel);
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameField = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- projectNameField.setLayoutData(data);
- new Label(parent, SWT.NONE); // pad
- synchHelper.synchText(projectNameField, PROJECT_NAME, new Control[]{projectNameLabel});
- }
-
- /**
- *
- */
- private void createProjectLocationGroup(Composite parent) {
- // set up location path label
- Label locationPathLabel = new Label(parent, SWT.NONE);
- locationPathLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.PROJECT_LOC_LBL));
- GridData data = new GridData();
- locationPathLabel.setLayoutData(data);
- // set up location path entry field
- locationPathField = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- locationPathField.setLayoutData(data);
- // set up browse button
- browseButton = new Button(parent, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- browseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleLocationBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
- synchHelper.synchText(locationPathField, PROJECT_LOCATION, null);
- }
-
- /**
- * Open an appropriate directory browser
- */
- protected void handleLocationBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
- dialog.setMessage(defDirDialogLabel);
- String dirName = model.getStringProperty(PROJECT_LOCATION);
- if ((dirName != null) && (dirName.length() != 0)) {
- File path = new File(dirName);
- if (path.exists()) {
- dialog.setFilterPath(dirName);
- }
- }
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- model.setProperty(PROJECT_LOCATION, selectedDirectory);
- }
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- model = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java
deleted file mode 100644
index 6eb05ff11..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Created on Mar 23, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.earcreation.IDefaultJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.moduleextension.EarModuleManager;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IPluginContribution;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.wizards.IWizardDescriptor;
-import org.eclipse.ui.wizards.IWizardRegistry;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.ui.GenericWizardNode;
-
-public class NewJ2EEComponentSelectionPage extends DataModelWizardPage implements IDefaultJ2EEComponentCreationDataModelProperties {
- private Button defaultModulesButton;
-
- private Composite defaultModulesComposite;
-
- private Composite newModulesComposite;
-
- private Button appClientRadioButton;
-
- private Button ejbRadioButton;
-
- private Button webRadioButton;
-
- private Button connectorRadioButton;
-
- private GenericWizardNode appClientNode;
-
- private GenericWizardNode ejbNode;
-
- private GenericWizardNode webNode;
-
- private GenericWizardNode connectorNode;
-
- private GenericWizardNode selectedNode;
-
- private StackLayout stackLayout;
-
- /**
- * @param model
- * @param pageName
- */
- protected NewJ2EEComponentSelectionPage(IDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_DESC));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[] { CREATE_APPCLIENT, APPCLIENT_COMPONENT_NAME, CREATE_CONNECTOR, CONNECTOR_COMPONENT_NAME, CREATE_EJB, EJB_COMPONENT_NAME, CREATE_WEB, WEB_COMPONENT_NAME, MODULE_NAME_COLLISIONS_VALIDATION, ENABLED };
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- setInfopopID(IJ2EEUIContextIds.EAR_NEW_MODULE_PROJECTS_PAGE);
- createDefaultCheckBox(composite);
- Composite forStackComposite = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- forStackComposite.setLayout(layout);
- forStackComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- Composite stackComposite = createStackLayoutComposite(forStackComposite);
- createDefaultModulesComposite(stackComposite);
- createModuleSelectionComposite(stackComposite);
- stackLayout.topControl = defaultModulesComposite;
- setButtonEnablement();
- return composite;
- }
-
- protected Composite createStackLayoutComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- stackLayout = new StackLayout();
- composite.setLayout(stackLayout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- return composite;
- }
-
- private void createDefaultModulesComposite(Composite parent) {
- defaultModulesComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- defaultModulesComposite.setLayout(layout);
- defaultModulesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- // Default Module Controls creation
- createAppClientDefaultModuleControl();
- if (J2EEPlugin.isEJBSupportAvailable())
- createEJBDefaultModuleControl();
- createWebDefaultModuleControl();
- if (J2EEPlugin.isEJBSupportAvailable())
- createConnectorDefaultModuleControl();
- }
-
- /**
- * @param parent
- */
- private void createModuleSelectionComposite(Composite parent) {
- newModulesComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- newModulesComposite.setLayout(layout);
- newModulesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- appClientRadioButton = new Button(newModulesComposite, SWT.RADIO);
-
- appClientRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.appClient")); //$NON-NLS-1$
- appClientRadioButton.addListener(SWT.Selection, this);
- if (EarModuleManager.getEJBModuleExtension() != null) {
- ejbRadioButton = new Button(newModulesComposite, SWT.RADIO);
- ejbRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.ejb")); //$NON-NLS-1$
- ejbRadioButton.addListener(SWT.Selection, this);
- }
- if (EarModuleManager.getWebModuleExtension() != null) {
- webRadioButton = new Button(newModulesComposite, SWT.RADIO);
- webRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.web")); //$NON-NLS-1$
- webRadioButton.addListener(SWT.Selection, this);
- }
- if (EarModuleManager.getJCAModuleExtension() != null) {
- connectorRadioButton = new Button(newModulesComposite, SWT.RADIO);
- connectorRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.jca")); //$NON-NLS-1$
- connectorRadioButton.addListener(SWT.Selection, this);
- }
- }
-
- /**
- *
- */
- private void createConnectorDefaultModuleControl() {
- if (EarModuleManager.getJCAModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_JCA_MODULE_LBL);
- createJ2EEComponentControl(label, CREATE_CONNECTOR, CONNECTOR_COMPONENT_NAME);
- }
- }
-
- /**
- *
- */
- private void createWebDefaultModuleControl() {
- if (EarModuleManager.getWebModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_WEB_MODULE_LBL);
- createJ2EEComponentControl(label, CREATE_WEB, WEB_COMPONENT_NAME);
- }
- }
-
- /**
- *
- */
- private void createEJBDefaultModuleControl() {
- if (EarModuleManager.getEJBModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_EJB_MODULE_LBL);
- createJ2EEComponentControl(label, CREATE_EJB, EJB_COMPONENT_NAME);
- }
- }
-
- private void createAppClientDefaultModuleControl() {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_APPCLIENT_MODULE_LBL);
- createJ2EEComponentControl(label, CREATE_APPCLIENT, APPCLIENT_COMPONENT_NAME);
- }
-
- private void createJ2EEComponentControl(String label, String createProperty, String projectProperty) {
- final Button checkBox = new Button(defaultModulesComposite, SWT.CHECK);
- checkBox.setSelection(true);
- checkBox.setText(label);
-
- final Text textField = new Text(defaultModulesComposite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- textField.setLayoutData(data);
- synchHelper.synchCheckbox(checkBox, createProperty, null);
- synchHelper.synchText(textField, projectProperty, null);
- }
-
- private void createDefaultCheckBox(Composite composite) {
- Composite checkBoxComposite = new Composite(composite, SWT.NULL);
- GridLayout layout = new GridLayout();
- checkBoxComposite.setLayout(layout);
- checkBoxComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- defaultModulesButton = new Button(checkBoxComposite, SWT.CHECK);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 0;
- defaultModulesButton.setLayoutData(data);
- defaultModulesButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.DEFAULT_COMPONENT_PAGE_NEW_MOD_SEL_PG_DEF_BTN));
- defaultModulesButton.setSelection(true);
- defaultModulesButton.addListener(SWT.Selection, this);
- synchHelper.synchCheckbox(defaultModulesButton, ENABLED, null);
- createControlsSeparatorLine(checkBoxComposite);
- }
-
- protected void createControlsSeparatorLine(Composite parent) {
- // add a horizontal line
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- separator.setLayoutData(data);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == defaultModulesButton)
- handleDefaultModulesButtonPressed();
- else if (!defaultModulesButton.getSelection()) {
- if (evt.widget == appClientRadioButton && appClientRadioButton.getSelection())
- setSelectedNode(getAppClientNode());
- else if (evt.widget == ejbRadioButton && ejbRadioButton.getSelection())
- setSelectedNode(getEjbNode());
- else if (evt.widget == webRadioButton && webRadioButton.getSelection())
- setSelectedNode(getWebNode());
- else if (evt.widget == connectorRadioButton && connectorRadioButton.getSelection())
- setSelectedNode(getConnectorNode());
- validatePage();
- }
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleDefaultModulesButtonPressed() {
- if (defaultModulesButton.getSelection()) {
- setSelectedNode(null);
- showDefaultModulesComposite();
- } else
- showNewModulesCompsite();
- setButtonEnablement();
- validatePage();
- }
-
- private void showDefaultModulesComposite() {
- defaultModulesComposite.setVisible(true);
- newModulesComposite.setVisible(false);
- stackLayout.topControl = defaultModulesComposite;
- }
-
- /**
- * This is done based on the J2EE version. We need to disable Connectors if
- * not j2ee 1.3 or higher.
- */
- private void setButtonEnablement() {
- if (!defaultModulesButton.getSelection() && connectorRadioButton != null) {
- int version = getDataModel().getIntProperty(J2EE_VERSION);
- connectorRadioButton.setEnabled(version > J2EEVersionConstants.J2EE_1_2_ID);
- }
- }
-
- /**
- *
- */
- private void showNewModulesCompsite() {
- defaultModulesComposite.setVisible(false);
- newModulesComposite.setVisible(true);
- if (!isAnyModuleRadioSelected())
- appClientRadioButton.setSelection(true);
- setSelectedNode(getWizardNodeFromSelection());
- stackLayout.topControl = newModulesComposite;
- }
-
- /**
- * @return
- */
- private GenericWizardNode getWizardNodeFromSelection() {
- if (appClientRadioButton.getSelection())
- return getAppClientNode();
- if (connectorRadioButton != null && connectorRadioButton.getSelection())
- return getConnectorNode();
- if (ejbRadioButton != null && ejbRadioButton.getSelection())
- return getEjbNode();
- if (webRadioButton != null && webRadioButton.getSelection())
- return getWebNode();
- return null;
- }
-
- /**
- * @return
- */
- private boolean isAnyModuleRadioSelected() {
- return appClientRadioButton.getSelection() || (connectorRadioButton != null && connectorRadioButton.getSelection()) || (ejbRadioButton != null && ejbRadioButton.getSelection()) || (webRadioButton != null && webRadioButton.getSelection());
- }
-
- /**
- * @return Returns the appClientNode.
- */
- private GenericWizardNode getAppClientNode() {
- if (appClientNode == null) {
- appClientNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- // TODO use new flexible project stuff
- return null;
- // return new
- // AppClientModuleCreationWizard(getDefaultModel().getClientModel());
- }
- };
- }
- return appClientNode;
- }
-
- /**
- * @return Returns the connectorNode.
- */
- private GenericWizardNode getConnectorNode() {
- if (connectorNode == null) {
- connectorNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
-
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor descriptor = newWizardRegistry.findWizard("org.eclipse.jst.j2ee.internal.internal.jca.ui.internal.wizard.JCAProjectWizard"); //$NON-NLS-1$
- try {
- result = descriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return connectorNode;
- }
-
- /**
- * @return Returns the ejbNode.
- */
- private GenericWizardNode getEjbNode() {
- if (ejbNode == null) {
- ejbNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
-
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor descriptor = newWizardRegistry.findWizard("org.eclipse.jst.j2ee.internal.internal.ejb.ui.internal.wizard.EJBProjectWizard"); //$NON-NLS-1$
- try {
- result = descriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return ejbNode;
- }
-
- /**
- * @return Returns the webNode.
- */
- private GenericWizardNode getWebNode() {
- if (webNode == null) {
- webNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor servletWizardDescriptor = newWizardRegistry.findWizard("org.eclipse.jst.servlet.ui.internal.wizard.WEBProjectWizard"); //$NON-NLS-1$
- try {
- result = servletWizardDescriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return webNode;
- }
-
- /**
- * @param selectedNode
- * The selectedNode to set.
- */
- private void setSelectedNode(GenericWizardNode selectedNode) {
- this.selectedNode = selectedNode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- if (!defaultModulesButton.getSelection())
- return selectedNode != null;
- return false;
- }
-
- /**
- * The <code>WizardSelectionPage</code> implementation of this
- * <code>IWizardPage</code> method returns the first page of the currently
- * selected wizard if there is one.
- */
- public IWizardPage getNextPage() {
- if (selectedNode == null)
- return null;
- IPluginContribution pluginContribution = new IPluginContribution() {
- public String getLocalId() {
- String id = null;
- if (selectedNode == appClientNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.appclientProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == ejbNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.ejb.ui.util.ejbProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == connectorNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.jcaProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == webNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.webProjectWizard"; //$NON-NLS-1$
- }
- return id;
- }
-
- public String getPluginId() {
- return "org.eclipse.jst.j2ee.internal.internal.internal.ui"; //$NON-NLS-1$
- }
- };
-
- if (!WorkbenchActivityHelper.allowUseOf(pluginContribution)) {
- return null;
- }
-
- boolean isCreated = selectedNode.isContentCreated();
- IWizard wizard = selectedNode.getWizard();
- if (wizard == null) {
- setSelectedNode(null);
- return null;
- }
- if (!isCreated) // Allow the wizard to create its pages
- wizard.addPages();
-
- return wizard.getStartingPage();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#validatePage()
- */
- protected void validatePage() {
- if (!defaultModulesButton.getSelection()) {
- setPageComplete(false);
- setErrorMessage(null);
- } else
- super.validatePage();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java
deleted file mode 100644
index a5dabbe65..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
-import org.eclipse.jem.util.emf.workbench.JavaProjectUtilities;
-import org.eclipse.jface.operation.IRunnableContext;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModel;
-import org.eclipse.jst.j2ee.internal.dialogs.TypeSearchEngine;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.SWT;
-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.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditOperationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-
-/**
- * @author jialin
- *
- * To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Generation - Code and Comments
- */
-public class NewJavaClassOptionsWizardPage extends WTPWizardPage {
-
- protected Button publicButton;
- protected Button abstractButton;
- protected Button finalButton;
- protected ListViewer interfaceViewer;
- protected Button addButton;
- protected Button removeButton;
- protected Button inheritButton;
- protected Button constructorButton;
- protected Button mainMethodButton;
-
- /**
- * @param model
- * @param pageName
- */
- public NewJavaClassOptionsWizardPage(ArtifactEditOperationDataModel model, String pageName, String pageDesc, String pageTitle) {
- super(model, pageName);
- setDescription(pageDesc);
- this.setTitle(pageTitle);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{NewJavaClassDataModel.MODIFIER_ABSTRACT, NewJavaClassDataModel.MODIFIER_FINAL};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = 300;
- composite.setLayoutData(data);
-
- createModifierControls(composite);
- createInterfaceControls(composite);
-
- // Separator label
- Label seperator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 2;
- seperator.setLayoutData(data);
-
- createStubsComposite(composite);
-
- publicButton.setFocus();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, getInfopopID());
- return composite;
- }
-
- /**
- * Create controls for the modifiers
- */
- protected void createModifierControls(Composite parent) {
- Label modifiersLabel = new Label(parent, SWT.NONE);
- modifiersLabel.setText(J2EEUIMessages.JAVA_CLASS_MODIFIERS_LABEL);
- modifiersLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- publicButton = new Button(composite, SWT.CHECK);
- publicButton.setText(J2EEUIMessages.JAVA_CLASS_PUBLIC_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(publicButton, NewJavaClassDataModel.MODIFIER_PUBLIC, null);
-
- abstractButton = new Button(composite, SWT.CHECK);
- abstractButton.setText(J2EEUIMessages.JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(abstractButton, NewJavaClassDataModel.MODIFIER_ABSTRACT, null);
-
- finalButton = new Button(composite, SWT.CHECK);
- finalButton.setText(J2EEUIMessages.JAVA_CLASS_FINAL_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(finalButton, NewJavaClassDataModel.MODIFIER_FINAL, null);
- }
-
- protected void createInterfaceControls(Composite parent) {
- Label interfaceLabel = new Label(parent, SWT.NONE);
- interfaceLabel.setText(J2EEUIMessages.JAVA_CLASS_INTERFACES_LABEL);
- interfaceLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING));
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- interfaceViewer = new ListViewer(composite);
- interfaceViewer.getList().setLayoutData(new GridData(GridData.FILL_BOTH));
- interfaceViewer.setContentProvider(getInterfaceContentProvider());
- interfaceViewer.setLabelProvider(getInterfaceLabelProvider());
- interfaceViewer.setInput(model.getProperty(NewJavaClassDataModel.INTERFACES));
-
- Composite buttonCompo = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- layout.marginHeight = 0;
- buttonCompo.setLayout(layout);
- buttonCompo.setLayoutData(new GridData(GridData.FILL_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING));
-
- addButton = new Button(buttonCompo, SWT.PUSH);
- addButton.setText(J2EEUIMessages.ADD_BUTTON_LABEL);
- addButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL));
- addButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- handleInterfaceAddButtonSelected();
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
-
- removeButton = new Button(buttonCompo, SWT.PUSH);
- removeButton.setText(J2EEUIMessages.REMOVE_BUTTON);
- removeButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL));
- removeButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- handleInterfaceRemoveButtonSelected();
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
- removeButton.setEnabled(false);
-
- interfaceViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- removeButton.setEnabled(!selection.isEmpty());
- }
- });
-
- }
-
- /**
- * Create the composite with all the stubs
- */
- protected void createStubsComposite(Composite parent) {
- Label stubLabel = new Label(parent, SWT.NONE);
- stubLabel.setText(J2EEUIMessages.JAVA_CLASS_METHOD_STUBS_LABEL);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 2;
- stubLabel.setLayoutData(data);
-
- Composite buttonCompo = new Composite(parent, SWT.NULL);
- buttonCompo.setLayout(new GridLayout());
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = 2;
- data.horizontalIndent = 15;
- buttonCompo.setLayoutData(data);
-
- mainMethodButton = new Button(buttonCompo, SWT.CHECK);
- mainMethodButton.setText(J2EEUIMessages.JAVA_CLASS_MAIN_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(mainMethodButton, NewJavaClassDataModel.MAIN_METHOD, null);
-
- inheritButton = new Button(buttonCompo, SWT.CHECK);
- inheritButton.setText(J2EEUIMessages.JAVA_CLASS_INHERIT_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(inheritButton, NewJavaClassDataModel.ABSTRACT_METHODS, null);
-
- constructorButton = new Button(buttonCompo, SWT.CHECK);
- constructorButton.setText(J2EEUIMessages.JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(constructorButton, NewJavaClassDataModel.CONSTRUCTOR, null);
- }
-
- /**
- * @see IStatefulWizardPage#saveWidgetValues()
- */
- // public void saveWidgetValues() {
- // // TODO: do we want to do this here or in the concrete subclasses???
- // IDialogSettings store = getDialogSettings();
- // if (store != null)
- // store.put(getUniqueKey(""), getUniqueKey("")); //$NON-NLS-1$
- // //$NON-NLS-2$
- // DialogSettingsHelper.saveButton(inheritButton,
- // getUniqueKey(idInheritedAbstractButton), store);
- // DialogSettingsHelper.saveButton(constructorButton,
- // getUniqueKey(idSuperClassConstructorsButton), store);
- // DialogSettingsHelper.saveButton(publicButton,
- // getUniqueKey(idPublicButton), store);
- // DialogSettingsHelper.saveButton(abstractButton,
- // getUniqueKey(idAbstractButton), store);
- // DialogSettingsHelper.saveButton(finalButton, getUniqueKey(idFinalButton),
- // store);
- //
- // }
- /**
- * @see IStatefulWizardPage#restoreWidgetValues()
- */
- // public void restoreWidgetValues() {
- // IDialogSettings store = super.getDialogSettings();
- // if (store != null && store.get(getUniqueKey("")) != null) { //$NON-NLS-1$
- // DialogSettingsHelper.restoreButton(inheritButton,
- // getUniqueKey(idInheritedAbstractButton), store);
- // DialogSettingsHelper.restoreButton(constructorButton,
- // getUniqueKey(idSuperClassConstructorsButton), store);
- // DialogSettingsHelper.restoreButton(publicButton,
- // getUniqueKey(idPublicButton), store);
- // DialogSettingsHelper.restoreButton(abstractButton,
- // getUniqueKey(idAbstractButton), store);
- // DialogSettingsHelper.restoreButton(finalButton,
- // getUniqueKey(idFinalButton), store);
- // }
- // }
- /**
- * Returns the Super Interface Content Provider
- */
- protected IStructuredContentProvider getInterfaceContentProvider() {
- return new IStructuredContentProvider() {
- public Object[] getElements(Object inputElement) {
- Object[] ret = new Object[0];
- if (inputElement instanceof ArrayList) {
- ret = ((ArrayList) inputElement).toArray();
- }
- return ret;
- }
- public void dispose() {
- //Do nothing
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //Default is nothing
- }
- };
- }
-
- /**
- * Returns the Super Interface Label Provider
- */
- protected ILabelProvider getInterfaceLabelProvider() {
- return new ILabelProvider() {
- public Image getImage(Object element) {
- return J2EEUIPlugin.getDefault().getImage("full/obj16/interface_obj"); //$NON-NLS-1$
- }
-
- public String getText(Object element) {
- String ret = J2EEUIMessages.EMPTY_STRING;
- if (element instanceof String)
- ret = (String) element;
- return ret;
- }
-
- public void addListener(ILabelProviderListener listener) {
- //Do nothing
- }
- public void dispose() {
- //Do nothing
- }
- public boolean isLabelProperty(Object element, String property) {
- return true;
- }
- public void removeListener(ILabelProviderListener listener) {
- //Do nothing
- }
- };
- }
-
- /**
- * Browse for a new Super Interface Class
- */
- protected void handleInterfaceAddButtonSelected() {
- IProject project = ((ArtifactEditOperationDataModel)model).getTargetProject();
- IRunnableContext context = Workbench.getInstance().getActiveWorkbenchWindow();
- IJavaProject javaProject = JavaProjectUtilities.getJavaProject(project);
- // this eliminates the non-exported classpath entries
- final IJavaSearchScope scope = TypeSearchEngine.createJavaSearchScopeForAProject(javaProject, true, true);
- TypeSelectionDialog dialog = new TypeSelectionDialog(getShell(),context,IJavaSearchConstants.INTERFACE, scope);
- dialog.setTitle(J2EEUIMessages.INTERFACE_SELECTION_DIALOG_TITLE);
- if (dialog.open() == Window.OK) {
- IType type = (IType) dialog.getFirstResult();
- String superclassFullPath = ""; //$NON-NLS-1$
- if (type != null)
- superclassFullPath = type.getFullyQualifiedName();
- interfaceViewer.add(superclassFullPath);
- }
- List valueList = Arrays.asList(interfaceViewer.getList().getItems());
- model.setProperty(NewJavaClassDataModel.INTERFACES, valueList);
- }
-
- /**
- * Remove an interface from the SuperInterface List
- */
- protected void handleInterfaceRemoveButtonSelected() {
- IStructuredSelection selection = (IStructuredSelection) interfaceViewer.getSelection();
- List items = selection.toList();
- if (!items.isEmpty()) {
- Object array[] = interfaceViewer.getList().getItems();
- List valueList = new ArrayList();
-
- for (int i = 0; i < array.length; i++) {
- valueList.add(array[i]);
- }
- for (int i=0; i<items.size(); i++) {
- valueList.remove(items.get(i));
- }
- interfaceViewer.setInput(valueList);
- model.setProperty(NewJavaClassDataModel.INTERFACES, valueList);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java
deleted file mode 100644
index 4e2b51c4e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java
+++ /dev/null
@@ -1,691 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-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.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.internal.ui.JavaPlugin;
-import org.eclipse.jdt.internal.ui.dialogs.TypeSelectionDialog;
-import org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider;
-import org.eclipse.jdt.ui.JavaElementLabelProvider;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModel;
-import org.eclipse.jst.j2ee.internal.dialogs.TypeSearchEngine;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.servertarget.ServerTargetHelper;
-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.Cursor;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-import org.eclipse.ui.dialogs.ISelectionStatusValidator;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditOperationDataModel;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-
-/**
- *
- */
-public class NewJavaClassWizardPage extends WTPWizardPage {
-
- private Text folderText;
- private Button folderButton;
- private Text packageText;
- private Button packageButton;
- protected Text classText;
- private Text superText;
- private Button superButton;
- private Combo projectNameCombo;
- private Combo componentNameCombo;
- private String moduleType;
- private boolean hasNewModuleButton;
- private AnnotationsStandaloneGroup annotationsGroup = null;
- private String projectName;
-
- /**
- * @param model
- * @param pageName
- */
- public NewJavaClassWizardPage(ArtifactEditOperationDataModel model, String pageName, String pageDesc, String pageTitle,
- String moduleType) {
- super(model, pageName);
- setDescription(pageDesc);
- this.setTitle(pageTitle);
- setPageComplete(false);
- this.moduleType = moduleType;
- this.hasNewModuleButton = false;
- this.projectName = null;
- }
-
- /**
- *
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{ArtifactEditOperationDataModel.PROJECT_NAME,
- ArtifactEditOperationDataModel.MODULE_NAME,
- NewJavaClassDataModel.SOURCE_FOLDER,
- NewJavaClassDataModel.JAVA_PACKAGE,
- NewJavaClassDataModel.CLASS_NAME,
- NewJavaClassDataModel.SUPERCLASS};
- }
-
- /**
- *
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- composite.setLayoutData(data);
-
- addProjectNameGroup(composite);
- addComponentGroup(composite);
- addFolderGroup(composite);
- addSeperator(composite, 3);
- addPackageGroup(composite);
- addClassnameGroup(composite);
- addSuperclassGroup(composite);
-
- createAnnotationsGroup(composite);
- folderText.setFocus();
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, getInfopopID());
- return composite;
- }
-
- /**
- * Add component group to composite
- */
- private void addComponentGroup(Composite composite) {
- Label componentLabel = new Label(composite, SWT.LEFT);
- componentLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULE_NAME));
- componentLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- componentNameCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- data.horizontalSpan = 1;
- componentNameCombo.setLayoutData(data);
- initializeComponentList();
- synchHelper.synchCombo(componentNameCombo, ArtifactEditOperationDataModel.MODULE_NAME, new Control[] {});
- if (!hasNewModuleButton) {
- new Label(composite, SWT.NONE);
- } else {
- Button newModuleButton = new Button(composite, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E));
- newModuleButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- newModuleButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleNewModuleButtonPressed();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
- }
-
- private void initializeComponentList() {
- List componentList = new ArrayList();
- StructureEdit moduleCore = null;
- if (projectNameCombo.getText().length() == 0)
- return;
- IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
- try {
- moduleCore = StructureEdit.getStructureEditForRead(project);
- WorkbenchComponent[] components = moduleCore.findComponentsByType(moduleType);
- for (int j = 0; j < components.length; j++) {
- if (!componentList.contains(components[j].getName()))
- componentList.add(components[j].getName());
- }
- } finally {
- if (moduleCore != null)
- moduleCore.dispose();
- }
- String[] componentNames = new String[componentList.size()];
- for (int i = 0; i < componentList.size(); i++) {
- componentNames[i] = (String) componentList.get(i);
- }
- model.setIgnorePropertyChanges(true);
- componentNameCombo.setItems(componentNames);
- model.setIgnorePropertyChanges(false);
- if (componentNames.length > 0) {
- componentNameCombo.setText(componentNames[0]);
- model.setProperty(ArtifactEditOperationDataModel.MODULE_NAME, componentNameCombo.getText());
- }
- }
-
- /**
- * Add project group
- */
- private void addProjectNameGroup(Composite parent) {
- // set up project name label
- Label projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_PROJECT) + ":"); //$NON-NLS-1$
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- data.horizontalSpan = 1;
- projectNameCombo.setLayoutData(data);
- projectNameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- initializeComponentList();
- }
- });
- synchHelper.synchCombo(projectNameCombo, ArtifactEditOperationDataModel.PROJECT_NAME, new Control[] {});
- initializeProjectList();
- new Label(parent, SWT.NONE);
- }
-
- /**
- *
- */
- private void initializeProjectList() {
- IProject[] workspaceProjects = ProjectUtilities.getAllProjects();
- List items = new ArrayList();
- for (int i = 0; i < workspaceProjects.length; i++) {
- IProject project = workspaceProjects[i];
- try {
- if (project.isAccessible() && project.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- items.add(project.getName());
- }
- } catch (CoreException ce) {
- // Ignore
- }
- }
- String[] names = new String[items.size()];
- for (int i = 0; i < items.size(); i++) {
- names[i] = (String) items.get(i);
- }
-
- projectNameCombo.setItems(names);
- try {
- IProject selectedProject = getSelectedProject();
- if (selectedProject != null && selectedProject.isAccessible()
- && selectedProject.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- projectNameCombo.setText(selectedProject.getName());
- model.setProperty(ArtifactEditOperationDataModel.PROJECT_NAME, selectedProject.getName());
- }
- } catch (CoreException ce) {
- // Ignore
- }
- if (projectName == null && names.length > 0)
- projectName = names[0];
-
- if ((projectNameCombo.getText() == null || projectNameCombo.getText().length() == 0) && projectName != null) {
- projectNameCombo.setText(projectName);
- model.setProperty(ArtifactEditOperationDataModel.PROJECT_NAME, projectName);
- }
-
- }
-
- /**
- * Add folder group to composite
- */
- private void addFolderGroup(Composite composite) {
- // folder
- Label folderLabel = new Label(composite, SWT.LEFT);
- folderLabel.setText(J2EEUIMessages.FOLDER_LABEL);
- folderLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- folderText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- folderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- synchHelper.synchText(folderText, NewJavaClassDataModel.SOURCE_FOLDER, null);
-
- folderButton = new Button(composite, SWT.PUSH);
- folderButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL);
- folderButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- folderButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleFolderButtonPressed();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
-
- /**
- * Add package group to composite
- */
- private void addPackageGroup(Composite composite) {
- // package
- Label packageLabel = new Label(composite, SWT.LEFT);
- packageLabel.setText(J2EEUIMessages.JAVA_PACKAGE_LABEL);
- packageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- packageText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- packageText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- IPackageFragment packageFragment = getSelectedPackageFragment();
- if (packageFragment != null && packageFragment.exists()) {
- projectNameCombo.setText(packageFragment.getElementName());
- model.setProperty(NewJavaClassDataModel.JAVA_PACKAGE, packageFragment.getElementName());
- }
-
- synchHelper.synchText(packageText, NewJavaClassDataModel.JAVA_PACKAGE, null);
-
- packageButton = new Button(composite, SWT.PUSH);
- packageButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL);
- packageButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- packageButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handlePackageButtonPressed();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
-
- /**
- * Add classname group to composite
- */
- private void addClassnameGroup(Composite composite) {
- // class name
- Label classLabel = new Label(composite, SWT.LEFT);
- classLabel.setText(J2EEUIMessages.CLASS_NAME_LABEL);
- classLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- classText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- classText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- synchHelper.synchText(classText, NewJavaClassDataModel.CLASS_NAME, null);
-
- new Label(composite, SWT.LEFT);
- }
-
- /**
- * Add seperator to composite
- */
- protected void addSeperator(Composite composite, int horSpan) {
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- // Separator label
- Label seperator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
- data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- data.horizontalSpan = horSpan;
- seperator.setLayoutData(data);
- }
-
- /**
- * Add superclass group to the composite
- */
- private void addSuperclassGroup(Composite composite) {
- // superclass
- Label superLabel = new Label(composite, SWT.LEFT);
- superLabel.setText(J2EEUIMessages.SUPERCLASS_LABEL);
- superLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- superText = new Text(composite, SWT.SINGLE | SWT.BORDER);
- superText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- synchHelper.synchText(superText, NewJavaClassDataModel.SUPERCLASS, null);
-
- superButton = new Button(composite, SWT.PUSH);
- superButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL);
- superButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- superButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleSuperButtonPressed();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- // Do nothing
- }
- });
- }
-
- /**
- * Browse for a new Destination Folder
- */
- protected void handleFolderButtonPressed() {
- ISelectionStatusValidator validator = getContainerDialogSelectionValidator();
- ViewerFilter filter = getContainerDialogViewerFilter();
- ITreeContentProvider contentProvider = new WorkbenchContentProvider();
- ILabelProvider labelProvider = new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI.getWorkbench()
- .getDecoratorManager().getLabelDecorator());
- ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), labelProvider, contentProvider);
- dialog.setValidator(validator);
- dialog.setTitle(J2EEUIMessages.CONTAINER_SELECTION_DIALOG_TITLE);
- dialog.setMessage(J2EEUIMessages.CONTAINER_SELECTION_DIALOG_DESC);
- dialog.addFilter(filter);
- IProject project = ((NewJavaClassDataModel) model).getTargetProject();
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
-
- if (project != null)
- dialog.setInitialSelection(project);
- if (dialog.open() == Window.OK) {
- Object element = dialog.getFirstResult();
- try {
- if (element instanceof IContainer) {
- IContainer container = (IContainer) element;
- folderText.setText(container.getFullPath().toString());
- // dealWithSelectedContainerResource(container);
- }
- } catch (Exception ex) {
- // Do nothing
- }
-
- }
- }
-
- private void handleNewModuleButtonPressed() {
- this.createNewComponent();
- initializeProjectList();
- initializeComponentList();
- }
-
- protected void createNewComponent() {
- }
-
- protected void handlePackageButtonPressed() {
- IPackageFragmentRoot packRoot = ((NewJavaClassDataModel) model).getJavaPackageFragmentRoot();
- if (packRoot == null)
- return;
- IJavaElement[] packages = null;
- try {
- packages = packRoot.getChildren();
- } catch (JavaModelException e) {
- // Do nothing
- }
- if (packages == null)
- packages = new IJavaElement[0];
-
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new JavaElementLabelProvider(
- JavaElementLabelProvider.SHOW_DEFAULT));
- dialog.setTitle(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_TITLE);
- dialog.setMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_DESC);
- dialog.setEmptyListMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_MSG_NONE);
- dialog.setElements(packages);
- if (dialog.open() == Window.OK) {
- IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
- if (fragment != null) {
- packageText.setText(fragment.getElementName());
- } else {
- packageText.setText(J2EEUIMessages.EMPTY_STRING);
- }
- }
- }
-
- protected void handleSuperButtonPressed() {
- getControl().setCursor(new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT));
- IPackageFragmentRoot packRoot = ((NewJavaClassDataModel) model).getJavaPackageFragmentRoot();
- if (packRoot == null)
- return;
-
- // this eliminates the non-exported classpath entries
- final IJavaSearchScope scope = TypeSearchEngine.createJavaSearchScopeForAProject(packRoot.getJavaProject(), true, true);
-
- // This includes all entries on the classpath. This behavior is
- // identical
- // to the Super Class Browse Button on the Create new Java Class Wizard
- // final IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new
- // IJavaElement[] {root.getJavaProject()} );
- TypeSelectionDialog dialog = new TypeSelectionDialog(getShell(), getWizard().getContainer(), IJavaSearchConstants.CLASS, scope);
- dialog.setTitle(J2EEUIMessages.SUPERCLASS_SELECTION_DIALOG_TITLE);
- dialog.setMessage(J2EEUIMessages.SUPERCLASS_SELECTION_DIALOG_DESC);
-
- if (dialog.open() == Window.OK) {
- IType type = (IType) dialog.getFirstResult();
- String superclassFullPath = J2EEUIMessages.EMPTY_STRING;
- if (type != null) {
- superclassFullPath = type.getFullyQualifiedName();
- }
- superText.setText(superclassFullPath);
- getControl().setCursor(null);
- return;
- }
- getControl().setCursor(null);
- }
-
- /**
- * Returns a new instance of the Selection validator for the Container
- * Selection Dialog This method can be extended by subclasses, as it does
- * some basic validation.
- */
- protected ISelectionStatusValidator getContainerDialogSelectionValidator() {
- return new ISelectionStatusValidator() {
- public IStatus validate(Object[] selection) {
- if (selection != null && selection[0] != null && !(selection[0] instanceof IProject))
- return WTPCommonPlugin.OK_STATUS;
- return WTPCommonPlugin.createErrorStatus(J2EEUIMessages.CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG);
- }
- };
- }
-
- /**
- * Returns a new instance of the Selection Listner for the Container
- * Selection Dialog
- */
- protected ViewerFilter getContainerDialogViewerFilter() {
- return new ViewerFilter() {
- public boolean select(Viewer viewer, Object parent, Object element) {
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- return ServerTargetHelper.hasJavaNature(project)
- && project.getName().equals(model.getProperty(ArtifactEditOperationDataModel.PROJECT_NAME));
- } else if (element instanceof IFolder) {
- IFolder folder = (IFolder) element;
- // only show source folders
- ArtifactEditOperationDataModel dataModel = ((ArtifactEditOperationDataModel) model);
- StructureEdit moduleCore = null;
- try {
- moduleCore = StructureEdit.getStructureEditForRead(dataModel.getTargetProject());
- ComponentResource[] sourceContainers = moduleCore.getSourceContainers(dataModel.getWorkbenchModule());
- // TODO this api does not work yet
- if (sourceContainers == null)
- return true;
- for (int i = 0; i < sourceContainers.length; i++) {
- if (sourceContainers[i].getSourcePath().toString().equals(folder.getFullPath().toString()))
- return true;
- }
- } finally {
- if (moduleCore != null)
- moduleCore.dispose();
- }
- }
- return false;
- }
- };
- }
-
- /**
- * Create annotations group and set default enablement
- */
- private void createAnnotationsGroup(Composite parent) {
- annotationsGroup = new AnnotationsStandaloneGroup(parent, model, IModuleConstants.JST_EJB_MODULE.equals(moduleType),
- IModuleConstants.JST_WEB_MODULE.equals(moduleType));
- IProject project = null;
- project = ((NewJavaClassDataModel) model).getTargetProject();
- annotationsGroup.setEnablement(project);
- // annotationsGroup.setUseAnnotations(true);
- }
-
- /**
- * @return
- */
- private IProject getSelectedProject() {
- IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- // StructuredSelection stucturedSelection = (StructuredSelection)
- // selection;
- IJavaElement element = getInitialJavaElement(selection);
- if (element != null && element.getJavaProject() != null)
- return (IProject) element.getJavaProject().getProject();
- return null;
- }
-
- /**
- * @return
- */
- private IPackageFragment getSelectedPackageFragment() {
- IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- // StructuredSelection stucturedSelection = (StructuredSelection)
- // selection;
- IJavaElement element = getInitialJavaElement(selection);
- if (element != null) {
- if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT)
- return (IPackageFragment) element;
- else if (element.getElementType() == IJavaElement.TYPE) {
- return ((IType) element).getPackageFragment();
- }
- }
- return null;
- }
-
- /**
- * Utility method to inspect a selection to find a Java element.
- *
- * @param selection
- * the selection to be inspected
- * @return a Java element to be used as the initial selection, or
- * <code>null</code>, if no Java element exists in the given
- * selection
- */
- protected IJavaElement getInitialJavaElement(ISelection selection) {
- IJavaElement jelem = null;
- if (selection != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
- Object selectedElement = ((IStructuredSelection) selection).getFirstElement();
- if (selectedElement instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) selectedElement;
-
- jelem = (IJavaElement) adaptable.getAdapter(IJavaElement.class);
- if (jelem == null) {
- IResource resource = (IResource) adaptable.getAdapter(IResource.class);
- if (resource != null && resource.getType() != IResource.ROOT) {
- while (jelem == null && resource.getType() != IResource.PROJECT) {
- resource = resource.getParent();
- jelem = (IJavaElement) resource.getAdapter(IJavaElement.class);
- }
- if (jelem == null) {
- jelem = JavaCore.create(resource); // java project
- }
- }
- }
- }
- }
- if (jelem == null) {
- IWorkbenchPart part = JavaPlugin.getActivePage().getActivePart();
- if (part instanceof ContentOutline) {
- part = JavaPlugin.getActivePage().getActiveEditor();
- }
-
- if (part instanceof IViewPartInputProvider) {
- Object elem = ((IViewPartInputProvider) part).getViewPartInput();
- if (elem instanceof IJavaElement) {
- jelem = (IJavaElement) elem;
- }
- }
- }
-
- if (jelem == null || jelem.getElementType() == IJavaElement.JAVA_MODEL) {
- try {
- IJavaProject[] projects = JavaCore.create(getWorkspaceRoot()).getJavaProjects();
- if (projects.length == 1) {
- jelem = projects[0];
- }
- } catch (JavaModelException e) {
- JavaPlugin.log(e);
- }
- }
- return jelem;
- }
-
- protected IWorkspaceRoot getWorkspaceRoot() {
- return ResourcesPlugin.getWorkspace().getRoot();
- }
-
- private IWorkbenchPage internalGetActivePage() {
- IWorkbenchWindow window = J2EEUIPlugin.getActiveWorkbenchWindow();
- if (window == null)
- return null;
- return J2EEUIPlugin.getActiveWorkbenchWindow().getActivePage();
- }
-
- public void setHasNewModuleButton(boolean hasNewModuleButton) {
- this.hasNewModuleButton = hasNewModuleButton;
- }
-
- public void setProjectName(String projectName) {
- this.projectName = projectName;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleDataModelGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleDataModelGroup.java
deleted file mode 100644
index 51a87420a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleDataModelGroup.java
+++ /dev/null
@@ -1,262 +0,0 @@
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IFlexibleJavaProjectCreationDataModelProperties;
-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.Combo;
-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.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class NewModuleDataModelGroup implements IFlexibleJavaProjectCreationDataModelProperties{
-
- private IDataModel model;
- protected Combo projectNameCombo = null;
- protected Text moduleNameText = null;
- protected Button newButton = null;
- protected Text serverTargetText;
- private DataModelSynchHelper synchHelper;
- private Composite parentComposite;
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- private static final String PROJECT_NAME = J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_PROJECT)+ ":"; //$NON-NLS-1$
- private static final String NEW_LABEL = J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E); //$NON-NLS-1$
- private static final String MODULE_NAME = J2EEUIMessages.getResourceString(J2EEUIMessages.MODULE_NAME); //$NON-NLS-1$
-
- /**
- * @param parent
- * @param style
- */
- public NewModuleDataModelGroup(Composite parent, int style, IDataModel model) {
- this.model = model;
- this.parentComposite = parent;
- synchHelper = new DataModelSynchHelper(model);
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- createProjectNameGroup(parent);
- projectNameCombo.setFocus();
- initializeProjectList();
- createServerTargetComposite(parent);
- addSeperator(parent,3);
- createModuleGroup(parent);
- }
-
- /**
- *
- *
- */
- public void initializeProjectList() {
- IProject[] workspaceProjects = ProjectUtilities.getAllProjects();
- List items = new ArrayList();
- for (int i=0; i<workspaceProjects.length; i++) {
- IProject project = workspaceProjects[i];
- try {
- if (project.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- items.add(project.getName());
- }
- } catch (CoreException ce) {
- //Ignore
- }
- }
- String[] names = new String[items.size()];
- for (int i=0; i<items.size(); i++) {
- names[i]= (String) items.get(i);
- }
-// model.setIgnorePropertyChanges(true);
- projectNameCombo.setItems(names);
-// model.setIgnorePropertyChanges(false);
-
- if (!model.isPropertySet(IComponentCreationDataModelProperties.PROJECT_NAME)
- || model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME).length()==0) {
- IProject selectedProject = getSelectedProject();
- if (selectedProject!=null) {
- projectNameCombo.setText(selectedProject.getName());
- model.setProperty(IComponentCreationDataModelProperties.PROJECT_NAME,
- selectedProject.getName());
- }
- else if (names.length>0) {
- projectNameCombo.setText(names[0]);
- model.setProperty(IComponentCreationDataModelProperties.PROJECT_NAME, names[0]);
- }
- } else {
- projectNameCombo.add(model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- projectNameCombo.setText(model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- }
- }
-
- /**
- *
- */
- private void createProjectNameGroup(Composite parent) {
- // set up project name label
- Label projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(PROJECT_NAME);
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- projectNameCombo.setLayoutData(data);
- projectNameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- });
- newButton = new Button(parent, SWT.NONE);
- newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newButton.setText(NEW_LABEL);
- newButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleNewProjectSelected();
- }
- });
- synchHelper.synchCombo(projectNameCombo,
- IComponentCreationDataModelProperties.PROJECT_NAME,
- new Control[]{projectNameLabel});
- }
-
- /**
- * @return
- */
- private IProject getSelectedProject() {
- IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- StructuredSelection stucturedSelection = (StructuredSelection) selection;
- Object obj = stucturedSelection.getFirstElement();
- if (obj instanceof IProject)
- return (IProject) obj;
- return null;
- }
-
- /**
- *
- *
- */
- private void handleNewProjectSelected() {
-// IDataModel flexibleJavaModel = DataModelFactory.createDataModel(new FlexibleJavaProjectCreationDataModelProvider());
-// IDataModel javaProjModel = DataModelFactory.createDataModel(new JavaProjectCreationDataModelProvider());
-// IDataModel serverTargetModel = DataModelFactory.createDataModel(new J2EEProjectServerTargetDataModelProvider());
-// flexibleJavaModel.addNestedModel(NESTED_MODEL_PROJECT_CREATION, javaProjModel);
-// flexibleJavaModel.addNestedModel(NESTED_MODEL_SERVER_TARGET, serverTargetModel);
-//// FlexibleJavaProjectCreationDataModel projModel = new FlexibleJavaProjectCreationDataModel();
-// / IDataModel newProjectWizard = new FlexibleProjectCreationDataModelWizard(flexibleJavaModel);
-// WizardDialog dialog = new WizardDialog(parentComposite.getShell(), newProjectWizard);
-// if (Window.OK == dialog.open()) {
-// String newProjectName = javaProjModel.getStringProperty(IFlexibleProjectCreationDataModelProperties.PROJECT_NAME);
-// projectNameCombo.add(newProjectName);
-// projectNameCombo.setText(newProjectName);
-// IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
-// IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
-// if (runtime != null)
-// serverTargetText.setText(runtime.getName());
-// }
- }
-
- /**
- *
- * @param parent
- */
- private void createModuleGroup(Composite parent) {
- GridData data = new GridData();
- // Add the module name label
- Label moduleNameLabel = new Label(parent, SWT.NONE);
- moduleNameLabel.setText(MODULE_NAME);
- // Add the module name entry field
- moduleNameText = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- moduleNameText.setLayoutData(data);
- synchHelper.synchText(moduleNameText,
- IComponentCreationDataModelProperties.COMPONENT_NAME,
- new Control[] {});
- new Label(parent,SWT.NONE);
- }
-
- /**
- *
- *
- */
- public void dispose() {
- if (synchHelper != null) {
- if (model != null)
- model.removeListener(synchHelper);
- synchHelper.dispose();
- }
- model = null;
- }
-
- /**
- *
- * @return
- */
- public String getProjectName() {
- return projectNameCombo.getText();
- }
-
- /**
- *
- * @param parent
- * @param hSpan
- */
- public void addSeperator(Composite parent, int hSpan) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hSpan;
- separator.setLayoutData(gd);
- }
-
- /**
- *
- * @param parent
- */
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetText = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetText.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- new Label(parent, SWT.NONE);
- String projectName = projectNameCombo.getText();
- if (projectName!=null && projectName.length()!=0) {
- IProject project = ProjectUtilities.getProject(projectName);
- if (project !=null) {
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroup.java
deleted file mode 100644
index d6c9b44d7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroup.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 3, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-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.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- *
- */
-public class NewModuleGroup implements IJ2EEComponentCreationDataModelProperties{
-
- private IDataModel model;
- protected Text moduleNameText = null;
- protected Button newButton = null;
- protected Text serverTargetText;
- private DataModelSynchHelper synchHelper;
- private Composite parentComposite;
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- private static final String NEW_LABEL_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E); //$NON-NLS-1$
- private static final String MODULE_NAME_UI = J2EEUIMessages.getResourceString(J2EEUIMessages.MODULE_NAME); //$NON-NLS-1$
-
- /**
- * @param parent
- * @param style
- */
- public NewModuleGroup(Composite parent, int style, IDataModel model, DataModelSynchHelper syncHelper) {
- this.model = model;
- this.parentComposite = parent;
- synchHelper = syncHelper;
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- //createProjectNameGroup(parent);
- //initializeProjectList();
- createModuleGroup(parent);
- //addSeperator(parent,3);
- //createServerTargetComposite(parent);
- }
-
- /**
- *
- *
- */
-// public void initializeProjectList() {
-// IProject[] workspaceProjects = ProjectUtilities.getAllProjects();
-// List items = new ArrayList();
-// for (int i=0; i<workspaceProjects.length; i++) {
-// IProject project = workspaceProjects[i];
-// try {
-// if (project.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
-// items.add(project.getName());
-// }
-// } catch (CoreException ce) {
-// //Ignore
-// }
-// }
-// String[] names = new String[items.size()];
-// for (int i=0; i<items.size(); i++) {
-// names[i]= (String) items.get(i);
-// }
-// //model.IgnorePropertyChanges(true);
-// projectNameCombo.setItems(names);
-// //model.setIgnorePropertyChanges(false);
-//
-// if (!model.isPropertySet(PROJECT_NAME) || model.getStringProperty(PROJECT_NAME).length()==0) {
-// IProject selectedProject = getSelectedProject();
-// if (selectedProject!=null) {
-// projectNameCombo.setText(selectedProject.getName());
-// model.setProperty(PROJECT_NAME,selectedProject.getName());
-// }
-// else if (names.length>0) {
-// projectNameCombo.setText(names[0]);
-// model.setProperty(PROJECT_NAME,names[0]);
-// }
-// } else {
-// projectNameCombo.add(model.getStringProperty(PROJECT_NAME));
-// projectNameCombo.setText(model.getStringProperty(PROJECT_NAME));
-// }
-// }
-
- /**
- *
- */
-// private void createProjectNameGroup(Composite parent) {
-// // set up project name label
-// Label projectNameLabel = new Label(parent, SWT.NONE);
-// projectNameLabel.setText(PROJECT_NAME_UI);
-// GridData data = new GridData();
-// projectNameLabel.setLayoutData(data);
-// // set up project name entry field
-// projectNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
-// data = new GridData(GridData.FILL_HORIZONTAL);
-// data.widthHint = SIZING_TEXT_FIELD_WIDTH;
-// projectNameCombo.setLayoutData(data);
-// projectNameCombo.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
-// IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
-// if (runtime != null)
-// serverTargetText.setText(runtime.getName());
-// }
-// });
-// newButton = new Button(parent, SWT.NONE);
-// newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// newButton.setText(NEW_LABEL_UI);
-// newButton.addSelectionListener(new SelectionAdapter() {
-// public void widgetSelected(SelectionEvent e) {
-// handleNewProjectSelected();
-// }
-// });
-// synchHelper.synchCombo(projectNameCombo, PROJECT_NAME, new Control[]{projectNameLabel});
-// }
-
- /**
- * @return
- */
- private IProject getSelectedProject() {
- IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null || !(selection instanceof StructuredSelection))
- return null;
- StructuredSelection stucturedSelection = (StructuredSelection) selection;
- Object obj = stucturedSelection.getFirstElement();
- if (obj instanceof IProject)
- return (IProject) obj;
- return null;
- }
-
- /**
- *
- *
- */
-// private void handleNewProjectSelected() {
-// IDataModel projModel = DataModelFactory.createDataModel(new FlexibleJavaProjectCreationDataModelProvider());
-// FlexibleProjectCreationWizard newProjectWizard = new FlexibleProjectCreationWizard(projModel);
-// WizardDialog dialog = new WizardDialog(parentComposite.getShell(), newProjectWizard);
-// if (Window.OK == dialog.open()) {
-// String newProjectName = projModel.getStringProperty(PROJECT_NAME);
-// projectNameCombo.add(newProjectName);
-// projectNameCombo.setText(newProjectName);
-// IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
-// IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
-// if (runtime != null)
-// serverTargetText.setText(runtime.getName());
-// }
-// }
-
- /**
- *
- * @param parent
- */
- private void createModuleGroup(Composite parent) {
- GridData data = new GridData();
- // Add the module name label
- Label moduleNameLabel = new Label(parent, SWT.NONE);
- moduleNameLabel.setText(MODULE_NAME_UI);
- // Add the module name entry field
- moduleNameText = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- moduleNameText.setLayoutData(data);
- synchHelper.synchText(moduleNameText,COMPONENT_NAME,new Control[] {});
- new Label(parent,SWT.NONE);
- }
-
- /**
- *
- *
- */
- public void dispose() {
- if (synchHelper != null) {
- if (model != null)
- model.removeListener(synchHelper);
- synchHelper.dispose();
- }
- model = null;
- }
-
- /**
- *
- * @return
- */
-// public String getProjectName() {
-// return projectNameCombo.getText();
-// }
-
- /**
- *
- * @param parent
- * @param hSpan
- */
- public void addSeperator(Composite parent, int hSpan) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hSpan;
- separator.setLayoutData(gd);
- }
-
- /**
- *
- * @param parent
- */
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetText = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetText.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- new Label(parent, SWT.NONE);
- String projectName = moduleNameText.getText();
- if (projectName!=null && projectName.length()!=0) {
- IProject project = ProjectUtilities.getProject(projectName);
- if (project !=null) {
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroupEx.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroupEx.java
deleted file mode 100644
index c7bfcc41c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleGroupEx.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 3, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.FlexibleJavaProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.FlexibleProjectCreationDataModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-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.Combo;
-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.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.Workbench;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- *
- */
-public class NewModuleGroupEx {
-
- private IDataModel model;
- protected Combo projectNameCombo = null;
- protected Text moduleNameText = null;
- protected Button newButton = null;
- protected Text serverTargetText;
- private DataModelSynchHelper synchHelper;
- private Composite parentComposite;
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- private static final String PROJECT_NAME = J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_PROJECT)+ ":"; //$NON-NLS-1$
- private static final String NEW_LABEL = J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E); //$NON-NLS-1$
- private static final String MODULE_NAME = J2EEUIMessages.getResourceString(J2EEUIMessages.MODULE_NAME); //$NON-NLS-1$
-
- /**
- * @param parent
- * @param style
- */
- public NewModuleGroupEx(Composite parent, int style, IDataModel model) {
- this.model = model;
- this.parentComposite = parent;
- synchHelper = new DataModelSynchHelper(model);
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- createProjectNameGroup(parent);
- projectNameCombo.setFocus();
- initializeProjectList();
- createServerTargetComposite(parent);
- addSeperator(parent,3);
- createModuleGroup(parent);
- }
-
- /**
- *
- *
- */
- public void initializeProjectList() {
- IProject[] workspaceProjects = ProjectUtilities.getAllProjects();
- List items = new ArrayList();
- for (int i=0; i<workspaceProjects.length; i++) {
- IProject project = workspaceProjects[i];
- try {
- if (project.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- items.add(project.getName());
- }
- } catch (CoreException ce) {
- //Ignore
- }
- }
- String[] names = new String[items.size()];
- for (int i=0; i<items.size(); i++) {
- names[i]= (String) items.get(i);
- }
- //model.setIgnorePropertyChanges(true);
- projectNameCombo.setItems(names);
- //model.setIgnorePropertyChanges(false);
-
- if (!model.isPropertySet(IComponentCreationDataModelProperties.PROJECT_NAME) || model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME).length()==0) {
- IProject selectedProject = getSelectedProject();
- if (selectedProject!=null) {
- projectNameCombo.setText(selectedProject.getName());
- model.setProperty(IComponentCreationDataModelProperties.PROJECT_NAME,selectedProject.getName());
- }
- else if (names.length>0) {
- projectNameCombo.setText(names[0]);
- model.setProperty(IComponentCreationDataModelProperties.PROJECT_NAME,names[0]);
- }
- } else {
- projectNameCombo.add(model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- projectNameCombo.setText(model.getStringProperty(IComponentCreationDataModelProperties.PROJECT_NAME));
- }
- }
-
- /**
- *
- */
- private void createProjectNameGroup(Composite parent) {
- // set up project name label
- Label projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(PROJECT_NAME);
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- projectNameCombo.setLayoutData(data);
- projectNameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- });
- newButton = new Button(parent, SWT.NONE);
- newButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newButton.setText(NEW_LABEL);
- newButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleNewProjectSelected();
- }
- });
- synchHelper.synchCombo(projectNameCombo, IComponentCreationDataModelProperties.PROJECT_NAME, new Control[]{projectNameLabel});
- }
-
- /**
- * @return
- */
- private IProject getSelectedProject() {
- IWorkbenchWindow window = Workbench.getInstance().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- StructuredSelection stucturedSelection = (StructuredSelection) selection;
- Object obj = stucturedSelection.getFirstElement();
- if (obj instanceof IProject)
- return (IProject) obj;
- return null;
- }
-
- /**
- *
- *
- */
- private void handleNewProjectSelected() {
- IDataModel projModel = DataModelFactory.createDataModel(new FlexibleJavaProjectCreationDataModelProvider());
- FlexibleProjectCreationWizard newProjectWizard = new FlexibleProjectCreationWizard(projModel);
- WizardDialog dialog = new WizardDialog(parentComposite.getShell(), newProjectWizard);
- if (Window.OK == dialog.open()) {
- String newProjectName = projModel.getStringProperty(FlexibleProjectCreationDataModel.PROJECT_NAME);
- projectNameCombo.add(newProjectName);
- projectNameCombo.setText(newProjectName);
- IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- }
-
- /**
- *
- * @param parent
- */
- private void createModuleGroup(Composite parent) {
- GridData data = new GridData();
- // Add the module name label
- Label moduleNameLabel = new Label(parent, SWT.NONE);
- moduleNameLabel.setText(MODULE_NAME);
- // Add the module name entry field
- moduleNameText = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- moduleNameText.setLayoutData(data);
- synchHelper.synchText(moduleNameText,IComponentCreationDataModelProperties.COMPONENT_NAME,new Control[] {});
- new Label(parent,SWT.NONE);
- }
-
- /**
- *
- *
- */
- public void dispose() {
- if (synchHelper != null) {
- if (model != null)
- model.removeListener(synchHelper);
- synchHelper.dispose();
- }
- model = null;
- }
-
- /**
- *
- * @return
- */
- public String getProjectName() {
- return projectNameCombo.getText();
- }
-
- /**
- *
- * @param parent
- * @param hSpan
- */
- public void addSeperator(Composite parent, int hSpan) {
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = hSpan;
- separator.setLayoutData(gd);
- }
-
- /**
- *
- * @param parent
- */
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- serverTargetText = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- serverTargetText.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- new Label(parent, SWT.NONE);
- String projectName = projectNameCombo.getText();
- if (projectName!=null && projectName.length()!=0) {
- IProject project = ProjectUtilities.getProject(projectName);
- if (project !=null) {
- IRuntime runtime = ServerCore.getProjectProperties(project).getRuntimeTarget();
- if (runtime != null)
- serverTargetText.setText(runtime.getName());
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleProjectSelectionPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleProjectSelectionPage.java
deleted file mode 100644
index 9e699623b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewModuleProjectSelectionPage.java
+++ /dev/null
@@ -1,505 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 13, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.application.internal.operations.DefaultModuleProjectCreationDataModel;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.moduleextension.EarModuleManager;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IPluginContribution;
-import org.eclipse.ui.activities.WorkbenchActivityHelper;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.wizards.IWizardDescriptor;
-import org.eclipse.ui.wizards.IWizardRegistry;
-import org.eclipse.wst.common.frameworks.internal.ui.GenericWizardNode;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPWizardPage;
-
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class NewModuleProjectSelectionPage extends WTPWizardPage {
- private Button defaultModulesButton;
- private Composite defaultModulesComposite;
- private Composite newModulesComposite;
- private Button appClientRadioButton;
- private Button ejbRadioButton;
- private Button webRadioButton;
- private Button connectorRadioButton;
- private GenericWizardNode appClientNode;
- private GenericWizardNode ejbNode;
- private GenericWizardNode webNode;
- private GenericWizardNode connectorNode;
- private GenericWizardNode selectedNode;
- private StackLayout stackLayout;
-
- /**
- * @param model
- * @param pageName
- */
- protected NewModuleProjectSelectionPage(DefaultModuleProjectCreationDataModel model, String pageName) {
- super(model, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_MOD_SEL_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_MOD_SEL_PG_DESC));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#getValidationPropertyNames()
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{DefaultModuleProjectCreationDataModel.CREATE_APPCLIENT, DefaultModuleProjectCreationDataModel.APPCLIENT_PROJECT_NAME, DefaultModuleProjectCreationDataModel.CREATE_CONNECTOR, DefaultModuleProjectCreationDataModel.CONNECTOR_PROJECT_NAME, DefaultModuleProjectCreationDataModel.CREATE_EJB, DefaultModuleProjectCreationDataModel.EJB_PROJECT_NAME, DefaultModuleProjectCreationDataModel.CREATE_WEB, DefaultModuleProjectCreationDataModel.WEB_PROJECT_NAME, DefaultModuleProjectCreationDataModel.MODULE_NAME_COLLISIONS_VALIDATION, DefaultModuleProjectCreationDataModel.ENABLED};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- setInfopopID(IJ2EEUIContextIds.EAR_NEW_MODULE_PROJECTS_PAGE);
- createDefaultCheckBox(composite);
- Composite forStackComposite = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- forStackComposite.setLayout(layout);
- forStackComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- Composite stackComposite = createStackLayoutComposite(forStackComposite);
- createDefaultModulesComposite(stackComposite);
- createModuleSelectionComposite(stackComposite);
- stackLayout.topControl = defaultModulesComposite;
- setButtonEnablement();
- return composite;
- }
-
- protected Composite createStackLayoutComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- stackLayout = new StackLayout();
- composite.setLayout(stackLayout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- return composite;
- }
-
- private void createDefaultModulesComposite(Composite parent) {
- defaultModulesComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- defaultModulesComposite.setLayout(layout);
- defaultModulesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- //Default Module Controls creation
- createAppClientDefaultModuleControl();
- if (J2EEPlugin.isEJBSupportAvailable())
- createEJBDefaultModuleControl();
- createWebDefaultModuleControl();
- if (J2EEPlugin.isEJBSupportAvailable())
- createConnectorDefaultModuleControl();
- }
-
- /**
- * @param parent
- */
- private void createModuleSelectionComposite(Composite parent) {
- newModulesComposite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- newModulesComposite.setLayout(layout);
- newModulesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- appClientRadioButton = new Button(newModulesComposite, SWT.RADIO);
-
- appClientRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.appClient")); //$NON-NLS-1$
- appClientRadioButton.addListener(SWT.Selection, this);
- if (EarModuleManager.getEJBModuleExtension() != null) {
- ejbRadioButton = new Button(newModulesComposite, SWT.RADIO);
- ejbRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.ejb")); //$NON-NLS-1$
- ejbRadioButton.addListener(SWT.Selection, this);
- }
- if (EarModuleManager.getWebModuleExtension() != null) {
- webRadioButton = new Button(newModulesComposite, SWT.RADIO);
- webRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.web")); //$NON-NLS-1$
- webRadioButton.addListener(SWT.Selection, this);
- }
- if (EarModuleManager.getJCAModuleExtension() != null) {
- connectorRadioButton = new Button(newModulesComposite, SWT.RADIO);
- connectorRadioButton.setText(J2EEUIMessages.getResourceString("NewModuleSelectionPage.jca")); //$NON-NLS-1$
- connectorRadioButton.addListener(SWT.Selection, this);
- }
- }
-
- /**
- *
- */
- private void createConnectorDefaultModuleControl() {
- if (EarModuleManager.getJCAModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.JCA_PROJ_LBL);
- createModuleProjectControl(label, DefaultModuleProjectCreationDataModel.CREATE_CONNECTOR, DefaultModuleProjectCreationDataModel.CONNECTOR_PROJECT_NAME);
- }
- }
-
- /**
- *
- */
- private void createWebDefaultModuleControl() {
- if (EarModuleManager.getWebModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.WEB_PROJ_LBL);
- createModuleProjectControl(label, DefaultModuleProjectCreationDataModel.CREATE_WEB, DefaultModuleProjectCreationDataModel.WEB_PROJECT_NAME);
- }
- }
-
- /**
- *
- */
- private void createEJBDefaultModuleControl() {
- if (EarModuleManager.getEJBModuleExtension() != null) {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.EJB_PROJ_LBL);
- createModuleProjectControl(label, DefaultModuleProjectCreationDataModel.CREATE_EJB, DefaultModuleProjectCreationDataModel.EJB_PROJECT_NAME);
- }
- }
-
- private void createAppClientDefaultModuleControl() {
- String label = J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJ_LBL);
- createModuleProjectControl(label, DefaultModuleProjectCreationDataModel.CREATE_APPCLIENT, DefaultModuleProjectCreationDataModel.APPCLIENT_PROJECT_NAME);
- }
-
- private void createModuleProjectControl(String label, String createProperty, String projectProperty) {
- final Button checkBox = new Button(defaultModulesComposite, SWT.CHECK);
- checkBox.setSelection(true);
- checkBox.setText(label);
-
- final Text textField = new Text(defaultModulesComposite, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- textField.setLayoutData(data);
- synchHelper.synchCheckbox(checkBox, createProperty, null);
- synchHelper.synchText(textField, projectProperty, null);
- }
-
- private void createDefaultCheckBox(Composite composite) {
- Composite checkBoxComposite = new Composite(composite, SWT.NULL);
- GridLayout layout = new GridLayout();
- checkBoxComposite.setLayout(layout);
- checkBoxComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- defaultModulesButton = new Button(checkBoxComposite, SWT.CHECK);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 0;
- defaultModulesButton.setLayoutData(data);
- defaultModulesButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_MOD_SEL_PG_DEF_BTN));
- defaultModulesButton.setSelection(true);
- defaultModulesButton.addListener(SWT.Selection, this);
- synchHelper.synchCheckbox(defaultModulesButton, DefaultModuleProjectCreationDataModel.ENABLED, null);
- createControlsSeparatorLine(checkBoxComposite);
- }
-
- protected void createControlsSeparatorLine(Composite parent) {
- // add a horizontal line
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
- separator.setLayoutData(data);
- }
-
- private DefaultModuleProjectCreationDataModel getDefaultModel() {
- return (DefaultModuleProjectCreationDataModel) model;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == defaultModulesButton)
- handleDefaultModulesButtonPressed();
- else if (!defaultModulesButton.getSelection()) {
- if (evt.widget == appClientRadioButton && appClientRadioButton.getSelection())
- setSelectedNode(getAppClientNode());
- else if (evt.widget == ejbRadioButton && ejbRadioButton.getSelection())
- setSelectedNode(getEjbNode());
- else if (evt.widget == webRadioButton && webRadioButton.getSelection())
- setSelectedNode(getWebNode());
- else if (evt.widget == connectorRadioButton && connectorRadioButton.getSelection())
- setSelectedNode(getConnectorNode());
- validatePage();
- }
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleDefaultModulesButtonPressed() {
- if (defaultModulesButton.getSelection()) {
- setSelectedNode(null);
- showDefaultModulesComposite();
- } else
- showNewModulesCompsite();
- setButtonEnablement();
- validatePage();
- }
-
- private void showDefaultModulesComposite() {
- defaultModulesComposite.setVisible(true);
- newModulesComposite.setVisible(false);
- stackLayout.topControl = defaultModulesComposite;
- }
-
- /**
- * This is done based on the J2EE version. We need to disable Connectors if not j2ee 1.3 or
- * higher.
- */
- private void setButtonEnablement() {
- if (!defaultModulesButton.getSelection() && connectorRadioButton != null) {
- int version = getDefaultModel().getIntProperty(DefaultModuleProjectCreationDataModel.J2EE_VERSION);
- connectorRadioButton.setEnabled(version > J2EEVersionConstants.J2EE_1_2_ID);
- }
- }
-
- /**
- *
- */
- private void showNewModulesCompsite() {
- defaultModulesComposite.setVisible(false);
- newModulesComposite.setVisible(true);
- if (!isAnyModuleRadioSelected())
- appClientRadioButton.setSelection(true);
- setSelectedNode(getWizardNodeFromSelection());
- stackLayout.topControl = newModulesComposite;
- }
-
- /**
- * @return
- */
- private GenericWizardNode getWizardNodeFromSelection() {
- if (appClientRadioButton.getSelection())
- return getAppClientNode();
- if (connectorRadioButton != null && connectorRadioButton.getSelection())
- return getConnectorNode();
- if (ejbRadioButton != null && ejbRadioButton.getSelection())
- return getEjbNode();
- if (webRadioButton != null && webRadioButton.getSelection())
- return getWebNode();
- return null;
- }
-
- /**
- * @return
- */
- private boolean isAnyModuleRadioSelected() {
- return appClientRadioButton.getSelection() || (connectorRadioButton != null && connectorRadioButton.getSelection()) || (ejbRadioButton != null && ejbRadioButton.getSelection()) || (webRadioButton != null && webRadioButton.getSelection());
- }
-
- /**
- * @return Returns the appClientNode.
- */
- private GenericWizardNode getAppClientNode() {
- if (appClientNode == null) {
- appClientNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- //TODO use new flexible project stuff
- return null;
- //return new AppClientModuleCreationWizard(getDefaultModel().getClientModel());
- }
- };
- }
- return appClientNode;
- }
-
- /**
- * @return Returns the connectorNode.
- */
- private GenericWizardNode getConnectorNode() {
- if (connectorNode == null) {
- connectorNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
-
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor descriptor = newWizardRegistry.findWizard("org.eclipse.jst.j2ee.internal.internal.jca.ui.internal.wizard.JCAProjectWizard"); //$NON-NLS-1$
- try {
- result = descriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return connectorNode;
- }
-
- /**
- * @return Returns the ejbNode.
- */
- private GenericWizardNode getEjbNode() {
- if (ejbNode == null) {
- ejbNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
-
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor descriptor = newWizardRegistry.findWizard("org.eclipse.jst.j2ee.internal.internal.ejb.ui.internal.wizard.EJBProjectWizard"); //$NON-NLS-1$
- try {
- result = descriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return ejbNode;
- }
-
- /**
- * @return Returns the webNode.
- */
- private GenericWizardNode getWebNode() {
- if (webNode == null) {
- webNode = new GenericWizardNode() {
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.GenericWizardNode#createWizard()
- */
- protected IWizard createWizard() {
- IWizard result = null;
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor servletWizardDescriptor = newWizardRegistry.findWizard("org.eclipse.jst.servlet.ui.internal.wizard.WEBProjectWizard"); //$NON-NLS-1$
- try {
- result = servletWizardDescriptor.createWizard();
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return result;
- }
- };
- }
- return webNode;
- }
-
- /**
- * @param selectedNode
- * The selectedNode to set.
- */
- private void setSelectedNode(GenericWizardNode selectedNode) {
- this.selectedNode = selectedNode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- public boolean canFlipToNextPage() {
- if (!defaultModulesButton.getSelection())
- return selectedNode != null;
- return false;
- }
-
- /**
- * The <code>WizardSelectionPage</code> implementation of this <code>IWizardPage</code>
- * method returns the first page of the currently selected wizard if there is one.
- */
- public IWizardPage getNextPage() {
- if (selectedNode == null)
- return null;
- IPluginContribution pluginContribution = new IPluginContribution() {
- public String getLocalId() {
- String id = null;
- if (selectedNode == appClientNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.appclientProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == ejbNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.ejb.ui.util.ejbProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == connectorNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.jcaProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == webNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.webProjectWizard"; //$NON-NLS-1$
- }
- return id;
- }
-
- public String getPluginId() {
- return "org.eclipse.jst.j2ee.internal.internal.internal.ui"; //$NON-NLS-1$
- }
- };
-
- if (!WorkbenchActivityHelper.allowUseOf(pluginContribution)) {
- return null;
- }
-
- boolean isCreated = selectedNode.isContentCreated();
- IWizard wizard = selectedNode.getWizard();
- if (wizard == null) {
- setSelectedNode(null);
- return null;
- }
- if (!isCreated) // Allow the wizard to create its pages
- wizard.addPages();
-
- return wizard.getStartingPage();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#validatePage()
- */
- protected void validatePage() {
- if (!defaultModulesButton.getSelection()) {
- setPageComplete(false);
- setErrorMessage(null);
- } else
- super.validatePage();
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewProjectGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewProjectGroup.java
deleted file mode 100644
index f568b2665..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewProjectGroup.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Nov 3, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-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.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.internal.operations.ProjectCreationDataModel;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPDataModelSynchHelper;
-
-/**
- * @author DABERG
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class NewProjectGroup {
- private ProjectCreationDataModel model;
- public Text projectNameField = null;
- protected Text locationPathField = null;
- protected Button browseButton = null;
- // constants
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- // default values
- private String defProjectNameLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.NAME_LABEL); //$NON-NLS-1$
- private String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL); //$NON-NLS-1$
- private static final String defDirDialogLabel = "Directory"; //$NON-NLS-1$
-
- private WTPDataModelSynchHelper synchHelper;
-
- /**
- * @param parent
- * @param style
- */
- public NewProjectGroup(Composite parent, int style, ProjectCreationDataModel model) {
- this.model = model;
- synchHelper = new WTPDataModelSynchHelper(model);
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- createProjectNameGroup(parent);
- createProjectLocationGroup(parent);
- projectNameField.setFocus();
- }
-
- /**
- *
- */
- private void createProjectNameGroup(Composite parent) {
- // set up project name label
- Label projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(defProjectNameLabel);
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameField = new Text(parent, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- projectNameField.setLayoutData(data);
- new Label(parent, SWT.NONE); // pad
- synchHelper.synchText(projectNameField, ProjectCreationDataModel.PROJECT_NAME, new Control[]{projectNameLabel});
- }
-
- /**
- *
- */
- private void createProjectLocationGroup(Composite parent) {
- // set up location path label
- Label locationPathLabel = new Label(parent, SWT.NONE);
- locationPathLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.PROJECT_LOC_LBL));
- GridData data = new GridData();
- locationPathLabel.setLayoutData(data);
- // set up location path entry field
- locationPathField = new Text(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- locationPathField.setLayoutData(data);
- // set up browse button
- browseButton = new Button(parent, SWT.PUSH);
- browseButton.setText(defBrowseButtonLabel);
- browseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- browseButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleLocationBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
- synchHelper.synchText(locationPathField, ProjectCreationDataModel.PROJECT_LOCATION, null);
- }
-
- /**
- * Open an appropriate directory browser
- */
- protected void handleLocationBrowseButtonPressed() {
- DirectoryDialog dialog = new DirectoryDialog(locationPathField.getShell());
- dialog.setMessage(defDirDialogLabel);
- String dirName = model.getStringProperty(ProjectCreationDataModel.PROJECT_LOCATION);
- if ((dirName != null) && (dirName.length() != 0)) {
- File path = new File(dirName);
- if (path.exists()) {
- dialog.setFilterPath(dirName);
- }
- }
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- model.setProperty(ProjectCreationDataModel.PROJECT_LOCATION, selectedDirectory);
- }
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- synchHelper.dispose();
- model = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java
deleted file mode 100644
index 46ec179fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-/**
- * @author Sachin
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class PackageNameResolver extends ClassLoader {
-
- public PackageNameResolver() {
- super();
- }
-
- public String getClassName(final String classFile) {
- File file = new File(classFile);
- byte[] classbuf = new byte[(int) file.length()];
- try {
- FileInputStream instream = new FileInputStream(file);
- instream.read(classbuf);
- instream.close();
- } catch (Throwable e) {
- return null;
- }
- boolean badclassname = true;
- String classname = classFile.replace(java.io.File.separatorChar, '.');
- int endi;
- if (classname.endsWith(".class")) //$NON-NLS-1$
- endi = classname.lastIndexOf('.');
- else
- endi = classname.length();
- int i = classname.indexOf('.');
- while (i < endi && badclassname == true) {
- badclassname = false;
- try {
- defineClass(classname.substring(i + 1, endi), classbuf, 0, classbuf.length);
- } catch (java.lang.NoClassDefFoundError e) {
- String msg = e.getMessage();
- if (msg == null || msg.indexOf(' ') > 0) {
- badclassname = true;
- }
- } catch (Throwable e) {
- badclassname = true;
- }
- if (badclassname) {
- i = classname.indexOf('.', i + 1);
- if (i == -1)
- i = endi;
- }
- }
- if (badclassname)
- return null;
- return classname.substring(i + 1, endi);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneDataModelGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneDataModelGroup.java
deleted file mode 100644
index 67f04c64c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneDataModelGroup.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentCreationDataModel;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.earcreation.EarComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-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.Label;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.ComponentCreationDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-
-public class ServerEarAndStandaloneDataModelGroup {
-
- private Button newEAR;
- private Combo earCombo;
- private Label earLabel;
- private Button addToEAR;
- private IDataModel model;
- private DataModelSynchHelper synchHelper;
- private Composite parentComposite;
-
- /**
- *
- */
- public ServerEarAndStandaloneDataModelGroup(Composite parent, IDataModel model) {
- this.model = model;
- this.parentComposite = parent;
- synchHelper = new DataModelSynchHelper(model);
- buildComposites(parent);
- }
-
- /**
- *
- * @param parent
- */
- public void buildComposites(Composite parent) {
- createEarAndStandaloneComposite(parent);
- }
-
- /**
- * @param parent
- */
- protected void createEarAndStandaloneComposite(Composite parent) {
-
- if (model.getBooleanProperty(IJ2EEComponentCreationDataModelProperties.UI_SHOW_EAR_SECTION)) {
-
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- separator.setLayoutData(gd);
-
- new Label(parent, SWT.NONE); //pad
-
- // Create Add to EAR checkbox
- addToEAR = new Button(parent, SWT.CHECK);
- addToEAR.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.LINK_MODULETO_EAR_PROJECT));
- addToEAR.setSelection(true);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- addToEAR.setLayoutData(gd);
- synchHelper.synchCheckbox(addToEAR, J2EEComponentCreationDataModel.ADD_TO_EAR, null);
- addToEAR.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleAddToEarSelection();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- });
- // Create EAR Group
- earLabel = new Label(parent, SWT.NONE);
- earLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_PROJECT_FOR_MODULE_CREATION));
-
- earCombo = new Combo(parent, SWT.NONE);
- earCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- newEAR = new Button(parent, SWT.NONE);
- newEAR.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_W));
- newEAR.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newEAR.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleNewEarSelected();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
-
- });
-
- Control[] deps = new Control[]{earLabel, newEAR};
- synchHelper.synchCombo(earCombo, J2EEComponentCreationDataModel.EAR_MODULE_NAME, deps);
- }
- }
-
- /**
- *
- */
- protected void handleAddToEarSelection() {
- boolean selection = addToEAR.getSelection();
- earLabel.setEnabled(selection);
- earCombo.setEnabled(selection);
- newEAR.setEnabled(selection);
- }
-
- /**
- *
- */
- protected void handleNewEarSelected() {
- IDataModel earModel = DataModelFactory.createDataModel(new EarComponentCreationDataModelProvider());
- //earModel.setIntProperty(IJ2EEComponentCreationDataModelProperties.J2EE_VERSION, model.getIntProperty(IJ2EEComponentCreationDataModelProperties.J2EE_VERSION));
- earModel.setIntProperty(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION, model.getIntProperty(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION));
- earModel.setProperty(IComponentCreationDataModelProperties.COMPONENT_NAME, model.getProperty(IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME));
- EARComponentCreationWizard earWizard = new EARComponentCreationWizard();
- WizardDialog dialog = new WizardDialog(parentComposite.getShell(), earWizard);
- if (Window.OK == dialog.open()) {
- model.setProperty(IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME, earModel.getProperty(ComponentCreationDataModel.COMPONENT_NAME));
- }
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- model.dispose();
- synchHelper = null;
- model = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneGroup.java
deleted file mode 100644
index f0744fbea..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerEarAndStandaloneGroup.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentCreationDataModelProperties;
-import org.eclipse.jst.j2ee.internal.earcreation.EarComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-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.Label;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-
-/**
- *
- */
-public class ServerEarAndStandaloneGroup implements IJ2EEComponentCreationDataModelProperties {
-
- private Button newEAR;
- private Combo earCombo;
- private Label earLabel;
- private Button addToEAR;
- private IDataModel model;
- private DataModelSynchHelper synchHelper;
- private Composite parentComposite;
-
- /**
- *
- */
- public ServerEarAndStandaloneGroup(Composite parent, IDataModel model, DataModelSynchHelper helper) {
- this.model = model;
- this.parentComposite = parent;
- synchHelper = helper;
- buildComposites(parent);
- }
-
- /**
- *
- * @param parent
- */
- public void buildComposites(Composite parent) {
- createEarAndStandaloneComposite(parent);
- }
-
- /**
- * @param parent
- */
- protected void createEarAndStandaloneComposite(Composite parent) {
-
- if (model.getBooleanProperty(UI_SHOW_EAR_SECTION)) {
-
- Label separator = new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 3;
- separator.setLayoutData(gd);
-
- new Label(parent, SWT.NONE); //pad
-
- // Create Add to EAR checkbox
- addToEAR = new Button(parent, SWT.CHECK);
- addToEAR.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.LINK_MODULETO_EAR_PROJECT));
- addToEAR.setSelection(true);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- addToEAR.setLayoutData(gd);
- synchHelper.synchCheckbox(addToEAR, ADD_TO_EAR, null);
- addToEAR.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleAddToEarSelection();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
- });
- // Create EAR Group
- earLabel = new Label(parent, SWT.NONE);
- earLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_PROJECT_FOR_MODULE_CREATION));
-
- earCombo = new Combo(parent, SWT.NONE);
- earCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- newEAR = new Button(parent, SWT.NONE);
- newEAR.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_W));
- newEAR.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newEAR.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- handleNewEarSelected();
- }
-
- public void widgetDefaultSelected(SelectionEvent e) {
- //do nothing
- }
-
- });
-
- Control[] deps = new Control[]{earLabel, newEAR};
- synchHelper.synchCombo(earCombo, EAR_COMPONENT_NAME, deps);
- }
- }
-
- /**
- *
- */
- protected void handleAddToEarSelection() {
- boolean selection = addToEAR.getSelection();
- earLabel.setEnabled(selection);
- earCombo.setEnabled(selection);
- newEAR.setEnabled(selection);
- }
-
- /**
- *
- */
- protected void handleNewEarSelected() {
- IDataModel moduleModel = model;
- IDataModel earModel = DataModelFactory.createDataModel(new EarComponentCreationDataModelProvider());
- earModel.setIntProperty(COMPONENT_VERSION, moduleModel.getIntProperty(IJ2EEComponentCreationDataModelProperties.COMPONENT_VERSION));
- earModel.setProperty(COMPONENT_NAME, moduleModel.getProperty(IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME));
- EARComponentCreationWizard earWizard = new EARComponentCreationWizard(earModel);
- WizardDialog dialog = new WizardDialog(parentComposite.getShell(), earWizard);
- if (Window.OK == dialog.open()) {
- moduleModel.setProperty(EAR_COMPONENT_NAME, earModel.getProperty(COMPONENT_NAME));
- }
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- model.dispose();
- synchHelper = null;
- model = null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java
deleted file mode 100644
index 7cc318796..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 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
- **************************************************************************************************/
-/*
- * Created on Aug 27, 2003
- *
- * To change the template for this generated file go to Window>Preferences>Java>Code Generation>Code
- * and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.List;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.internal.ResourceManager;
-
-
-public class ServerTargetComboHelper {
- private List targets;
- public String[] items;
- public static final String defaultId = "com.ibm.etools.websphere.serverTarget.base.v51"; //$NON-NLS-1$
- public static final String defaultExpressId = "com.ibm.etools.websphere.serverTarget.express.v51"; //$NON-NLS-1$
-
- ServerTargetComboHelper(List targets, String[] items) {
- this.targets = targets;
- this.items = items;
- }
-
- public IRuntime getSelectedTarget(int itemIndex) {
- return (IRuntime) targets.get(itemIndex);
- }
-
- /**
- * @param target
- * @return
- */
- public boolean isCompatible(IRuntime target) {
- return targets.contains(target);
- }
-
- public int getDefaultServerTargetIndex() {
- IRuntime v51TargetServer = null;
- if (J2EEPlugin.isEJBSupportAvailable())
- v51TargetServer = ResourceManager.getInstance().getRuntime(defaultId);
- else
- v51TargetServer = ResourceManager.getInstance().getRuntime(defaultExpressId);
- if (v51TargetServer != null && targets.contains(v51TargetServer))
- return targets.indexOf(v51TargetServer) + 1;
- return -1;
- }
-
- public int getServerTargetIndexFromItems(IRuntime serverTarget) {
- if (items != null && items.length > 0) {
- String serverTargetLabel = serverTarget.getName() + " (" + serverTarget.getRuntimeType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- for (int i = 0; i < items.length; i++) {
- String label = items[i];
- if (label.equals(serverTargetLabel)) {
- return i;
- }
- }
- }
- return -1;
- }
-
- public List getValidTargets() {
- return targets;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetGroup.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetGroup.java
deleted file mode 100644
index 4745b42e8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetGroup.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Mar 8, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IJ2EEProjectServerTargetDataModelProperties;
-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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class ServerTargetGroup implements IJ2EEProjectServerTargetDataModelProperties{
- private IDataModel model;
- private DataModelSynchHelper synchHelper;
- private Combo targetServerCombo;
- private Button newTargetServerButton;
- public Composite parentUI;
-
- /**
- *
- */
- public ServerTargetGroup() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @param parent
- * @param style
- */
- public ServerTargetGroup(Composite parent, int style, IDataModel model, DataModelSynchHelper helper) {
- this.model = model;
- this.parentUI = parent;
- synchHelper = helper;
- buildComposites(parent);
- }
-
- /**
- * Create the controls within this composite
- */
- public void buildComposites(Composite parent) {
- createServerTargetGroup(parent);
- }
-
- /**
- * @param parent
- */
- private void createServerTargetGroup(Composite parent) {
- Label serverTargetLabel = new Label(parent, SWT.NONE);
- serverTargetLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_SERVER_LBL));
- GridData data = new GridData();
- serverTargetLabel.setLayoutData(data);
-
-
- targetServerCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- targetServerCombo.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
-
- newTargetServerButton = new Button(parent, SWT.NONE);
- newTargetServerButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newTargetServerButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_THREE_DOTS_E));
- newTargetServerButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleNewTargetServerButtonPressed();
- }
- });
- newTargetServerButton.setEnabled(true);
-
- Control[] deps = new Control[]{serverTargetLabel, newTargetServerButton};
- synchHelper.synchCombo(targetServerCombo, RUNTIME_TARGET_ID, deps);
- }
-
- /**
- *
- */
- protected void handleNewTargetServerButtonPressed() {
- FlexibleProjectCreationWizardPage.launchNewRuntimeWizard(parentUI.getShell(), model);
- }
-
- public void dispose() {
- model.removeListener(synchHelper);
- model = null;
- }
-
- /**
- * @return Returns the targetServerCombo.
- */
- public Combo getTargetServerCombo() {
- return targetServerCombo;
- }
-
- /**
- * @param targetServerCombo
- * The targetServerCombo to set.
- */
- public void setTargetServerCombo(Combo targetServerCombo) {
- this.targetServerCombo = targetServerCombo;
- }
-
- /**
- * @return Returns the newTargetServerButton.
- */
- public Button getNewTargetServerButton() {
- return newTargetServerButton;
- }
-
- /**
- * @param newTargetServerButton
- * The newTargetServerButton to set.
- */
- public void setNewTargetServerButton(Button newTargetServerButton) {
- this.newTargetServerButton = newTargetServerButton;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java
deleted file mode 100644
index 05aeaaf3f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on Aug 17, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jst.j2ee.internal.common.CommonEditResourceHandler;
-import org.eclipse.jst.j2ee.internal.ejb.project.EJBNatureRuntime;
-import org.eclipse.jst.j2ee.internal.servertarget.ServerTargetHelper;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- * @author vijayb
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class ServerTargetUIHelper {
- /**
- *
- */
- public ServerTargetUIHelper() {
- super();
- }
-
- public static String getSelectedServerTargetString(Combo serverTargetCombo) {
- if (serverTargetCombo.getSelectionIndex() != -1)
- return serverTargetCombo.getItem(serverTargetCombo.getSelectionIndex());
- return null;
- }
-
- /**
- * @return
- */
- public static int getSelectedServerTargetStringIndex(Combo serverTargetCombo) {
- return serverTargetCombo.getSelectionIndex();
- }
-
- private static void setServerTargetForProject(Shell shell, IProject project, IRuntime runtime) {
- ServerTargetHelper.cleanUpNonServerTargetClasspath(project);
- setServerTarget(shell, project, runtime, null);
- }
-
- /**
- * @param earProject
- * @param moduleProject
- * @return
- */
- public static boolean setModuleServerTargetIfNecessary(IProject earProject, IProject moduleProject, Shell shell) {
- IRuntime earRuntime = getProjectRuntime(earProject);
- if (earRuntime != null) {
- IRuntime moduleRuntime = getProjectRuntime(moduleProject);
- if (moduleRuntime == null) {
- return true;
- } else if (!earRuntime.getId().equals(moduleRuntime.getId())) {
- String dialogMessage = CommonEditResourceHandler.getString("Change_Module_Server_Target_Dialog_Message_UI_", new Object[]{earRuntime.getName(), moduleRuntime.getName()}); //$NON-NLS-1$
- String dialogTitle = CommonEditResourceHandler.getString("Change_Server_Target_Dialog_Title_UI_"); //$NON-NLS-1$
- MessageDialog dialog = new MessageDialog(shell, dialogTitle, null, dialogMessage, MessageDialog.QUESTION, new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, 0);
- dialog.open();
- if (dialog.getReturnCode() == 0) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- *
- * @param project
- * @return IRuntime return the existing Target runtime on a IProject
- */
- public static IRuntime getProjectRuntime(IProject project) {
- return ServerCore.getProjectProperties(project).getRuntimeTarget();
- }
-
- // private static String getEARJ2EELevel(IProject earProject) {
- // EARNatureRuntime nature = EARNatureRuntime.getRuntime(earProject);
- // String j2eeLevel = null;
- // int natureID = nature.getJ2EEVersion();
- // switch (natureID) {
- // case (J2EEVersionConstants.J2EE_1_2_ID) :
- // j2eeLevel = J2EEVersionConstants.VERSION_1_2_TEXT;
- // break;
- // case (J2EEVersionConstants.J2EE_1_3_ID) :
- // j2eeLevel = J2EEVersionConstants.VERSION_1_3_TEXT;
- // break;
- // case (J2EEVersionConstants.J2EE_1_4_ID) :
- // j2eeLevel = J2EEVersionConstants.VERSION_1_4_TEXT;
- // break;
- // default :
- // j2eeLevel = J2EEVersionConstants.VERSION_1_4_TEXT;
- // break;
- // }
- // return j2eeLevel;
- // }
-
- public static void setServerTarget(Shell shell, IProject project, IRuntime runtime, IProgressMonitor monitor) {
- try {
- ServerCore.getProjectProperties(project).setRuntimeTarget(runtime, monitor);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- /**
- * @param project
- */
- public static void setServerTargetForClientJarIfNecessary(Shell parentShell, IProject project, IRuntime runtime) {
- EJBNatureRuntime natureRuntime = EJBNatureRuntime.getRuntime(project);
- if (natureRuntime != null) {
- IProject ejbClientJarProject = natureRuntime.getDefinedEJBClientJARProject();
- if (ejbClientJarProject != null && ejbClientJarProject.exists()) {
- if (runtime != null) {
- setServerTargetForProject(null, ejbClientJarProject, runtime);
- }
- }
- }
- }
-
- public static ServerTargetComboHelper getValidServerTargetComboItems(String j2eeType, String selectedVersion) {
- List validServerTargets = ServerTargetHelper.getServerTargets(j2eeType, selectedVersion);
- String[] serverTargetList = null;
- if (!validServerTargets.isEmpty()) {
- int serverTargetListSize = validServerTargets.size();
- serverTargetList = new String[serverTargetListSize];
- for (int i = 0; i < validServerTargets.size(); i++) {
- IRuntime runtime = (IRuntime) validServerTargets.get(i);
- serverTargetList[i] = runtime.getName() + " (" + runtime.getRuntimeType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return new ServerTargetComboHelper(validServerTargets, serverTargetList);
- }
-
- /**
- * @param project
- */
- public static void runEarValidation(IProject project) {
- try {
- IRunnableWithProgress runnable = EARValidationHelper.createValidationRunnable(project);
- runnable.run(null);
- } catch (InterruptedException ie) {
- Logger.getLogger().logError(ie);
- } catch (InvocationTargetException ite) {
- Logger.getLogger().logError(ite);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java
deleted file mode 100644
index 7b6405255..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-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.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.internal.operations.WTPOperationDataModel;
-
-/**
- * @author jialin
- *
- * To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Generation - Code and Comments
- */
-public class StringArrayTableWizardSection extends Composite {
-
- protected class StringArrayListContentProvider implements IStructuredContentProvider {
- public boolean isDeleted(Object element) {
- return false;
- }
- public Object[] getElements(Object element) {
- if (element instanceof List) {
- return ((List) element).toArray();
- }
- return new Object[0];
- }
- public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
- //Default nothing
- }
- public void dispose() {
- //Default nothing
- }
- }
- protected class StringArrayListLabelProvider extends LabelProvider {
- public Image getImage(Object element) {
- return labelProviderImage;
- }
- public String getText(Object element) {
- String[] array = (String[]) element;
- String s = array[0];
- return s;
- }
- }
-
- protected class AddStringArrayDialog extends Dialog {
- protected String windowTitle;
- protected String[] labelsForTextField;
- protected Text[] texts;
- protected String[] stringArray;
- /**
- * CMPFieldDialog constructor comment.
- */
- public AddStringArrayDialog(Shell shell, String windowTitle, String[] labelsForTextField) {
- super(shell);
- this.windowTitle = windowTitle;
- this.labelsForTextField = labelsForTextField;
- }
- /**
- * CMPFieldDialog constructor comment.
- */
- public Control createDialogArea(Composite parent) {
-
- Composite composite = (Composite) super.createDialogArea(parent);
- getShell().setText(windowTitle);
-
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- composite.setLayoutData(data);
-
- int n = labelsForTextField.length;
- texts = new Text[n];
- for (int i = 0; i < n; i++) {
- Label label = new Label(composite, SWT.LEFT);
- label.setText(labelsForTextField[i]);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
- texts[i] = new Text(composite, SWT.SINGLE | SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 100;
- texts[i].setLayoutData(data);
- }
-
- // set focus
- texts[0].setFocus();
- return composite;
- }
-
- protected void okPressed() {
- int n = labelsForTextField.length;
- stringArray = new String[n];
- for (int i = 0; i < n; i++) {
- stringArray[i] = texts[i].getText();
- }
- super.okPressed();
- }
-
- public String[] getStringArray() {
- return stringArray;
- }
- }
-
- private TableViewer viewer;
- private Button addButton;
- private Button removeButton;
- private String title;
- private String[] labelsForText;
- private WTPOperationDataModel model;
- private String propertyName;
- private Image labelProviderImage;
-
- public StringArrayTableWizardSection(Composite parent, String title, String addButtonLabel, String removeButtonLabel, String[] labelsForText, Image labelProviderImage,
- WTPOperationDataModel model, String propertyName) {
- super(parent, SWT.NONE);
- this.title = title;
- this.labelsForText = labelsForText;
- this.labelProviderImage = labelProviderImage;
- this.model = model;
- this.propertyName = propertyName;
-
- GridLayout layout = new GridLayout(2, false);
- layout.marginHeight = 4;
- layout.marginWidth = 0;
- this.setLayout(layout);
- this.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label titleLabel = new Label(this, SWT.LEFT);
- titleLabel.setText(title);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- titleLabel.setLayoutData(data);
-
- viewer = new TableViewer(this);
- viewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
- viewer.setContentProvider(new StringArrayListContentProvider());
- viewer.setLabelProvider(new StringArrayListLabelProvider());
-
- Composite buttonCompo = new Composite(this, SWT.NULL);
- layout = new GridLayout();
- layout.marginHeight = 0;
- buttonCompo.setLayout(layout);
- buttonCompo.setLayoutData(new GridData(GridData.FILL_VERTICAL | GridData.VERTICAL_ALIGN_BEGINNING));
-
- addButton = new Button(buttonCompo, SWT.PUSH);
- addButton.setText(addButtonLabel);
- addButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL));
- addButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- handleAddButtonSelected(event);
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
-
- removeButton = new Button(buttonCompo, SWT.PUSH);
- removeButton.setText(removeButtonLabel);
- removeButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL));
- removeButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- handleRemoveButtonSelected(event);
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
- removeButton.setEnabled(false);
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- removeButton.setEnabled(!selection.isEmpty());
- }
- });
- }
-
- private void handleAddButtonSelected(SelectionEvent event) {
- AddStringArrayDialog dialog = new AddStringArrayDialog(getShell(), title, labelsForText);
- dialog.open();
- String[] stringArray = dialog.getStringArray();
- addStringArray(stringArray);
- }
-
- private void handleRemoveButtonSelected(SelectionEvent event) {
- ISelection selection = viewer.getSelection();
- if (selection.isEmpty() || !(selection instanceof IStructuredSelection))
- return;
- Object selectedObj = ((IStructuredSelection) selection).getFirstElement();
- removeStringArray(selectedObj);
- }
-
- public void addStringArray(String[] stringArray) {
- List valueList = new ArrayList();
- if (stringArray == null)
- return;
- valueList = (List) viewer.getInput();
- if (valueList == null)
- valueList = new ArrayList();
- valueList.add(stringArray);
- setInput(valueList);
- }
-
- public void removeStringArray(Object selectedStringArray) {
- List valueList = (List) viewer.getInput();
- valueList.remove(selectedStringArray);
- setInput(valueList);
- }
-
- public void setInput(List input) {
- viewer.setInput(input);
- // Create a new list to trigger property change
- List newInput = new ArrayList();
- newInput.addAll(input);
- model.setProperty(propertyName, newInput);
- }
-
- public TableViewer getTableViewer() {
- return viewer;
- }
-
- public Button getAddButton() {
- return addButton;
- }
-
- public Button getRemoveButton() {
- return removeButton;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/TableObjects.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/TableObjects.java
deleted file mode 100644
index c480d0bd4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/TableObjects.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Insert the type's description here. Creation date: (3/19/2001 5:10:14 PM)
- *
- * @author: Administrator
- */
-public class TableObjects {
- public List tableObjectsList;
-
- /**
- * EJBs constructor comment.
- */
- public TableObjects() {
- super();
- tableObjectsList = new ArrayList();
- }
-
- public List getTableObjects() {
- return tableObjectsList;
- }
-
- protected void initList() {
- if (tableObjectsList == null)
- tableObjectsList = new ArrayList();
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java
deleted file mode 100644
index 2bd0fa296..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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
- *******************************************************************************/
-/*
- * Created on May 1, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-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.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-
-
-/**
- * @author Sachin
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class WizardClassesImportMainPage extends WizardPage {
- Composite composite;
-
- protected Button importFromDir;
- protected Button importFromZip;
-
- private List dragAndDropFileNames = null;
-
- /**
- * @param pageName
- */
- public WizardClassesImportMainPage(String pageName) {
- super(pageName);
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- }
-
- public WizardClassesImportMainPage(String pageName, List fileNames) {
- super(pageName);
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- dragAndDropFileNames = fileNames;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
- Composite aComposite = new Composite(parent, SWT.NULL);
- aComposite.setLayout(new GridLayout());
- aComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
- aComposite.setSize(aComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- aComposite.setFont(parent.getFont());
- createImportTypeGroup(aComposite);
- setControl(aComposite);
- }
-
- protected void createImportTypeGroup(Composite parent) {
- Composite importTypeGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- importTypeGroup.setLayout(layout);
- importTypeGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- //importTypeGroup.setText(WorkbenchMessages.getString("WizardExportPage.options"));
- // //$NON-NLS-1$
-
- SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IWizard wiz = getWizard();
- if (((ClassesImportWizard) wiz).page1 != null) {
- ((ClassesImportWizard) wiz).page1.blankPage();
- }
- }
- };
- importFromDir = new Button(importTypeGroup, SWT.RADIO);
- importFromDir.setText(J2EEUIMessages.getResourceString("ClassesImport.fromDir")); //$NON-NLS-1$
- importFromDir.addSelectionListener(selectionListener);
-
- importFromZip = new Button(importTypeGroup, SWT.RADIO);
- importFromZip.setText(J2EEUIMessages.getResourceString("ClassesImport.fromZip")); //$NON-NLS-1$
- importFromZip.addSelectionListener(selectionListener);
-
- IWizard wiz = getWizard();
- String fileName = null;
- if (((ClassesImportWizard) wiz).fileNames != null)
- fileName = ((ClassesImportWizard) wiz).fileNames.get(0).toString();
- if (fileName != null && (fileName.endsWith(".zip") || fileName.endsWith(".jar"))) { //$NON-NLS-1$ //$NON-NLS-2$
- importFromDir.setSelection(false);
- importFromZip.setSelection(true);
- } else {
- importFromDir.setSelection(true);
- importFromZip.setSelection(false);
- }
- }
-
- protected boolean isSetImportFromDir() {
- if (importFromDir != null)
- return importFromDir.getSelection();
-
- String fileName = dragAndDropFileNames.get(0).toString();
- if (fileName != null && (fileName.endsWith(".zip") || fileName.endsWith(".jar"))) { //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- return true;
- }
-}
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java
deleted file mode 100644
index ccb063b75..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java
+++ /dev/null
@@ -1,1439 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 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.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-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.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.DirectoryDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.FileSystemElement;
-import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.eclipse.ui.internal.dialogs.DialogUtil;
-import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
-import org.eclipse.ui.internal.ide.dialogs.ResourceTreeAndListGroup;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.model.WorkbenchViewerSorter;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-
-/**
- * Page 1 of the base resource import-from-file-system Wizard
- */
-/* package */
-class WizardClassesImportPage1 extends WizardResourceImportPage implements Listener {
-
- // widgets
- protected Combo sourceNameField;
- protected Button overwriteExistingResourcesCheckbox;
- protected Button createContainerStructureButton;
- protected Button createOnlySelectedButton;
- protected Button sourceBrowseButton;
- //protected Button selectTypesButton;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- //A boolean to indicate if the user has typed anything
- private boolean entryChanged = false;
-
- // dialog store id constants
- private final static String STORE_SOURCE_NAMES_ID = "WizardFileSystemResourceImportPage1.STORE_SOURCE_NAMES_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
- //private final static String STORE_OVERWRITE_EXISTING_RESOURCES_ID =
- // "WizardFileSystemResourceImportPage1.STORE_OVERWRITE_EXISTING_RESOURCES_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
- //private final static String STORE_CREATE_CONTAINER_STRUCTURE_ID =
- // "WizardFileSystemResourceImportPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
-
- //private static final String SELECT_TYPES_TITLE = "DataTransfer.selectTypes"; //$NON-NLS-1$
- private static final String SELECT_ALL_TITLE = J2EEUIMessages.getResourceString("DataTransfer.selectAll"); //$NON-NLS-1$
- private static final String DESELECT_ALL_TITLE = J2EEUIMessages.getResourceString("DataTransfer.deselectAll"); //$NON-NLS-1$
- private static final String SELECT_SOURCE_MESSAGE = J2EEUIMessages.getResourceString("FileImport.selectSource"); //$NON-NLS-1$
- protected static final String SOURCE_EMPTY_MESSAGE = J2EEUIMessages.getResourceString("FileImport.sourceEmpty"); //$NON-NLS-1$
-
- private IPath importedClassesPath;
- //protected Button importFromDir;
- //protected Button importFromZip;
-
-
- private ZipFileStructureProvider providerCache;
- ZipFileStructureProvider currentProvider;
-
- private static final String FILE_IMPORT_MASK = "*.jar;*.zip"; //$NON-NLS-1$
-
- private List dragAndDropFileNames = null;
-
- boolean createFullStructure = false;
- private String packageBaseDirName = null;
-
- //private MinimizedFileSystemElement test = null;
-
- //private Composite dummyParent = null;
-
- //private final static int SIZING_SELECTION_WIDGET_WIDTH = 400;
- //private final static int SIZING_SELECTION_WIDGET_HEIGHT = 150;
-
- private String packageDirStruc = null;
-
- /**
- * Creates an instance of this class
- */
- protected WizardClassesImportPage1(String name, IWorkbench aWorkbench, IStructuredSelection selection) {
- super(name, selection);
- }
-
- /**
- * Creates an instance of this class
- *
- * @param aWorkbench
- * IWorkbench
- * @param selection
- * IStructuredSelection
- */
- public WizardClassesImportPage1(IWorkbench aWorkbench, IStructuredSelection selection, IPath importedClassesPath, List fileNames) {
- this("fileSystemImportPage1", aWorkbench, selection); //$NON-NLS-1$
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- this.importedClassesPath = importedClassesPath;
- if (fileNames != null && fileNames.size() != 0) {
- dragAndDropFileNames = fileNames;
- }
- }
-
- public void blankPage() {
- if (this.selectionGroup != null)
- this.selectionGroup.setRoot(null);
- if (sourceNameField != null)
- sourceNameField.setText(""); //$NON-NLS-1$
- }
-
- protected void createFileSelectionGroup(Composite parent) {
-
- //Just create with a dummy root.
- this.selectionGroup = new ResourceTreeAndListGroup(parent, new FileSystemElement("Dummy", null, true), //$NON-NLS-1$
- getFolderProvider(), new WorkbenchLabelProvider(), getFileProvider(),
- //new WorkbenchLabelProviderForClassImport(),
- new WorkbenchLabelProvider(), SWT.NONE, DialogUtil.inRegularFontMode(parent));
-
- ICheckStateListener listener = new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- updateWidgetEnablements();
- }
- };
-
- WorkbenchViewerSorter sorter = new WorkbenchViewerSorter();
- this.selectionGroup.setTreeSorter(sorter);
- this.selectionGroup.setListSorter(sorter);
- this.selectionGroup.addCheckStateListener(listener);
- }
-
- /**
- * Creates a new button with the given id.
- * <p>
- * The <code>Dialog</code> implementation of this framework method creates a standard push
- * button, registers for selection events including button presses and registers default buttons
- * with its shell. The button id is stored as the buttons client data. Note that the parent's
- * layout is assumed to be a GridLayout and the number of columns in this layout is incremented.
- * Subclasses may override.
- * </p>
- *
- * @param parent
- * the parent composite
- * @param id
- * the id of the button (see <code>IDialogConstants.*_ID</code> constants for
- * standard dialog button ids)
- * @param label
- * the label from the button
- * @param defaultButton
- * <code>true</code> if the button is to be the default button, and
- * <code>false</code> otherwise
- */
- protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
- // increment the number of columns in the button bar
- ((GridLayout) parent.getLayout()).numColumns++;
-
- Button button = new Button(parent, SWT.PUSH);
-
- GridData buttonData = new GridData(GridData.FILL_HORIZONTAL);
- button.setLayoutData(buttonData);
-
- button.setData(new Integer(id));
- button.setText(label);
-
- if (defaultButton) {
- Shell shell = parent.getShell();
- if (shell != null) {
- shell.setDefaultButton(button);
- }
- button.setFocus();
- }
- return button;
- }
-
- /**
- * Creates the buttons for selecting specific types or selecting all or none of the elements.
- *
- * @param parent
- * the parent control
- */
- protected final void createButtonsGroup(Composite parent) {
- // top level group
- Composite buttonComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
-
- layout.makeColumnsEqualWidth = true;
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- // types edit button
- // selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID,
- // SELECT_TYPES_TITLE, false);
-
- SelectionListener listener = new SelectionAdapter() {
- // public void widgetSelected(SelectionEvent e) {
- // handleTypesEditButtonPressed();
- // }
- };
- // selectTypesButton.addSelectionListener(listener);
-
- selectAllButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(true);
- }
- };
- selectAllButton.addSelectionListener(listener);
-
- deselectAllButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(false);
- }
- };
- deselectAllButton.addSelectionListener(listener);
-
- }
-
- /**
- * (non-Javadoc) Method declared on IDialogPage.
- */
- public void createControl(Composite parent) {
- //super.createControl(parent);
- initializeDialogUnits(parent);
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
- composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- composite.setFont(parent.getFont());
-
- //dummyParent = composite;
-
- createSourceGroup(composite);
-
- //createSpacer(composite);
-
- //createPlainLabel(composite,
- // WorkbenchMessages.getString("WizardImportPage.destinationLabel")); //$NON-NLS-1$
- //createDestinationGroup(composite);
-
- createOptionsGroup(composite);
-
- restoreWidgetValues();
- updateWidgetEnablements();
- setPageComplete(determinePageCompletion());
-
- setControl(composite);
-
- validateSourceGroup();
- //WorkbenchHelp.setHelp(getControl(),
- // IDataTransferHelpContextIds.FILE_SYSTEM_IMPORT_WIZARD_PAGE);
- }
-
- protected void createOptionsGroup(Composite parent) {
- Composite optionsGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- optionsGroup.setLayout(layout);
- optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
-
- createOptionsGroupButtons(optionsGroup);
-
- }
-
- /**
- * Create the import options specification widgets.
- */
- protected void createOptionsGroupButtons(Composite optionsGroup) {
-
- // overwrite... checkbox
- overwriteExistingResourcesCheckbox = new Button(optionsGroup, SWT.CHECK);
- overwriteExistingResourcesCheckbox.setText(J2EEUIMessages.getResourceString("FileImport.overwriteExisting")); //$NON-NLS-1$
- }
-
- protected boolean isSetImportFromDir() {
- ClassesImportWizard ciw = (ClassesImportWizard) getWizard();
- return ciw.mainPage.isSetImportFromDir();
- }
-
- public String getClassFileDirectory(String s) {
- int index = s.lastIndexOf(File.separatorChar);
- return s.substring(0, index + 1);
- }
-
- /**
- * Create the group for creating the root directory
- */
- protected void createRootDirectoryGroup(Composite parent) {
- Composite sourceContainerGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- sourceContainerGroup.setLayout(layout);
- sourceContainerGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
-
- new Label(sourceContainerGroup, SWT.NONE).setText(getSourceLabel());
-
- // source name entry field
- sourceNameField = new Combo(sourceContainerGroup, SWT.BORDER);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- sourceNameField.setLayoutData(data);
-
- setSourceNameFieldForDragAndDrop();
-
- sourceNameField.addListener(SWT.Modify, this);
-
- sourceNameField.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateFromSourceField();
-
- }
- });
-
- sourceNameField.addKeyListener(new KeyListener() {
- /*
- * @see KeyListener.keyPressed
- */
- public void keyPressed(KeyEvent e) {
- //If there has been a key pressed then mark as dirty
- entryChanged = true;
-
- }
-
- /*
- * @see KeyListener.keyReleased
- */
- public void keyReleased(KeyEvent e) {
- //do nothing
- }
- });
-
- sourceNameField.addFocusListener(new FocusListener() {
- /*
- * @see FocusListener.focusGained(FocusEvent)
- */
- public void focusGained(FocusEvent e) {
- //Do nothing when getting focus
- if (dragAndDropFileNames != null) {
- sourceNameField.setEnabled(false);
- }
-
- }
-
- /*
- * @see FocusListener.focusLost(FocusEvent)
- */
- public void focusLost(FocusEvent e) {
- //Clear the flag to prevent constant update
- if (entryChanged) {
-
- entryChanged = false;
- updateFromSourceField();
- }
-
- }
- });
-
- // source browse button
- sourceBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
- sourceBrowseButton.setText(J2EEUIMessages.getResourceString("DataTransfer.browse")); //$NON-NLS-1$
- sourceBrowseButton.addListener(SWT.Selection, this);
- sourceBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- if (dragAndDropFileNames != null) {
- sourceBrowseButton.setEnabled(false);
- }
-
- }
-
- private void setSourceNameFieldForDragAndDrop() {
- if (dragAndDropFileNames != null) {
- String fileName = (String) (dragAndDropFileNames.get(0));
- sourceNameField.setText(fileName);
- File f = new File(fileName);
- if (f.isFile()) {
- if (ImportUtil.getExtension(f).equals("zip") || ImportUtil.getExtension(f).equals("jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- //importFromZip.setSelection(true);
- //importFromDir.setSelection(false);
- } else if (ImportUtil.getExtension(f).equals("class")) { //$NON-NLS-1$
- sourceNameField.setText(getClassFileDirectory(fileName));
-
- //get com.ibm.abc.ClassName
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(fileName);
- if (qualifiedClassName != null) {
-
- //get com
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- String textToSet = fileName.substring(0, 1 + fileName.lastIndexOf(File.separatorChar));
- sourceNameField.setText(textToSet);
- return;
- }
- String baseDir = qualifiedClassName.substring(0, index);
-
- //get com.ibm.abc
- index = qualifiedClassName.lastIndexOf('.');
- String packageName = qualifiedClassName.substring(0, index);
- //get com/ibm/abc
- packageDirStruc = packageName.replace('.', File.separatorChar);
-
- //get C:\com
- index = fileName.indexOf(baseDir);
- //if packageDirStuc exists then set the sourceDir to com, else
- //set the directory to the parent directory of the class
- if (fileName.indexOf(packageDirStruc) != -1) {
- int baseDirLength = baseDir.length();
- String textToSet = fileName.substring(0, index + baseDirLength);
- index = packageName.indexOf('.');
- if (index == -1)
- packageBaseDirName = packageName;
- else
- packageBaseDirName = packageName.substring(0, index);
-
- f = new File(textToSet);
- if (f.getParent() != null)
- f = new File(f.getParent());
- textToSet = f.getAbsolutePath(); //want to set the root directory to
- // com's parent
- sourceNameField.setText(textToSet);
- }
- }
-
- }
- }
- }
- }
-
- /**
- * Update the receiver from the source name field.
- */
-
- private void updateFromSourceField() {
-
- setSourceName(sourceNameField.getText());
- //Update enablements when this is selected
- updateWidgetEnablements();
- }
-
- /**
- * Creates and returns a <code>FileSystemElement</code> if the specified file system object
- * merits one. The criteria for this are: Also create the children.
- */
- protected MinimizedFileSystemElement createRootElement(Object fileSystemObject, IImportStructureProvider provider) {
- boolean isContainer = provider.isFolder(fileSystemObject);
- String elementLabel = provider.getLabel(fileSystemObject);
-
- // Use an empty label so that display of the element's full name
- // doesn't include a confusing label
- MinimizedFileSystemElement dummyParent = new MinimizedFileSystemElement("", null, true); //$NON-NLS-1$
- dummyParent.setPopulated();
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
-
- result.setPackageBaseDirName(packageBaseDirName);
- result.setFileSystemObject(fileSystemObject);
-
- //Get the files for the element so as to build the first level
- result.getFiles(provider);
-
- return dummyParent;
- }
-
- /**
- * Create the import source specification widgets
- */
- protected void createSourceGroup(Composite parent) {
- //createImportTypeGroup(parent);
- createRootDirectoryGroup(parent);
- createFileSelectionGroup(parent);
-
- createButtonsGroup(parent);
- }
-
- /**
- * Enable or disable the button group.
- */
- protected void enableButtonGroup(boolean enable) {
- // selectTypesButton.setEnabled(enable);
- selectAllButton.setEnabled(enable);
- deselectAllButton.setEnabled(enable);
- }
-
- /**
- * Answer a boolean indicating whether the specified source currently exists and is valid
- */
- protected boolean ensureSourceIsValid() {
- if (isSetImportFromDir()) {
- if (getSourceDirectory() != null && new File(getSourceDirectoryName()).isDirectory())
- return true;
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- return false;
- }
- ZipFile specifiedFile = getSpecifiedSourceFile();
-
- if (specifiedFile == null) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- return false;
- }
- return closeZipFile(specifiedFile);
- }
-
- /**
- * Execute the passed import operation. Answer a boolean indicating success.
- */
- protected boolean executeImportOperation(ImportOperation op) {
- initializeOperation(op);
- if (createFullStructure) {
- op.setCreateContainerStructure(true);
- } else {
- op.setCreateContainerStructure(false);
- }
-
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- displayErrorDialog(e.getTargetException());
- return false;
- }
-
- IStatus status = op.getStatus();
- if (!status.isOK()) {
- ErrorDialog.openError(getContainer().getShell(), getString("FileImport.importProblems"), //$NON-NLS-1$
- null, // no special message
- status);
- return false;
- }
-
- return true;
- }
-
- // need the following private stuff just because the DataTransferMessages class is not public!
- //private static final String RESOURCE_BUNDLE = "org.eclipse.ui.wizards.datatransfer.messages";
- // //$NON-NLS-1$
- //private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private static String getString(String key) {
- try {
- return J2EEUIMessages.getResourceString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer a boolean
- * indicating success. If false is returned then the wizard will not close.
- *
- * @return boolean
- */
- public boolean finish() {
- if (!ensureSourceIsValid())
- return false;
-
- clearProviderCache();
-
- saveWidgetValues();
-
- Iterator resourcesEnum = getSelectedResources().iterator();
- List fileSystemObjects = new ArrayList();
- while (resourcesEnum.hasNext()) {
- fileSystemObjects.add(((FileSystemElement) resourcesEnum.next()).getFileSystemObject());
- }
-
- if (fileSystemObjects.size() > 0) {
- if (getSourceDirectory() != null) {
- return importResources(fileSystemObjects);
- }
- return importResourcesFromZip(fileSystemObjects);
- }
-
- MessageDialog.openInformation(getContainer().getShell(), getString("DataTransfer.information"), //$NON-NLS-1$
- getString("FileImport.noneSelected")); //$NON-NLS-1$
-
- return false;
- }
-
- /**
- * Returns a content provider for <code>FileSystemElement</code> s that returns only files as
- * children.
- */
-
- protected ITreeContentProvider getFileProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (currentProvider != null) {
- return element.getFiles(currentProvider).getChildren(element);
- }
- return element.getFiles(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- return new Object[0];
- }
-
- public Object[] getElements(Object element) {
- Object[] superObjects = super.getElements(element);
- if (dragAndDropFileNames != null && getSourceDirectory() != null) {
- MinimizedFileSystemElement anElement = null;
- int newObjectsIndex = 0;
- for (int i = 0; i < superObjects.length; i++) {
- anElement = (MinimizedFileSystemElement) superObjects[i];
-
- File file = (File) anElement.getFileSystemObject();
-
- for (int k = 0; k < dragAndDropFileNames.size(); k++) {
- if (file.getAbsolutePath().equals(dragAndDropFileNames.get(k))) {
- newObjectsIndex++;
- }
- }
- }
- if (newObjectsIndex > 0) {
- Object[] newObjects = new Object[newObjectsIndex];
- newObjectsIndex = 0;
-
- for (int i = 0; i < superObjects.length; i++) {
- anElement = (MinimizedFileSystemElement) superObjects[i];
-
- File file = (File) anElement.getFileSystemObject();
-
- for (int k = 0; k < dragAndDropFileNames.size(); k++) {
- if (file.getAbsolutePath().equals(dragAndDropFileNames.get(k))) {
-
- newObjects[newObjectsIndex++] = anElement;
-
- }
- }
-
- }
- return newObjects;
- }
- }
- return superObjects;
- }
- };
- }
-
- /**
- * Answer the root FileSystemElement that represents the contents of the currently-specified
- * source. If this FileSystemElement is not currently defined then create and return it.
- */
- protected MinimizedFileSystemElement getFileSystemTree() {
- if (isSetImportFromDir()) {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory != null) {
- return selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
- }
- if (sourceNameField.getText().length() > 0) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- }
- return null;
- }
- ZipFile sourceFile = getSpecifiedSourceFile();
- if (sourceFile == null) {
- //Clear out the provider as well
- this.currentProvider = null;
- if (sourceNameField.getText().length() > 0) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- }
- return null;
- }
-
- ZipFileStructureProvider provider = getStructureProvider(sourceFile);
- this.currentProvider = provider;
- return selectFiles(provider.getRoot(), provider);
- }
-
- /**
- * Returns a content provider for <code>FileSystemElement</code> s that returns only folders
- * as children.
- */
- protected ITreeContentProvider getFolderProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (currentProvider != null) {
- return element.getFolders(currentProvider).getChildren(element);
- }
- return element.getFolders(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (element.isPopulated())
- return getChildren(element).length > 0;
- //If we have not populated then wait until asked
- return true;
- }
- return false;
- }
-
- };
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff it exists as a
- * valid directory, or <code>null</code> otherwise.
- */
- protected File getSourceDirectory() {
- return getSourceDirectory(this.sourceNameField.getText());
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff it exists as a
- * valid directory, or <code>null</code> otherwise.
- *
- * @param path
- * a String not yet formatted for java.io.File compatability
- */
- private File getSourceDirectory(String path) {
- if (isSetImportFromDir()) {
- File sourceDirectory = new File(getSourceDirectoryName(path));
- if (!sourceDirectory.exists() || !sourceDirectory.isDirectory()) {
- return null;
- }
-
- return sourceDirectory;
- }
- return null;
- }
-
- /**
- * Answer the directory name specified as being the import source. Note that if it ends with a
- * separator then the separator is first removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName() {
- return getSourceDirectoryName(this.sourceNameField.getText());
- }
-
- /**
- * Answer the directory name specified as being the import source. Note that if it ends with a
- * separator then the separator is first removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName(String sourceName) {
- IPath result = new Path(sourceName.trim());
-
- if (result.getDevice() != null && result.segmentCount() == 0) // something like "c:"
- result = result.addTrailingSeparator();
- else
- result = result.removeTrailingSeparator();
-
- return result.toOSString();
- }
-
- /**
- * Answer the string to display as the label for the source specification field
- */
- protected String getSourceLabel() {
- return J2EEUIMessages.getResourceString("DataTransfer.directory"); //$NON-NLS-1$
- }
-
- /**
- * Handle all events and enablements for widgets in this dialog
- *
- * @param event
- * Event
- */
- public void handleEvent(Event event) {
- if (event.widget == sourceBrowseButton) {
- if (isSetImportFromDir()) {
- handleSourceBrowseButtonPressed();
- } else {
- handleSourceBrowseButtonPressedForZip();
- }
- }
-
- super.handleEvent(event);
-
- }
-
- /**
- * Open an appropriate source browser so that the user can specify a source to import from
- */
- protected void handleSourceBrowseButtonPressed() {
- String currentSource = this.sourceNameField.getText();
- DirectoryDialog dialog = new DirectoryDialog(sourceNameField.getShell(), SWT.SAVE);
- dialog.setMessage(SELECT_SOURCE_MESSAGE);
- dialog.setFilterPath(getSourceDirectoryName(currentSource));
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- //Just quit if the directory is not valid
- if ((getSourceDirectory(selectedDirectory) == null) || selectedDirectory.equals(currentSource))
- return;
- //If it is valid then proceed to populate
- setErrorMessage(null);
- setSourceName(selectedDirectory);
- selectionGroup.setFocus();
- }
- }
-
- /**
- * Open a registered type selection dialog and note the selections in the receivers
- * types-to-export field., Added here so that inner classes can have access
- */
- protected void handleTypesEditButtonPressed() {
-
- super.handleTypesEditButtonPressed();
- }
-
- /**
- * Import the resources with extensions as specified by the user
- */
- protected boolean importResources(List fileSystemObjects) {
- Iterator i = fileSystemObjects.iterator();
- while (i.hasNext()) {
- File f = (File) i.next();
- List singleItemList = new ArrayList();
- singleItemList.add(f);
- String textToSet = getPackageName(f);
- if (textToSet != null) {
- File newSource = new File(textToSet);
- executeImportOperation(new ImportOperation(getContainerFullPath(), newSource, FileSystemStructureProvider.INSTANCE, this, singleItemList));
- } else {
- executeImportOperation(new ImportOperation(getContainerFullPath(), getSourceDirectory(), FileSystemStructureProvider.INSTANCE, this, singleItemList));
-
- }
- }
- return true;
-
- }
-
- protected String getPackageName(File f) {
- if (ImportUtil.getExtension(f).equals("class")) { //$NON-NLS-1$
- String fileName = f.getAbsolutePath();
- //get com.ibm.abc.ClassName
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(fileName);
- if (qualifiedClassName != null) {
-
- //get com
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- return fileName.substring(0, 1 + fileName.lastIndexOf(File.separatorChar));
- }
- String baseDir = qualifiedClassName.substring(0, index);
-
- //get com.ibm.abc
- index = qualifiedClassName.lastIndexOf('.');
- String packageName = qualifiedClassName.substring(0, index);
-
- //get com/ibm/abc
- packageDirStruc = packageName.replace('.', File.separatorChar);
-
- //get C:\com
- index = fileName.indexOf(baseDir);
- //if packageDirStuc exists then set the sourceDir to com, else
- //set the directory to the parent directory of the class
- if (fileName.indexOf(packageDirStruc) != -1) {
- int baseDirLength = baseDir.length();
- String textToSet = fileName.substring(0, index + baseDirLength);
- index = packageName.indexOf('.');
- if (index == -1)
- packageBaseDirName = packageName;
- else
- packageBaseDirName = packageName.substring(0, index);
-
- f = new File(textToSet);
- if (f.getParent() != null)
- f = new File(f.getParent());
- textToSet = f.getAbsolutePath(); //want to set the root directory to com's
- // parent
- //sourceNameField.setText(textToSet);
- return textToSet;
- }
- }
- }
- return null;
- }
-
- /**
- * Initializes the specified operation appropriately.
- */
- protected void initializeOperation(ImportOperation op) {
-
- /*
- * op.setCreateContainerStructure( createContainerStructureButton.getSelection());
- */
- op.setOverwriteResources(overwriteExistingResourcesCheckbox.getSelection());
- }
-
- /**
- * Returns whether the extension provided is an extension that has been specified for export by
- * the user.
- *
- * @param extension
- * the resource name
- * @return <code>true</code> if the resource name is suitable for export based upon its
- * extension
- */
- protected boolean isExportableExtension(String extension) {
- if (selectedTypes == null) // ie.- all extensions are acceptable
- return true;
-
- Iterator aenum = selectedTypes.iterator();
- while (aenum.hasNext()) {
- if (extension.equalsIgnoreCase((String) aenum.next()))
- return true;
- }
-
- return false;
- }
-
- /**
- * Repopulate the view based on the currently entered directory.
- */
- protected void resetSelection() {
-
- MinimizedFileSystemElement currentRoot = getFileSystemTree();
- this.selectionGroup.setRoot(currentRoot);
- if (dragAndDropFileNames != null) {
-
- if (dragAndDropFileNames.get(0).toString().endsWith(".zip") == false && dragAndDropFileNames.get(0).toString().endsWith(".jar") == false) { //$NON-NLS-1$ //$NON-NLS-2$
- this.selectionGroup.expandAll();
- }
-
- MinimizedFileSystemElement temp = (MinimizedFileSystemElement) currentRoot.getFolders().getChildren()[0];
-
- List dirList = pathToArray();
-
- for (int i = 0; i < dirList.size(); i++) {
- String s = (String) dirList.get(i);
- Object[] folders = temp.getFolders().getChildren();
- for (int k = 0; k < folders.length; k++) {
- if (((File) ((MinimizedFileSystemElement) folders[k]).getFileSystemObject()).getName().equals(s)) {
- temp = (MinimizedFileSystemElement) temp.getFolders().getChildren()[k];
- break;
- }
- }
-
- }
-
- if (dragAndDropFileNames.get(0).toString().endsWith(".zip") == false && dragAndDropFileNames.get(0).toString().endsWith(".jar") == false) { //$NON-NLS-1$ //$NON-NLS-2$
- this.selectionGroup.initialCheckTreeItem(temp);
- }
-
- //If can figure out how to pre-highlight dir, then use following code
- //to check dragged files only. Also need to show all files in tree.
- /*
- * String fileName = null; MinimizedFileSystemElement name = null; int numFiles =
- * temp.getFiles().getChildren().length; Object[] files = temp.getFiles().getChildren();
- * for(int i = 0; i < dragAndDropFileNames.size(); i++) { fileName = (new
- * File((String)dragAndDropFileNames.get(i))).getName(); for(int k = 0; k < numFiles;
- * k++) { if(fileName.equals(((File) ((MinimizedFileSystemElement)
- * files[0]).getFileSystemObject()).getName())) {
- * this.selectionGroup.initialCheckTreeItem(temp); break; } } }
- */
-
- //this.selectionGroup.setAllSelections(true);
- }
- }
-
- private List pathToArray() {
- String s = (String) dragAndDropFileNames.get(0);
-
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(s);
-
- int slashCounts = 0;
- if (qualifiedClassName != null) {
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- return Collections.EMPTY_LIST;
- }
- String baseDir = qualifiedClassName.substring(0, index);
- for (int i = s.indexOf(baseDir); i < s.lastIndexOf(File.separatorChar); i++) {
- if (s.charAt(i) == File.separatorChar)
- slashCounts++;
- }
- }
-
- List dirNamesArray = new ArrayList(slashCounts);
- if (s.endsWith(".zip") || s.endsWith(".jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- return dirNamesArray;
- }
- int startIndex = 0;
- int endIndex;
- for (int i = 0; i <= slashCounts; i++) {
- endIndex = qualifiedClassName.indexOf('.', startIndex);
- dirNamesArray.add(qualifiedClassName.substring(startIndex, endIndex));
- startIndex = endIndex + 1;
- }
- return dirNamesArray;
- }
-
- /**
- * Use the dialog store to restore widget values to the values that they held last time this
- * wizard was used to completion
- */
- protected void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames == null)
- return; // ie.- no values stored, so stop
-
- // set filenames history
- for (int i = 0; i < sourceNames.length; i++)
- sourceNameField.add(sourceNames[i]);
- }
- }
-
- /**
- * Since Finish was pressed, write widget values to the dialog store so that they will persist
- * into the next invocation of this wizard page
- */
- protected void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames == null)
- sourceNames = new String[0];
-
- sourceNames = addToHistory(sourceNames, getSourceDirectoryName());
- settings.put(STORE_SOURCE_NAMES_ID, sourceNames);
-
- }
- }
-
- /**
- * Invokes a file selection operation using the specified file system and structure provider. If
- * the user specifies files to be imported then this selection is cached for later retrieval and
- * is returned.
- */
- protected MinimizedFileSystemElement selectFiles(final Object rootFileSystemObject, final IImportStructureProvider structureProvider) {
-
- final MinimizedFileSystemElement[] results = new MinimizedFileSystemElement[1];
-
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- //Create the root element from the supplied file system object
- results[0] = createRootElement(rootFileSystemObject, structureProvider);
- }
- });
-
- return results[0];
- }
-
- /**
- * Set all of the selections in the selection group to value. Implemented here to provide access
- * for inner classes.
- *
- * @param value
- * boolean
- */
- protected void setAllSelections(boolean value) {
- super.setAllSelections(value);
- }
-
- /**
- * Sets the source name of the import to be the supplied path. Adds the name of the path to the
- * list of items in the source combo and selects it.
- *
- * @param path
- * the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems = this.sourceNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length; i++) {
- if (currentItems[i].equals(path))
- selectionIndex = i;
- }
- if (selectionIndex < 0) {
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- this.sourceNameField.setItems(newItems);
- selectionIndex = oldLength;
- }
- this.sourceNameField.select(selectionIndex);
-
- resetSelection();
- }
- }
-
- /**
- * Update the tree to only select those elements that match the selected types
- */
- protected void setupSelectionsBasedOnSelectedTypes() {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getContainer().getShell());
- final Map selectionMap = new Hashtable();
-
- final IElementFilter filter = new IElementFilter() {
-
- public void filterElements(Collection files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- Iterator filesList = files.iterator();
- while (filesList.hasNext()) {
- if (monitor.isCanceled())
- throw new InterruptedException();
- checkFile(filesList.next());
- }
- }
-
- public void filterElements(Object[] files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- for (int i = 0; i < files.length; i++) {
- if (monitor.isCanceled())
- throw new InterruptedException();
- checkFile(files[i]);
- }
- }
-
- private void checkFile(Object fileElement) {
- MinimizedFileSystemElement file = (MinimizedFileSystemElement) fileElement;
- if (isExportableExtension(file.getFileNameExtension())) {
- List elements = new ArrayList();
- FileSystemElement parent = file.getParent();
- if (selectionMap.containsKey(parent))
- elements = (List) selectionMap.get(parent);
- elements.add(file);
- selectionMap.put(parent, elements);
- }
- }
-
- };
-
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(final IProgressMonitor monitor) throws InterruptedException {
- monitor.beginTask("ImportPage.filterSelections", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- getSelectedResources(filter, monitor);
- }
- };
-
- try {
- dialog.run(true, true, runnable);
- } catch (InvocationTargetException exception) {
- //Couldn't start. Do nothing.
- return;
- } catch (InterruptedException exception) {
- //Got interrupted. Do nothing.
- return;
- }
- // make sure that all paint operations caused by closing the progress
- // dialog get flushed, otherwise extra pixels will remain on the screen until
- // updateSelections is completed
- getShell().update();
- // The updateSelections method accesses SWT widgets so cannot be executed
- // as part of the above progress dialog operation since the operation forks
- // a new process.
- if (selectionMap != null) {
- updateSelections(selectionMap);
- }
- }
-
- /*
- * (non-Javadoc) Method declared on IDialogPage. Set the selection up when it becomes visible.
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- resetSelection();
- if (visible)
- this.sourceNameField.setFocus();
- }
-
- /**
- * Update the selections with those in map . Implemented here to give inner class visibility
- *
- * @param map
- * Map - key tree elements, values Lists of list elements
- */
- protected void updateSelections(Map map) {
- super.updateSelections(map);
- }
-
- /**
- * Check if widgets are enabled or disabled by a change in the dialog. Provided here to give
- * access to inner classes.
- *
- * @param event
- * Event
- */
- protected void updateWidgetEnablements() {
-
- super.updateWidgetEnablements();
- }
-
- /**
- * Answer a boolean indicating whether self's source specification widgets currently all contain
- * valid values.
- */
- protected boolean validateSourceGroup() {
- if (getSourceDirectory() != null) {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory == null) {
- setMessage(SOURCE_EMPTY_MESSAGE);
- enableButtonGroup(false);
- return false;
- }
-
- if (sourceConflictsWithDestination(new Path(sourceDirectory.getPath()))) {
- setErrorMessage(getSourceConflictMessage()); //$NON-NLS-1$
- enableButtonGroup(false);
- return false;
- }
-
- enableButtonGroup(true);
- return true;
- }
- //If there is nothing being provided to the input then there is a problem
- if (this.currentProvider == null) {
- setMessage(SOURCE_EMPTY_MESSAGE);
- enableButtonGroup(false);
- return false;
- }
- enableButtonGroup(true);
- return true;
- }
-
- /**
- * Returns whether the source location conflicts with the destination resource. This will occur
- * if the source is already under the destination.
- *
- * @param sourcePath
- * the path to check
- * @return <code>true</code> if there is a conflict, <code>false</code> if not
- */
- protected boolean sourceConflictsWithDestination(IPath sourcePath) {
-
- IContainer container = getSpecifiedContainer();
- if (container == null)
- return false;
- return getSpecifiedContainer().getLocation().isPrefixOf(sourcePath);
- }
-
- protected IPath getResourcePath() {
- return importedClassesPath;
- }
-
- //-------------------------------------------------------------------------------------
-
- //makesure to call mainpage.cancel()
- public boolean cancel() {
- clearProviderCache();
- return true;
- }
-
- /**
- * Clears the cached structure provider after first finalizing it properly.
- */
- protected void clearProviderCache() {
- if (providerCache != null) {
- closeZipFile(providerCache.getZipFile());
- providerCache = null;
- }
- }
-
- /**
- * Attempts to close the passed zip file, and answers a boolean indicating success.
- */
- protected boolean closeZipFile(ZipFile file) {
- try {
- file.close();
- } catch (IOException e) {
- //displayErrorDialog(DataTransferMessages.format("ZipImport.couldNotClose", new
- // Object[] { file.getName()})); //$NON-NLS-1$
- return false;
- }
-
- return true;
- }
-
- /**
- * Answer a handle to the zip file currently specified as being the source. Return null if this
- * file does not exist or is not of valid format.
- */
-
- protected ZipFile getSpecifiedSourceFile() {
- return getSpecifiedSourceFile(sourceNameField.getText());
- }
-
- /**
- * Answer a handle to the zip file currently specified as being the source. Return null if this
- * file does not exist or is not of valid format.
- */
-
- private ZipFile getSpecifiedSourceFile(String fileName) {
- if (fileName.length() == 0)
- return null;
-
- try {
- return new ZipFile(fileName);
- } catch (ZipException e) {
- //displayErrorDialog(DataTransferMessages.getString("ZipImport.badFormat"));
- // //$NON-NLS-1$
- } catch (IOException e) {
- //displayErrorDialog(DataTransferMessages.getString("ZipImport.couldNotRead"));
- // //$NON-NLS-1$
- }
-
- sourceNameField.setFocus();
- return null;
- }
-
- /**
- * Returns a structure provider for the specified zip file.
- */
- protected ZipFileStructureProvider getStructureProvider(ZipFile targetZip) {
- if (providerCache == null)
- providerCache = new ZipFileStructureProvider(targetZip);
- else if (!providerCache.getZipFile().getName().equals(targetZip.getName())) {
- clearProviderCache(); // ie.- new value, so finalize&remove old value
- providerCache = new ZipFileStructureProvider(targetZip);
- } else if (!providerCache.getZipFile().equals(targetZip))
- closeZipFile(targetZip); // ie.- duplicate handle to same .zip
-
- return providerCache;
- }
-
- /**
- * Open a FileDialog so that the user can specify the source file to import from
- */
- protected void handleSourceBrowseButtonPressedForZip() {
- String selectedFile = queryZipFileToImport();
- if (selectedFile != null) {
- if (!selectedFile.equals(sourceNameField.getText())) {
- //Be sure it is valid before we go setting any names
- ZipFile sourceFile = getSpecifiedSourceFile(selectedFile);
- if (sourceFile != null) {
- closeZipFile(sourceFile);
- setSourceName(selectedFile);
- selectionGroup.setFocus();
- }
- }
- }
- }
-
- /**
- * Import the resources with extensions as specified by the user
- */
- protected boolean importResourcesFromZip(List fileSystemObjects) {
-
- ZipFile zipFile = getSpecifiedSourceFile();
- ZipFileStructureProvider structureProvider = getStructureProvider(zipFile);
-
- boolean result = executeImportOperation(new ImportOperation(getContainerFullPath(), structureProvider.getRoot(), structureProvider, this, fileSystemObjects));
-
- closeZipFile(zipFile);
-
- return result;
- }
-
- /**
- * Opens a file selection dialog and returns a string representing the selected file, or
- * <code>null</code> if the dialog was canceled.
- */
- protected String queryZipFileToImport() {
- FileDialog dialog = new FileDialog(sourceNameField.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[]{FILE_IMPORT_MASK});
-
- String currentSourceString = sourceNameField.getText();
- int lastSeparatorIndex = currentSourceString.lastIndexOf(File.separator);
- if (lastSeparatorIndex != -1)
- dialog.setFilterPath(currentSourceString.substring(0, lastSeparatorIndex));
-
- return dialog.open();
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/javadoc.xml b/plugins/org.eclipse.jst.j2ee.ui/javadoc.xml
deleted file mode 100644
index 633a03eb8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/javadoc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project default="javadoc">
- <target name="javadoc">
- <javadoc access="protected" author="false" classpath="../org.eclipse.jst.j2ee.web/bin;../org.eclipse.jst.common.frameworks/bin;../org.eclipse.jst.common.navigator.java/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\core.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.common.uriresolver_1.0.0\uriresolver.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.edit.ui_2.1.0\runtime\edit.ui.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.wsdl_1.0.0\wsdl.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui.editors_3.1.0\editors.jar;D:\Development\targets\wtp_target\eclipse\plugins\com.ibm.wtp.common.util_1.0.1\util.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.ecore.edit_2.1.0\runtime\ecore.edit.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.xml.uriresolver_1.0.0\xmlcatalog.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui.workbench_3.1.0\workbench.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.core.runtime.compatibility_3.0.0\compatibility.jar;D:\Development\targets\wtp_target\eclipse\plugins\com.ibm.wtp.emf.workbench_1.0.1.1\emfworkbench.jar;../org.eclipse.jst.j2ee.jca.ui/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.edit_2.1.0\runtime\edit.jar;../org.eclipse.wst.common.emfworkbench.integration/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jem.workbench_1.0.1.1\workbench.jar;../org.eclipse.wst.validation/bin;../org.eclipse.wst.web/bin;../org.eclipse.jst.ejb.ui/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jdt.core_3.1.0\jdtcore.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\osgi.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.common.ui_2.0.1\runtime\common.ui.jar;../org.eclipse.jst.common.annotations.controller/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.codegen_2.1.0\runtime\codegen.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui.ide_3.1.0\ide.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jdt.ui_3.1.0\jdt.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jem_1.0.1\javainst.jar;../org.eclipse.jst.j2ee.ejb/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\defaultAdaptor.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.swt.win32_3.1.0\ws\win32\swt.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\resolver.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.wsdl_1.0.0\jars\wsdl4j.jar;../org.eclipse.jst.j2ee.jca/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.xsd_2.1.0\runtime\xsd.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jface.text_3.1.0\jfacetext.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui.workbench.texteditor_3.1.0\texteditor.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui.views_3.1.0\views.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.core.resources_3.1.0\resources.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.common.contentmodel_1.0.0\contentmodel.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.text_3.1.0\text.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.ws.parser_1.0.0\parser.jar;../org.eclipse.jst.j2ee/bin;../org.eclipse.jst.common.annotations.core/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\eclipseAdaptor.jar;../org.eclipse.jst.j2ee.core/runtime/j2ee.jar;../org.eclipse.wst.sse.core/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.core.filebuffers_3.1.0\filebuffers.jar;../org.eclipse.wst.common.navigator.workbench/bin;../org.eclipse.wst.common.migration/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.webbrowser_1.0.0\webbrowser.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jem_1.0.1\mofjava.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.server.core_3.0.0\servercore.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.common_2.1.0\runtime\common.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.server.ui_3.0.0\serverui.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jdt.launching_3.1.0\launching.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.wsdl_1.0.0\jars\qname.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ui_3.1.0\ui.jar;../org.eclipse.wst.common.frameworks/bin;../org.eclipse.jst.j2ee.core/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.codegen.ecore_2.1.0\runtime\codegen.ecore.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.ltk.core.refactoring_3.1.0\refcore.jar;../org.eclipse.jst.servlet.ui/bin;bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.core.runtime_3.1.0\runtime.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.osgi_3.1.0\console.jar;../org.eclipse.wst.common.emf/bin;../org.eclipse.wst.common.navigator.views/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.update.configurator_3.0.0\configurator.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.ecore.xmi_2.1.0\runtime\ecore.xmi.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jface_3.1.0\jface.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.emf.ecore_2.1.0\runtime\ecore.jar;../org.eclipse.wst.common.frameworks.ui/bin;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.jst.server.core_3.0.0\sjavacore.jar;D:\Development\targets\wtp_target\eclipse\plugins\org.eclipse.wst.common.encoding_1.0.0\encodingresource.jar" destdir="D:\Development\wtp_api_docs" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="org.eclipse.jst.j2ee.jca.ui,org.eclipse.jst.servlet.ui,org.eclipse.jst.j2ee.ui,org.eclipse.jst.ejb.ui" sourcepath="j2ee_ui;../org.eclipse.jst.ejb.ui/property_files;../org.eclipse.jst.servlet.ui/property_files;property_files;../org.eclipse.jst.servlet.ui/servlet_ui;../org.eclipse.jst.ejb.ui/ejb_ui;../org.eclipse.jst.j2ee.jca.ui/property_files;../org.eclipse.jst.j2ee.jca.ui/jca_ui" splitindex="true" use="true" version="true"/>
- </target>
-</project>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/plugin.properties b/plugins/org.eclipse.jst.j2ee.ui/plugin.properties
deleted file mode 100644
index b1dab49ab..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-j2ee=J2EE
-client.jar.file_ui_=App Client JAR file
-client.export.description_ui_=Export an Application Client project into an Application Client JAR file
-ear.file_ui_=EAR file
-ear.import.description_ui_=Import an external EAR file into an Enterprise Application project
-ear.export.description_ui_=Export an Enterprise Application project into an EAR file
-ear.export.action.description_ui_=Export EAR File...
-j2ee.category_ui_=J2EE
-client.project_ui_=Application Client Project
-ear.project_ui_=Enterprise Application Project
-j2ee.actions.description_ui_=Actions for J2EE Development
-create.enterprise.application_ui_=Create an Enterprise Application
-create.client.module_ui_=Create an Application Client project
-client.export.action.label_ui_=Export Application Client JAR...
-jar.dependencies.props_ui_=Java JAR Dependencies
-ejb.export.action.description_ui_=Export EJB JAR File...
-ejb.client.jar.creation.action.description_ui_=Create EJB Client Jar
-emptyEJBGroupFilter.name=Empty EJB groups
-ejb.export.action.description_ui_=Export EJB JAR File...
-utility_jar_import_wizard=J2EE Utility Jar
-deploy_ui_=Deploy
-Import_Classes=Import Class Files...
-flexible.project_ui_=Flexible Java Project
-new.flexible.project.description_ui_=Create a flexible Java project
-ear_component_ui_=J2EE EAR Application Project
-new.ear.component.description_ui_=Create a J2EE EAR project
-appclient_component_ui_=J2EE Application Client Project
-new.appclient.component.description_ui_=Create a J2EE application client project
-Java_Component=Java Component
-Java_Component.description=Create a Java Component \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml b/plugins/org.eclipse.jst.j2ee.ui/plugin.xml
deleted file mode 100644
index d867a16de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml
+++ /dev/null
@@ -1,919 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.j2ee.ui"
- name="WTP J2EE UI Plug-in"
- version="1.0.0"
- provider-name="Eclipse.org"
- description="This plugin contains J2EE project creation, import, and export wizards for Applications and EJB, AppClients, Web and Connector modules. Related actions are contributed to the Project Explorer. J2EE Migration and some Web Service support are also defined here. This plugin offers no extension-points."
- class="org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin">
-
- <runtime>
- <library name="j2ee_ui.jar">
- <export name="*"/>
- </library>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.wst.common.navigator.views"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.wst.common.frameworks.ui"/>
- <import plugin="org.eclipse.jst.j2ee"/>
- <import plugin="org.eclipse.jst.j2ee.ejb"/>
- <import plugin="org.eclipse.jst.j2ee.jca"/>
- <import plugin="org.eclipse.jst.j2ee.web"/>
- <import plugin="org.eclipse.emf.edit.ui"/>
- <import plugin="org.eclipse.jdt.ui"/>
- <import plugin="org.eclipse.wst.validation"/>
- <import plugin="org.eclipse.jst.j2ee.core"/>
- <import plugin="org.eclipse.jem.workbench"/>
- <import plugin="org.eclipse.wst.common.emfworkbench.integration"/>
- <import plugin="org.eclipse.ui.workbench"/>
- <import plugin="org.eclipse.jem.workbench"/>
- <import plugin="org.eclipse.jem"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.wst.common.frameworks"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- <import plugin="org.eclipse.wst.common.emf"/>
- <import plugin="org.eclipse.emf.ecore.xmi"/>
- <import plugin="org.eclipse.wst.common.migration"/>
- <import plugin="org.eclipse.ltk.core.refactoring"/>
- <import plugin="org.eclipse.wst.internet.webbrowser"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.jst.common.annotations.controller"/>
- <import plugin="org.eclipse.jst.common.navigator.java"/>
- <import plugin="org.eclipse.wst.web"/>
- <import plugin="org.eclipse.wst.common.navigator.workbench"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.wst.sse.core"/>
- <import plugin="org.eclipse.wst.xml.core"/>
- <import plugin="org.eclipse.wst.common.modulecore"/>
- <import plugin="org.eclipse.jst.common.frameworks"/>
-
- </requires>
-<!-- ====================================================== -->
-<!-- -->
-<!-- Purpose: Extension for the J2EE ACtion Sets -->
-<!-- Extension point: org.eclipse.ui.actionSets -->
-<!-- ====================================================== -->
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="%j2ee"
- description="%j2ee.actions.description_ui_"
- visible="false"
- id="org.eclipse.jst.j2ee.J2eeMainActionSet">
- <action
- label="%create.client.module_ui_"
- icon="icons/full/ctool16/newappclient_wiz.gif"
- tooltip="%create.client.module_ui_"
- class="org.eclipse.jst.j2ee.internal.actions.NewAppClientComponentAction"
- toolbarPath="J2EEMain"
- id="org.eclipse.jst.j2ee.internal.actions.NewAppClientComponent">
- </action>
- <action
- label="%create.enterprise.application_ui_"
- icon="icons/full/ctool16/newear_wiz.gif"
- tooltip="%create.enterprise.application_ui_"
- class="org.eclipse.jst.j2ee.internal.actions.NewEARComponentAction"
- toolbarPath="J2EEMain"
- id="org.eclipse.jst.j2ee.internal.actions.NewEARComponent">
- </action>
- </actionSet>
- </extension>
-
-<!--================================-->
-<!-- Project Wizard Contributions -->
-<!--================================-->
- <extension
- id="J2EEUIProjectWizards"
- point="org.eclipse.ui.newWizards">
- <category
- name="%j2ee.category_ui_"
- id="org.eclipse.jst.j2ee.internal">
- </category>
-<!-- Flexible Project Wizard -->
- <wizard
- name="%flexible.project_ui_"
- icon="icons/full/ctool16/newear_wiz.gif"
- category="org.eclipse.jdt.ui.java"
- class="org.eclipse.jst.j2ee.internal.wizard.FlexibleProjectCreationWizard"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.ui.FlexibleProjectCreationWizard"
- >
- <description>
- %new.flexible.project.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
-<!-- EAR Component Wizard -->
- <wizard
- name="%ear_component_ui_"
- icon="icons/full/ctool16/newear_wiz.gif"
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard">
- <description>
- %new.ear.component.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
-<!-- Application Client Component Wizard -->
- <wizard
- name="%appclient_component_ui_"
- icon="icons/full/ctool16/newappclient_wiz.gif"
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard">
- <description>
- %new.appclient.component.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
-
- </extension>
-
-<!--================================-->
-<!-- Import Wizard Contributions -->
-<!--================================-->
- <!-- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- name="%client.jar.file_ui_"
- icon="icons/full/ctool16/appclient_import_wiz.gif"
- class="org.eclipse.jst.j2ee.internal.wizard.AppClientModuleImportWizard"
- id="org.eclipse.jst.j2ee.ui.AppClientModuleImportWizard">
- <description>
- %client.import.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- name="%ear.file_ui_"
- icon="icons/full/ctool16/import_ear.gif"
- class="org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationImportWizard"
- id="org.eclipse.jst.j2ee.ui.EnterpriseApplicationImportWizard">
- <description>
- %ear.import.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- class="org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizard"
- icon="icons/jar_obj.gif"
- name="%utility_jar_import_wizard"
- id="org.eclipse.jst.j2ee.ui.J2EEUtilityJarImportWizard">
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- name="%Import_Classes"
- icon=""
- class="org.eclipse.jst.j2ee.internal.wizard.ClassesImportWizard"
- id="org.eclipse.jst.j2ee.internal.wizard.ClassesImportWizard">
-
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- </extension> -->
-<!--================================-->
-<!-- Export Wizard Contributions -->
-<!--================================-->
- <!-- <extension
- point="org.eclipse.ui.exportWizards">
- <wizard
- name="%client.jar.file_ui_"
- icon="icons/full/ctool16/appclient_export.gif"
- class="org.eclipse.jst.j2ee.internal.wizard.AppClientModuleExportWizard"
- id="org.eclipse.jst.j2ee.ui.AppClientModuleExportWizard">
- <description>
- %client.export.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- name="%ear.file_ui_"
- icon="icons/full/ctool16/export_ear.gif"
- class="org.eclipse.jst.j2ee.internal.wizard.EnterpriseApplicationExportWizard"
- id="org.eclipse.jst.j2ee.ui.EnterpriseApplicationExportWizard">
- <description>
- %ear.export.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- </extension> -->
-<!-- ====================================================== -->
-<!-- Extension point: org.eclipse.ui.projectNatureImages -->
-<!-- Purpose: Attach icon overlays for J2EE project natures -->
-<!-- ====================================================== -->
- <extension
- point="org.eclipse.ui.ide.projectNatureImages">
- <image
- icon="icons/full/ovr16/ejb_module_ovr.gif"
- natureId="org.eclipse.jst.j2ee.ejb.EJBNature"
- id="org.eclipse.ui.ejbProjectNatureImage">
- </image>
- <image
- icon="icons/full/ovr16/enterprise_app_ovr.gif"
- natureId="org.eclipse.jst.j2ee.EARNature"
- id="org.eclipse.ui.earProjectNatureImage">
- </image>
- <image
- icon="icons/full/ovr16/client_app_ovr.gif"
- natureId="org.eclipse.jst.j2ee.ApplicationClientNature"
- id="org.eclipse.ui.appClientModProjectNatureImage">
- </image>
- <image
- icon="icons/full/ovr16/connector_ovr.gif"
- natureId="org.eclipse.jst.j2ee.jca.ConnectorNature"
- id="org.eclipse.ui.ConnectorModProjectNatureImage">
- </image>
- <image
- icon="icons/full/ovr16/web_module_ovr.gif"
- natureId="org.eclipse.jst.j2ee.web.WebNature"
- id="org.eclipse.ui.webProjectNatureImage">
- </image>
- </extension>
-
-<!-- Navigator Object Contributions -->
-<!-- EAR Group Contributions
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.earNewProjectActions">
- <action
- label="%ear.project_ui_"
- icon="icons/full/ctool16/newear_wiz.gif"
- class="org.eclipse.jst.j2ee.internal.actions.NewEARProjectAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.new.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.newEARAction">
- </action>
- <visibility>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- </visibility>
- </objectContribution>
- </extension>
- -->
-<!-- Navigator Object Contributions -->
-<!-- Application Client Group Contributions
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.appClientNewProjectActions">
- <action
- label="%appclient.project_ui_"
- icon="icons/full/ctool16/newappclient_wiz.gif"
- class="org.eclipse.jst.j2ee.internal.actions.NewApplClientProjectAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.new.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.newAppClientAction">
- </action>
- <visibility>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- </visibility>
- </objectContribution>
- </extension>
- -->
-<!-- Navigator Object Contributions -->
-
- <extension
- point="org.eclipse.wst.common.frameworks.ui.wtpuiAction">
- <masterOperation
- description="Delete the dependent J2EE modules"
- extendedGenericId="org.eclipse.wst.common.generic.Delete"
- populatorClass="org.eclipse.jst.j2ee.internal.ui.actions.J2EEDeleteModuleActionPopulator"
- operationClass="org.eclipse.wst.common.frameworks.internal.operation.extension.ui.IActionWTPOperation"
- name="Delete J2EE Dependent Modules"
- alwaysExecute="true"
- overrideId="org.eclipse.wst.common.actions.Java.delete">
- <selectionEnablement>
- <or>
- <and>
- <objectClass name="org.eclipse.core.resources.IProject"
- adaptable="true" />
- <or>
- <objectState
- value="org.eclipse.jst.j2ee.EARNature"
- name="projectNature" />
- <objectState
- value="org.eclipse.jst.j2ee.ApplicationClientNature"
- name="projectNature" />
- <objectState
- value="org.eclipse.jst.j2ee.jca.ConnectorNature"
- name="projectNature" />
- <objectState
- value="org.eclipse.jst.j2ee.ejb.EJBNature"
- name="projectNature" />
- <objectState
- value="org.eclipse.jst.j2ee.web.WebNature"
- name="projectNature" />
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.Application">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.client.ApplicationClient">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.jca.Connector">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.ejb.EJBJar">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.webapplication.WebApp">
- </objectClass>
- </or>
- </selectionEnablement>
- </masterOperation>
- </extension>
-
-
- <extension
- point="org.eclipse.wst.common.emfworkbench.integration.adapterFactory">
- <adapterFactory
- className="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEEjbItemProviderAdapterFactory"
- packageURI="ejb.xmi"
- id="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEEjbItemProviderAdapterFactory">
- <!-- <view
- id="org.eclipse.wst.navigator.ui.WTPCommonNavigator">
- </view> -->
- <view
- id="org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator">
- </view>
- </adapterFactory>
- <adapterFactory
- className="org.eclipse.jst.j2ee.internal.war.ui.util.J2EEWebItemProviderAdapterFactory"
- packageURI="webapplication.xmi"
- id="org.eclipse.jst.j2ee.internal.war.ui.util.J2EEWebItemProviderAdapterFactory">
- <!-- <view
- id="org.eclipse.wst.navigator.ui.WTPCommonNavigator">
- </view> -->
- <view
- id="org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator">
- </view>
- </adapterFactory>
- <adapterFactory
- className="org.eclipse.jst.j2ee.internal.provider.J2EEApplicationItemProviderAdapterFactory"
- packageURI="application.xmi"
- id="org.eclipse.jst.j2ee.internal.provider.J2EEApplicationItemProviderAdapterFactory">
- <!-- <view
- id="org.eclipse.wst.navigator.ui.WTPCommonNavigator">
- </view> -->
- <view
- id="org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator">
- </view>
- </adapterFactory>
- <adapterFactory
- className="org.eclipse.jst.j2ee.internal.provider.J2EEModulemapItemProviderAdapterFactory"
- packageURI="modulemap.xmi"
- id="org.eclipse.jst.j2ee.internal.provider.J2EEModulemapItemProviderAdapterFactory">
- <!-- <view
- id="org.eclipse.wst.navigator.ui.WTPCommonNavigator">
- </view> -->
- <view
- id="org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator">
- </view>
- </adapterFactory>
- </extension>
-
-
-
-
-<!-- Navigator Object Contributions -->
-<!-- EAR Group Contributions
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.earProjectActions">
- <action
- label="%ear.file_ui_"
- icon="icons/full/ctool16/import_ear.gif"
- class="org.eclipse.jst.j2ee.internal.ear.actions.ImportEARAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.import.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.importEARAction">
- </action>
- <action
- label="%ear.file_ui_"
- icon="icons/full/ctool16/export_ear.gif"
- class="org.eclipse.jst.j2ee.internal.ear.actions.ExportEARAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.export.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.exportEARAction">
- </action>
- <visibility>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- </visibility>
- </objectContribution>
- </extension>
- -->
-<!-- Navigator Object Contributions -->
-<!-- Application Client Group Contributions
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.appClientProjectActions">
- <action
- label="%client.jar.file_ui_"
- icon="icons/full/ctool16/appclient_import_wiz.gif"
- class="org.eclipse.jst.j2ee.internal.client.actions.ImportApplicationClientAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.import.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.importAppClientAction">
- </action>
- <action
- label="%client.jar.file_ui_"
- icon="icons/full/ctool16/appclient_export.gif"
- class="org.eclipse.jst.j2ee.internal.client.actions.ExportApplicationClientAction"
- menubarPath="org.eclipse.wst.common.frameworks.internal.navigator.export.menu/additions"
- enablesFor="1"
- id="org.eclipse.jst.j2ee.internal.ui.navigator.exportAppClientAction">
- </action>
- <visibility>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- </visibility>
- </objectContribution>
- </extension>
- -->
-<!-- Navigator Object Contributions -->
-<!-- ================================================== -->
-<!-- DEPLOY EXTENSIONS -->
-<!-- ================================================== -->
-<!-- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="java.lang.Object"
- nameFilter="*"
- id="org.eclipse.jst.j2ee.internal.ui.deploy">
- <action
- label="%deploy_ui_"
- icon="icons/full/ctool16/re_execute.gif"
- class="org.eclipse.jst.j2ee.internal.actions.J2EEDeployAction"
- menubarPath="additions"
- id="deployAction">
- </action>
- <visibility>
- <or>
- <objectClass
- name="org.eclipse.jst.j2ee.ejb.EJBJar">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.ejb.EnterpriseBean">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.webapplication.WebApp">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.jca.Connector">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.application.Application">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.client.ApplicationClient">
- </objectClass>
- <and>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.jca.ConnectorNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ejb.EJBNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.web.WebNature">
- </objectState>
- </or>
- </and>
- </or>
- </visibility>
- </objectContribution>
- </extension> -->
-<!-- Navigator Object Contributions -->
-
-
-
- <extension
- point="org.eclipse.ui.propertyPages">
-<!-- ====================================================== -->
-<!-- J2EE Dependencies properties page -->
-<!-- ====================================================== -->
-<!-- =========== org.eclipse.jst.j2ee.internal.EARNature ============ -->
- <page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- name="%j2ee"
- class="org.eclipse.jst.j2ee.internal.J2EEPropertiesPage"
- id="J2EEPropertiesPage">
- <filter
- name="nature"
- value="org.eclipse.jst.j2ee.EARNature">
- </filter>
- </page>
-<!-- =========== org.eclipse.jst.j2ee.internal.J2EEPropertiesPage ============ -->
- <page
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- name="%j2ee"
- class="org.eclipse.jst.j2ee.internal.J2EEPropertiesPage"
- id="J2EEPropertiesPage">
- <filter
- name="nature"
- value="org.eclipse.jdt.core.javanature">
- </filter>
- </page>
-<!-- =========== org.eclipse.jst.j2ee.internal.JARDependencyProperties============ -->
- <page
- objectClass="org.eclipse.core.resources.IProject"
- name="%jar.dependencies.props_ui_"
- class="org.eclipse.jst.j2ee.internal.JARDependencyPropertiesPage"
- id="JARDependenciesPropertiesPage">
- <filter
- name="nature"
- value="org.eclipse.jdt.core.javanature">
- </filter>
- </page>
- <page
- objectClass="org.eclipse.jdt.core.IJavaProject"
- name="%jar.dependencies.props_ui_"
- class="org.eclipse.jst.j2ee.internal.JARDependencyPropertiesPage"
- id="JARDependenciesPropertiesPage">
- <filter
- name="nature"
- value="org.eclipse.jdt.core.javanature">
- </filter>
- </page>
- </extension>
-
-
- <extension point="org.eclipse.ltk.core.refactoring.renameParticipants">
-
- <renameParticipant
- class="org.eclipse.jst.j2ee.internal.actions.J2EERenameParticipant"
- id="org.eclipse.jst.j2ee.internal.actions.J2EERenameParticipant"
- name="J2EE Rename Participant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature" />
- </iterate>
- </with>
- <with
- variable="element">
- <instanceof
- value="org.eclipse.core.resources.IProject">
- </instanceof>
- </with>
- </enablement>
- </renameParticipant>
- </extension>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- name="%j2ee"
- icon="icons/full/cview16/j2ee_perspective.gif"
- class="org.eclipse.jst.j2ee.internal.perspective.J2EEPerspective"
- id="org.eclipse.jst.j2ee.J2EEPerspective">
- </perspective>
- </extension>
-
- <extension
- point="org.eclipse.jem.util.uiContextSensitiveClass">
- <uiContextSensitiveClass
- context="UI"
- key="rendererFactory"
- className="org.eclipse.jst.j2ee.internal.emf2xml.sed.EMF2DOMSedRendererFactory">
- </uiContextSensitiveClass>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.navigator.workbench.commonWizard">
- <!-- EAR New -->
- <commonWizard
- type="new"
- wizardId="org.eclipse.jst.j2ee.internal.wizard.EARComponentCreationWizard">
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.core.resources.IWorkspaceRoot">
- </objectClass>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.wst.common.modulecore.ModuleCoreNature">
- </objectState>
- </or>
- </and>
- </or>
- </enablement>
- </commonWizard>
- <!-- AppClient New -->
- <commonWizard
- type="new"
- wizardId="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentCreationWizard">
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.core.resources.IWorkspaceRoot">
- </objectClass>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.wst.common.modulecore.ModuleCoreNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl">
- </objectClass>
-
- </or>
- </enablement>
- </commonWizard>
- <!-- EAR Import -->
- <!-- <commonWizard
- type="import"
- wizardId="org.eclipse.jst.j2ee.ui.EnterpriseApplicationImportWizard">
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.core.resources.IWorkspaceRoot">
- </objectClass>
- <and>
- <objectClass
- name="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup">
- </objectClass>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- </and>
-
- </or>
- </enablement>
- </commonWizard> -->
- <!-- App Client Import -->
- <!-- <commonWizard
- type="import"
- wizardId="org.eclipse.jst.j2ee.ui.AppClientModuleImportWizard">
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.core.resources.IWorkspaceRoot">
- </objectClass>
- <and>
- <objectClass
- name="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup">
- </objectClass>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- </and>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl">
- </objectClass>
- </or>
- </enablement>
- </commonWizard> -->
- <!-- Utility Jar Import -->
- <!-- <commonWizard
- type="import"
- wizardId="org.eclipse.jst.j2ee.ui.J2EEUtilityJarImportWizard">
- <enablement>
- <or>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.provider.J2EEUtilityJarItemProvider">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.earcreation.modulemap.EARProjectMapImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.core.resources.IWorkspaceRoot">
- </objectClass>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl">
- </objectClass>
- </or>
- </enablement>
- </commonWizard> -->
- <!-- EAR export -->
- <!-- <commonWizard
- type="export"
- wizardId="org.eclipse.jst.j2ee.ui.EnterpriseApplicationExportWizard">
- <enablement>
- <or>
- <and>
- <or>
- <objectClass
- name="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup">
- </objectClass>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- </or>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.EARNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ApplicationImpl">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.provider.ModulesItemProvider">
- </objectClass>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.application.impl.ModuleImpl">
- </objectClass>
- </or>
- </enablement>
- </commonWizard> -->
- <!-- App Client export -->
- <!-- <commonWizard
- type="export"
- wizardId="org.eclipse.jst.j2ee.ui.AppClientModuleExportWizard">
- <enablement>
- <or>
- <and>
- <or>
- <objectClass
- name="org.eclipse.wst.common.navigator.internal.groups.NavigatorGroup">
- </objectClass>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- </or>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl">
- </objectClass>
- </or>
- </enablement>
- </commonWizard> -->
- <!-- Import Classes Wizard -->
- <!-- <commonWizard
- type="import"
- wizardId="org.eclipse.jst.j2ee.internal.wizard.ClassesImportWizard">
- <enablement>
- <or>
- <and>
- <objectClass
- name="org.eclipse.core.resources.IProject">
- </objectClass>
- <or>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ApplicationClientNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.jca.ConnectorNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.ejb.EJBNature">
- </objectState>
- <objectState
- name="projectNature"
- value="org.eclipse.jst.j2ee.web.WebNature">
- </objectState>
- </or>
- </and>
- <objectClass
- name="org.eclipse.jst.j2ee.internal.client.impl.ApplicationClientImpl">
- </objectClass>
- </or>
- </enablement>
- </commonWizard> -->
- </extension>
-
- <extension
- point="org.eclipse.wst.common.frameworks.DataModelProviderExtension">
- <DataModelProvider
- class="org.eclipse.jst.j2ee.internal.earcreation.EarComponentCreationDataModelProvider"
- id="org.eclipse.jst.j2ee.internal.earcreation.IEarComponentCreationDataModelProperties"/>
- </extension>
-
-</plugin>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/prepareforpii.xml b/plugins/org.eclipse.jst.j2ee.ui/prepareforpii.xml
deleted file mode 100644
index d3bfda0d3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/prepareforpii.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<project name="PrepareForPII" default="main" basedir=".">
-
- <!-- Setup temp variables -->
- <target name="init">
- <property name="nlsDir" value="d:/NLS/Corona/0526"/>
- <property name="plugin" value="com.ibm.wtp.j2ee.ui"/>
- <property name="plugindir" value="d:/workspaceCorona/${plugin}"/>
- <property name="outputDir" value="${nlsDir}/${plugin}"/>
-
-
- </target>
-
- <!-- Create the destination dir -->
- <target name="nlsDir" depends="init">
- <mkdir dir="${nlsDir}"/>
- </target>
-
- <!-- Create the destination dir -->
- <target name="plugindir" depends="nlsDir">
- <delete dir="${outputDir}"/>
- <mkdir dir="${outputDir}"/>
- </target>
-
- <!-- Move the files to the correct locations in the workspace. -->
- <target name="main" depends="plugindir">
-
- <messageIdGen folderPath = "${plugindir}" componentId = "E" />
-
- <copy todir = "${outputDir}/property_files" >
- <fileset dir="${plugindir}/property_files">
- <include name="**/*.properties"/>
- </fileset>
- </copy>
-
- <copy file="${plugindir}/plugin.properties" todir="${outputDir}"/>
-
- </target>
-</project>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_figures.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_figures.properties
deleted file mode 100644
index 8ba66f7ae..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_figures.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-RelationshipPolyLine_UI_0=Navigation
-RelationshipPolyLine_UI_1=Navigation
-RelationshipPolyLine_UI_2=Cmr Field / Foreign Key
-RelationshipPolyLine_UI_3=Cmr Field / Foreign Key
-RelationshipPolyLine_UI_4=Edit left end
-RelationshipPolyLine_UI_5=Edit right
-RelationshipPolyLine_UI_6=Edit left end
-RelationshipPolyLine_UI_7=Edit right end
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_ui.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_ui.properties
deleted file mode 100644
index 9ac84f478..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_ui.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-0=Failed to find the image "{0}".
-1=New EJB Project
-2=EJB version:
-3=EJB Project
-4=Create an EJB project and add it to a new or existing Enterprise Application.
-5=Import an EJB jar from the file system
-6=EJB Jar Import
-7=EJB Jar file:
-8=EJB module:
-9=EJB Jar Export
-10=Export EJB project to the local file system.
-11=EJB client JAR Creation
-12=Use this wizard to create an EJB client JAR from your existing EJB
-13=Client JAR URI:
-14=Project name:
-15=Project location:
-16=EJB Module:
-17=Delete Bean Only
-18=Delete Bean Classes
-19=Delete Access Bean
-20=Delete Deployed Code
-21=Select All
-22=Deselect All
-23=The selected enterprise bean cannot be deleted because it is involved in\nrelationships with other enterprise beans. You must first delete these\nrelationships before deleting the bean.
-24=Delete...
-25=Cannot delete Enterprise Bean
-26=Cannot delete the bean named "{0}" because it is in a binary project.
-27=Delete Enterprise Bean(s)
-28=What options would you like when deleting the selected\nEnterprise Bean(s)?
-GroupedEJBJarItemProvider_UI_0=Session
-GroupedEJBJarItemProvider_UI_1=Entity
-GroupedEJBJarItemProvider_UI_2=Message
-NewEJBProjectAction_UI_0=EJB Module
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/emftosed.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/emftosed.properties
deleted file mode 100644
index 37e232621..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/emftosed.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-Unexpected_IO_exception_occurred_creating_xml_document_1_EXC_=IWAE0017E Unexpected IO exception occurred creating xml document
-EMF2DOMSedRenderer_UI_0={0} should not use an OutputStream for loading
-EMF2DOMSedRenderer_UI_1={0} should not use an InputStream for loading
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ejb_ui.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ejb_ui.properties
deleted file mode 100644
index fc3565ea0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ejb_ui.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-
-GroupedEJBJarItemProvider_UI_0=Session
-GroupedEJBJarItemProvider_UI_1=Entity
-GroupedEJBJarItemProvider_UI_2=Message
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties
deleted file mode 100644
index 53083c773..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties
+++ /dev/null
@@ -1,319 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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=Project location:
-2=Target server:
-3=J2EE version:
-4=Failed to find the image "{0}".
-5=New Enterprise Application Project
-6=Enterprise Application Project
-7=Create an Enterprise Application project containing one or more module projects.
-8=EAR Module Projects
-9=Select the module projects to add to the new EAR project from the list. \nSelect New Module button to create a new module project.
-10=&Select All
-11=&Deselect All
-12=New &Module...
-13=EAR application:
-14=N&ew...
-14a=Ne&w...
-15=Add module to an EAR application.
-16=New Module Project
-17=Create a new module project for the selected module type
-18=New Module Project
-19=Create default module projects.
-20=Application Client project:
-21=EJB project:
-22=Web project:
-23=Connector project:
-24=New Application Client Project
-25=Application Client Project
-26=Create an Application Client project and add it to a new or existing Enterprise Application project
-27=Module Dependencies
-28=Select dependent JARs for the module within the Enterprise Application project.
-29=Available dependent JARs:
-30=Manifest Class-Path:
-31=JAR/Module
-32=Project
-33=New
-34=Import an Application Client project from the file System
-35=Application Client Import
-36=Application Client file:
-37=Application Client project:
-38=Import
-39=Import an Enterprise Application project based on selected resources.
-40=Enterprise Application Import
-41=EAR file:
-42=Overwrite existing resources without warning.
-43=Project import
-44=Optimized: make binary projects for EJB, client, and utility JARs
-45=Expanded: extract project contents for development
-46=Import for partial EAR development
-47=Select All
-48=Deselect All
-49=Utility JARs and web libraries
-50=Select the utility JARs from the list to be imported as utility projects. Unselected JARs will be imported as \nutility JARs in the EAR.
-51=Enter the new project name that will be created for the imported module file by selecting the second column of the table for edit.
-52=EAR Module and Utility JAR Projects
-53=Project locations
-54=This is the parent directory for all referenced projects. A subdirectory will be created for each project.
-55=Module Root Location:
-
-57=Select the location directory
-58=Modules in EAR
-59=New Project Name
-60=filenames
-61=projectnames
-62=Destination:
-63=Overwrite existing file
-64=Export source files
-65=Application Client Export
-66=Export Application Client project to the local file system.
-67=Export
-68=EAR Export
-69=Export Enterprise Application project to the local file system.
-70=Include project build paths and meta-data files
-71=If you select this option, the exported EAR maintains project names and external classpath dependencies, which are useful for later importing the EAR into binary projects. If you select this option and later import the EAR, only binary projects are created.
-72=Include
-73=Import EAR Project
-74=Allow nested projects overwrites (module and utility projects)
-75=Delete project on overwrite
-76=EAR project:
-
-#migration strings
-77=Error
-78=An internal error occurred performing the selected action.
-79=Binary Project
-80=The action cannot be performed on the selection, which is part of a binary project.
-81=Information
-82=The chosen operation is not currently available.
-
-90=Create an EJB Client JAR module to hold the client interfaces and classes.
-91=Generate an annotated bean class
-92=Add support for annotated Java classes
-93=B&rowse...
-94=Na&me:
-95=Create a default Main class
-96=Create a default stateless session bean
-98=Generate an annotated servlet class
-
-97=Select the utility JARs from the list to be imported as utility projects or jars.
-99=Module Name:
-Entity_UI_=Entity Beans
-Message_Driven_Beans_UI_=Message-Driven Beans
-Session_Beans_UI_=Session Beans
-EJB_Class_UI_=EJB Class: {0}
-Home_Interface_UI_=Home Interface: {0}
-Service_Endpoint_Interface_UI_=Service Endpoint Interface: {0}
-Primary_Key_Class_UI_=Primary Key Class: {0}
-Remote_Interface_UI_=Remote Interface: {0}
-Local_Interface_UI_=Local Interface: {0}
-Local_Home_Interface_UI_=Local Home Interface: {0}
-Delete_UI_=Delete...
-Project_should_not_be_null_1_EXC_=IWAE0021E Project should not be null
-Non-project_in_selection_2_EXC_=IWAE0022E Non-project in selection
-Problems_Opening_Editor_ERROR_=IWAE0052E Problems Opening Editor.
-Utility_JARs_UI_=Utility JARs
-Delete_1=Delete...
-Delete_selected_project(s)_2=Delete selected project(s)
-Remove_module(s)_from_all_Enterprise_Applications_3=Remove module(s) from all Enterprise Applications
-Remove_module(s)_from_all_other_Enterprise_Applications_4=Remove module(s) from all other Enterprise Applications
-Remove_module_dependencies_referencing_selected_project(s)_5=Remove module dependencies referencing selected project(s)
-Delete_Module_Options_6=Delete Module Options
-Delete_Enterprise_Application_Options_7=Delete Enterprise Application Options
-Delete_could_not_be_completed_8=Delete could not be completed
-Delete_error_9=Delete error
-What_would_you_like_to_delete__10=What would you like to delete?
-Delete_selected_Enterprise_Application_project(s)_only_11=Delete selected Enterprise Application project(s) only
-Also_delete_module_and_utility_Java_projects_12=Also delete module and utility Java projects
-Delete_selected_project(s)_only_13=Delete selected project(s) only
-Also_delete_references_to_selected_project(s)_14=Also delete references to selected project(s)
-CUSTOM_DELETE_MIX_MATCH_UI_=The custom J2EE delete options are not available for the selected J2EE projects. The standard delete options will be used.
-DEPLOY_DIALOG_TITLE=J2EE Deployment
-DEPLOY_ERROR_TEXT=IWAE0001E Error:
-DEPLOY_WARNING_TEXT=Warning:
-DEPLOY_INFO_TEXT=IWAE0002I Info:
-DEPLOY_OK_TEXT=Ok:
-DEPLOYMENT_IN_PROGRESS=Deployment operation in progress...
-DEPLOY_SUCCESS_REPORT=Deployment finished successfully.
-DEPLOY_WARNINGS_REPORT=Deployment finished with warnings; see log files for details.
-DEPLOY_ERRORS_REPORT=Deployment finished with errors; see log files for details.
-
-NewModuleSelectionPage.appClient=Application Client
-NewModuleSelectionPage.ejb=Enterprise Java Bean
-NewModuleSelectionPage.web=Web
-NewModuleSelectionPage.jca=Connector
-
-NewApplClientModuleAction_UI_0=Application Client Module
-NewEARModuleAction_UI_0=EAR Module
-J2EEProjectCreationPage_UI_0=Hide &Advanced <<
-J2EEProjectCreationPage_UI_1=Show &Advanced >>
-J2EEUtilityJarImportPage_UI_0=Utility Jar Import
-J2EEUtilityJarImportPage_UI_1=Import dependent Utility Jars for J2EE Enterprise Applications
-J2EEUtilityJarImportPage_UI_2=Available Utility Jars Directory
-J2EEUtilityJarImportPage_UI_3=External Jar Directory:
-J2EEUtilityJarImportPage_UI_4=Linked Path Variable
-J2EEUtilityJarImportPage_UI_5=Make these imported files team-shareable by creating or re-using a Linked Path Variable (LPV). Select an existing LPV or type a new name to create one to the directory above. Other teammates should define this value through Window > Preferences | Workbench > Linked Resources. This option is only available for linked imports.
-J2EEUtilityJarImportPage_UI_6=Overwrite Existing Resources (projects and archives)
-J2EEUtilityJarImportPage_UI_7=Select Utility Jar:
-J2EEUtilityJarImportPage.0=Use Existing Linked Path Variable
-J2EEUtilityJarImportPage.1=Linked Path Variable:
-EARImportProjectsPage_UI_0=include
-EARImportProjectsPage_UI_1=file
-EARImportProjectsPage_UI_2=project
-EARImportProjectsPage_UI_3=Select New
-EARImportProjectsPage_UI_4=Select Binary
-
-J2EEUtilityJarImportTypePage_UI_0=Utility Jar Import
-J2EEUtilityJarImportTypePage_UI_1=Import dependent Utility Jars for J2EE Enterprise Applications
-J2EEUtilityJarImportTypePage_UI_2=Select import type
-J2EEUtilityJarImportTypePage_UI_3=Create Java Projects from Utility Jars
-J2EEUtilityJarImportTypePage_UI_4=Create linked Java Projects from Utility Jars
-J2EEUtilityJarImportTypePage_UI_5=Copy Utility Jars into an existing EAR from an external location
-J2EEUtilityJarImportTypePage_UI_6=Create Linked Utility Jars in an existing EAR from an external location
-J2EEUtilityJarImportTypePage_UI_7=Project import options
-J2EEUtilityJarImportTypePage_UI_8=Select EAR Project
-J2EEUtilityJarImportTypePage_UI_9=EAR Project:
-J2EEUtilityJarImportTypePage_UI_10=Create Binary Projects
-J2EEUtilityJarImportTypePage_UI_11=Override Project Root (Specify location below)
-
-Deployment_Descriptor_UI_=Deployment Descriptor
-
-Rename_1=Rename
-Rename_selected_project_2=Rename selected project
-Rename_module_in_all_Enterprise_Applications_3=Rename module in all Enterprise Applications
-Rename_module_in_all_other_Enterprise_Applications_4=Rename module in all other Enterprise Applications
-Rename_module_dependencies_referencing_selected_project_5=Rename module dependencies referencing selected project
-Rename_Module_Options_6=Rename Module Options
-Rename_Enterprise_Application_Options_7=Rename Enterprise Application Options
-Rename_could_not_be_completed_8=Rename could not be completed
-Rename_error_9=Rename error
-What_would_you_like_to_rename_this_to__10=What would you like to rename this to?
-Context_Root__11=Context root:
-Rename_selected_Enterprise_Application_project_only_12=Rename selected Enterprise Application project only
-Also_rename_module_and_utility_Java_projects_13=Also rename module and utility Java projects
-Project_already_exists.=Project {0} already exists.
-Project_should_not_be_null_1_EXC_=IWAE0021E Project should not be null
-Non-project_in_selection_2_ERROR_=IWAE0024E Non-project in selection
-
-
-ERROR_OCCURRED_TITLE=Error
-ERROR_OCCURRED_MESSAGE=An internal error occurred performing the selected action.
-
-Import_Class_Files_UI=Import
-FileImport.selectSource=Select a directory to import from.
-Import_Classes=Import Class Files...
-ClassesImport.fromDir=Import from Directory
-ClassesImport.fromZip=Import from Zip or Jar
-DataTransfer.browse=Browse...
-DataTransfer.directory=Source:
-DataTransfer.fileSystemTitle=Import Class Files
-FileImport.importFileSystem=Import class files from the local file system.
-FileImport.sourceEmpty=Source must not be empty.
-FileImport.overwriteExisting=Overwrite existing resources without warning
-DataTransfer.selectAll=Select All
-DataTransfer.deselectAll=Deselect All
-Import_Class_Files_UI=Import
-FileImport.selectSource=Select a directory to import from.
-Inconsistent_Files_3=Inconsistent Files
-The_following_workspace_files_are_inconsistent_with_the_editor_4=The following workspace files are inconsistent with the editor: \n
-Update_the_editor_with_the_workspace_contents__5=Update the editor with the workspace contents?
-Error_checking_out_files_10=Error checking out files
-Inconsistent_files_detected_11=Inconsistent files detected
-Modules_UI_=Modules
-Utility_Java_Projects_UI_=Project Utility JARs
-The_following_files_are_inconsistent_with_the_file_system._Do_you_want_to_save_and_overwrite_these_files_on_the_file_system__12_WARN_=IWAE0020W The following files are inconsistent with the file system.\nDo you want to save and overwrite these files on the file system?
-J2EE_Level=J2EE Level:
-J2EE_12=1.2
-J2EE_13=1.3
-J2EE_14=1.4
-J2EE_12_DESCRIPTION=J2EE 1.2 includes Servlet Specification level 2.2, JSP Specification level 1.1, and EJB Specification level 1.1.
-J2EE_13_DESCRIPTION=J2EE 1.3 includes Connector Architecture Specification level 1.0, Servlet Specification level 2.3, JSP Specification level 1.2, and EJB Specification level 2.0.
-J2EE_14_DESCRIPTION=J2EE 1.4 includes Connector Architecture Specification level 1.5, Servlet Specification level 2.4, JSP Specification level 1.3, and EJB Specification level 2.1.
-EJB_LEVEL=EJB Level:
-EJB_11=1.1
-EJB_20=2.0
-EJB_21=2.1
-EJB_11_DESCRIPTION=EJB 1.1 includes Session Beans, BMP Beans and CMP 1.1 Beans. EJB 1.1 modules may be included in either J2EE 1.2 or J2EE 1.3 Enterprise Applications.
-EJB_20_DESCRIPTION=EJB 2.0 includes Message-Driven Beans, BMP Beans, and CMP 1.1 and CMP 2.0 Beans. EJB 2.0 modules may only be included in J2EE 1.3 Enterprise Applications.
-EJB_21_DESCRIPTION=EJB 2.1 includes Message-Driven Beans, BMP Beans, and CMP 1.1 and CMP 2.0 Beans. EJB 2.1 modules may only be included in J2EE 1.4 Enterprise Applications.
-WEB_LEVEL=Web Level:
-WEB_22=2.2
-WEB_23=2.3
-WEB_24=2.4
-WEB_22_DESCRIPTION=Web 2.2 includes Servlet specification 2.2 and JSP specification 1.1.
-WEB_23_DESCRIPTION=Web 2.3 includes Servlet specification 2.3 and JSP specification 1.2.
-WEB_24_DESCRIPTION=Web 2.4 includes Servlet specification 2.4 and JSP specification 2.0.
-APP_CLIENT_LEVEL=Application Client Level:
-APP_CLIENT_12_DESCRIPTION=Application 1.2 includes the Applciation client specification level 1.2.
-APP_CLIENT_13_DESCRIPTION=Application 1.3 includes the Applciation client specification level 1.3.
-APP_CLIENT_14_DESCRIPTION=Application 1.4 includes the Applciation client specification level 1.4.
-CONNECTOR_LEVEL=Connector Architecture Level:
-CONNECTOR_10=1.0
-CONNECTOR_15=1.5
-CONNECTOR_10_DESCRIPTION=Connector Architecture 1.0 modules may only be included in J2EE 1.3 Enterprise Applications.
-CONNECTOR_15_DESCRIPTION=Connector Architecture 1.5 modules may only be included in J2EE 1.4 Enterprise Applications.
-DESCRIPTION=Description:
-WEB_CONTEXT_ROOT=Context Root:
-WEB_CONTENT_FOLDER_NAME=Web content folder name:
-FileImport.invalidSource = Source directory is not valid or has not been specified.
-FileImport.importProblems = Import Problems
-DataTransfer.information = Information
-FileImport.noneSelected = There are no resources currently selected for import.
-File_Selection_UI_=File Selection
-Select_a_file__UI_=Select a file:
-Flexible_Structure=Use flexible project structure
-FlexibleProjectCreationWizard.mainPage.title=Flexible Project
-FlexibleProjectCreationWizard.mainPage.desc=Create a flexible project.
-FlexibleProjectCreationWizard.title=New Flexible Project
-EARComponentCreationWizard.title=New J2EE EAR Application Project
-EARComponentCreationWizard.mainPage.title=J2EE EAR Application Project
-EARComponentCreationWizard.mainPage.desc=Create a J2EE EAR application.
-EARComponentCreationWizard.secondPage.title=J2EE Modules to Add to the EAR
-EARComponentCreationWizard.secondPage.desc=Select the J2EE modules to add to the new EAR application from the list. \nSelect New Module button to create a new J2EE module.
-AppClientComponentCreationWizard.title=New J2EE Application Client Project
-AppClientComponentCreationWizard.mainPage.title=J2EE Application Client Project
-AppClientComponentCreationWizard.mainPage.desc=Create a J2EE Application Client.
-DefaultJ2EEComponentCreationWizard.title=Create default J2EE modules.
-DefaultJ2EEComponentCreationWizard.page.title=New J2EE Module
-DefaultJ2EEComponentCreationWizard.page.desc=Create a new J2EE module for the selected module type
-DefaultJ2EEComponentCreationWizard.page.label.ejb=EJB module
-DefaultJ2EEComponentCreationWizard.page.label.web=Web module
-DefaultJ2EEComponentCreationWizard.page.label.jca=Connector module
-DefaultJ2EEComponentCreationWizard.page.label.appclient=Application client module
-DefaultJ2EEComponentCreationWizard.page.button.select=Create default modules
-
-FOLDER_LABEL=Folder:
-BROWSE_BUTTON_LABEL=Browse...
-JAVA_PACKAGE_LABEL=Java package:
-CLASS_NAME_LABEL=Class name:
-SUPERCLASS_LABEL=Superclass:
-CONTAINER_SELECTION_DIALOG_TITLE=Container Selection
-CONTAINER_SELECTION_DIALOG_DESC=Choose a Container:
-CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG=Choose a valid java source folder for the selected module.
-PACKAGE_SELECTION_DIALOG_TITLE=Package Selection
-PACKAGE_SELECTION_DIALOG_DESC=Choose a package:
-PACKAGE_SELECTION_DIALOG_MSG_NONE=No packages to choose from
-SUPERCLASS_SELECTION_DIALOG_TITLE=Superclass Selection
-SUPERCLASS_SELECTION_DIALOG_DESC=Choose a superclass:
-JAVA_CLASS_MODIFIERS_LABEL=Modifiers:
-JAVA_CLASS_PUBLIC_CHECKBOX_LABEL=Public
-JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL=Abstract
-JAVA_CLASS_FINAL_CHECKBOX_LABEL=Final
-JAVA_CLASS_INTERFACES_LABEL=Interfaces:
-JAVA_CLASS_METHOD_STUBS_LABEL=Which method stubs would you like to create?
-JAVA_CLASS_MAIN_CHECKBOX_LABEL=public static void main(String[] args)
-JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL=Constructors from superclass
-JAVA_CLASS_INHERIT_CHECKBOX_LABEL=Inherited abstract methods
-ADD_BUTTON_LABEL=Add...
-REMOVE_BUTTON=Remove
-INTERFACE_SELECTION_DIALOG_TITLE=Interface Selection
-JAVAUTILITY_MAIN_PG_TITLE=Java Component
-JAVAUTILITY_MAIN_PG_DESC=Create a Java Component
-JAVAUTIL_COMPONENT_WIZ_TITLE=New Java Component Module
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties
deleted file mode 100644
index cda4abcea..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-0=Failed to find the image "{0}".
-1=New Connector Project
-2=JCA version:
-3=Connector Project
-4=Create a standalone Connector project or add it to a new or existing Enterprise Application project.
-5=Import a Connector module from the file system
-6=Connector Import
-7=Connector file:
-8=Connector module:
-9=Connector Export
-10=Export Connector module to the local file system.
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties
deleted file mode 100644
index 0fdfac28e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-Up_1=&Up
-Down_2=&Down
-Select_All_3=Select &All
-Deselect_All_4=D&eselect All
-ERROR_READING_MANIFEST_DIALOG_TITLE=Error Reading Manifest
-SAVE_MANIFEST_WITH_ERROR=The manifest file contains errors and can not be parsed. The file will be saved but the Java build path will not be updated. Following are common limitations which can cause problems:
-ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR=The manifest file contains errors and can not be parsed. Other pages cannot be used until these errors are corrected. Following are common limitations which can cause problems:
-ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE=The manifest file contains errors and can not be parsed. Following are common limitations which can cause problems:
-MANIFEST_PROBLEM_1=* Lines in the file must be no greater than 72 bytes. Continuation of long lines is indicated by a new line and a space.
-MANIFEST_PROBLEM_2=* The last line in the file must end with a new line or it will not be parsed.
-MANIFEST_PROBLEM_3=* Blank lines with extra white space may cause parse to fail.
-MANIFEST_PROBLEM_4=* The attributes must be formatted correctly. Refer to the manifest and JAR file specification for more information.
-An_internal_error_occurred_ERROR_=IWAE0010E An internal error occurred:
-Project_name__UI_=Project name:
-EAR_Project_Name__UI__UI_=Enterprise application project name:
-Available_dependent_JARs__UI_=Available dependent JARs:
-Manifest_Class-Path__UI_=Manifest Class-Path:
-JAR/Module_UI_=JAR/Module
-Project_UI_=Project
diff --git a/plugins/org.eclipse.jst.j2ee.ui/property_files/migwizards.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/migwizards.properties
deleted file mode 100644
index 0282152aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/migwizards.properties
+++ /dev/null
@@ -1,187 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 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
-###############################################################################
-#migration wizards
-Select_All=Select All
-Deselect_All=Deselect All
-Migration_Wizard_Title_=J2EE Migration Wizard
-J2EE_Migration_Wizard_Welcome_=J2EE Migration Wizard Welcome Page
-Welcome_To_The_J2EE_Migration_Wizard_=Welcome to the J2EE Migration Wizard
-Please_Read_The_Following_Information_=Please read the following information, then click Next.
-The_Migration_Wizard_Guides_The_Process_=The Migration Wizard guides the process of optionally migrating your J2EE project structures and the J2EE version of the associated projects.
-Prior_To_Proceeding_With_The_Migration_Wizard_=Prior to proceeding with the Migration Wizard it is strongly recommended you:
-Read_The_Online_Help_Section_=Read the online help on Migrating applications to J2EE 1.3 and J2EE 1.4 specification levels."
-Backup_Your_Entire_Workspace_=Backup your entire workspace.
-If_Working_With_A_Repository_=If working with a repository, "check out" or "lock" all corresponding projects.
-Once_The_Migration_Wizard_Is_Complete_=Once the Migration Wizard is complete, the details of the steps performed during migration will be presented in a results window. This information is also written to the LoggingUtil.log file in the .metadata folder in your local workspace.
-Based_On_The_Number_Of_Projects_=Based on the number of projects, migration may take a few minutes.
-Enterprise_Application_=Enterprise Application
-The_following_enterprise_application_project_=The following enterprise application project will be migrated. The project structure migration is optional.
-Enterprise_Application_Project_=Enterprise Application Project:
-Migrate_Project_Structure_=Migrate project structure.
-Migrate_Project_From_Version_=Migrate project J2EE specification level.
-Version_Level=J2EE version
-TARGET_SERVER=Target Server
-The_Project_Version_And_The_Deployment_Descriptor_=The project version and the deployment descriptor are migrated for the enterprise application. This migration allows for the inclusion of J2EE 1.3 modules into the enterprise application.
-Migrate_All_Module_Projects_=Migrate all module projects
-All_EJB_Web_Application_Client_Modules_Referenced_=All EJB, web, and application client modules referenced by the enterprise application are automatically selected for migration.
-Select_The_Finish_Button_To_Accept_The_Default_=Select the Finish button to accept the default migration options for all module projects, or customize the migration options for each type of module project on the following pages.
-Migrate_Project_From_Version_EJB_=Migrate project from version level J2EE 1.2 (EJB 1.x) to J2EE 1.3 (EJB 2.x)
-EJB_Module_Migration_=EJB Module Migration
-Select_the_EJB_projects_to_be_migrated_=Select the EJB projects to be migrated. The project structures migration is optional.
-Migrated_CMP_Beans_To_=Migrate CMP 1.x beans to CMP 2.x beans
-Add_Local_Client_Views_=Add local client views
-Available_Projects_=Projects:
-Selected_Projects_={0} of {1} projects selected.
-Selected_Beans_Migration_={0} of {1} beans selected.
-Application_Client_Projects_=Application Client Projects:
-Connector_Projects_=Connector Projects:
-Select_The_Connector_Projects_=Select the connector projects to be migrated. The project structure migration is optional.
-Select_The_Application_Client_Projects_=Select the application client projects to be migrated. The project structure migration is optional.
-WEB_MIGRATE_WIZARD_TITLE=Web Projects:
-WEB_MIGRATE_WIZARD_DESCRIPTION=Select the web projects to be migrated. The project structure migration is optional.
-Select_the_enterprise_beans_that_will_have_=Select the enterprise beans that will have local client views added.
-Enterprise_Beans_Selection_=Enterprise Beans
-Select_All_Entity_Beans_=Select All Entity Beans
-Select_Required_Beans_=Select Required
-Delete_Remote_Client_Views_=Delete remote client views
-Local_Client_View_Naming_Scheme_=Local client view naming scheme
-Reuse_The_Deleted_Remote_Client_View_=Reuse the deleted remote client view name
-Specify_Suffix_=Specify suffix:
-EJB_Client_View_Example_=For example, EJB bean "Foo" will have local client views named: "Foo{0}" and "Foo{1}Home".
-The_Suffix_Text_Can_Not_Be_=The suffix text cannot be empty.
-A_Project_Must_Be_Selected_=A project must be selected in order to migrate.
-A_Bean_Must_Be_Selected_=A bean must be selected in order to migrate the local client view.
-#moved from mofj2ee.properties
-Stack_trace_of_nested_exce=Stack trace of nested exception:
-ERROR=Error:
-WARNING=Warning:
-INFO=Info:
-DEFAULT_COMPLETED_STATUS_MSG=Migration was completed for {0}.
-DEFAULT_NOT_NEEDED_STATUS_MSG=Migration was not required for {0}.
-DEFAULT_NOT_POSSIBLE_STATUS_MSG=Migration was not possible for {0}.
-DEFAULT_ERROR_STATUS_MSG=IWAE0003E Error migrating {0}.
-REMOVED_LOCAL_CLIENT_MSG=Removed local client view for EJB {0}.
-REMOVED_ACCESS_INTENTS_MSG=Removed {0} 1.1 method access intent(s) from CMP bean {1}.
-REMOVED_ISOLATION_LEVELS_MSG=Removed {0} 1.1 method isolation level(s) from CMP bean {1}.
-CONVERTED_FINDER_MSG=Converted finder descripter for {0} in CMP bean {1}. Use the EJB editor to update the query EJB QL.
-UNNAMED_EJB=<Unnamed CMP bean>
-CONVERTED_QUERY_DESCRIPTION=Converted from IBM version 1.1 extensions.
-MIGRATED_DEFAULT_DATASOURCE_JAR_MSG=Migrated default Datasource binding to a default CMP Connection Factory binding for EJB JAR \"{0}\".
-MIGRATED_DEFAULT_DATASOURCE_MSG=Migrated default Datasource binding to a default CMP Connection Factory binding for EJB JAR.
-J2EE_VERSION_NULL_ERROR=Unable to get J2EE version of object because it is not contained by a document.
-J2EE_VERSION_PROXY_ERROR=Unable to get J2EE version of referenced object because the proxy cannot be resolved. Check the ids in the deployment descriptor files. HREF = {0}.
-#moved from j2eecreation.properties
-J2EE_PROJECT_MIGRATION_TITLE_UI_=J2EE Project Migration
-ENTERPRISE_APPLICATIONS_UI_=Enterprise Applications
-WIZ_BAN_DESC_UI_=Select the {0} projects to be migrated. The project structure migration is optional.
-ENTERPRISE_APP_PROJECTS_UI_=Enterprise application projects:
-MIGRATE_J2EE_SPEC_UI_=Migrate project from version level J2EE 1.2 to J2EE 1.3
-MIGRATE_EJB_SPEC_UI_=Migrate project from version level EJB 1.1 to EJB 2.0
-MIGRATE_MODULE_PROJECTS_UI_=Migrate module projects
-APPLICATION_CLIENTS_UI_=Application Clients
-APPLICATION_CLIENT_PROJECTS_UI_=Application client projects:
-ENTERPRISE_BEANS_BAN_UI_=Enterprise Beans
-EJB_PROJECTS_UI_=EJB projects:
-ADD_LOCAL_CLIENT_VIEWS_CHECK_UI_=Add local client views
-MIGRATE_CMP_BEANS_UI_=Migrate CMP 1.1 beans to CMP 2.0 beans
-ADD_LOCAL_CLIENT_VIEWS_BAN_UI_=Add Local Client Views
-SELECT_EJB_CLIENT_VIEWS_UI_=Select the enterprise beans that will have local client views added.
-ENTERPRISE_BEANS_LIST_UI_=Enterprise beans:
-DELETE_REM_CLIENT_VIEWS_UI_=Delete remote client views
-LOCAL_CLIENT_VIEW_SCHEME_UI_=Local client view naming scheme:
-REUSE_DELETED_CLIENT_VIEW_NAME_UI_=Reuse the deleted remote client view name
-SPECIFY_SUFFIX_UI_=Specify suffix:
-SUFFIX_EXAMPLE_UI_=(For example, enterprise bean \'foo\' will have local client views named: \'fooLocal\' and \'fooLocalHome\'.)
-MIGRATION_SUCCESS_REPORT_UI_=Migration finished successfully.
-MIGRATION_WARNINGS_REPORT_UI_=Migration finished with warnings; see log files for details.
-MIGRATION_ERRORS_REPORT_UI_=Migration finished with errors; see log files for details.
-PROJECT_STRUCTURE_SUCCESS_UI_=Project structure migration successful: {0}.
-PROJECT_STRUCTURE_FAILED_UI_=Project structure migration failed: {0}.
-PROJECT_NOT_NEED_MIGRATION_UI_=Project structure did not need migration: {0}.
-J2EE_VERSION_SUCCESS_UI_=J2EE version level migration successful: {0}.
-J2EE_VERSION_FAILED_UI_=J2EE version level migration failed: {0}.
-J2EE_VERSION_NOT_NEED_MIGRATION_UI_=J2EE version level did not need migration: {0}.
-LOCAL_CLIENT_ADD_SUCCESS_UI_=Local client views added successfully: {0}.
-LOCAL_CLIENT_ADD_FAILED_UI_=Local client views failed on add: {0}.
-LOCAL_CLIENT_VIEWS_EXIST_UI_=Local client views already exist: {0}.
-REMOTE_CLIENT_DELETE_SUCCESS_UI_=Remote client views deleted successfully: {0}.
-REMOTE_CLIENT_DELETE_FAILED_UI_=Remote client views failed on delete: {0}.
-REMOTE_CLIENT_VIEWS_NOT_EXIST_UI_=Remote client views did not exist: {0}.
-JAR_11_IMPORT_20_UI_=The 1.1 JAR is being imported into an EJB 2.0 module. The deployment descriptor will be converted, but the CMP beans remain version 1.1.
-CMP_11_IMPORT_20_UI_=The following CMP 1.1 beans are being imported into an EJB 2.0 module. The deployment descriptor will be converted, but the CMP beans remain version 1.1.
-OLD_PROJECT_STRUCTURE_UI_=The J2EE project {0} has an old project structure, and should be migrated.
-PROJECT_MUST_BE_SELECTED_UI_=A {0} project must be selected.
-ENTERPRISE_APPLICATION_UI_=enterprise application
-APPLICATION_CLIENT_UI_=application client
-EJB_UI_=EJB
-WEB_UI_=WEB
-EJB_MUST_BE_SELECTED_UI_=An enterprise bean must be selected.
-MIGRATE_UI_=Migrate...
-MIGRATE_J2EE_PROJECTS_UI_=Migrate J2EE Projects...
-OPEN_J2EE_MIGRATION_WIZARD_UI_=Open J2EE Migration Wizard...
-MIGRATING_PROJECT_STRUCTURES_UI_=Migrating project structure...
-MIGRATING_J2EE_VERSION_UI_=Migrating project J2EE version level...
-ADDING_LOCAL_CLIENT_VIEWS_UI_=Adding local client views...
-DELETING_REMOTE_CLIENT_VIEWS_UI_=Deleting remote client views...
-MIGRATION_NOT_NEEDED_REPORT=Migration was not needed for the selected items.
-MIGRATION_NOT_POSSIBLE_REPORT=Migration was not possible for the selected items.
-SOURCE_FOLDER_RENAME_FAILED=Unable to rename the Java source folder {0}.
-SOURCE_FOLDER_RENAME_SKIPPED=The Java source folders are not renamed when there is more than one source folder.
-WEBCONTENT_FOLDER_RENAME_FAILED=Unable to rename the web content folder {0}.
-WEBCONTENT_FOLDER_RENAME_SKIPPED=The web content folder {0} not renamed.
-WEBPROJECT_VERSION_MIGRATE_FAILED=Unable to migrate the web project version.
-ABS_PATHS_APP_EXT_REMOVED=Absolute paths were removed from the application extensions file in enterprise application project {0}.
-PROJECT_REFERENCES_UPDATED=Project references were updated in enterprise application project {0}.
-PROJECT_CLASSPATH_UPDATED=Project Java build path was updated for project {0}.
-FAILED_MIGRATING_IMPORTED_CLASSES=Unable to migrate the imported_classes JAR file. Exception: {0}
-EXTRACTED_IMPORTED_CLASSES=Imported classes were extracted from file {0}.
-IMPORTED_CLASSES_FILE_DELETED=Imported classes file {0} was deleted.
-BACKEND_MIGRATION_FAILED=Unable to migrate the Map and Schema file structure in project {0}
-BINARY_MIGRATION_FAILED=Unable to migrate binary project {0}.
-COMPLETED_BACKEND_MIG=The backend (Map and Schema) meta-data of the {0} project migrated successfully.
-NOT_NEEDED_DEPLOYMENT_DESC_MIG=The deployment descriptor was not found in the project {0}.
-NOT_NEEDED_BACKEND_MIG=The old backend (Map and Schema) structure was not found in the project {0}.
-MIGRATION_COMPLETE=Migration Complete
-MIGRATION_ERRORS=Migration Errors
-MIGRATION_NOT_NEEDED=Migration Not Needed
-CONFIRMATION_TITLE=Confirm Migration
-OPEN_EDITORS_TITLE=Open Editors
-CONFIRM_MIGRATE_PROJECT_STRUCTURE=This will migrate the project structure for the selected items to the latest format. Continue?
-CONFIRM_MIGRATE_J2EE_13=This will migrate the project structure for the selected items if necessary, and migrate the J2EE version of the selected items from 1.2 to 1.3. Continue?
-INFORM_OPEN_EDITORS=Open editors exist in the workbench. Please close all editors before running migration.\n\nDo you want to close all editors and continue migration?
-WEBCONTENT_LIBPATH_UPDATE_FAILED=Unable to remove JAR file from classpath.
-FAILED_DEPLOY_DELETE=Failed deleting deploy code in {0} project.
-COMPLETED_DEPLOY_DELETE=Completed delete of deploy code in {0} project.
-FAILED_LOCAL_CLIENT_CREATE=Failed creating local client view for {0}.
-COMPLETED_LOCAL_CLIENT_CREATE=Completed creation of a local client view for {0}.
-COMPLETED_CMP20_CODEGEN=Completed CMP 2.0 code generation in {0} project.
-LOCAL_CLIENT_NOT_NEEDED=A local client view was not created since one already exists for {0}.
-INVALID_SELECTION_TITLE=Invalid Selection
-INFORM_INVALID_J2EE_SELECTION=One or more J2EE 1.4 specification projects have been selected for migration that is not valid.\nOnly J2EE 1.2 or 1.3 specification projects can be migrated.
-INFORM_PROPER_SELECTION=Selection must be one enterprise application project or any combination of EJB, web, and application client module projects.
-REQUIRED_CLIENT_VIEW_TITLE=Client View Required
-CONFIRM_CLIENT_VIEW_REQUIRED=The following beans are required to have client views because of inheritance or relationship rules. These beans will be automatically selected and client views will be generated.
-FILES_OUT_OF_SYNC=Cannot migrate because some resources are out-of-sync with the file system in project {0}. Refresh the project and try again.
-SERVER_TARGET_SETTING_FAILED_UI_=Setting of target server failed: {0}.
-RemoveCompatibilityActionDelegate_UI_0=Warninig
-RemoveCompatibilityActionDelegate_UI_1=Continue Removing Backward Compatibility from Projects?
-JaxrpcmapSpecificationMigrator_UI_1=jaxrpc mapping migration completed successfully
-JaxrpcmapSpecificationMigrator_UI_2=Migration of jaxrpc mapping descriptor is not possible because the module root folder was not found.
-WebServicesClientSpecificationMigrator_UI_0=Web services client migration completed successfully.
-WebServicesClientSpecificationMigrator_UI_1=A valid project is required for Webservices Migration
-WebServicesClientSpecificationMigrator_UI_2=Could not locate Webservices.
-WebServicesClientSpecificationMigrator_UI_3=There is no webservices client file to migrate.
-WebServicesSpecificationMigrator_UI_0=Web services migration completed successfully.
-WebServicesSpecificationMigrator_UI_1=No Web services migration was required
-J2EEProjectStructureMigrationOperation_UI_4=Migration of Web Project version successful
-J2EEProjectStructureMigrationOperation_UI_0="Project {0} -- Renamed \'{1} \' to \'{2}\'.
-J2EEProjectStructureMigrationOperation_UI_1=Problem renaming java source: {0}.
-J2EEProjectStructureMigrationOperation_UI_2="Problem renaming web content: {0}.

Back to the top