Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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/.cvsignore8
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.project29
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.core.prefs95
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/about.html34
-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/ear-wiz-banner.gifbin3213 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-icon.gifbin605 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/ear.gifbin592 -> 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/library_obj.gifbin338 -> 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/prj_obj.gifbin351 -> 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/util-wiz-banner.gifbin2938 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-icon.gifbin338 -> 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/common/jdt/internal/integration/ui/WTPUIWorkingCopyManager.java484
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java1282
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java305
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java643
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IJ2EEDependenciesControl.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.java634
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java244
-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/JARDependencyPropertiesPage.java1101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/SecondCheckBoxStateChangedEvent.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java370
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java225
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java71
-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.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ComponentEditorInput.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ForceClasspathUpdateAction.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java167
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEActionFilterExtensionPoint.java120
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java312
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java460
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java44
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.java111
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.properties13
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.java194
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.properties15
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.java100
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.properties12
-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.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java193
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java100
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java85
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java157
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java172
-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/deployables/EnterpriseDeployableArtifactAdapterFactory.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java212
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/Messages.java26
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java128
-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.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/messages.properties2
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java319
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java381
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java85
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java44
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java146
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java41
-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.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java134
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java69
-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.java332
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java144
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java235
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java195
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java196
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java251
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java253
-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.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java154
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java104
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java197
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java153
-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.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java307
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java119
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java296
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/UtilityModuleProjectItemProvider.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.java444
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.properties2
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableItem.java115
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java184
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/IJavaEEDeploymentAssemblySectionBuilder.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java120
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDependenciesPropertyPage.java484
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierData.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierHelper.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java178
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEComponentDependencyContentProvider.java143
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java440
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java106
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.properties1
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java106
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.properties1
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties18
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/ClasspathDependencyComponentLabelProvider.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/CustomEARProjectReferenceWizardFragment.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependenciesPropertyPage.java457
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependencyPageProvider.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/IJavaEEPreferencePageExtender.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePage.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtension.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtensionReader.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/Messages.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/messages.properties13
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/ContextRootInputPage.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootChange.java130
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootRefactoringProcessor.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootWizard.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/AnnotationIconDecorator.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java44
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java319
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebContextParamGroupItemProvider.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java89
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java95
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java124
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java103
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java91
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentExportWizard.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java248
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java159
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java163
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportPage.java100
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java327
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java302
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java78
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java174
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java231
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java260
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java575
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java290
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java133
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties2
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java420
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java374
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.java97
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEWizardNLS.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java530
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java404
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java748
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java548
-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/earlibraries.properties2
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/messages.properties1
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/IArchiveExportParticipantPanelFactory.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/internal/ArchiveExportParticipantPanelsExtensionPoint.java119
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.java428
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties11
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.properties15
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.java185
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.properties13
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.properties12
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java69
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/javadoc.xml6
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.properties43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.xml857
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/UtilityFacetInstallPage.properties12
-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.properties47
-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.properties362
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties23
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/schema/JavaEEPreferencePageExtender.exsd83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/schema/archiveExportParticipantPanels.exsd127
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/schema/newjavaeeactionfilter.exsd99
384 files changed, 0 insertions, 33431 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.classpath b/plugins/org.eclipse.jst.j2ee.ui/.classpath
deleted file mode 100644
index 3dce472cb..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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <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 678089c03..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-doc
-temp.folder
-build.xml
-j2ee_ui.jar
-@dot
-src.zip
-javaCompiler...args
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/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 04a5d483f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Wed Jul 25 14:00:45 EDT 2007
-eclipse.preferences.version=1
-encoding//j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/earlibraries.properties=8859_1
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 037a4e528..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,95 +0,0 @@
-#Mon Jun 08 15:35:45 EDT 2009
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.builder.invalidClasspath=abort
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-eclipse.preferences.version=1
-org.eclipse.jdt.core.incompleteClasspath=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-instance/org.eclipse.core.net/org.eclipse.core.net.hasMigrated=true
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
diff --git a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 6cf957904..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Apr 13 14:16:39 EDT 2007
-eclipse.preferences.version=1
-internal.default.compliance=default
diff --git a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index 15574080b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,80 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.jst.j2ee.ui; singleton:=true
-Bundle-Version: 1.1.600.qualifier
-Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.common.jdt.internal.integration.ui;x-internal:=true,
- org.eclipse.jst.j2ee.internal;x-internal:=true,
- org.eclipse.jst.j2ee.internal.actions;x-internal:=true,
- org.eclipse.jst.j2ee.internal.classpathdep.ui,
- org.eclipse.jst.j2ee.internal.client.actions;x-internal:=true,
- org.eclipse.jst.j2ee.internal.command;x-internal:=true,
- org.eclipse.jst.j2ee.internal.deployables;x-internal:=true,
- org.eclipse.jst.j2ee.internal.dialogs;x-internal:=true,
- org.eclipse.jst.j2ee.internal.ejb.provider;x-internal:=true,
- org.eclipse.jst.j2ee.internal.listeners;x-internal:=true,
- org.eclipse.jst.j2ee.internal.perspective;x-internal:=true,
- org.eclipse.jst.j2ee.internal.plugin;x-internal:=true,
- org.eclipse.jst.j2ee.internal.provider;x-internal:=true,
- org.eclipse.jst.j2ee.internal.ui;x-internal:=true,
- org.eclipse.jst.j2ee.internal.ui.util;x-internal:=true,
- org.eclipse.jst.j2ee.internal.war.ui.util;x-internal:=true,
- org.eclipse.jst.j2ee.internal.wizard;x-internal:=true,
- org.eclipse.jst.j2ee.ui.archive,
- org.eclipse.jst.j2ee.ui.archive.internal,
- org.eclipse.jst.j2ee.ui.project.facet,
- org.eclipse.jst.j2ee.ui.project.facet.appclient,
- org.eclipse.jst.j2ee.internal.ui.preferences
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.common.frameworks.ui;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jst.j2ee;bundle-version="[1.1.501,1.2.0)",
- org.eclipse.jst.j2ee.ejb;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.j2ee.jca;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.j2ee.web;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.emf.edit.ui;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jdt.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jst.j2ee.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jem.workbench;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.jem;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.common.frameworks;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.server.core;bundle-version="[1.0.102,2.0.0)",
- org.eclipse.wst.server.ui;bundle-version="[1.0.102,2.0.0)",
- org.eclipse.wst.common.emf;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.ltk.core.refactoring;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ltk.ui.refactoring;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.web;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.editors;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.common.modulecore;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.jst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jem.util;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.jst.common.annotations.controller;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.j2ee.ejb.annotation.model;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.wst.common.project.facet.ui;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.jst.server.core;bundle-version="[1.0.102,2.0.0)",
- org.eclipse.wst.web.ui;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.ui.navigator.resources;bundle-version="[3.2.0,4.0.0)",
- com.ibm.icu;bundle-version="3.8.1",
- org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jst.jee;bundle-version="[1.0.0,1.1.0)",
- org.eclipse.jst.common.project.facet.ui;bundle-version="[1.3.1,2.0.0)",
- org.eclipse.jst.common.project.facet.core;bundle-version="[1.3.100,2.0.0)",
- org.eclipse.wst.common.modulecore.ui;bundle-version="1.0.0",
- org.eclipse.jst.common.ui;bundle-version="1.0.0"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.jst.j2ee.ui/about.html b/plugins/org.eclipse.jst.j2ee.ui/about.html
deleted file mode 100644
index 2199df3f0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>June, 2008</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
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 c031d2cf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/build.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 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
-###############################################################################
-bin.includes = plugin.xml,\
- icons/,\
- plugin.properties,\
- .,\
- META-INF/,\
- about.html
-jars.compile.order = .
-source.. = j2ee_ui/,\
- property_files/
-output.. = bin/
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/ear-wiz-banner.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-banner.gif
deleted file mode 100644
index 625e763c9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-banner.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-icon.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-icon.gif
deleted file mode 100644
index 8b409b507..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/ear-wiz-icon.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/ear.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/ear.gif
deleted file mode 100644
index f52fa9702..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/ear.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/library_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/library_obj.gif
deleted file mode 100644
index cb55e33b5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/full/obj16/library_obj.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/prj_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/prj_obj.gif
deleted file mode 100644
index a4ea580d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/prj_obj.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/util-wiz-banner.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-banner.gif
deleted file mode 100644
index 9b93c9a7a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-banner.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-icon.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-icon.gif
deleted file mode 100644
index 2038b22ad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/util-wiz-icon.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/common/jdt/internal/integration/ui/WTPUIWorkingCopyManager.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/common/jdt/internal/integration/ui/WTPUIWorkingCopyManager.java
deleted file mode 100644
index 1b909a221..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/common/jdt/internal/integration/ui/WTPUIWorkingCopyManager.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.common.jdt.internal.integration.ui;
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.ui.JavaPlugin;
-import org.eclipse.jdt.internal.ui.javaeditor.ICompilationUnitDocumentProvider;
-import org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput;
-import org.eclipse.jdt.ui.IWorkingCopyManager;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.IAnnotationModel;
-import org.eclipse.jst.common.jdt.internal.integration.WTPWorkingCopyManager;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
-import org.eclipse.ui.texteditor.IDocumentProvider;
-import org.eclipse.wst.common.frameworks.internal.SaveFailedException;
-
-/**
- * Insert the type's description here. Creation date: (4/25/2001 7:05:36 PM)
- *
- * @author: Administrator
- */
-public class WTPUIWorkingCopyManager extends WTPWorkingCopyManager {
- private IWorkingCopyManager javaWorkingCopyManager;
- private ICompilationUnitDocumentProvider cuDocumentProvider;
- private HashMap editorInputs;
- private CoreException lastError;
-
- /**
- * WTPUIWorkingCopyManager constructor comment.
- */
- public WTPUIWorkingCopyManager() {
- super();
- cuDocumentProvider = JavaPlugin.getDefault().getCompilationUnitDocumentProvider();
- javaWorkingCopyManager = JavaUI.getWorkingCopyManager();
- }
-
- protected void syncConnect(final IEditorInput input, final ICompilationUnit cu) throws CoreException {
- Display d = Display.getCurrent();
- if (d != null) {
- lastError = null;
- d.syncExec(new Runnable() {
- public void run() {
- try {
- connect(input, cu);
- } catch (CoreException e) {
- lastError = e;
- }
- }
- });
- } else
- connect(input, cu);
- if (lastError != null)
- throw lastError;
- }
-
- /**
- * Connect the CompilationUnitDocumentProvider to the
- *
- * @input and connect the annotation model from the provider to the IDocument of the
- * @input.
- */
- protected void connect(IEditorInput input, ICompilationUnit cu) throws CoreException {
- if (input != null && javaWorkingCopyManager != null && cuDocumentProvider != null ) {
- javaWorkingCopyManager.connect(input);
- getEditorInputs().put(cu, input);
- IDocument doc = cuDocumentProvider.getDocument(input);
- if (doc != null && cuDocumentProvider.getAnnotationModel(input)!= null)
- cuDocumentProvider.getAnnotationModel(input).connect(doc);
- }
- }
-
- protected void revertWorkingCopies() {
- if (getEditorInputs().isEmpty())
- return;
- Iterator it = getEditorInputs().values().iterator();
- IEditorInput input;
- while (it.hasNext()) {
- input = (IEditorInput) it.next();
- revert(input);
- }
- }
-
- /**
- * Disonnect the CompilationUnitDocumentProvider from the
- *
- * @input and disconnect the annotation model from the provider from the IDocument of the
- * @input.
- */
- protected void disconnect(IEditorInput input) {
- IDocument doc = cuDocumentProvider.getDocument(input);
- cuDocumentProvider.getAnnotationModel(input).disconnect(doc);
- javaWorkingCopyManager.disconnect(input);
- }
-
- protected void revert(IEditorInput input) {
- try {
- cuDocumentProvider.resetDocument(input);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- IDocument doc = cuDocumentProvider.getDocument(input);
- IAnnotationModel model = cuDocumentProvider.getAnnotationModel(input);
-
- if (model instanceof AbstractMarkerAnnotationModel) {
- AbstractMarkerAnnotationModel markerModel = (AbstractMarkerAnnotationModel) model;
- markerModel.resetMarkers();
- }
- model.disconnect(doc);
- javaWorkingCopyManager.disconnect(input);
- }
-
- protected void disconnectEditorInputs() {
- Iterator it = getEditorInputs().values().iterator();
- IEditorInput input;
- while (it.hasNext()) {
- input = (IEditorInput) it.next();
- disconnect(input);
- }
- }
-
- protected void discardExistingCompilationUnits() {
- if (getEditorInputs().isEmpty())
- return;
- Iterator it = getEditorInputs().values().iterator();
- IEditorInput input;
- while (it.hasNext()) {
- input = (IEditorInput) it.next();
- disconnect(input);
- }
- }
-
- @Override
- public Set getAffectedFiles() {
- Set aSet = new HashSet();
- Iterator it = getEditorInputs().keySet().iterator();
- ICompilationUnit unit = null;
- IResource resource = null;
- while (it.hasNext()) {
- unit = (ICompilationUnit) it.next();
- if (isDirty(unit)) {
- try {
- resource = unit.getUnderlyingResource();
- } catch (JavaModelException ignore) {
- continue;
- }
- if (resource instanceof IFile)
- aSet.add(resource);
- }
- }
- return aSet;
- }
-
- protected IEditorInput getEditorInput(ICompilationUnit cu) {
- IEditorInput input = primGetEditorInput(cu);
- if (input == null) {
- try {
- input = getEditorInput((IJavaElement) cu);
- } catch (JavaModelException e) {
- //Ignore
- }
- }
- return input;
- }
-
- protected IEditorInput getEditorInput(IJavaElement element) throws JavaModelException {
- IJavaElement localElement = element;
- while (localElement != null) {
- switch (localElement.getElementType()) {
- case IJavaElement.COMPILATION_UNIT : {
- ICompilationUnit cu = (ICompilationUnit) localElement;
- if (cu.isWorkingCopy())
- cu = cu.getPrimary();
- IResource resource = cu.getUnderlyingResource();
- if (resource.getType() == IResource.FILE)
- return new FileEditorInput((IFile) resource);
- break;
- }
- case IJavaElement.CLASS_FILE :
- return new InternalClassFileEditorInput((IClassFile) localElement);
- }
- localElement = localElement.getParent();
- }
- return null;
- }
-
- /**
- * Insert the method's description here. Creation date: (4/25/2001 7:30:20 PM)
- *
- * @return java.util.HashMap
- */
- protected java.util.HashMap getEditorInputs() {
- if (editorInputs == null)
- editorInputs = new HashMap(20);
- return editorInputs;
- }
-
- /**
- * Returns the working copy remembered for the compilation unit encoded in the given editor
- * input. Does not connect the edit model to the working copy.
- *
- * @param input
- * ICompilationUnit
- * @return the working copy of the compilation unit, or <code>null</code> if the input does
- * not encode an editor input, or if there is no remembered working copy for this
- * compilation unit
- */
- @Override
- public org.eclipse.jdt.core.ICompilationUnit getExistingWorkingCopy(ICompilationUnit cu) throws CoreException {
- if (cu == null || cu.isWorkingCopy()) {
- return cu;
- }
- ICompilationUnit newCU = super.getExistingWorkingCopy(cu);
- if (newCU != null)
- return newCU;
- IEditorInput editorInput = getEditorInput(cu);
- return javaWorkingCopyManager.getWorkingCopy(editorInput);
- }
-
- /**
- * Returns the working copy remembered for the compilation unit.
- *
- * @param input
- * ICompilationUnit
- * @return the working copy of the compilation unit, or <code>null</code> if there is no
- * remembered working copy for this compilation unit
- */
- @Override
- public org.eclipse.jdt.core.ICompilationUnit getWorkingCopy(ICompilationUnit cu, boolean forNewCU) throws org.eclipse.core.runtime.CoreException {
- if (forNewCU)
- return super.getWorkingCopy(cu, forNewCU);
- return primGetWorkingCopy(cu);
- }
-
- public boolean isDirty(ICompilationUnit cu) {
- if (cu == null)
- return false;
- IDocumentProvider p = cuDocumentProvider;
- return p == null ? false : p.canSaveDocument(getEditorInput(cu));
- }
-
- /**
- * mustSaveDocument method comment.
- */
- public boolean isSaveNeeded() {
- Iterator it = getEditorInputs().entrySet().iterator();
- while (it.hasNext()) {
- if (cuDocumentProvider.mustSaveDocument(it.next()))
- return true;
- }
- return false;
- }
-
- @Override
- protected void primDispose() {
- super.primDispose();
- discardExistingCompilationUnits();
- editorInputs = null;
- javaWorkingCopyManager = null;
- }
-
- @Override
- protected void primRevert() {
- super.primRevert();
- revertWorkingCopies();
- editorInputs = null;
- javaWorkingCopyManager = null;
- }
-
- protected IEditorInput primGetEditorInput(ICompilationUnit cu) {
- return (IEditorInput) getEditorInputs().get(cu);
- }
-
- /**
- * Returns the working copy remembered for the compilation unit encoded in the given editor
- * input.
- *
- * @param input
- * ICompilationUnit
- * @return the working copy of the compilation unit, or <code>null</code> if the input does
- * not encode an editor input, or if there is no remembered working copy for this
- * compilation unit
- */
- @Override
- protected org.eclipse.jdt.core.ICompilationUnit primGetWorkingCopy(ICompilationUnit cu) throws CoreException {
- if (cu == null) {
- return cu;
- }
- ICompilationUnit primary = cu.getPrimary();
- ICompilationUnit newCU = getNewCompilationUnitWorkingCopy(primary);
- if (newCU != null)
- return newCU;
- IEditorInput editorInput = primGetEditorInput(primary);
- if (editorInput == null) {
- editorInput = getEditorInput(cu);
- syncConnect(editorInput, cu);
- }
- if (cu.isWorkingCopy())
- return cu;
- return javaWorkingCopyManager.getWorkingCopy(editorInput);
- }
-
- /**
- * This will save all of the referenced CompilationUnits to be saved.
- */
- @Override
- protected void primSaveCompilationUnits(org.eclipse.core.runtime.IProgressMonitor monitor) {
- super.primSaveCompilationUnits(null);
- saveExistingCompilationUnits(monitor);
- }
-
- protected void primSaveDocument(IEditorInput input, IDocument doc, IProgressMonitor monitor) throws CoreException {
- try {
- cuDocumentProvider.saveDocument(monitor, input, doc, true); // overwrite if needed
- } catch (CoreException ex) {
- if (!isFailedWriteFileFailure(ex))
- throw ex;
- IResource resource = (IResource) input.getAdapter(IRESOURCE_CLASS);
- if (resource == null || resource.getType() != IResource.FILE || !resource.getResourceAttributes().isReadOnly())
- throw ex;
-
- if (getSaveHandler().shouldContinueAndMakeFileEditable((IFile) resource))
- cuDocumentProvider.saveDocument(monitor, input, doc, false);
- else
- throw ex;
- }
- }
-
- protected void saveDocument(IEditorInput input, IProgressMonitor monitor) {
- IDocument doc = cuDocumentProvider.getDocument(input);
- boolean canSave = cuDocumentProvider.canSaveDocument(input);
- try {
- if (canSave) {
- ICompilationUnit unit = javaWorkingCopyManager.getWorkingCopy(input);
- synchronized (unit) {
- cuDocumentProvider.aboutToChange(input);
- primSaveDocument(input, doc, monitor);
- }
- }
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- throw new SaveFailedException(e);
- } finally {
- if (canSave)
- cuDocumentProvider.changed(input);
- }
- }
-
- /**
- * This will save all of the referenced CompilationUnits to be saved.
- */
- protected void saveExistingCompilationUnits(org.eclipse.core.runtime.IProgressMonitor monitor) {
- if (getEditorInputs().isEmpty())
- return;
- if (!validateState()) {
- if (monitor != null)
- monitor.setCanceled(true);
- return;
- }
- Iterator it = getEditorInputs().entrySet().iterator();
- Map.Entry entry;
- // ICompilationUnit cu;
- IEditorInput input;
- try {
- while (it.hasNext()) {
- entry = (Map.Entry) it.next();
- // cu = (ICompilationUnit) entry.getKey();
- input = (IEditorInput) entry.getValue();
- try {
- saveDocument(input, null);
- } finally {
- disconnect(input);
- }
- }
- } finally {
- getEditorInputs().clear();
- }
- }
-
- /**
- * Call validateEdit for all read only IFiles corresponding to each WorkingCopy.
- *
- * @return boolean
- */
- private boolean validateState() {
- List readOnlyFiles = getReadOnlyModifiedFiles();
- if (readOnlyFiles != null && !readOnlyFiles.isEmpty()) {
- IFile[] files = new IFile[readOnlyFiles.size()];
- readOnlyFiles.toArray(files);
- IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- Object ctx = win == null ? null : win.getShell();
- IStatus status = ResourcesPlugin.getWorkspace().validateEdit(files, ctx);
- return status.isOK();
- }
- return true;
- }
-
- private List getReadOnlyModifiedFiles() {
- List readOnlyFiles = null;
- IFile readOnlyFile = null;
- Iterator it = getEditorInputs().entrySet().iterator();
- Map.Entry entry;
- // ICompilationUnit cu;
- IEditorInput input;
- IDocumentProvider docProv = cuDocumentProvider;
- while (it.hasNext()) {
- readOnlyFile = null;
- entry = (Map.Entry) it.next();
- // cu = (ICompilationUnit) entry.getKey();
- input = (IEditorInput) entry.getValue();
- if (docProv.canSaveDocument(input))
- readOnlyFile = getReadOnlyFile(input);
- if (readOnlyFile != null) {
- if (readOnlyFiles == null)
- readOnlyFiles = new ArrayList();
- readOnlyFiles.add(readOnlyFile);
- }
- }
- return readOnlyFiles;
- }
-
- private IFile getReadOnlyFile(IEditorInput input) {
- if (input instanceof IFileEditorInput) {
- IFileEditorInput finput = (IFileEditorInput) input;
- IFile file = finput.getFile();
- if (file.isReadOnly())
- return file;
- }
- return null;
- }
-
-
- @Override
- protected void addDeletedCompilationUnit(ICompilationUnit cu) {
- IEditorInput input = primGetEditorInput(cu);
- if (input != null)
- disconnect(input);
- getEditorInputs().remove(cu);
- super.addDeletedCompilationUnit(cu);
- }
-
- /**
- * @see com.ibm.etools.j2ee.workbench.IJ2EEWorkingCopyManager#hasWorkingCopies()
- */
- @Override
- public boolean hasWorkingCopies() {
- return super.hasWorkingCopies() || (editorInputs != null && !editorInputs.isEmpty());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java
deleted file mode 100644
index 42b92c152..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java
+++ /dev/null
@@ -1,1282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- * Stefan Dimov, stefan.dimov@sap.com - bugs 207826, 222651
- * Milen Manov, milen.manov@sap.com - bugs 248623
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-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.IContentProvider;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualArchiveComponent;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.dialogs.ChangeLibDirDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.DependencyConflictResolveDialog;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.ui.DoubleCheckboxTableItem;
-import org.eclipse.jst.j2ee.internal.ui.DoubleCheckboxTableViewer;
-import org.eclipse.jst.j2ee.model.IEARModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.EarFacetRuntimeHandler;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.jst.j2ee.project.facet.IJavaProjectMigrationDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.JavaProjectMigrationDataModelProvider;
-import org.eclipse.jst.javaee.application.Application;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * @deprecated wtp 3.2
- */
-public class AddModulestoEARPropertiesPage implements IJ2EEDependenciesControl, Listener {
-
- protected final String PATH_SEPARATOR = AvailableJ2EEComponentsForEARContentProvider.PATH_SEPARATOR;
- protected final IProject project;
- protected final J2EEDependenciesPage propPage;
- protected IVirtualComponent earComponent = null;
- protected Text componentNameText;
- protected Label availableModules;
- protected CheckboxTableViewer availableComponentsViewer;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- protected Button projectJarButton;
- protected Button externalJarButton;
- protected Button addVariableButton;
- protected Button changeLibPathButton;
- protected Composite buttonColumn;
-
- protected String libDir = null;
- protected String oldLibDir;
- protected List j2eeComponentList = new ArrayList();
- protected List javaProjectsList = new ArrayList();
- protected List j2eeLibElementList = new ArrayList();
- protected List javaLibProjectsList = new ArrayList();
- protected static final IStatus OK_STATUS = IDataModelProvider.OK_STATUS;
- protected boolean isVersion5;
- protected Set libsToUncheck;
- protected Listener tableListener;
- protected Listener labelListener;
-
- //[Bug 238264] the cached list of jars selected using 'add jar' or 'add external jars'
- protected List<IVirtualComponent> addedJARComponents = new ArrayList<IVirtualComponent>();
-
-
- /**
- * Constructor for AddModulestoEARPropertiesControl.
- */
- public AddModulestoEARPropertiesPage(final IProject project, final J2EEDependenciesPage page) {
- this.project = project;
- this.propPage = page;
- earComponent = ComponentCore.createComponent(project);
- boolean hasEE5Facet = false;
- try {
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if(facetedProject != null){
- IProjectFacetVersion facetVersion = facetedProject.getProjectFacetVersion(EarUtilities.ENTERPRISE_APPLICATION_FACET);
- //EE6TODO
- if(facetVersion.equals(EarUtilities.ENTERPRISE_APPLICATION_50)){
- hasEE5Facet = true;
- }
- }
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- //EE6TODO
- if(hasEE5Facet){
- String earDDVersion = JavaEEProjectUtilities.getJ2EEDDProjectVersion(project);
- if (earDDVersion.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
- isVersion5 = true;
- Application app = (Application)ModelProviderManager.getModelProvider(project).getModelObject();
- if (app != null)
- oldLibDir = app.getLibraryDirectory();
- if (oldLibDir == null) oldLibDir = J2EEConstants.EAR_DEFAULT_LIB_DIR;
- libDir = oldLibDir;
- }
- }
- libsToUncheck = new HashSet();
- }
-
- public Composite createContents(final Composite parent) {
- 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));
- J2EEDependenciesPage.createDescriptionComposite(composite, ManifestUIResourceHandler.EAR_Modules_Desc);
- createListGroup(composite);
- refresh();
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- 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);
-
- availableModules = new Label(listGroup, SWT.NONE);
- gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- availableModules.setText(J2EEUIMessages.getResourceString("AVAILABLE_J2EE_COMPONENTS")); //$NON-NLS-1$ = "Available dependent JARs:"
- availableModules.setLayoutData(gData);
- createTableComposite(listGroup);
- }
-
- public boolean performOk() {
- NullProgressMonitor monitor = new NullProgressMonitor();
- if (isVersion5) {
- if (libDir.length() == 0) {
-
- MessageDialog dlg = new MessageDialog(null,
- J2EEUIMessages.getResourceString(J2EEUIMessages.BLANK_LIB_DIR),
- null, J2EEUIMessages.getResourceString(J2EEUIMessages.BLANK_LIB_DIR_WARN_QUESTION),
- MessageDialog.QUESTION, new String[] {J2EEUIMessages.YES_BUTTON,
- J2EEUIMessages.NO_BUTTON,
- J2EEUIMessages.CANCEL_BUTTON}, 1);
- switch (dlg.open()) {
- case 0: break;
- case 1: {
- handleChangeLibDirButton(false);
- return false;
- }
- case 2: return false;
- default: return false;
- }
- }
- updateLibDir(monitor);
- }
- removeModulesFromEAR(monitor);
- addModulesToEAR(monitor);
- refresh();
- return true;
- }
-
- public void performDefaults() {
- }
-
- public boolean performCancel() {
- return true;
- }
-
- public void dispose() {
- Table table = null;
- if (availableComponentsViewer != null) {
- table = availableComponentsViewer.getTable();
- }
- if(table != null){
- table.removeListener(SWT.Dispose, tableListener);
- table.removeListener(SWT.KeyDown, tableListener);
- table.removeListener(SWT.MouseMove, tableListener);
- table.removeListener(SWT.MouseHover, tableListener);
- }
- }
-
- public void setVisible(boolean visible) {
- }
-
- private List newJ2EEModulesToAdd(boolean inLibFolder){
- if (inLibFolder && !isVersion5) return null;
- List newComps = new ArrayList();
- List comps = inLibFolder ? j2eeLibElementList : j2eeComponentList;
- if (comps != null && !comps.isEmpty()){
- for (int i = 0; i < comps.size(); i++){
- IVirtualComponent handle = (IVirtualComponent)comps.get(i);
- if (ClasspathDependencyUtil.isClasspathComponentDependency(handle)) {
- continue;
- }
- if( !inEARAlready(handle))
- newComps.add(handle);
- }
- }
- return newComps;
- }
-
- private void updateLibDir(IProgressMonitor monitor) {
- if (libDir.equals(oldLibDir)) return;
- final IEARModelProvider earModel = (IEARModelProvider)ModelProviderManager.getModelProvider(project);
- final Application app = (Application)ModelProviderManager.getModelProvider(project).getModelObject();
- oldLibDir = app.getLibraryDirectory();
- if (oldLibDir == null) oldLibDir = J2EEConstants.EAR_DEFAULT_LIB_DIR;
- earModel.modify(new Runnable() {
- public void run() {
- app.setLibraryDirectory(libDir);
- }}, null);
- }
-
- protected void createDD(IProgressMonitor monitor) {
- if( earComponent != null ){
- IDataModelOperation op = generateEARDDOperation();
- try {
- op.execute(monitor, null);
- } catch (ExecutionException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- }
-
- private void execAddOp(IProgressMonitor monitor, List componentList, String path) throws CoreException {
- if (componentList == null || componentList.isEmpty()) return;
- IDataModel dm = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider());
-
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent);
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, componentList);
-
- //[Bug 238264] the uri map needs to be manually set correctly
- Map uriMap = new HashMap();
- IVirtualComponent virtComp;
- String virtCompURIMapName;
- for(int i=0; i<componentList.size(); i++) {
- virtComp = (IVirtualComponent)componentList.get(i);
- virtCompURIMapName = getVirtualComponentNameWithExtension(virtComp);
- uriMap.put(virtComp, virtCompURIMapName);
- }
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
-
- if (isVersion5) dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
-
- IStatus stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- if (stat != OK_STATUS)
- throw new CoreException(stat);
- try {
- dm.getDefaultOperation().execute(monitor, null);
- } catch (ExecutionException e) {
- J2EEUIPlugin.logError(e);
- }
- }
-
- private void execAddOp1(IProgressMonitor monitor, List jProjList, List j2eeCompList, String path)
- throws CoreException {
- if (!jProjList.isEmpty()) {
- Set moduleProjects = new HashSet();
- for (int i = 0; i < jProjList.size(); i++) {
- try {
- IProject proj = (IProject) jProjList.get(i);
- moduleProjects.add(proj);
- IDataModel migrationdm = DataModelFactory.createDataModel(new JavaProjectMigrationDataModelProvider());
- migrationdm.setProperty(IJavaProjectMigrationDataModelProperties.PROJECT_NAME, proj.getName());
- migrationdm.getDefaultOperation().execute(monitor, null);
-
-
- IDataModel refdm = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- List targetCompList = (List) refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
-
- IVirtualComponent targetcomponent = ComponentCore.createComponent(proj);
- targetCompList.add(targetcomponent);
-
- refdm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent);
- refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, targetCompList);
- if (isVersion5) refdm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
-
-
- // referenced java projects should have archiveName attribute
- ((Map)refdm.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP)).put(targetcomponent, proj.getName().replace(' ', '_') + IJ2EEModuleConstants.JAR_EXT);
-
- refdm.getDefaultOperation().execute(monitor, null);
- j2eeCompList.add(targetcomponent);
- } catch (ExecutionException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- EarFacetRuntimeHandler.updateModuleProjectRuntime(earComponent.getProject(), moduleProjects, new NullProgressMonitor());
- } // end
-
- }
-
- private IStatus addModulesToEAR(IProgressMonitor monitor) {
- try {
- if( earComponent != null ){
- final List list = newJ2EEModulesToAdd(false);
- final List bndList = newJ2EEModulesToAdd(true);
- final boolean shouldRun = (list != null && !list.isEmpty()) || !javaProjectsList.isEmpty();
- final boolean shouldBndRun = isVersion5 &&
- ((bndList != null && !bndList.isEmpty()) || !javaLibProjectsList.isEmpty());
- if(shouldRun || shouldBndRun){
- IWorkspaceRunnable runnable = new IWorkspaceRunnable(){
-
- public void run(IProgressMonitor monitor) throws CoreException{
- if (shouldRun) {
- execAddOp(monitor, list, J2EEConstants.EAR_ROOT_DIR);
- execAddOp1(monitor, javaProjectsList, j2eeComponentList, J2EEConstants.EAR_ROOT_DIR);
- }
- if (shouldBndRun) {
- execAddOp(monitor, bndList, libDir);
- execAddOp1(monitor, javaLibProjectsList, j2eeLibElementList, libDir);
- }
- }
- };
- J2EEUIPlugin.getWorkspace().run(runnable, monitor);
- }
- }
- } catch (Exception e) {
- J2EEUIPlugin.logError(e);
- }
-
- //[Bug 238264] clear out the cache because they should all either be added as references now
- // or no longer checked and therefore not wanted by the user
- this.addedJARComponents.clear();
-
- return OK_STATUS;
- }
-
- private void remComps(List list, String path) {
- if( !list.isEmpty()){
- try {
- // remove the components from the EAR
- IDataModelOperation op = removeComponentFromEAROperation(earComponent, list, path);
- op.execute(null, null);
- // if that succeeded, remove all EAR-scope J2EE dependencies on these components
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(earComponent.getProject());
- } catch (ExecutionException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- }
-
- private IStatus removeModulesFromEAR(IProgressMonitor monitor) {
- IStatus stat = OK_STATUS;
- if (!isVersion5) {
- if(earComponent != null && j2eeComponentList != null) {
- List list = getComponentsToRemove();
- remComps(list, J2EEConstants.EAR_ROOT_DIR);
- }
- } else {
- if( earComponent != null && j2eeComponentList != null) {
- List[] list = getComponentsToRemoveUpdate(!libDir.equals(oldLibDir));
- remComps(list[0], J2EEConstants.EAR_ROOT_DIR);
-
- remComps(list[1], oldLibDir);
- }
- }
- return stat;
- }
-
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, earComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- protected IDataModelOperation removeComponentFromEAROperation(IVirtualComponent sourceComponent, List targetComponentsHandles, String dir) {
- IDataModel model = DataModelFactory.createDataModel(new RemoveComponentFromEnterpriseApplicationDataModelProvider());
- model.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, sourceComponent);
- List modHandlesList = (List) model.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- modHandlesList.addAll(targetComponentsHandles);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modHandlesList);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, dir);
- return model.getDefaultOperation();
- }
-
- protected List getComponentsToRemove(){
- //j2eeComponentList = getCheckedJ2EEElementsAsList();
- List list = new ArrayList();
- if( earComponent != null){
- IVirtualReference[] oldrefs = earComponent.getReferences();
- for (int j = 0; j < oldrefs.length; j++) {
- IVirtualReference ref = oldrefs[j];
- IVirtualComponent handle = ref.getReferencedComponent();
- if(!j2eeComponentList.contains(handle) && (isVersion5 ? !j2eeLibElementList.contains(handle) : true)){
- if ((handle instanceof VirtualArchiveComponent) && (isPhysicallyAdded((VirtualArchiveComponent)handle)))
- continue;
- list.add(handle);
- }
- }
- }
- return list;
- }
-
- // EAR5 case
- protected List[] getComponentsToRemoveUpdate(boolean dirUpdated){
- //j2eeComponentList = getCheckedJ2EEElementsAsList();
- List[] list = new ArrayList[2];
- list[0] = new ArrayList();
- list[1] = new ArrayList();
- if( earComponent != null){
- IVirtualReference[] oldrefs = earComponent.getReferences();
- for (int j = 0; j < oldrefs.length; j++) {
- IVirtualReference ref = oldrefs[j];
- IVirtualComponent handle = ref.getReferencedComponent();
- if (handle instanceof VirtualArchiveComponent) {
- VirtualArchiveComponent comp = (VirtualArchiveComponent)handle;
- if (isPhysicallyAdded(comp))
- continue;
- }
- if(!j2eeComponentList.contains(handle) && ref.getRuntimePath().isRoot()) {
- list[0].add(handle);
- }
- if((!j2eeLibElementList.contains(handle) || dirUpdated) &&
- ref.getRuntimePath().toString().equals(oldLibDir)) {
- list[1].add(handle);
- }
- }
- }
- return list;
- }
-
-
- public void handleEvent(Event event) {
- if (event.widget == selectAllButton)
- handleSelectAllButtonPressed();
- else if (event.widget == deselectAllButton)
- handleDeselectAllButtonPressed();
- else if(event.widget == projectJarButton)
- handleSelectProjectJarButton();
- else if(event.widget == externalJarButton)
- handleSelectExternalJarButton();
- else if(event.widget == addVariableButton)
- handleSelectVariableButton();
- else if(event.widget == changeLibPathButton) {
- this.handleChangeLibDirButton(true);
- }
- }
-
- private void handleSelectAllButtonPressed() {
- availableComponentsViewer.setAllChecked(true);
- j2eeComponentList = getCheckedJ2EEElementsAsList(true);
- javaProjectsList = getCheckedJavaProjectsAsList(true);
- if (isVersion5) {
- j2eeLibElementList = getCheckedJ2EEElementsAsList(false);
- javaLibProjectsList = getCheckedJavaProjectsAsList(false);
- }
- }
-
- /**
- * [Bug 279386] Grayed items must not be deselected.
- */
- private void handleDeselectAllButtonPressed() {
- TableItem[] items = availableComponentsViewer.getTable().getItems();
- for (TableItem item : items) {
- if (item.getChecked() && !item.getGrayed()) {
- // uncheck this item if already checked and not grayed
- item.setChecked(false);
- if (isVersion5) {
- ((DoubleCheckboxTableItem) item).setSecondChecked(false);
- }
-
- // remove from the cache lists
- Object comp = item.getData();
- if (comp != null) {
- j2eeComponentList.remove(comp);
- javaProjectsList.remove(comp);
- if (isVersion5) {
- libsToUncheck.remove(comp);
- j2eeLibElementList.remove(comp);
- javaLibProjectsList.remove(comp);
- }
- }
- }
- }
- }
-
- /**
- * [Bug 238264]
- * Add an archive as a potential new reference for this.earComponent
- * NOTE1: the given archive will not be added as a potential reference if there is already a reference to it
- * NOTE2: the given archive will only be added as an actual reference when this.performOk is invoked
- *
- * @param archive the archive to add as a potential new reference in this.earComponent
- *
- */
- private void addPotentialNewReference(IVirtualComponent archive) {
- //check to see if a reference to the given archive already exists
- IVirtualReference [] existingRefs = earComponent.getReferences();
- IVirtualComponent referencedComponent;
- boolean refAlreadyExists = false;
- for(int i=0;i<existingRefs.length && !refAlreadyExists;i++){
- referencedComponent = existingRefs[i].getReferencedComponent();
- refAlreadyExists = referencedComponent.equals(archive);
- }
-
- //only add the archive as a potentialy new reference if it does not already exist
- if(!refAlreadyExists && !j2eeComponentList.contains(archive) && !addedJARComponents.contains(archive)) {
- this.j2eeComponentList.add(archive);
- this.addedJARComponents.add(archive);
- } else {
- //TODO should inform user that they selected an already referenced archive?
- }
- }
-
- private void handleSelectExternalJarButton(){
- IPath[] selected= BuildPathDialogAccess.chooseExternalJAREntries(propPage.getShell());
-
- if (selected != null) {
- for (int i= 0; i < selected.length; i++) {
-
- String type = VirtualArchiveComponent.LIBARCHIVETYPE + IPath.SEPARATOR;
- IVirtualComponent archive = ComponentCore.createArchiveComponent( earComponent.getProject(), type +
- selected[i].toString());
-
- this.addPotentialNewReference(archive);
- }
- refresh();
- }
-
- }
-
- private void handleSelectVariableButton(){
- IPath existingPath[] = new Path[0];
- IPath[] paths = BuildPathDialogAccess.chooseVariableEntries(propPage.getShell(), existingPath);
-
- if (paths != null) {
- refresh();
- for (int i = 0; i < paths.length; i++) {
- IPath resolvedPath= JavaCore.getResolvedVariablePath(paths[i]);
-
- java.io.File file = new java.io.File(resolvedPath.toOSString());
- if( file.isFile() && file.exists()){
- String type = VirtualArchiveComponent.VARARCHIVETYPE + IPath.SEPARATOR;
-
- IVirtualComponent archive = ComponentCore.createArchiveComponent( earComponent.getProject(), type +
- paths[i].toString());
-
- this.addPotentialNewReference(archive);
- }else{
- //display error
- }
- }
- refresh();
- }
- }
-
- private void handleChangeLibDirButton(boolean warnBlank) {
- IVirtualFile vFile = earComponent.getRootFolder().getFile(new Path(J2EEConstants.APPLICATION_DD_URI));
- if (!vFile.exists()) {
- if (!MessageDialog.openQuestion(null,
- J2EEUIMessages.getResourceString(J2EEUIMessages.NO_DD_MSG_TITLE),
- J2EEUIMessages.getResourceString(J2EEUIMessages.GEN_DD_QUESTION))) return;
- createDD(new NullProgressMonitor());
- }
- Application app = (Application)ModelProviderManager.getModelProvider(project).getModelObject();
- if (libDir == null) {
- libDir = app.getLibraryDirectory();
- if (libDir == null) libDir = J2EEConstants.EAR_DEFAULT_LIB_DIR;
- }
-
- ChangeLibDirDialog dlg = new ChangeLibDirDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell(), libDir, warnBlank);
- if (dlg.open() == Dialog.CANCEL) return;
- libDir = dlg.getValue().trim();
- if (libDir.length() > 0) {
- if (!libDir.startsWith(J2EEConstants.EAR_ROOT_DIR)) libDir = IPath.SEPARATOR + libDir;
- }
- setLibDirInContentProvider();
- refresh();
- }
-
-
- protected void createTableComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gData);
- fillComposite(composite);
- }
-
- 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));
- createTable(parent);
- createButtonColumn(parent);
- }
-
- protected void createButtonColumn(Composite parent) {
- buttonColumn = createButtonColumnComposite(parent);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonColumn.setLayoutData(data);
- createPushButtons();
- }
-
- protected void createPushButtons() {
- selectAllButton = createPushButton(SELECT_ALL_BUTTON);
- deselectAllButton = createPushButton(DE_SELECT_ALL_BUTTON);
- projectJarButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.PROJECT_JAR));
- externalJarButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.EXTERNAL_JAR));
- addVariableButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.ADDVARIABLE));
- if (isVersion5) changeLibPathButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.CHANGE_LIB_DIR));
- }
-
- protected Button createPushButton(String label) {
- Button aButton = primCreatePushButton(label, buttonColumn);
- aButton.addListener(SWT.Selection, this);
- aButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- return aButton;
- }
-
- public Button primCreatePushButton(String label, Composite aButtonColumn) {
- Button aButton = new Button(aButtonColumn, SWT.PUSH);
- aButton.setText(label);
- return aButton;
- }
-
- public Composite createButtonColumnComposite(Composite parent) {
- Composite aButtonColumn = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- aButtonColumn.setLayout(layout);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
- aButtonColumn.setLayoutData(data);
- return aButtonColumn;
- }
-
- public Group createGroup(Composite parent) {
- return new Group(parent, SWT.NULL);
- }
-
- protected void createTable(Composite parent) {
- availableComponentsViewer = createavailableComponentsViewer(parent);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.FILL_VERTICAL);
- availableComponentsViewer.getTable().setLayoutData(gd);
-
- if (earComponent != null) {
- int j2eeVersion = J2EEVersionUtil.convertVersionStringToInt(earComponent);
- ILabelDecorator decorator = PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
- AvailableJ2EEComponentsForEARContentProvider provider = new AvailableJ2EEComponentsForEARContentProvider(earComponent, j2eeVersion, decorator);
- decorator.addListener(new ILabelProviderListener(){
-
- public void labelProviderChanged(LabelProviderChangedEvent event) {
- refresh();
- }
- });
- availableComponentsViewer.setContentProvider(provider);
- availableComponentsViewer.setLabelProvider(provider);
-
-
- setLibDirInContentProvider();
- addTableListeners();
- }
- }
-
- private void setLibDirInContentProvider() {
- IContentProvider prov = availableComponentsViewer.getContentProvider();
- if (prov instanceof AvailableJ2EEComponentsForEARContentProvider)
- ((AvailableJ2EEComponentsForEARContentProvider)prov).setCurrentLibDir(libDir);
- }
-
- protected void addTableListeners() {
- addCheckStateListener();
- addHoverHelpListeners();
- }
-
- protected void addHoverHelpListeners() {
- final Table table = availableComponentsViewer.getTable();
- createLabelListener(table);
- createTableListener(table);
- table.addListener(SWT.Dispose, tableListener);
- table.addListener(SWT.KeyDown, tableListener);
- table.addListener(SWT.MouseMove, tableListener);
- table.addListener(SWT.MouseHover, tableListener);
- }
-
- protected void createLabelListener(final Table table) {
- labelListener = new Listener () {
- public void handleEvent (Event event) {
- Label label = (Label)event.widget;
- Shell shell = label.getShell ();
- switch (event.type) {
- case SWT.MouseDown:
- Event e = new Event ();
- e.item = (TableItem) label.getData ("_TABLEITEM"); //$NON-NLS-1$
- table.setSelection (new TableItem [] {(TableItem) e.item});
- table.notifyListeners (SWT.Selection, e);
- shell.dispose ();
- table.setFocus();
- break;
- case SWT.MouseExit:
- shell.dispose ();
- break;
- }
- }
- };
- }
-
- protected void createTableListener(final Table table) {
- tableListener = new Listener () {
- Shell tip = null;
- Label label = null;
- public void handleEvent (Event event) {
- switch (event.type) {
- case SWT.Dispose:
- case SWT.KeyDown:
- case SWT.MouseMove: {
- if (tip == null) break;
- tip.dispose ();
- tip = null;
- label = null;
- break;
- }
- case SWT.MouseHover: {
- TableItem item = table.getItem (new Point (event.x, event.y));
- if (item != null) {
- if (!item.getGrayed())
- return;
- if (tip != null && !tip.isDisposed ()) tip.dispose ();
- tip = new Shell (PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell(), SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL);
- tip.setBackground (Display.getDefault().getSystemColor (SWT.COLOR_INFO_BACKGROUND));
- FillLayout layout = new FillLayout ();
- layout.marginWidth = 2;
- tip.setLayout (layout);
- label = new Label (tip, SWT.WRAP);
- label.setForeground (Display.getDefault().getSystemColor (SWT.COLOR_INFO_FOREGROUND));
- label.setBackground (Display.getDefault().getSystemColor (SWT.COLOR_INFO_BACKGROUND));
- label.setData ("_TABLEITEM", item); //$NON-NLS-1$
- label.setText (J2EEUIMessages.getResourceString(J2EEUIMessages.HOVER_HELP_FOR_DISABLED_LIBS));
- label.addListener (SWT.MouseExit, labelListener);
- label.addListener (SWT.MouseDown, labelListener);
- Point size = tip.computeSize (SWT.DEFAULT, SWT.DEFAULT);
- Rectangle rect = item.getBounds (0);
- Point pt = table.toDisplay (rect.x, rect.y);
- tip.setBounds (pt.x, pt.y - size.y, size.x, size.y);
- tip.setVisible (true);
- }
- }
- }
- }
- };
- }
-
- protected void addCheckStateListener() {
- availableComponentsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- CheckboxTableViewer vr = (CheckboxTableViewer)event.getSource();
- Object element = event.getElement();
- if (vr.getGrayed(element))
- vr.setChecked(element, !vr.getChecked(element));
- if (!(event instanceof SecondCheckBoxStateChangedEvent) && (isVersion5)) {
- Object[] items = ((DoubleCheckboxTableViewer)vr).getUncheckedItems();
- for (int i = 0; i < items.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)items[i];
- if (item.getSecondChecked()) {
- item.setSecondChecked(false);
- libsToUncheck.remove(event.getElement());
- }
- }
- }
- if ((event instanceof SecondCheckBoxStateChangedEvent)) {
- SecondCheckBoxStateChangedEvent evt = (SecondCheckBoxStateChangedEvent)event;
- DoubleCheckboxTableItem tblItem = evt.getTableItem();
- if (tblItem.getSecondChecked() && isConflict(tblItem.getData())) {
- DependencyConflictResolveDialog dlg = new DependencyConflictResolveDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow()
- .getShell(), DependencyConflictResolveDialog.DLG_TYPE_2);
- if (dlg.open() == DependencyConflictResolveDialog.BTN_ID_CANCEL) {
- tblItem.setSecondChecked(false);
- return;
- }
- }
- if (tblItem.getSecondChecked()) {
- if (!tblItem.getChecked())
- tblItem.setChecked(true);
- libsToUncheck.add(event.getElement());
- } else {
- libsToUncheck.remove(event.getElement());
- }
- }
- j2eeComponentList = getCheckedJ2EEElementsAsList(true);
- javaProjectsList = getCheckedJavaProjectsAsList(true);
- if (isVersion5) {
- j2eeLibElementList = getCheckedJ2EEElementsAsList(false);
- javaLibProjectsList = getCheckedJavaProjectsAsList(false);
-
- }
- }
- });
- }
-
- protected List getCPComponentsInEar(boolean inLibFolder) {
- List list = new ArrayList();
- Map pathToComp = new HashMap();
- IVirtualReference refs[] = earComponent.getReferences();
- for( int i=0; i< refs.length; i++){
- IVirtualReference ref = refs[i];
- if ((ref.getRuntimePath().isRoot() && !inLibFolder) ||
- (!ref.getRuntimePath().isRoot() && inLibFolder) ||
- !isVersion5) {
-
- IVirtualComponent comp = ref.getReferencedComponent();
- AvailableJ2EEComponentsForEARContentProvider.addClasspathComponentDependencies(list, pathToComp, comp);
- }
- }
- return list;
- }
-
- protected List getComponentsInEar(boolean inLibFolder) {
- List list = new ArrayList();
- IVirtualReference refs[] = earComponent.getReferences();
- for( int i=0; i< refs.length; i++){
- IVirtualReference ref = refs[i];
- if ((ref.getRuntimePath().isRoot() && !inLibFolder) ||
- (!ref.getRuntimePath().isRoot() && inLibFolder) ||
- !isVersion5) {
-
- IVirtualComponent comp = ref.getReferencedComponent();
- list.add(comp);
- }
- }
- return list;
- }
-
- /**
- *
- * @param componentHandle
- * @return
- * @description returns true is a component is already in the EAR as a dependent
- */
- protected boolean inEARAlready(IVirtualComponent component){
- IVirtualReference refs[] = earComponent.getReferences();
- for( int i=0; i< refs.length; i++){
- IVirtualReference ref = refs[i];
- if ( ref.getReferencedComponent().equals( component ))
- return true;
- }
- return false;
- }
-
- // The next two are used in EAR5 case
- protected List getCheckedJ2EEElementsAsList(boolean singleChecked) {
- Object[] elements;
- if (isVersion5) {
- elements = singleChecked ? ((DoubleCheckboxTableViewer)availableComponentsViewer).getSingleCheckedElements():
- ((DoubleCheckboxTableViewer)availableComponentsViewer).getDoubleCheckedElements();
-
- } else {
- elements = availableComponentsViewer.getCheckedElements();
- }
- List list;
- if (elements == null || elements.length == 0)
- list = new ArrayList(0); // Collections.EMPTY_LIST would cause UnsupportedOperationException when a later attempt to add to it is made
- else {
- list = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IVirtualComponent) {
- list.add(elements[i]);
- }
- }
- }
- return list;
- }
-
- protected List getCheckedJavaProjectsAsList(boolean single) {
- Object[] elements;
- if (isVersion5) {
- elements = single ? ((DoubleCheckboxTableViewer)availableComponentsViewer).getSingleCheckedElements() :
- ((DoubleCheckboxTableViewer)availableComponentsViewer).getDoubleCheckedElements();
- } else {
- elements = availableComponentsViewer.getCheckedElements();
- }
-
- List list;
- if (elements == null || elements.length == 0)
- list = new ArrayList(0); // Collections.EMPTY_LIST would cause UnsupportedOperationException when a later attempt to add to it is made
- else {
- list = new ArrayList();
- for (int i = 0; i < elements.length; i++) {
- if (elements[i] instanceof IProject) {
- list.add(elements[i]);
- }
- }
- }
- return list;
- }
-
- protected List getLibFolderLibsAsList() {
- Object[] items = ((DoubleCheckboxTableViewer)availableComponentsViewer).getSecondCheckedItems();
- List list;
- if (items == null || items.length == 0)
- list = new ArrayList(0); // Collections.EMPTY_LIST would cause UnsupportedOperationException when a later attempt to add to it is made
- else {
- list = new ArrayList();
- for (int i = 0; i < items.length; i++) {
- Object element = ((DoubleCheckboxTableItem)items[i]).getData();
- if (element instanceof IProject) {
- list.add(element);
- }
- }
- }
- return list;
- }
-
- public CheckboxTableViewer createavailableComponentsViewer(Composite parent) {
- int flags = SWT.CHECK | SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI;
-
- Table table = isVersion5 ? new Table(parent, flags) : new Table(parent, flags);
- availableComponentsViewer = isVersion5 ? new DoubleCheckboxTableViewer(table, 2) : 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));
- if (isVersion5) tableLayout.addColumnData(new ColumnWeightData(200, true));
- table.setLayout(tableLayout);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- availableComponentsViewer.setSorter(null);
-
- // table columns
- TableColumn fileNameColumn = new TableColumn(table, SWT.NONE, 0);
- fileNameColumn.setText(ManifestUIResourceHandler.JAR_Module_UI_);
- fileNameColumn.setResizable(true);
-
- TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(ManifestUIResourceHandler.Project_UI_);
- projectColumn.setResizable(true);
-
- if (isVersion5) {
- TableColumn bndColumn = new TableColumn(table, SWT.NONE, 2);
- bndColumn.setText(ManifestUIResourceHandler.Packed_In_Lib_UI_);
- bndColumn.setResizable(true);
- }
-
- tableLayout.layout(table, true);
- return availableComponentsViewer;
-
- }
-
- private boolean secondShouldBeDisabled(IVirtualComponent component) {
- if(component.isBinary()) return false;
- if (JavaEEProjectUtilities.isApplicationClientComponent(component)) return true;
- if (JavaEEProjectUtilities.isEARProject(component.getProject()) && component.isBinary()) return false;
- if (JavaEEProjectUtilities.isEJBComponent(component)) return true;
- if (JavaEEProjectUtilities.isDynamicWebComponent(component)) return true;
- if (JavaEEProjectUtilities.isJCAComponent(component)) return true;
- if (JavaEEProjectUtilities.isStaticWebProject(component.getProject())) return true;
- if (JavaEEProjectUtilities.isProjectOfType(component.getProject(), IJ2EEFacetConstants.JAVA)) return false;
- return false;
- }
-
- private boolean isPhysicallyAdded(VirtualArchiveComponent component) {
- try {
- if(component.getWorkspaceRelativePath() == null || !component.getWorkspaceRelativePath().segment(0).equals(earComponent.getName()))
- return false;
- component.getProjectRelativePath();
- return true;
- } catch (IllegalArgumentException e) {
- return false;
- }
- }
-
- private boolean isInLibDir(VirtualArchiveComponent comp) {
- IPath p = comp.getProjectRelativePath();
- if (p.segmentCount() == 2)
- return false;
- return true;
- }
-
-
- public void refresh() {
- if(availableComponentsViewer.getContentProvider() == null){
- return;
- }
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- availableComponentsViewer.setInput(input);
- GridData data = new GridData(GridData.FILL_BOTH);
- int numlines = Math.min(10, availableComponentsViewer.getTable().getItemCount());
- data.heightHint = availableComponentsViewer.getTable().getItemHeight() * numlines;
- availableComponentsViewer.getTable().setLayoutData(data);
-
- //[Bug 238264] for all the jars in the cache temparaly list them in the grid
- // until the user applys the changes
- for(IVirtualComponent jarComponent : this.addedJARComponents) {
- availableComponentsViewer.add(jarComponent);
- }
-
- TableItem [] items = availableComponentsViewer.getTable().getItems();
- List list = new ArrayList();
- //Object[] comps = getComponentsInEar();
- List cpComps;
- List cpLibComps = new LinkedList();
- HashSet j2eeComponentSet = new HashSet();
- HashSet j2eeLibComponentSet = new HashSet();
- if (isVersion5) {
- if( j2eeComponentList.isEmpty() ){
- List comps = getComponentsInEar(false);
- j2eeComponentList.addAll(comps);
- }
- if( j2eeLibElementList.isEmpty() ){
- List comps = getComponentsInEar(true);
- j2eeLibElementList.addAll(comps);
- }
- // get all Classpath contributions to the Ear
- cpComps = getCPComponentsInEar(false);
- j2eeComponentList.addAll(cpComps);
- cpLibComps = getCPComponentsInEar(true);
- j2eeLibElementList.addAll(cpLibComps);
- for (int i = 0; i < j2eeLibElementList.size(); i++) {
- j2eeLibComponentSet.add(j2eeLibElementList.get(i));
- }
-
- } else {
- if( j2eeComponentList.isEmpty() ){
- List comps = getComponentsInEar(false);
- j2eeComponentList.addAll(comps);
- }
- // get all Classpath contributions to the Ear
- cpComps = getCPComponentsInEar(false);
- j2eeComponentList.addAll(cpComps);
- }
- for (int i = 0; i < j2eeComponentList.size(); i++) {
- j2eeComponentSet.add(j2eeComponentList.get(i));
- }
-
- for (int i = 0; i < items.length; i++) {
- Object element = items[i].getData();
- try {
- if (element instanceof IVirtualComponent ||
- (element instanceof IProject && ((IProject) element).hasNature(JavaCore.NATURE_ID))) {
- if (j2eeComponentSet.contains(element)) {
- list.add(element);
- }
- boolean shouldBeDisabled = false;
- if (element instanceof VirtualArchiveComponent) {
- shouldBeDisabled = isPhysicallyAdded((VirtualArchiveComponent)element);
- if (shouldBeDisabled) {
- items[i].setChecked(true);
- items[i].setGrayed(true);
- }
- }
- if (isVersion5) {
- DoubleCheckboxTableItem dcbItem = (DoubleCheckboxTableItem)items[i];
- boolean secondEnabled = true;
- if (element instanceof IVirtualComponent)
- secondEnabled = !secondShouldBeDisabled((IVirtualComponent) element);
- if (shouldBeDisabled) {
- dcbItem.setSecondChecked(isInLibDir((VirtualArchiveComponent)element));
- dcbItem.setSecondEnabled(false);
- } else {
- dcbItem.setSecondChecked(j2eeLibComponentSet.contains(element));
- dcbItem.setSecondEnabled(secondEnabled);
- }
- if (j2eeLibComponentSet.contains(element)) list.add(element);
- }
- }
- } catch (CoreException e) {
- J2EEUIPlugin.logError(0, e.getMessage(), e);
- }
- }
-
- for (int i = 0; i < list.size(); i++)
- availableComponentsViewer.setChecked(list.get(i), true);
- GridData btndata = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
- buttonColumn.setLayoutData(btndata);
-
- }
-
- private boolean isConflict(Object lib) {
- IProject libProj = (lib instanceof IProject) ? (IProject)lib : ((IVirtualComponent)lib).getProject();
- IProject earProject = earComponent.getProject();
- try {
- IProject[] earRefProjects = earProject.getReferencedProjects();
- for (int i = 0; i < earRefProjects.length; i++) {
- if (!JavaEEProjectUtilities.isEARProject(earRefProjects[i]) &&
- !earRefProjects[i].equals(libProj)) {
- IVirtualComponent cmp1 = ComponentCore.createComponent(earRefProjects[i]);
- if (cmp1 != null) {
- IVirtualReference[] refs = cmp1.getReferences();
- for (int j = 0; j < refs.length; j++) {
- if (refs[j].getReferencedComponent().getProject().equals(libProj)) return true;
- }
- }
- }
- }
- return false;
- } catch (CoreException ce) {
- J2EEUIPlugin.logError(ce);
- }
- return false;
- }
-
- private void handleSelectProjectJarButton(){
- IPath[] selected= BuildPathDialogAccess.chooseJAREntries(propPage.getShell(), project.getLocation(), new IPath[0]);
-
- if (selected != null) {
- for (int i= 0; i < selected.length; i++) {
- //IPath fullPath = project.getFile(selected[i]).getFullPath();
- String type = VirtualArchiveComponent.LIBARCHIVETYPE + IPath.SEPARATOR;
- IVirtualComponent archive = ComponentCore.createArchiveComponent( earComponent.getProject(), type +
- selected[i].makeRelative().toString());
-
- this.addPotentialNewReference(archive);
- }
- refresh();
- }
-
- }
-
- /**
- * [Bug 238264]
- * determines a unique URI mapping name for a given component
- * this is in case two components have the same name.
- *
- * @return returns a valid (none duplicate) uri mapping name for the given component\
- */
- private String getURIMappingName(IVirtualComponent archive) {
-
- //get the default uri map name for the given archive
- IPath componentPath = Path.fromOSString(archive.getName());
- String uriMapName = componentPath.lastSegment().replace(' ', '_');
-
-
- //check to be sure this uri mapping is not already in use by another reference
- boolean dupeArchiveName;
- int lastDotIndex;
- String increment;
- IVirtualReference [] existingRefs = earComponent.getReferences();
- for(int i=0;i<existingRefs.length;i++){
- existingRefs[i].getReferencedComponent().getName();
-
- //if uri mapping names of the refed component and the given archive are the same
- // find a new uri map name for the given archive
- if(existingRefs[i].getArchiveName().equals(uriMapName)){
- dupeArchiveName = true;
- //find a new uriMapName for the given component
- for(int j=1; dupeArchiveName; j++){
- lastDotIndex = uriMapName.lastIndexOf('.');
- increment = "_"+j; //$NON-NLS-1$
-
- //create the new potential name
- if(lastDotIndex != -1){
- uriMapName = uriMapName.substring(0, lastDotIndex) + increment + uriMapName.substring(lastDotIndex);
- } else {
- uriMapName = uriMapName.substring(0)+increment;
- }
-
- //determine if the new potential name is valid
- for(int k=0; k<existingRefs.length; k++) {
- dupeArchiveName = existingRefs[k].getArchiveName().equals(uriMapName);
- if(dupeArchiveName) {
- break;
- }
- }
- }
- }
- }
-
- return uriMapName;
- }
-
- /**
- * Method returns the name of the given IVirtualComponent being sure the correct extension
- * is on the end of the name, this is important for internal projects. Added for [Bug 241509]
- *
- * @param virtComp the IVirtualComponent to get the name of with the correct extension
- * @return the name of the given IVirtualComponent with the correct extension
- */
- private String getVirtualComponentNameWithExtension(IVirtualComponent virtComp) {
- String virtCompURIMapName = this.getURIMappingName(virtComp);
-
- boolean linkedToEAR = true;
- try {
- if(virtComp.isBinary()){
- linkedToEAR = ((J2EEModuleVirtualArchiveComponent)virtComp).isLinkedToEAR();
- ((J2EEModuleVirtualArchiveComponent)virtComp).setLinkedToEAR(false);
- }
- if(JavaEEProjectUtilities.isDynamicWebComponent(virtComp)) {
- if(!virtCompURIMapName.endsWith(IJ2EEModuleConstants.WAR_EXT)) {
- //web module URIs need to end in WAR
- virtCompURIMapName += IJ2EEModuleConstants.WAR_EXT;
- }
- } else if(JavaEEProjectUtilities.isJCAComponent(virtComp)) {
- if(!virtCompURIMapName.endsWith(IJ2EEModuleConstants.RAR_EXT)) {
- //connector module URIs need to end in RAR
- virtCompURIMapName += IJ2EEModuleConstants.RAR_EXT;
- }
- } else if(!virtCompURIMapName.endsWith(IJ2EEModuleConstants.JAR_EXT)) {
- //all other modules (EJB, AppClient, Utility) need to end in JAR
- virtCompURIMapName += IJ2EEModuleConstants.JAR_EXT;
- }
- } finally {
- if(virtComp.isBinary()){
- ((J2EEModuleVirtualArchiveComponent)virtComp).setLinkedToEAR(linkedToEAR);
- }
- }
- return virtCompURIMapName;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java
deleted file mode 100644
index f1f648d0e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- * Milen Manov, milen.manov@sap.com - bugs 248623
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProvider;
-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.ClassPathSelection;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.IEARModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.javaee.application.Application;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class AvailableJ2EEComponentsForEARContentProvider extends LabelProvider
- implements IStructuredContentProvider, ITableLabelProvider {
-
- final static String PATH_SEPARATOR = String.valueOf(IPath.SEPARATOR);
-
- private int j2eeVersion;
- private IVirtualComponent earComponent;
- private boolean isEE5 = false;
- private String libDir = null;
-
- private ILabelDecorator decorator = PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
-
- private ILabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- public AvailableJ2EEComponentsForEARContentProvider(IVirtualComponent aEarComponent, int j2eeVersion) {
- super();
- this.j2eeVersion = j2eeVersion;
- earComponent = aEarComponent;
- }
-
- public AvailableJ2EEComponentsForEARContentProvider(IVirtualComponent aEarComponent, int j2eeVersion, ILabelDecorator decorator) {
- this(aEarComponent, j2eeVersion);
- this.decorator = decorator;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- */
- public Object[] getElements(Object inputElement) {
- if (null != earComponent){
- isEE5 = J2EEProjectUtilities.isJEEProject(earComponent.getProject());
- }
- 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();
- Map pathToComp = new HashMap();
- for (int i = 0; i < projects.length; i++) {
- // get flexible project
- IProject project = projects[i];
- if(ModuleCoreNature.isFlexibleProject(project)){
- IVirtualComponent component = ComponentCore.createComponent(project);
- if (JavaEEProjectUtilities.isApplicationClientProject(project) ||
- JavaEEProjectUtilities.isEJBProject(project) ||
- JavaEEProjectUtilities.isDynamicWebProject(project) ||
- JavaEEProjectUtilities.isJCAProject(project) ||
- JavaEEProjectUtilities.isUtilityProject(project) ){
- int compJ2EEVersion = J2EEVersionUtil.convertVersionStringToInt(component);
- if( compJ2EEVersion <= j2eeVersion){
- validCompList.add(component);
- } else if(isEE5){
- validCompList.add(component);
- }
- }else if(null != earComponent && JavaEEProjectUtilities.isEARProject(project)){
- //find the ArchiveComponent
- if (component.equals( earComponent )) {
- if (isEE5) {
- String earDDVersion = JavaEEProjectUtilities.getJ2EEDDProjectVersion(project);
- //EE6TODO
- boolean isDDVersion5 = earDDVersion.equals(J2EEVersionConstants.VERSION_5_0_TEXT) ? true : false;
- if (isDDVersion5) {
- Application app = (Application)ModelProviderManager.getModelProvider(project).getModelObject();
- if (libDir == null)
- libDir = app.getLibraryDirectory();
- if (libDir == null)
- libDir = J2EEConstants.EAR_DEFAULT_LIB_DIR;
- }
- }
- IVirtualReference[] newrefs = component.getReferences();
- for( int k=0; k< newrefs.length; k++ ){
- IVirtualReference tmpref = newrefs[k];
- IVirtualComponent referencedcomp = tmpref.getReferencedComponent();
- boolean isBinary = referencedcomp.isBinary();
- if( isBinary ){
- if (shouldShow(referencedcomp))
- validCompList.add(referencedcomp);
- } else {
- addClasspathComponentDependencies(validCompList, pathToComp, referencedcomp);
- }
- }
- }
- }
- } else
- try {
- if (project.exists() && project.isAccessible() && project.hasNature("org.eclipse.jdt.core.javanature") ){ //$NON-NLS-1$
- if( !project.getName().startsWith(".") ) //$NON-NLS-1$
- validCompList.add(project);
- }
- } catch (CoreException e) {
- Logger.getLogger().log(e);
- }
- }
- return validCompList.toArray();
- }
-
- public void setCurrentLibDir(String libDir) {
- this.libDir = libDir;
- }
-
- private boolean shouldShow(IVirtualComponent component) {
- if (!component.isBinary())
- return true;
-
- IFile workspaceFile = (IFile)component.getAdapter(IFile.class);
- if( workspaceFile == null )
- return true;
- if( workspaceFile.getFullPath().segment(0).equals(earComponent.getName()))
- return true;
-
- IPath p = workspaceFile.getProjectRelativePath();
- if ((p == null) || (p.segmentCount() == 0))
- return true;
- IContainer f = earComponent.getRootFolder().getUnderlyingFolder();
- String rootFolderName = f.getProjectRelativePath().segment(0);
- if (!p.segment(0).equals(rootFolderName))
- return false;
- if (p.segmentCount() == 2)
- return true;
- if (isEE5) {
- String strippedLibDir = stripSeparators(libDir);
- String[] libDirSegs = strippedLibDir.split(PATH_SEPARATOR);
- if (p.segmentCount() - 2 != libDirSegs.length)
- return false;
- for (int i = 0; i < libDirSegs.length; i++)
- if (!libDirSegs[i].equals(p.segment(i + 1)))
- return false;
- return true;
- }
- return false;
- }
-
- private String stripSeparators(final String dir) {
- String returnDir = dir;
- if (returnDir.startsWith(PATH_SEPARATOR))
- returnDir = returnDir.substring(1);
- if (returnDir.endsWith(PATH_SEPARATOR))
- returnDir = returnDir.substring(0, returnDir.length() - 1);
- return returnDir;
- }
-
- public static void addClasspathComponentDependencies(final List componentList, final Map pathToComp, final IVirtualComponent referencedComponent) {
- if (referencedComponent instanceof J2EEModuleVirtualComponent) {
- J2EEModuleVirtualComponent j2eeComp = (J2EEModuleVirtualComponent) referencedComponent;
- IVirtualReference[] cpRefs = j2eeComp.getJavaClasspathReferences();
- for (int j=0; j < cpRefs.length; j++) {
- // only ../ mappings supported at this level
- if (!cpRefs[j].getRuntimePath().equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- continue;
- }
- // if the absolute path for this component already has a mapping, skip (the comp might be contributed by more than
- // one child module)
- final IPath path = ClasspathDependencyUtil.getClasspathVirtualReferenceLocation(cpRefs[j]);
- final IVirtualComponent comp = (IVirtualComponent) pathToComp.get(path);
- if (comp != null) {
- // replace with a temp VirtualArchiveComponent whose IProject is set to a new pseudo name that is
- // the concatenation of all project contributions for that archive
- if (comp.isBinary()) {
- componentList.remove(comp);
- IVirtualComponent newComponent = ClassPathSelection.updateVirtualArchiveComponentDisplay(comp, cpRefs[j]);
- pathToComp.put(path, newComponent);
- componentList.add(newComponent);
- }
- continue;
- }
- pathToComp.put(path, cpRefs[j].getReferencedComponent());
- componentList.add(cpRefs[j].getReferencedComponent());
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex < 2){
- if (element instanceof IVirtualComponent) {
- IVirtualComponent comp = (IVirtualComponent)element;
- return getDecoratedImage(comp);
- } else if (element instanceof IProject){
- return workbenchLabelProvider.getImage(element);
- }
- }
- return null;
- }
-
- private Image getDecoratedImage(IVirtualComponent comp) {
- return getDecoratedImage(comp.getProject());
- }
-
- private Image getDecoratedImage(IProject project) {
- Image image = workbenchLabelProvider.getImage(project);
- if (decorator != null) {
- Image decorated = decorator.decorateImage(image, project);
- if (decorated != null) {
- return decorated;
- }
- }
- return image;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof IVirtualComponent) {
- IVirtualComponent comp = (IVirtualComponent)element;
- String name = ""; //$NON-NLS-1$
- if( columnIndex == 0 ){
- if (ClasspathDependencyUtil.isClasspathComponentDependency(comp)) {
- return ClasspathDependencyUtil.getClasspathComponentDependencyDisplayString(comp);
- }
- IModelProvider provider = ModelProviderManager.getModelProvider(earComponent.getProject());
- if (provider instanceof IEARModelProvider)
- {
- name = ((IEARModelProvider)provider).getModuleURI(comp);
- }
- if( name == null || name == "" ){ //$NON-NLS-1$
- name = comp.getName();
- }
- return name;
- } else if (columnIndex == 1) {
- return comp.getProject().getName();
- } else if (columnIndex == 2) {
- return ""; //$NON-NLS-1$
- }
- } else if (element instanceof IProject){
- if (columnIndex != 2) {
- return ((IProject)element).getName();
- }
- return ""; //$NON-NLS-1$
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- @Override
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java
deleted file mode 100644
index 163ae74c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClassHelperAdapterFactory.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-
-public class ClassHelperAdapterFactory implements IAdapterFactory {
-
- private static final Class IFILE_CLASS = IFile.class;
- private static final Class IRESOURCE_CLASS = IResource.class;
-
- private static final Class[] ADAPTER_TYPES = new Class[] {
- IFILE_CLASS, IRESOURCE_CLASS
- };
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if(IRESOURCE_CLASS == adapterType || IFILE_CLASS == adapterType) {
- if(adaptableObject instanceof J2EEJavaClassProviderHelper) {
- J2EEJavaClassProviderHelper provider = (J2EEJavaClassProviderHelper) adaptableObject;
- try {
- IResource resource = (IResource) provider.getAdapter(IRESOURCE_CLASS);
- return resource;
- } catch (RuntimeException e) {
- J2EEUIPlugin.logError(0, e.getMessage(), e);
- return null;
- }
- }
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return ADAPTER_TYPES;
- }
-
-}
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 a18b0d382..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java
+++ /dev/null
@@ -1,643 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-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.componentcore.J2EEModuleVirtualArchiveComponent;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModel;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModelEvent;
-import org.eclipse.jst.j2ee.internal.dialogs.DependencyConflictResolveDialog;
-import org.eclipse.jst.j2ee.internal.listeners.IValidateEditListener;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.wizard.AvailableJarsProvider;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-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;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-/**
- * @author jialin
- */
-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;
- /**
- * @deprecated this field should be removed
- */
- protected boolean isWLPEntry;
- protected Group radioGroup;
-
- protected boolean readOnly;
- protected AvailableJarsProvider availableJarsProvider;
- protected Button externalJarButton;
- protected Button projectJarButton;
- protected Button addVariableButton;
-
- protected Set compsToUncheck = new HashSet();
-
- /**
- * Constructor for ButtonBarManager.
- */
- public ClasspathTableManager(IClasspathTableOwner owner, ClasspathModel model) {
- this(owner, model, null);
- }
-
- 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);
- }
-
- public void fillWLPComposite(Composite parent) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.FILL_BOTH));
- createTable(parent);
- createWLPButtonColumn(parent);
- }
-
- public void fillWebRefComposite(Composite parent) {
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 0;
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(GridData.FILL_BOTH));
- createTable(parent);
- createWebRefButtonColumn(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) {
- 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 createWLPButtonColumn(Composite parent) {
- buttonColumn = owner.createButtonColumnComposite(parent);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonColumn.setLayoutData(data);
- createWLPPushButtons();
- }
-
- protected void createWebRefButtonColumn(Composite parent) {
- buttonColumn = owner.createButtonColumnComposite(parent);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_END);
- buttonColumn.setLayoutData(data);
- createWebRefPushButtons();
- }
-
- 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 createWLPPushButtons() {
- selectAllButton = createPushButton(SELECT_ALL_BUTTON);
- deselectAllButton = createPushButton(DE_SELECT_ALL_BUTTON);
- projectJarButton = createPushButton(J2EEUIMessages.getResourceString("PROJECT_JAR")); //$NON-NLS-1$
- externalJarButton = createPushButton(J2EEUIMessages.getResourceString("EXTERNAL_JAR")); //$NON-NLS-1$
- addVariableButton = createPushButton(J2EEUIMessages.getResourceString("ADDVARIABLE"));//$NON-NLS-1$
- if (isReadOnly()) {
- selectAllButton.setEnabled(false);
- deselectAllButton.setEnabled(false);
- projectJarButton.setEnabled(false);
- externalJarButton.setEnabled(false);
- addVariableButton.setEnabled(false);
- }
- }
-
- protected void createWebRefPushButtons() {
- selectAllButton = createPushButton(SELECT_ALL_BUTTON);
- deselectAllButton = createPushButton(DE_SELECT_ALL_BUTTON);
- if (isReadOnly()) {
- selectAllButton.setEnabled(false);
- deselectAllButton.setEnabled(false);
- }
- }
-
- 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 void createWebLibPushButtons() {
- selectAllButton = createPushButton(SELECT_ALL_BUTTON);
- deselectAllButton = createPushButton(DE_SELECT_ALL_BUTTON);
- projectJarButton = createPushButton(J2EEUIMessages.getResourceString("PROJECT_JAR")); //$NON-NLS-1$
- externalJarButton = createPushButton(J2EEUIMessages.getResourceString("EXTERNAL_JAR")); //$NON-NLS-1$
- addVariableButton = createPushButton(J2EEUIMessages.getResourceString("ADDVARIABLE"));//$NON-NLS-1$
- if (isReadOnly()) {
- 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) {
-
- ClasspathModelEvent evt = new ClasspathModelEvent(ClasspathModelEvent.CLASS_PATH_CHANGED);
- model.fireNotification(evt);
- 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();
- else if(event.widget == projectJarButton)
- handleSelectProjectJarButton();
- else if(event.widget == externalJarButton)
- handleSelectExternalJarButton();
- else if(event.widget == addVariableButton)
- handleSelectVariableButton();
- }
-
- private void handleSelectExternalJarButton(){
- //owner.handleSelectExternalJarButton();
- if( owner instanceof WebLibDependencyPropertiesPage){
- WebLibDependencyPropertiesPage control = (WebLibDependencyPropertiesPage)owner;
- control.handleSelectExternalJarButton();
- }
- }
- private void handleSelectProjectJarButton(){
- //owner.handleSelectExternalJarButton();
- if( owner instanceof WebLibDependencyPropertiesPage){
- WebLibDependencyPropertiesPage control = (WebLibDependencyPropertiesPage)owner;
- control.handleSelectProjectJarButton();
- }
- }
-
- private void handleSelectVariableButton(){
- //owner.handleSelectVariableButton();
- if( owner instanceof WebLibDependencyPropertiesPage){
- WebLibDependencyPropertiesPage control = (WebLibDependencyPropertiesPage)owner;
- control.handleSelectVariableButton();
- }
- }
-
- 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);
- compsToUncheck.clear();
- }
-
- protected void selectAllButtonSelected() {
- if (!validatateEdit())
- return;
- availableJARsViewer.setAllChecked(true);
- Object[] elements = availableJARsViewer.getCheckedElements();
- model.setAllClasspathElementsSelected(Arrays.asList(elements), true);
- for (int i = 0; i < elements.length; i++) {
- ClasspathElement el = (ClasspathElement)elements[i];
- el.getComponent().getAdapter(IVirtualComponent.class);
- IVirtualComponent ar = el.getTargetComponent();
- IVirtualComponent comp = (ar instanceof J2EEModuleVirtualArchiveComponent) ? ar : el.getComponent();
- if (isLibrary(comp))
- compsToUncheck.add(comp);
- }
- }
-
- protected java.util.List getSelectionAsList() {
- return ((IStructuredSelection) availableJARsViewer.getSelection()).toList();
- }
-
- protected java.util.List getCheckedLibsAsList() {
- List res = new LinkedList();
- Iterator it = compsToUncheck.iterator();
- while (it.hasNext()) {
- IVirtualComponent comp = (IVirtualComponent)it.next();
- res.add(comp);
- }
- return res;
- }
-
- 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();
- if (upButton != null && downButton != null) {
- 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);
- }
- });
- }
-
- private boolean isLibrary(IVirtualComponent component) {
- if (JavaEEProjectUtilities.isApplicationClientComponent(component)) return false;
- if (JavaEEProjectUtilities.isEARProject(component.getProject()) && component.isBinary()) return true;
- if (JavaEEProjectUtilities.isEJBComponent(component)) return false;
- if (JavaEEProjectUtilities.isDynamicWebComponent(component)) return false;
- if (JavaEEProjectUtilities.isJCAComponent(component)) return false;
- if (JavaEEProjectUtilities.isStaticWebProject(component.getProject())) return false;
- if (JavaEEProjectUtilities.isProjectOfType(component.getProject(), IJ2EEFacetConstants.JAVA)) return true;
- return true;
- }
-
- protected void availableJARCheckStateChanged(CheckStateChangedEvent event) {
- ClasspathElement el = (ClasspathElement)event.getElement();
- //226823 targeting a regular java project from web libs
- if(el.getComponent() == null){
- ClasspathElement element = (ClasspathElement) event.getElement();
- model.setSelection(element, event.getChecked());
- return;
- }
- el.getComponent().getAdapter(IVirtualComponent.class);
- IVirtualComponent ar = el.getTargetComponent();
- IVirtualComponent comp = (ar instanceof J2EEModuleVirtualArchiveComponent) ? ar : el.getComponent();
- CheckboxTableViewer v = (CheckboxTableViewer)event.getSource();
- if (isLibrary(comp) && event.getChecked()) {
- if (isConflict(comp)) {
- DependencyConflictResolveDialog dlg = new DependencyConflictResolveDialog(PlatformUI.
- getWorkbench().
- getActiveWorkbenchWindow().
- getShell(),
- DependencyConflictResolveDialog.DLG_TYPE_1);
- if (dlg.open() == DependencyConflictResolveDialog.BTN_ID_CANCEL) {
- v.setChecked(el, false);
- return;
- }
-
- }
- compsToUncheck.add(comp);
- } else if (!event.getChecked()) {
- compsToUncheck.remove(comp);
- }
- if (!EarUtilities.isStandaloneProject(model.getComponent().getProject()) && (isReadOnly() || !validatateEdit() || (isMyClientJAR(event) && !event.getChecked()))) {
- availableJARsViewer.setChecked(event.getElement(), !event.getChecked());
- return;
- }
- ClasspathElement element = (ClasspathElement) event.getElement();
- model.setSelection(element, event.getChecked());
- }
-
-
- private boolean isConflict(IVirtualComponent lib) {
- IProject[] ears = EarUtilities.getReferencingEARProjects(lib.getProject());
- for (int i = 0; i < ears.length; i++) {
- if (J2EEProjectUtilities.isJEEProject(ears[i])) {
- IVirtualComponent cmp = ComponentCore.createComponent(ears[i]);
- IVirtualReference[] refs = cmp.getReferences();
- for (int j = 0; j < refs.length; j++) {
- if (model.getProject().equals(refs[j].getReferencedComponent().getProject())) {
- IVirtualReference ref = cmp.getReference(lib.getName());
- if (ref != null && !ref.getRuntimePath().isRoot()) return true;
- }
- }
- }
- }
- return false;
- }
-
-
-
- /**
- * @param event
- * @return
- */
- private boolean isMyClientJAR(CheckStateChangedEvent event) {
- ClasspathElement element = (ClasspathElement) event.getElement();
- if(getClasspathSelection() != null)
- return getClasspathSelection().isMyClientJAR(element);
- return false;
- }
-
- 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.getSelectedEARComponent() == null && !(EarUtilities.isStandaloneProject(model.getComponent().getProject())))
- 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());
- if (element.isClasspathDependency()) {
- availableJARsViewer.setGrayed(element, true);
- }
- }
- }
-
- public void refresh() {
- final IProject project = model.getComponent().getProject();
- // if not a web project and it is either referenced by an EAR or a dynamic web project.
- if (!isWLPEntry() && (!EarUtilities.isStandaloneProject(project) ||
- (J2EEProjectUtilities.getReferencingWebProjects(project).length > 0))) {
- 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();
- } else {
- availableJARsViewer.setInput(model.getClassPathSelectionForWLPs());
- 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);
- refreshWLPCheckedItems();
- }
- }
-
- private void refreshWLPCheckedItems() {
- if (availableJARsViewer.getInput() != null) {
- java.util.List elements = ((ClassPathSelection) availableJARsViewer.getInput()).getClasspathElements();
- for (int i = 0; i < elements.size(); i++) {
- ClasspathElement element = (ClasspathElement) elements.get(i);
- availableJARsViewer.setChecked(element, element.isSelected());
- if (element.isClasspathDependency()) {
- availableJARsViewer.setGrayed(element, true);
- }
- }
- }
- }
-
- /**
- * 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;
- }
-
- public boolean isWLPEntry() {
- return model.isWLPModel();
- }
-
- /**
- * @deprecated do not use this method
- * @param isWLPEntry
- */
- public void setWLPEntry(boolean isWLPEntry) {
- this.isWLPEntry = isWLPEntry;
- }
-
-}
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 c2af1d1f2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-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
- */
-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); This method is never used hence commeting it out - vkb
- 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 a61619b8b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.common.CommonEditResourceHandler;
-
-/**
- * @author jialin
- */
-public interface ICommonManifestUIConstants {
- String UP_BUTTON = ManifestUIResourceHandler.Up_1;
- String DOWN_BUTTON = ManifestUIResourceHandler.Down_2;
- String SELECT_ALL_BUTTON = ManifestUIResourceHandler.Select_All_3;
- String DE_SELECT_ALL_BUTTON = ManifestUIResourceHandler.Deselect_All_4;
- String ERROR_READING_MANIFEST_DIALOG_TITLE = ManifestUIResourceHandler.ERROR_READING_MANIFEST_DIALOG_TITLE;
- String SAVE_MANIFEST_WITH_ERROR =ManifestUIResourceHandler.SAVE_MANIFEST_WITH_ERROR;
- String ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR = ManifestUIResourceHandler.ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR;
- String ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE = ManifestUIResourceHandler.ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE;
- String MANIFEST_PROBLEM_1 = ManifestUIResourceHandler.MANIFEST_PROBLEM_1;
- String MANIFEST_PROBLEM_2 = ManifestUIResourceHandler.MANIFEST_PROBLEM_2;
- String MANIFEST_PROBLEM_3 = ManifestUIResourceHandler.MANIFEST_PROBLEM_3;
- String MANIFEST_PROBLEM_4 = ManifestUIResourceHandler.MANIFEST_PROBLEM_4;
- String REDIRECT_TEXT_EDITOR_UI_ = ManifestUIResourceHandler.REDIRECT_TEXT_EDITOR_UI_;
-
- 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/IJ2EEDependenciesControl.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IJ2EEDependenciesControl.java
deleted file mode 100644
index f88e6ce85..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IJ2EEDependenciesControl.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Interface for classes that implement a portion the "J2EE Module Dependencies"
- * property page logic.
- * @deprecated wtp 3.2
- */
-public interface IJ2EEDependenciesControl extends ICommonManifestUIConstants {
-
- /**
- * Creates the Composite associated with this control.
- * @param parent Parent Composite.
- * @return Composite for the control.
- */
- Composite createContents(Composite parent);
-
- /**
- * Called when the property page's <code>performOk()</code> method is called.
- * @return
- */
- boolean performOk();
-
- /**
- * Called when the property page's <code>performDefaults()</code> method is called.
- * @return
- */
- void performDefaults();
-
- /**
- * Called when the property page's <code>performCancel()</code> method is called.
- * @return
- */
- boolean performCancel();
-
- /**
- * Called when the property page's <code>setVisible()</code> method is called.
- * @return
- */
- void setVisible(boolean visible);
-
- /**
- * Called when the property page's <code>dispose()</code> method is called.
- * @return
- */
- void dispose();
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.java
deleted file mode 100644
index 0b72e0142..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jst.common.frameworks.CommonFrameworksPlugin;
-import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
-import org.eclipse.jst.common.project.facet.JavaFacetInstallDataModelProvider;
-import org.eclipse.jst.common.project.facet.WtpUtils;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainerUtils;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.earcreation.EarFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.internal.ejb.project.operations.EjbFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.internal.ejb.project.operations.IEjbFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.jca.project.facet.ConnectorFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.project.facet.AppClientFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.UtilityFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.INavigatorContentService;
-import org.eclipse.wst.common.componentcore.datamodel.FacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties.FacetDataModelMap;
-import org.eclipse.wst.common.componentcore.internal.ComponentType;
-import org.eclipse.wst.common.componentcore.internal.ComponentcoreFactory;
-import org.eclipse.wst.common.componentcore.internal.IComponentProjectMigrator;
-import org.eclipse.wst.common.componentcore.internal.Property;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.SimpleValidateEdit;
-import org.eclipse.wst.project.facet.SimpleWebFacetInstallDataModelProvider;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-
-/**
- * This has been deprecated since WTP 3.1.2 and will be deleted post WTP 3.2.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=292934
- * @deprecated
- * @author jsholl
- */
-public class J2EEComponentProjectMigrator implements IComponentProjectMigrator {
-
- private static final String WEB_LIB_CONTAINER = "org.eclipse.jst.j2ee.internal.web.container"; //$NON-NLS-1$
- private static final String WEB_LIB_PATH = "/WEB-INF/lib"; //$NON-NLS-1$
- private static final String OLD_DEPLOYABLES_PATH = ".deployables"; //$NON-NLS-1$
- private IProject project;
-
- private static final String[] J2EE_CONTENT_EXTENSION_IDS = new String[] {
- "org.eclipse.jst.navigator.j2ee.ui.EARDDContent", //$NON-NLS-1$
- "org.eclipse.jst.navigator.j2ee.ui.WebDDContent", //$NON-NLS-1$
- "org.eclipse.jst.navigator.j2ee.ui.EJBDDContent", //$NON-NLS-1$
- "org.eclipse.jst.navigator.j2ee.ui.ConnectorDDContent" //$NON-NLS-1$
- };
-
- private static final String PROJECT_EXPLORER = "org.eclipse.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
-
- public J2EEComponentProjectMigrator() {
- super();
- }
-
- public void migrateProject(IProject aProject) {
- if (aProject.isAccessible() && (aProject.getFile(StructureEdit.MODULE_META_FILE_NAME).exists())) {
- // The file corresponding to StructureEdit.MODULE_META_FILE_NAME is crucial to migration.
- // If it does not exist, the project cannot be migrated. We should never fail the test for existence
- // of the file, if we do then something has gone badly wrong.
- Resource resource = WorkbenchResourceHelperBase.getResource(aProject.getFile(StructureEdit.MODULE_META_FILE_NAME), false);
- if(resource != null && resource.isLoaded()){
- // Unload the resource because the model inside the StructureEdit was cached when the
- // the project was imported, and files may have moved due to migration (.wtpmodules for example).
- resource.unload();
- }
-
- final List files = new ArrayList();
- files.add(aProject.getFile(J2EEProjectUtilities.DOT_PROJECT));
- files.add(aProject.getFile(J2EEProjectUtilities.DOT_CLASSPATH));
- files.add(aProject.getFile(StructureEdit.MODULE_META_FILE_NAME));
- if(SimpleValidateEdit.validateEdit(files)){
- project = aProject;
-
- removeComponentBuilders(project);
- if (multipleComponentsDetected())
- createNewProjects();
- String facetid = getFacetFromProject(project);
- if (facetid.length() == 0)
- addFacets(project);
- J2EEComponentClasspathUpdater.getInstance().queueUpdate(project);
- }
- }
- ensureJ2EEContentExtensionsEnabled();
- }
-
- /**
- * Ensure the J2EE content extension ids are enabled on the project explorer
- * for the projects being migrated.
- */
- private void ensureJ2EEContentExtensionsEnabled() {
- IViewPart view = null;
- try {
- view = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getActivePage().findView(PROJECT_EXPLORER);
- } catch (Exception e) {
- //Just bail and return if there is no view
- }
- if (view == null)
- return;
-
- INavigatorContentService contentService = (INavigatorContentService) view.getAdapter(INavigatorContentService.class);
- CommonViewer viewer = (CommonViewer) view.getAdapter(CommonViewer.class);
-
- // Set the J2EE content extensions as enabled now that we have set the J2EE facets
- if (contentService != null)
- contentService.getActivationService().activateExtensions(J2EE_CONTENT_EXTENSION_IDS, false);
-
- // Update the viewer if we are in the current UI thread
- if (viewer != null) {
- Display display = viewer.getControl().getDisplay();
- if (display!=null && Thread.currentThread().equals(display.getThread()))
- viewer.refresh();
- }
- }
-
- private void createNewProjects() {
-
- StructureEdit se = null;
- try {
- se = StructureEdit.getStructureEditForWrite(project);
- List comps = se.getComponentModelRoot().getComponents();
- List removedComps = new ArrayList();
- for (int i = 1;i<comps.size();i++) {
- WorkbenchComponent comp = (WorkbenchComponent) comps.get(i);
- IWorkspace ws = ResourcesPlugin.getWorkspace();
- IProject newProj = ws.getRoot().getProject(comp.getName());
- if (!newProj.exists()) {
- try {
- createProj(newProj,(!comp.getComponentType().getComponentTypeId().equals(J2EEProjectUtilities.ENTERPRISE_APPLICATION)));
- WtpUtils.addNatures(newProj);
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- if (comp.getComponentType()!=null)
- addFacetsToProject(newProj,comp.getComponentType().getComponentTypeId(),comp.getComponentType().getVersion(),false);
- removedComps.add(comp);
- IFolder compFolder = project.getFolder(comp.getName());
- if (compFolder.exists())
- try {
- compFolder.delete(true,null);
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- se.getComponentModelRoot().getComponents().removeAll(removedComps);
- se.save(null);
-
- } finally {
- if (se != null)
- se.dispose();
- }
-
-
- }
-
- private void createProj(IProject newProj, boolean isJavaProject) throws CoreException {
- newProj.create(null);
- IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(newProj.getName());
-// if (isJavaProject)
-// description.setNatureIds(new String[]{JavaCore.NATURE_ID});
- description.setLocation(null);
- newProj.open(null);
- newProj.setDescription(description, null);
- }
-
- private boolean multipleComponentsDetected() {
- StructureEdit se = null;
- try {
- se = StructureEdit.getStructureEditForRead(project);
- if (se == null) return false;
- if (se.getComponentModelRoot() == null) return false;
- return se.getComponentModelRoot().getComponents().size() > 1;
- } finally {
- if (se != null)
- se.dispose();
- }
- }
-
- private void removeComponentBuilders(IProject aProject) {
- try {
- aProject.refreshLocal(IResource.DEPTH_INFINITE,null);
- } catch (CoreException e1) {
- J2EEUIPlugin.logError(e1);
- }
- //IJavaProject javaP = JemProjectUtilities.getJavaProject(aProject);
- List oldBuilders = new ArrayList();
- oldBuilders.add("org.eclipse.wst.common.modulecore.ComponentStructuralBuilder"); //$NON-NLS-1$
- oldBuilders.add("org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver"); //$NON-NLS-1$
- oldBuilders.add("org.eclipse.wst.common.modulecore.DependencyGraphBuilder"); //$NON-NLS-1$
- try {
- J2EEProjectUtilities.removeBuilders(aProject,oldBuilders);
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- }
-
- public String getFacetFromProject(IProject aProject) {
- return J2EEProjectUtilities.getJ2EEProjectType(aProject);
- }
-
-
- protected IDataModel setupJavaInstallAction(IProject aProject, boolean existing,String srcFolder) {
- IDataModel dm = DataModelFactory.createDataModel(new JavaFacetInstallDataModelProvider());
- dm.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- String jVersion = "1.4"; //$NON-NLS-1$
- IScopeContext context = new ProjectScope( project );
- IEclipsePreferences prefs
- = context.getNode( JavaCore.PLUGIN_ID );
- if (JavaCore.VERSION_1_5.equals(prefs.get(JavaCore.COMPILER_COMPLIANCE,JavaCore.VERSION_1_4))) {
- jVersion = "5.0"; //$NON-NLS-1$
- }
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, jVersion);
- if (!existing)
- dm.setStringProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME, srcFolder);
- return dm;
- }
-
- protected IDataModel setupUtilInstallAction(IProject aProject,String specVersion) {
- IDataModel aFacetInstallDataModel = DataModelFactory.createDataModel(new UtilityFacetInstallDataModelProvider());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, specVersion);
- aFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,false);
- aFacetInstallDataModel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME,null);
- return aFacetInstallDataModel;
- }
- protected IDataModel setupEarInstallAction(IProject aProject,String specVersion) {
- IDataModel earFacetInstallDataModel = DataModelFactory.createDataModel(new EarFacetInstallDataModelProvider());
- earFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- earFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, specVersion);
-
- return earFacetInstallDataModel;
- }
- protected IDataModel setupAppClientInstallAction(IProject aProject,String specVersion) {
- IDataModel aFacetInstallDataModel = DataModelFactory.createDataModel(new AppClientFacetInstallDataModelProvider());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, specVersion);
- aFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,false);
- aFacetInstallDataModel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME,null);
- aFacetInstallDataModel.setBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS,false);
- return aFacetInstallDataModel;
- }
- protected IDataModel setupConnectorInstallAction(IProject aProject,String specVersion) {
- IDataModel aFacetInstallDataModel = DataModelFactory.createDataModel(new ConnectorFacetInstallDataModelProvider());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- aFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, specVersion);
- aFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,false);
- aFacetInstallDataModel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME,null);
- return aFacetInstallDataModel;
- }
-
- private void addFacets(IProject aProject) {
- StructureEdit edit = null;
- try {
- edit = StructureEdit.getStructureEditForWrite(aProject);
- if (edit == null) return; // Not a component project....
- edit.getModuleStructuralModel().setUseOldFormat(true);
- if (edit.getComponent() == null) return; // Can't migrate
- ComponentType type = edit.getComponent().getComponentType();
- if (type == null) return; // Can't migrate
- String compId = type.getComponentTypeId();
- String specVersion = edit.getComponent().getComponentType().getVersion();
- moveMetaProperties(edit.getComponent(),type);
- addFacetsToProject(aProject, compId, specVersion,true);
- }
- finally {
- if (edit != null) {
- edit.save(null);
- edit.getModuleStructuralModel().setUseOldFormat(false);
- edit.dispose();
- }
- }
-
- }
-
- private void moveMetaProperties(WorkbenchComponent component, ComponentType type) {
- List props = type.getProperties();
- List compProps = component.getProperties();
- for (Iterator iter = props.iterator(); iter.hasNext();) {
- Property element = (Property) iter.next();
- Property newProp = ComponentcoreFactory.eINSTANCE.createProperty();
- newProp.setName(element.getName());
- newProp.setValue(element.getValue());
- compProps.add(newProp);
- }
- props.clear();
- }
-
- private void addFacetsToProject(IProject aProject, String compId, String specVersion,boolean existing) {
- if (compId.equals(J2EEProjectUtilities.DYNAMIC_WEB))
- installWEBFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.EJB))
- installEJBFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.APPLICATION_CLIENT))
- installAppClientFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.ENTERPRISE_APPLICATION))
- installEARFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.JCA))
- installConnectorFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.UTILITY))
- installUtilityFacets(aProject,specVersion,existing);
- else if (compId.equals(J2EEProjectUtilities.STATIC_WEB))
- installStaticWebFacets(aProject,specVersion,existing);
- }
-
- private void installStaticWebFacets(IProject project2, String specVersion, boolean existing) {
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, project2.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- //facetDMs.add(setupJavaInstallAction(webProj,existing,CreationConstants.DEFAULT_WEB_SOURCE_FOLDER));
- IDataModel newModel = setupStaticWebInstallAction(project2);
- facetDMs.add(newModel);
- //setRuntime(webProj,dm); //Setting runtime property
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
- }
-
- private IDataModel setupStaticWebInstallAction(IProject project2) {
- IDataModel webFacetInstallDataModel = DataModelFactory.createDataModel(new SimpleWebFacetInstallDataModelProvider());
- webFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project2.getName());
- webFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, "1.0"); //$NON-NLS-1$
-
- return webFacetInstallDataModel;
- }
-
- private void installUtilityFacets(IProject aProject, String specVersion, boolean existing) {
- replaceDeployablesOutputIfNecessary(project);
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- facetDMs.add(setupJavaInstallAction(aProject,existing,"src")); //$NON-NLS-1$
- IDataModel newModel = setupUtilInstallAction(aProject,specVersion);
- facetDMs.add(newModel);
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
-
- }
-
- private void installConnectorFacets(IProject aProject, String specVersion, boolean existing) {
- replaceDeployablesOutputIfNecessary(project);
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- facetDMs.add(setupJavaInstallAction(aProject,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.JCA_CONTENT_FOLDER)));
- IDataModel newModel = setupConnectorInstallAction(aProject,specVersion);
- facetDMs.add(newModel);
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
-
- }
-
- private void installEARFacets(IProject aProject, String specVersion, boolean existing) {
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel newModel = setupEarInstallAction(aProject,specVersion);
- facetDMs.add(newModel);
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
-
- }
-
- private void installAppClientFacets(IProject aProject, String specVersion, boolean existing) {
- replaceDeployablesOutputIfNecessary(project);
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- facetDMs.add(setupJavaInstallAction(aProject,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.APP_CLIENT_CONTENT_FOLDER)));
- IDataModel newModel = setupAppClientInstallAction(aProject,specVersion);
- facetDMs.add(newModel);
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
-
- }
-
- private void installEJBFacets(IProject ejbProject2,String ejbVersion, boolean existing) {
- replaceDeployablesOutputIfNecessary(project);
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, ejbProject2.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- facetDMs.add(setupJavaInstallAction(ejbProject2,existing,J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER)));
- IDataModel newModel = setupEjbInstallAction(ejbProject2,ejbVersion,existing);
- facetDMs.add(newModel);
- //setRuntime(ejbProject2,dm); //Setting runtime property
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- }
-
- }
- private void installWEBFacets(IProject webProj,String specVersion, boolean existing) {
- removeOldWebContainerIfNecessary(project);
- replaceDeployablesOutputIfNecessary(project);
-
- IDataModel dm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- dm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, webProj.getName());
- FacetDataModelMap facetDMs = (FacetDataModelMap) dm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- facetDMs.add(setupJavaInstallAction(webProj,existing, CommonFrameworksPlugin.getDefault().getPluginPreferences().getString(CommonFrameworksPlugin.DEFAULT_SOURCE_FOLDER)));
- IDataModel newModel = setupWebInstallAction(webProj,specVersion);
- facetDMs.add(newModel);
- //setRuntime(webProj,dm); //Setting runtime property
- try {
- /**
- * Warning cleanup 12/07/2005
- */
- //IStatus stat = dm.getDefaultOperation().execute(null,null);
- dm.getDefaultOperation().execute(null,null);
- } catch (ExecutionException e) {
- Throwable realException = e.getCause();
- if (realException != null && realException instanceof CoreException) {
- IStatus st = ((CoreException)realException).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, realException);
- }
- } catch (Exception ex) {
- if (ex instanceof CoreException) {
- IStatus st = ((CoreException)ex).getStatus();
- String message = st != null ? st.toString() : ""; //$NON-NLS-1$
- J2EEUIPlugin.logError(message, ex);
- }
- }
-
-
- }
- private void replaceDeployablesOutputIfNecessary(IProject proj) {
-
-
- IJavaProject jproj = JemProjectUtilities.getJavaProject(proj);
- final IClasspathEntry[] current;
- boolean deployablesFound = false;
- try {
- current = jproj.getRawClasspath();
- List updatedList = new ArrayList();
- IPath sourcePath = null;
- for (int i = 0; i < current.length; i++) {
- IClasspathEntry entry = current[i];
- if ((entry.getEntryKind() == IClasspathEntry.CPE_SOURCE) && (entry.getOutputLocation() != null && entry.getOutputLocation().toString().indexOf(OLD_DEPLOYABLES_PATH) != -1)) {
- sourcePath = entry.getPath();
- updatedList.add(JavaCore.newSourceEntry(sourcePath));
- deployablesFound = true;
- }
- else
- updatedList.add(entry);
- }
- if (deployablesFound) {
- IClasspathEntry[] updated = (IClasspathEntry[])updatedList.toArray(new IClasspathEntry[updatedList.size()]);
- jproj.setRawClasspath(updated, null);
- jproj.save(null, true);
- }
- } catch (JavaModelException e) {
- J2EEUIPlugin.logError(e);
- }
-
-
-
- }
-
- private void removeOldWebContainerIfNecessary(IProject webProj) {
-
- IJavaProject jproj = JemProjectUtilities.getJavaProject(webProj);
- final IClasspathEntry[] current;
- try {
- current = jproj.getRawClasspath();
- List updatedList = new ArrayList();
- boolean useDefaultWebAppLibraries = J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries();
- for (int i = 0; i < current.length; i++) {
- IClasspathEntry entry = current[i];
- // the web container is added to the classpath if:
- // 1. they don't have an entry for WEB_LIB_CONTAINER AND
- // 2. they have an entry for WEB_LIB_PATH BUT
- // they do not have the preference checked to use the Web App classpath container
- if ((entry.getPath().toString().indexOf(WEB_LIB_CONTAINER) == -1) &&
- ((entry.getPath().toString().indexOf(WEB_LIB_PATH) == -1) || !useDefaultWebAppLibraries))
- updatedList.add(entry);
- }
- IClasspathEntry[] updated = (IClasspathEntry[])updatedList.toArray(new IClasspathEntry[updatedList.size()]);
- jproj.setRawClasspath(updated, null);
- jproj.save(null, true);
- } catch (JavaModelException e) {
- J2EEUIPlugin.logError(e);
- }
-
- }
-
- protected IRuntime getRuntimeByID(String id) {
- IRuntime[] targets = ServerUtil.getRuntimes("", ""); //$NON-NLS-1$ //$NON-NLS-2$
- for (int i = 0; i < targets.length; i++) {
- IRuntime target = targets[i];
- if (id.equals(target.getId()))
- return target;
- }
- return null;
- }
-
- protected IDataModel setupEjbInstallAction(IProject aProject,String ejbVersion, boolean existing) {
- IDataModel ejbFacetInstallDataModel = DataModelFactory.createDataModel(new EjbFacetInstallDataModelProvider());
- ejbFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- ejbFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, ejbVersion);
- ejbFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,false);
- ejbFacetInstallDataModel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME,null);
- if (!existing)
- ejbFacetInstallDataModel.setProperty(IEjbFacetInstallDataModelProperties.CONFIG_FOLDER, J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.EJB_CONTENT_FOLDER));
- return ejbFacetInstallDataModel;
- }
-
- protected IDataModel setupWebInstallAction(IProject aProject,String specVersion) {
- IDataModel webFacetInstallDataModel = DataModelFactory.createDataModel(new WebFacetInstallDataModelProvider());
- webFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, aProject.getName());
- webFacetInstallDataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, specVersion);
- webFacetInstallDataModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR,false);
- webFacetInstallDataModel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME,null);
- return webFacetInstallDataModel;
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java
deleted file mode 100644
index d95c6d1b6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial implementation as prop page heirarchy
- * rfrost@bea.com - conversion to single property page impl
- *******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-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.Label;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * Primary project property page for J2EE dependencies; content is dynamically
- * generated based on the project facets and will be comprised by a
- * set of IJ2EEDependenciesControl implementations.
- *
- */
-public class J2EEDependenciesPage extends PropertyPage {
-
- public String DESCRIPTION = J2EEUIMessages.getResourceString("DESCRIPTION"); //$NON-NLS-1$
-
- private IProject project;
- private IJ2EEDependenciesControl[] controls = new IJ2EEDependenciesControl[0];
-
- public J2EEDependenciesPage() {
- super();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- @Override
- protected Control createContents(Composite parent) {
-
- // Need to find out what type of project we are handling
- project = (IProject) getElement().getAdapter(IResource.class);
- boolean isEAR = false;
- boolean isWEB = false;
- try {
- final IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if (facetedProject == null) {
- return getFacetErrorComposite(parent);
- }
- isEAR = facetedProject.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE));
- isWEB = facetedProject.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE));
- } catch (CoreException ce) {
- return getFacetErrorComposite(parent);
- }
-
- if (isEAR) {
- return createEARContent(parent);
- } else if (isWEB) {
- return createWebContent(parent);
- } else {
- return createNonEARContent(parent);
- }
- }
-
- private Composite getFacetErrorComposite(final Composite parent) {
- final String errorCheckingFacet = ManifestUIResourceHandler.Error_Checking_Project_Facets;
- setErrorMessage(errorCheckingFacet);
- setValid(false);
- return getErrorComposite(parent, errorCheckingFacet);
- }
-
- private Composite getErrorComposite(final Composite parent, final String error) {
- final Composite composite = new Composite(parent, SWT.NONE);
- final GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- final Label label= new Label(composite, SWT.NONE);
- label.setText(error);
- return composite;
- }
-
- private Composite createEARContent(final Composite parent) {
- controls = new IJ2EEDependenciesControl[1];
- controls[0] = new AddModulestoEARPropertiesPage(project, this);
- return controls[0].createContents(parent);
- }
-
- private Composite createWebContent(final Composite parent) {
- final boolean standalone = EarUtilities.isStandaloneProject(project);
-
- if (standalone) {
- // only need to create the Web Libraries page
- controls = new IJ2EEDependenciesControl[1];
- controls[0] = new WebLibDependencyPropertiesPage(project, this);
- return controls[0].createContents(parent);
- }
- // Create a tabbed folder with both "J2EE Modules" and "Web Libraries"
- final TabFolder folder = new TabFolder(parent, SWT.LEFT);
- folder.setLayoutData(new GridData(GridData.FILL_BOTH));
- folder.setFont(parent.getFont());
-
- // Create the two tabs
- controls = new IJ2EEDependenciesControl[2];
-
- controls[0] = new JARDependencyPropertiesPage(project, this);
- TabItem tab = new TabItem(folder, SWT.NONE);
- tab.setControl(controls[0].createContents(folder));
- tab.setText(ManifestUIResourceHandler.J2EE_Modules);
- controls[1] = new WebLibDependencyPropertiesPage(project, this);
- tab = new TabItem(folder, SWT.NONE);
- tab.setControl(controls[1].createContents(folder));
- tab.setText(ManifestUIResourceHandler.Web_Libraries);
-
- folder.setSelection(0);
- return folder;
- }
-
- private Composite createNonEARContent(final Composite parent) {
- controls = new IJ2EEDependenciesControl[1];
- final boolean standalone = EarUtilities.isStandaloneProject(project);
- if (standalone) {
- // if not referenced by an EAR, check if referenced by a dynamic web project
- if (J2EEProjectUtilities.getReferencingWebProjects(project).length > 0) {
- controls[0] = new WebRefDependencyPropertiesPage(project, this);
- } else {
- return getUnreferencedErrorComposite(parent);
- }
- } else {
- controls[0] = new JARDependencyPropertiesPage(project, this);
- }
-
- return controls[0].createContents(parent);
- }
-
- private Composite getUnreferencedErrorComposite(final Composite parent) {
- final String msg = ManifestUIResourceHandler.Unreferenced_Module_Error;
- setErrorMessage(msg);
- return getErrorComposite(parent, msg);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- @Override
- public boolean performOk() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- if (!controls[i].performOk()) {
- return false;
- }
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- @Override
- public void performDefaults() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- controls[i].performDefaults();
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.IPreferencePage#performCancel()
- */
- @Override
- public boolean performCancel() {
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- if (!controls[i].performCancel()) {
- return false;
- }
- }
- }
- return super.performCancel();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
- */
- @Override
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- for (int i = 0; i < controls.length; i++) {
- if (controls[i] != null) {
- controls[i].setVisible(visible);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
- @Override
- public void dispose() {
- super.dispose();
- for (int i = 0; i < controls.length; i++) {
- if(controls[i] != null){
- controls[i].dispose();
- }
- }
- }
-
- protected static void createDescriptionComposite(final Composite parent, final String description) {
- Composite descriptionComp = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- descriptionComp.setLayout(layout);
- descriptionComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fillDescription(descriptionComp, description);
- }
-
- private static void fillDescription(Composite c, String s) {
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 250;
- Text text = new Text(c, SWT.READ_ONLY | SWT.WRAP);
- text.setLayoutData(data);
- text.setText(s);
- }
-}
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/JARDependencyPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java
deleted file mode 100644
index d42c66f53..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java
+++ /dev/null
@@ -1,1101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.jar.Manifest;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jface.dialogs.Dialog;
-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.AddComponentToEnterpriseApplicationDataModelProvider;
-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.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.UpdateManifestDataModelProperties;
-import org.eclipse.jst.j2ee.application.internal.operations.UpdateManifestDataModelProvider;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.classpathdep.UpdateClasspathAttributeUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants.DependencyAttributeType;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualArchiveComponent;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyEnablement;
-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.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.listeners.IValidateEditListener;
-import org.eclipse.jst.j2ee.internal.listeners.ValidateEditListener;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.javaee.application.Application;
-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.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.builder.IDependencyGraph;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.operation.RemoveReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.ui.WTPUIPlugin;
-import org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation;
-
-/**
- * @author jialin
- * @deprecated wtp 3.2
- */
-public class JARDependencyPropertiesPage implements IJ2EEDependenciesControl, IClasspathTableOwner, Listener, ClasspathModelListener, IElementChangedListener {
-
- protected final IProject project;
- protected final J2EEDependenciesPage propPage;
- protected IOException caughtManifestException;
- protected boolean isDirty;
- protected Text classPathText;
- protected Text componentNameText;
- protected ClasspathModel model;
- protected CCombo availableAppsCombo;
- protected ClasspathTableManager tableManager;
- protected IValidateEditListener validateEditListener;
- protected Label manifestLabel;
- protected Label enterpriseApplicationLabel;
- protected Label availableDependentJars;
- private final Display display;
- private boolean isDisposed = false;
-
- /**
- * Constructor for JARDependencyPropertiesControl
- */
- public JARDependencyPropertiesPage(final IProject project, final J2EEDependenciesPage page) {
- super();
- J2EEComponentClasspathUpdater.getInstance().pauseUpdates();
- this.project = project;
- this.propPage = page;
- this.display = propPage.getShell().getDisplay();
- }
-
- /**
- * Returns false if page should not be displayed for the project.
- */
- protected void initialize() {
- model = createClasspathModel();
- model.setProject(project);
- if (model.getComponent() != null) {
- model.addListener(this);
- updateModelManifest();
- initializeValidateEditListener();
- }
- }
-
- protected ClasspathModel createClasspathModel(){
- return new ClasspathModel(J2EEProjectUtilities.readManifest(project), false);
- }
-
- public void dispose() {
- isDisposed = true;
- JavaCore.removeElementChangedListener(this);
- J2EEComponentClasspathUpdater.getInstance().resumeUpdates();
- }
-
- private void updateModelManifest() {
- if (JemProjectUtilities.isBinaryProject(project) || model.getAvailableEARComponents().length == 0)
- return;
-
- IVirtualComponent component = ComponentCore.createComponent(project);
- if(component != null){
- IVirtualFile vManifest = component.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- if(vManifest.exists()){
- IFile iManifest = vManifest.getUnderlyingFile();
- if(iManifest != null && iManifest.exists()){
- InputStream in = null;
- try {
- in = iManifest.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(propPage.getShell());
- }
-
- public void setVisible(boolean visible) {
- if (visible) {
- if (caughtManifestException != null && !model.isDirty()) {
- ManifestErrorPrompter.showManifestException(propPage.getShell(), ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE, false, caughtManifestException);
- }
- }
- }
-
- /**
- * Refreshes the ClasspathModel if the project classpath is changed.
- */
- public void elementChanged(final ElementChangedEvent event) {
- if (event.getType() == ElementChangedEvent.POST_CHANGE && classpathChanged(event.getDelta())) {
- // trigger a recomputation and refresh for the currently selected EAR
- if (!isDisposed) {
- display.asyncExec (new Runnable () {
- public void run () {
- if (!isDisposed) {
- handleClasspathChange();
- }
- }
- });
- }
- }
- }
-
- /**
- * Called to refresh the UI when the classpath changes
- */
- protected void handleClasspathChange() {
- model.resetClassPathSelection();
- refresh();
- }
-
- private boolean classpathChanged(final IJavaElementDelta delta) {
- final int kind = delta.getKind();
- if (kind == IJavaElementDelta.CHANGED) {
- final int flags = delta.getFlags();
- final IJavaElement element = delta.getElement();
- if (element instanceof IJavaModel) {
- if ((flags & IJavaElementDelta.F_CHILDREN) == IJavaElementDelta.F_CHILDREN) {
- final IJavaElementDelta[] children = delta.getChangedChildren();
- for (int i = 0; i < children.length; i++) {
- // check all of the IJavaProject children
- if (classpathChanged(children[i])) {
- return true;
- }
- }
- }
- } else if (element instanceof IJavaProject) {
- // check if we either have a direct indication of a classpath change or a delta on the
- // .classpath file (changes to classpath entry attributes only give us this...)
- final IJavaProject jproject = (IJavaProject) element;
- final IProject eventProject = jproject.getProject();
- if (eventProject.equals(project)) {
- if ((flags & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0) {
- return true;
- }
- final IResourceDelta[] deltas = delta.getResourceDeltas();
- if (deltas != null) {
- for (int i = 0; i < deltas.length; i++) {
- if (deltas[i].getProjectRelativePath().toString().equals(".classpath")) { //$NON-NLS-1$
- return true;
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- public Composite createContents(Composite parent) {
- initialize();
- Composite composite = createBasicComposite(parent);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- if (model.getComponent() != null) {
- if (!isValidComponent())
- return composite;
- J2EEDependenciesPage.createDescriptionComposite(composite, ManifestUIResourceHandler.J2EE_Modules_Desc);
- createProjectLabelsGroup(composite);
- createListGroup(composite);
- createTextGroup(composite);
- refresh();
- }
- Dialog.applyDialogFont(parent);
- postCreateContents();
- return composite;
- }
-
- /**
- * Called at the end of createContents().
- */
- protected void postCreateContents() {
- // register this object as an IElementChangedListener so that it will react to user changes to the Java build path
- JavaCore.addElementChangedListener(this);
- }
-
- /**
- * @param comp
- * @return
- */
- protected Composite createBasicComposite(Composite comp) {
- Composite composite = new Composite(comp, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- return composite;
- }
-
- protected boolean isValidComponent() {
- if (JavaEEProjectUtilities.isEARProject(project)) {
- propPage.setErrorMessage(ManifestUIResourceHandler.EAR_Module_Dep_Error);
- return false;
- } else if (EarUtilities.isStandaloneProject(model.getComponent().getProject())) {
- propPage.setErrorMessage(ClasspathModel.NO_EAR_MESSAGE);
- return false;
- }
- return true;
- }
-
- 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.Project_name__UI_);
- *
- * componentNameText = new Text(labelsGroup, SWT.BORDER); GridData data = new
- * GridData(GridData.FILL_HORIZONTAL); componentNameText.setEditable(false);
- * componentNameText.setLayoutData(data); componentNameText.setText(project.getName());
- */
-
- createEnterpriseAppsControls(labelsGroup);
-
- }
-
- private void createEnterpriseAppsControls(Composite labelsGroup) {
-
- enterpriseApplicationLabel = new Label(labelsGroup, SWT.NONE);
- enterpriseApplicationLabel.setText(ManifestUIResourceHandler.EAR_Project_Name__UI__UI_);
-
- 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);
-
- availableDependentJars = new Label(listGroup, SWT.NONE);
- gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- availableDependentJars.setText(ManifestUIResourceHandler.Available_dependent_JARs__UI_);
- availableDependentJars.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));
-
- createClassPathText(textGroup);
-
- }
-
- protected void createClassPathText(Composite textGroup) {
-
- manifestLabel = new Label(textGroup, SWT.NONE);
- manifestLabel.setText(ManifestUIResourceHandler.Manifest_Class_Path__UI_);
-
- 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.fillComposite(composite);
- }
-
- /**
- * @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);
-
- // do not create sorter otherwise order will go wrong
- //availableJARsViewer.setSorter(new ViewerSorter());
-
- // table columns
- TableColumn fileNameColumn = new TableColumn(table, SWT.NONE, 0);
- fileNameColumn.setText(ManifestUIResourceHandler.JAR_Module_UI_);
- fileNameColumn.setResizable(true);
-
- TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(ManifestUIResourceHandler.Project_UI_);
- 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() {
- IVirtualComponent[] components = model.getAvailableEARComponents();
- String[] values = new String[components.length];
- for (int i = 0; i < components.length; i++) {
- values[i] = components[i].getProject().getName();
- }
- if (availableAppsCombo != null) {
- availableAppsCombo.setItems(values);
- IVirtualComponent selected = model.getSelectedEARComponent();
- if (selected != null) {
- int index = Arrays.asList(components).indexOf(selected);
- availableAppsCombo.select(index);
- } else
- availableAppsCombo.clearSelection();
- }
- }
-
- protected void refresh() {
- populateApps();
- if (tableManager != null) {
- tableManager.refresh();
- }
- refreshText();
- }
-
-
- public void refreshText() {
- ClassPathSelection sel = model.getClassPathSelection();
- if (sel != null && classPathText != null)
- classPathText.setText(sel.toString());
- }
-
- /**
- * @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();
- }
- }
-
- public void performDefaults() {
- model.resetClassPathSelection();
- refresh();
- isDirty = false;
- model.dispose();
- }
-
- public boolean performCancel() {
- model.dispose();
- return true;
- }
-
- /**
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- if (!isDirty)
- return true;
- modifyEARBundledLibs();
- WorkspaceModifyComposedOperation composed = new WorkspaceModifyComposedOperation(createManifestOperation());
- createClasspathAttributeUpdateOperation(composed, model.getClassPathSelection(), false);
- try {
- new ProgressMonitorDialog(propPage.getShell()).run(true, true, composed);
- } catch (InvocationTargetException ex) {
- String title = ManifestUIResourceHandler.An_internal_error_occurred_ERROR_;
- String msg = title;
- if (ex.getTargetException() != null && ex.getTargetException().getMessage() != null)
- msg = ex.getTargetException().getMessage();
- MessageDialog.openError(propPage.getShell(), title, msg);
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- return false;
- } catch (InterruptedException e) {
- // cancelled
- return false;
- } finally {
- model.dispose();
- }
- isDirty = false;
- return true;
- }
-
- List getUnSelectedClassPathElementsForJ2EEDependency() {
- List unselectedForJ2EE = getUnSelectedClassPathSelection().getClasspathElements();
-
- List unselected = new ArrayList();
- if (model != null && model.getClassPathSelectionForWLPs() != null) {
- List wlpSelected = model.getClassPathSelectionForWLPs().getSelectedClasspathElements();
-
- java.util.Iterator it = unselectedForJ2EE.iterator();
-
- while (it.hasNext()) {
- ClasspathElement element = (ClasspathElement) it.next();
- java.util.Iterator wlpIterator = wlpSelected.iterator();
- boolean found = false;
- while (wlpIterator.hasNext()) {
- ClasspathElement wlpElement = (ClasspathElement) wlpIterator.next();
- String text = element.getText();
- int index = text.indexOf(IJ2EEModuleConstants.JAR_EXT);
- if (index != -1) {
- text = text.substring(0, index);
- if (text.equals(wlpElement.getText())) {
- found = true;
- break;
- }
- }
- }
- if (!found) {
- if (!unselected.contains(element))
- unselected.add(element);
- }
-
- }
- }
- return unselected;
- }
-
-
- /**
- * @deprecated don't use this method it will be deleted
- * @return
- */
- List getUnSelectedClassPathElementsForWebDependency() {
- List unselectedForWLP = getUnSelectedClassPathSelectionForWLPs().getClasspathElements();
- List unselected = new ArrayList();
- if (model != null && model.getClassPathSelection() != null) {
- List j2eeSelected = model.getClassPathSelection().getSelectedClasspathElements();
- java.util.Iterator it = unselectedForWLP.iterator();
-
- while (it.hasNext()) {
- ClasspathElement element = (ClasspathElement) it.next();
- java.util.Iterator j2eeIterator = j2eeSelected.iterator();
- boolean found = false;
- while (j2eeIterator.hasNext()) {
- ClasspathElement j2eeElement = (ClasspathElement) j2eeIterator.next();
- String text = j2eeElement.getText();
- int index = text.indexOf(IJ2EEModuleConstants.JAR_EXT);
- if( index != -1 ){
- text = text.substring(0, index);
- if (element.getText().equals(text)) {
- found = true;
- break;
- }
- }
- }
- if (!found) {
- if (!unselected.contains(element))
- unselected.add(element);
- }
-
- }
- } else {
- unselected = unselectedForWLP;
- }
- return unselected;
- }
-
- /**
- * DoNotUseMeThisWillBeDeletedPost15
- * @return
- */
- protected WorkspaceModifyComposedOperation createJ2EEComponentDependencyOperations() {
- WorkspaceModifyComposedOperation composedOp = null;
- List selected = getSelectedClassPathSelection().getClasspathElements();
- List unselected = getUnSelectedClassPathElementsForJ2EEDependency();
-
- List targetComponentsHandles = new ArrayList();
- for (int i = 0; i < selected.size(); i++) {
- ClasspathElement element = (ClasspathElement) selected.get(i);
- IVirtualComponent component = element.getComponent();
- if (null != component) {
- targetComponentsHandles.add(component);
- }
- }
- if (!targetComponentsHandles.isEmpty()) {
- composedOp = new WorkspaceModifyComposedOperation();
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(ComponentUtilities.createReferenceComponentOperation(model.getComponent(), targetComponentsHandles)));
- }
- targetComponentsHandles = new ArrayList();
- for (int i = 0; i < unselected.size(); i++) {
- ClasspathElement element = (ClasspathElement) unselected.get(i);
- IProject elementProject = element.getProject();
- if (elementProject != null) {
- if (ModuleCoreNature.isFlexibleProject(elementProject)) {
- IVirtualComponent targetComp = ComponentCore.createComponent(elementProject);
- targetComponentsHandles.add(targetComp);
- }
- } else {
- URI archiveURI = element.getArchiveURI();
- if (archiveURI != null && !archiveURI.equals("")) { //$NON-NLS-1$
- String name = ""; //$NON-NLS-1$
- try {
- String type = ModuleURIUtil.getArchiveType(archiveURI);
- String tmpname = ModuleURIUtil.getArchiveName(archiveURI);
- name = type + IPath.SEPARATOR + tmpname;
- } catch (UnresolveableURIException e) {
- Logger.getLogger().logError(e.getMessage());
- }
- if (!name.equals("")) { //$NON-NLS-1$
- IVirtualReference ref = model.getComponent().getReference(name);
- if (ref != null) {
- IVirtualComponent referenced = ref.getReferencedComponent();
- targetComponentsHandles.add(referenced);
- }
- }
- }
- }
- }
- if (!targetComponentsHandles.isEmpty()) {
- if (composedOp == null)
- composedOp = new WorkspaceModifyComposedOperation();
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(ComponentUtilities.removeReferenceComponentOperation(model.getComponent(), targetComponentsHandles)));
- }
- return composedOp;
- }
-
-
- /**
- * This should be moved to the {@link WebLibDependencyPropertiesPage} because it is only used there.
- * @return
- */
- protected WorkspaceModifyComposedOperation createComponentDependencyOperations() {
- WorkspaceModifyComposedOperation composedOp = null;
- final ClassPathSelection selectedWLPs = getSelectedClassPathSelectionForWLPs();
- List selected = selectedWLPs.getClasspathElements();
- List unselected = getUnSelectedClassPathSelectionForWLPs().getClasspathElements();
-
- List targetComponentsHandles = new ArrayList();
- for (int i = 0; i < selected.size(); i++) {
- ClasspathElement element = (ClasspathElement) selected.get(i);
- if (element.isClasspathDependency() || element.isClasspathEntry()) {
- continue;
- }
- IProject elementProject = element.getProject();
- if (elementProject != null) {
- IVirtualComponent targetComp = ComponentCore.createComponent(elementProject);
- targetComponentsHandles.add(targetComp);
- }
- }
- if (!targetComponentsHandles.isEmpty()) {
- composedOp = new WorkspaceModifyComposedOperation();
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(ComponentUtilities.createWLPReferenceComponentOperation(model.getComponent(), targetComponentsHandles)));
- }
- targetComponentsHandles = new ArrayList();
- for (int i = 0; i < unselected.size(); i++) {
- ClasspathElement element = (ClasspathElement) unselected.get(i);
- if (element.isClasspathDependency() || element.isClasspathEntry()) {
- continue;
- }
- IProject elementProject = element.getProject();
- if (elementProject != null) {
- if (ModuleCoreNature.isFlexibleProject(elementProject)) {
- IVirtualComponent targetComp = ComponentCore.createComponent(elementProject);
- targetComponentsHandles.add(targetComp);
- }
- } else {
- URI archiveURI = element.getArchiveURI();
- if (archiveURI != null && !archiveURI.equals("")) { //$NON-NLS-1$
- String name = ""; //$NON-NLS-1$
- try {
- String type = ModuleURIUtil.getArchiveType(archiveURI);
- String tmpname = ModuleURIUtil.getArchiveName(archiveURI);
- name = type + IPath.SEPARATOR + tmpname;
- } catch (UnresolveableURIException e) {
- Logger.getLogger().logError(e.getMessage());
- }
- if (!name.equals("")) { //$NON-NLS-1$
- IVirtualReference ref = model.getComponent().getReference(name);
- IVirtualComponent referenced = ref.getReferencedComponent();
- targetComponentsHandles.add(referenced);
- }
- }
- }
- }
- if (!targetComponentsHandles.isEmpty()) {
- if (composedOp == null) {
- composedOp = new WorkspaceModifyComposedOperation();
- }
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(ComponentUtilities.removeWLPReferenceComponentOperation(model.getComponent(), targetComponentsHandles)));
- }
-
- if (composedOp == null) {
- composedOp = new WorkspaceModifyComposedOperation();
- }
- createClasspathAttributeUpdateOperation(composedOp, model.getClassPathSelectionForWLPs(), true);
-
- return composedOp;
- }
-
- protected WorkspaceModifyComposedOperation createFlexProjectOperations() {
- WorkspaceModifyComposedOperation composedOp = null;
- Object[] elements = tableManager.availableJARsViewer.getCheckedElements();
- for (int i = 0; i < elements.length; i++) {
- ClasspathElement element = (ClasspathElement) elements[i];
- IProject elementProject = element.getProject();
- try {
- if (elementProject != null && !elementProject.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- if (composedOp == null) {
- composedOp = new WorkspaceModifyComposedOperation();
- }
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(J2EEProjectUtilities.createFlexJavaProjectForProjectOperation(elementProject, false)));
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- return composedOp;
- }
-
- protected ClassPathSelection getUnSelectedClassPathSelectionForWLPs() {
- ClassPathSelection selection = new ClassPathSelection();
- Object[] checkedElements = tableManager.availableJARsViewer.getCheckedElements();
- List modelElements = model.getClassPathSelectionForWLPs().getClasspathElements();
- for (int i = 0; i < modelElements.size(); i++) {
- List checkedElementsList = Arrays.asList(checkedElements);
- if (!checkedElementsList.contains(modelElements.get(i))) {
- selection.getClasspathElements().add(modelElements.get(i));
- }
- }
- return selection;
- }
-
- private ClassPathSelection getSelectedClassPathSelection() {
- ClassPathSelection selection = new ClassPathSelection();
- Object[] checkedElements = tableManager.availableJARsViewer.getCheckedElements();
- for (int i = 0; i < checkedElements.length; i++) {
- selection.getClasspathElements().add(checkedElements[i]);
- }
- return selection;
- }
-
- protected ClassPathSelection getUnSelectedClassPathSelection() {
- ClassPathSelection selection = new ClassPathSelection();
- Object[] checkedElements = tableManager.availableJARsViewer.getCheckedElements();
- List modelElements = model.getClassPathSelection().getClasspathElements();
- for (int i = 0; i < modelElements.size(); i++) {
- List checkedElementsList = Arrays.asList(checkedElements);
- if (!checkedElementsList.contains(modelElements.get(i))) {
- selection.getClasspathElements().add(modelElements.get(i));
- }
- }
- return selection;
- }
-
-
- private ClassPathSelection getSelectedClassPathSelectionForWLPs() {
- ClassPathSelection selection = new ClassPathSelection();
- Object[] checkedElements = tableManager.availableJARsViewer.getCheckedElements();
- for (int i = 0; i < checkedElements.length; i++) {
- selection.getClasspathElements().add(checkedElements[i]);
- }
- return selection;
- }
-
- protected UpdateManifestOperation createManifestOperation() {
- return new UpdateManifestOperation(project.getName(), model.getClassPathSelection().toString(), true);
- }
-
- protected void createClasspathAttributeUpdateOperation(final WorkspaceModifyComposedOperation composedOp, final ClassPathSelection selection, final boolean isWebApp) {
- final boolean webLibsOnly = isWebApp && !ClasspathDependencyEnablement.isAllowClasspathComponentDependency();
- final Map selectedEntriesToRuntimePath = new HashMap();
- final Map unselectedEntriesToRuntimePath = new HashMap();
- final List elements = selection.getClasspathElements();
- for (int i = 0; i < elements.size(); i++) {
- final ClasspathElement element = (ClasspathElement) elements.get(i);
- if (element.isClasspathEntry()) {
- final IClasspathEntry entry = element.getClasspathEntry();
- final IClasspathAttribute attrib = ClasspathDependencyUtil.checkForComponentDependencyAttribute(entry, DependencyAttributeType.DEPENDENCY_OR_NONDEPENDENCY, webLibsOnly);
- boolean hasDepAttrib = false;
- if (attrib != null && attrib.getName().equals(IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY)) {
- hasDepAttrib = true;
- }
- final IPath runtimePath = ClasspathDependencyUtil.getRuntimePath(attrib, isWebApp, ClasspathDependencyUtil.isClassFolderEntry(entry));
- if (element.isSelected()) {
- // only add if we don't already have the attribute
- if (!hasDepAttrib) {
- selectedEntriesToRuntimePath.put(entry, runtimePath);
- }
- } else {
- // only add if we already have the attribute
- if (hasDepAttrib) {
- unselectedEntriesToRuntimePath.put(entry, runtimePath);
- }
- }
- }
- }
-
- // if there are any attributes to add, create an operation to add all necessary attributes
- if (!selectedEntriesToRuntimePath.isEmpty()) {
- IDataModelOperation op = UpdateClasspathAttributeUtil.createAddDependencyAttributesOperation(project.getName(), selectedEntriesToRuntimePath);
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(op));
- }
- // if there are any attributes to remove, create an operation to remove all necessary attributes
- if (!unselectedEntriesToRuntimePath.isEmpty()) {
- IDataModelOperation op = UpdateClasspathAttributeUtil.createRemoveDependencyAttributesOperation(project.getName(), unselectedEntriesToRuntimePath);
- composedOp.addRunnable(WTPUIPlugin.getRunnableWithProgress(op));
- }
- }
-
- protected boolean isReadOnly() {
- return JemProjectUtilities.isBinaryProject(project) && (project.findMember(IModuleConstants.COMPONENT_FILE_PATH) == null) ;
- }
-
- protected void modifyEARBundledLibs() {
- List compsToUncheckList = tableManager.getCheckedLibsAsList();
- if (compsToUncheckList.size() == 0) return;
- Set allCompsToUncheck = new HashSet();
- Set allCompNamesToUncheck = new HashSet();
- for (int i = 0; i < compsToUncheckList.size(); i++) {
- IVirtualComponent comp = (IVirtualComponent)compsToUncheckList.get(i);
- allCompsToUncheck.add(comp);
- if (comp instanceof J2EEModuleVirtualArchiveComponent) allCompNamesToUncheck.add(comp.getName());
- }
- IProject[] ears = EarUtilities.getReferencingEARProjects(project);
- for (int i = 0; i < ears.length; i++) {
- if (J2EEProjectUtilities.isJEEProject(ears[i])) {
- IVirtualComponent earComponent = ComponentCore.createComponent(ears[i]);
- List listToUncheck = createListToUncheck(earComponent, allCompsToUncheck, allCompNamesToUncheck);
- if (listToUncheck.size() == 0) continue;
- removeModulesFromEAR(new NullProgressMonitor(), earComponent, listToUncheck);
- addModulesToEAR(new NullProgressMonitor(), earComponent, listToUncheck);
- }
- }
- }
- //---------------------------------
- private IStatus removeModulesFromEAR(IProgressMonitor monitor, final IVirtualComponent earComponent, final List compsToUncheckList) {
- IStatus stat = IDataModelProvider.OK_STATUS;
- String libDir = ((Application)ModelProviderManager.getModelProvider(earComponent.getProject()).getModelObject()).getLibraryDirectory();
- libDir = (libDir == null) ? J2EEConstants.EAR_DEFAULT_LIB_DIR : libDir;
- Map dependentComps = getEARModuleDependencies(earComponent, compsToUncheckList);
- try {
- IDataModelOperation op = removeComponentFromEAROperation(earComponent, compsToUncheckList, libDir);
- op.execute(null, null);
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(earComponent.getProject());
- removeEARComponentDependencies(dependentComps);
- } catch (ExecutionException e) {
- Logger.getLogger().log(e);
- }
- return stat;
- }
-
-
- private IStatus addModulesToEAR(IProgressMonitor monitor, final IVirtualComponent earComponent, final List compsToUncheckList) {
- try {
- IWorkspaceRunnable runnable = new IWorkspaceRunnable(){
- public void run(IProgressMonitor monitor) throws CoreException{
- execAddOp(monitor, compsToUncheckList, J2EEConstants.EAR_ROOT_DIR, earComponent);
- }
- };
- J2EEUIPlugin.getWorkspace().run(runnable, monitor);
- } catch (Exception e) {
- Logger.getLogger().log(e);
- }
- return IDataModelProvider.OK_STATUS;
- }
-
- private List createListToUncheck(IVirtualComponent earComponent, Set compsToUncheckList, Set compNamesToUncheck) {
- LinkedList res = new LinkedList();
- IVirtualReference[] refs = earComponent.getReferences();
- for (int j = 0; j < refs.length; j++) {
- if (!refs[j].getRuntimePath().isRoot() &&
- (compsToUncheckList.contains(refs[j].getReferencedComponent()) ||
- compNamesToUncheck.contains(refs[j].getReferencedComponent().getName()))) {
- res.add(refs[j].getReferencedComponent());
- }
- }
- return res;
- }
-
- private void execAddOp(IProgressMonitor monitor, List list, String path, IVirtualComponent earComponent) throws CoreException {
- IDataModel dm = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider());
-
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent);
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, list);
- dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
-
- IStatus stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- if (stat != IDataModelProvider.OK_STATUS)
- throw new CoreException(stat);
- try {
- dm.getDefaultOperation().execute(monitor, null);
- } catch (ExecutionException e) {
- Logger.getLogger().log(e);
- }
- }
-
-
- protected IDataModelOperation removeComponentFromEAROperation(IVirtualComponent sourceComponent, List targetComponentsHandles, String dir) {
- IDataModel model = DataModelFactory.createDataModel(new RemoveComponentFromEnterpriseApplicationDataModelProvider());
- model.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, sourceComponent);
- List modHandlesList = (List) model.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- modHandlesList.addAll(targetComponentsHandles);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modHandlesList);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, dir);
- return model.getDefaultOperation();
- }
-
- private Map getEARModuleDependencies(final IVirtualComponent earComponent, final List components) {
- final Map dependentComps = new HashMap();
- // get all current references to project within the scope of this EAR
- for (int i = 0; i < components.size(); i++) {
-
- final List compsForProject = new ArrayList();
- final IVirtualComponent comp = (IVirtualComponent) components.get(i);
- Set<IProject> referencingComponents = IDependencyGraph.INSTANCE.getReferencingComponents(project);
- IProject [] dependentProjects = referencingComponents.toArray(new IProject[referencingComponents.size()]);
- for (int j = 0; j < dependentProjects.length; j++) {
- final IProject project = dependentProjects[j];
- // if this is an EAR, can skip
- if (JavaEEProjectUtilities.isEARProject(project)) {
- continue;
- }
- final IVirtualComponent dependentComp = ComponentCore.createComponent(project);
- // ensure that the project's share an EAR
- final IProject[] refEARs = EarUtilities.getReferencingEARProjects(project);
- boolean sameEAR = false;
- for (int k = 0; k < refEARs.length; k++) {
- if (refEARs[k].equals(earComponent.getProject())) {
- sameEAR = true;
- break;
- }
- }
- if (!sameEAR) {
- continue;
- }
- // if the dependency is a web lib dependency, can skip
- if (JavaEEProjectUtilities.isDynamicWebProject(project)) {
- IVirtualReference ref = dependentComp.getReference(comp.getName());
- if (ref != null && ref.getRuntimePath().equals(new Path("/WEB-INF/lib"))) { //$NON-NLS-1$
- continue;
- }
- }
- compsForProject.add(dependentComp);
- }
- dependentComps.put(comp, compsForProject);
- }
- return dependentComps;
- }
-
- private void removeEARComponentDependencies(final Map dependentComps) throws ExecutionException {
- final Iterator targets = dependentComps.keySet().iterator();
- while (targets.hasNext()) {
- final IVirtualComponent target = (IVirtualComponent) targets.next();
- final List sources = (List) dependentComps.get(target);
- for (int i = 0; i < sources.size(); i++) {
- final IVirtualComponent source = (IVirtualComponent) sources.get(i);
- final IDataModel model = DataModelFactory.createDataModel(new RemoveReferenceComponentsDataModelProvider());
- model.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, source);
- final List modHandlesList = (List) model.getProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
- modHandlesList.add(target);
- model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, modHandlesList);
- model.getDefaultOperation().execute(null, null);
- // update the manifest
- removeManifestDependency(source, target);
- }
- }
- }
-
- private void removeManifestDependency(final IVirtualComponent source, final IVirtualComponent target)
- throws ExecutionException {
- final String sourceProjName = source.getProject().getName();
- final String targetProjName = target.getProject().getName();
- final IProgressMonitor monitor = new NullProgressMonitor();
- final IFile manifestmf = J2EEProjectUtilities.getManifestFile(source.getProject());
- final ArchiveManifest mf = J2EEProjectUtilities.readManifest(source.getProject());
- if (mf == null)
- return;
- final IDataModel updateManifestDataModel = DataModelFactory.createDataModel(new UpdateManifestDataModelProvider());
- updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.PROJECT_NAME, sourceProjName);
- updateManifestDataModel.setBooleanProperty(UpdateManifestDataModelProperties.MERGE, false);
- updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.MANIFEST_FILE, manifestmf);
- String[] cp = mf.getClassPathTokenized();
- List cpList = new ArrayList();
- String cpToRemove = targetProjName + IJ2EEModuleConstants.JAR_EXT;
- for (int i = 0; i < cp.length; i++) {
- if (!cp[i].equals(cpToRemove)) {
- cpList.add(cp[i]);
- }
- }
- updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.JAR_LIST, cpList);
- updateManifestDataModel.getDefaultOperation().execute(monitor, null );
- }
-
-}
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 ce309b4f8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author jialin
- */
-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 50c1f238b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class ManifestUIResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "manifest_ui";//$NON-NLS-1$
-
- private ManifestUIResourceHandler() {
- // Do not instantiate
- }
-
- public static String Up_1;
- public static String Down_2;
- public static String Select_All_3;
- public static String Deselect_All_4;
- public static String ERROR_READING_MANIFEST_DIALOG_TITLE;
- public static String SAVE_MANIFEST_WITH_ERROR;
- public static String ERROR_READING_MANIFEST_DIALOG_MESSAGE_EDITOR;
- public static String ERROR_READING_MANIFEST_DIALOG_MESSAGE_PROP_PAGE;
- public static String MANIFEST_PROBLEM_1;
- public static String MANIFEST_PROBLEM_2;
- public static String MANIFEST_PROBLEM_3;
- public static String MANIFEST_PROBLEM_4;
- public static String An_internal_error_occurred_ERROR_;
- public static String Project_name__UI_;
- public static String EAR_Project_Name__UI__UI_;
- public static String Available_dependent_JARs__UI_;
- public static String Manifest_Class_Path__UI_;
- public static String JAR_Module_UI_;
- public static String Packed_In_Lib_UI_;
- public static String Project_UI_;
- public static String EAR_Modules;
- public static String EAR_Modules_Desc;
- public static String J2EE_Modules;
- public static String J2EE_Modules_Desc;
- public static String Web_Libraries;
- public static String Web_Libraries_Desc;
- public static String Web_Ref_Desc;
- public static String EAR_Module_Dep_Error;
- public static String Unreferenced_Module_Error;
- public static String Jar_Dep_One_Module_Error;
- public static String Web_Lib_Error;
- public static String REDIRECT_TEXT_EDITOR_UI_;
- public static String Error_Checking_Project_Facets;
- public static String WEB_LIB_LIST_DESCRIPTION;
- public static String Dynamic_Web_Error;
- public static String No_Web_Reference_Error;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, ManifestUIResourceHandler.class);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/SecondCheckBoxStateChangedEvent.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/SecondCheckBoxStateChangedEvent.java
deleted file mode 100644
index eeb1f5e20..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/SecondCheckBoxStateChangedEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Stefan Dimov, stefan.dimov@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.ICheckable;
-import org.eclipse.jst.j2ee.internal.ui.DoubleCheckboxTableItem;
-
-public class SecondCheckBoxStateChangedEvent extends CheckStateChangedEvent {
-
- /**
- *
- */
- private static final long serialVersionUID = 4497186607413856367L;
- private DoubleCheckboxTableItem item = null;
-
- public SecondCheckBoxStateChangedEvent(ICheckable source,
- Object element,
- boolean state) {
- super(source, element, state);
- }
-
- public void setTableItem(DoubleCheckboxTableItem itm) {
- item = itm;
- }
-
- public DoubleCheckboxTableItem getTableItem() {
- return item;
- }
-}
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 f0637b960..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.operation.IRunnableContext;
-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;
-
-/**
- * @deprecated as of wtp 3.2
- * @author jialin
- */
-public class UpdateManifestOperation implements org.eclipse.jface.operation.IRunnableWithProgress {
- protected String projectName;
- protected String classPathValue;
- protected boolean replace;
-/**
- * UpdateManifestOperation constructor comment.
- * @deprecated as of wtp 3.2
- */
-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/WebLibDependencyPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java
deleted file mode 100644
index bd6dbe591..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.BuildPathDialogAccess;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jst.j2ee.application.internal.operations.ClasspathElement;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModel;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-/**
- * @deprecated wtp 3.2
- */
-public class WebLibDependencyPropertiesPage extends JARDependencyPropertiesPage {
-
- public WebLibDependencyPropertiesPage(final IProject project, final J2EEDependenciesPage page) {
- super(project, page);
- }
-
- @Override
- protected ClasspathModel createClasspathModel() {
- return new ClasspathModel(null, true);
- }
-
- @Override
- public Composite createContents(Composite parent) {
- initialize();
- Composite composite = createBasicComposite(parent);
- if (model.getComponent() != null) {
- if (!isValidWebModule())
- return composite;
- J2EEDependenciesPage.createDescriptionComposite(composite, ManifestUIResourceHandler.Web_Libraries_Desc);
- // createProjectLabelsGroup(composite);
- createListGroup(composite);
- handleWLPSupport();
- setEnablement();
- }
- Dialog.applyDialogFont(parent);
- postCreateContents();
- return composite;
- }
-
- @Override
- 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.Project_name__UI_);
-
- componentNameText = new Text(labelsGroup, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- componentNameText.setEditable(false);
- componentNameText.setLayoutData(data);
- componentNameText.setText(project.getName());
- }
-
- @Override
- 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);
-
- availableDependentJars = new Label(listGroup, SWT.NONE);
- gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- availableDependentJars.setText(ManifestUIResourceHandler.Available_dependent_JARs__UI_);
- availableDependentJars.setLayoutData(gData);
- createTableComposite(listGroup);
- }
-
- @Override
- 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.fillWLPComposite(composite);
- }
-
- protected boolean isValidWebModule() {
- if (!JavaEEProjectUtilities.isDynamicWebProject(project)) {
- propPage.setErrorMessage(ManifestUIResourceHandler.Web_Lib_Error);
- return false;
- }
- return true;
- }
- private boolean equals(final Object obj1, final Object obj2) {
- if (obj1 == obj2) {
- return true;
- } else if (obj1 == null || obj2 == null) {
- return false;
- } else {
- return obj1.equals(obj2);
- }
- }
-
- protected void setEnablement() {
- if (tableManager.availableJARsViewer.getTable().getItems().length == 0) {
- tableManager.selectAllButton.setEnabled(false);
- tableManager.deselectAllButton.setEnabled(false);
- } else {
- tableManager.selectAllButton.setEnabled(true);
- tableManager.deselectAllButton.setEnabled(true);
- }
- }
- private IProgressMonitor submon(final IProgressMonitor parent, final int ticks) {
- return (parent == null ? null : new SubProgressMonitor(parent, ticks));
- }
-
- private void handleWLPSupport() {
- availableDependentJars.setText(ManifestUIResourceHandler.WEB_LIB_LIST_DESCRIPTION);
- tableManager.refresh();
- }
-
- @Override
- protected void handleClasspathChange() {
- model.resetClassPathSelectionForWLPs();
- super.handleClasspathChange();
- setEnablement();
- }
-
- @Override
- public boolean performOk() {
- if (model.getComponent() == null || !isValidWebModule()) {
- return true;
- }
- if (!isDirty) {
- return true;
- }
- try {
- IProject[] javaProjects = getJavaProjectsWithoutFacets();
- boolean createdFlexProjects = runWLPOp(createFlexProjectOperations());
-
- boolean createdComponentDependency = false;
- if (createdFlexProjects) {
- addTargetRuntimesToNewJavaProjects(javaProjects,new NullProgressMonitor());
- createdComponentDependency = runWLPOp(createComponentDependencyOperations());
- isDirty = false;
- }
- // treat as a classpath change for refresh purposes
- // XXX this refresh is not working - suspect it is because the virtual component dependencies are
- // not consistently being recomputed
- //handleClasspathChange();
- return createdComponentDependency;
- } finally {
- model.dispose();
- }
- }
-
- private IProject[] getJavaProjectsWithoutFacets() {
- List projectsList = new ArrayList();
- Object[] elements = tableManager.availableJARsViewer.getCheckedElements();
- for (int i = 0; i < elements.length; i++) {
- ClasspathElement element = (ClasspathElement) elements[i];
- IProject elementProject = element.getProject();
- try {
- if (elementProject != null && !elementProject.hasNature(IModuleConstants.MODULE_NATURE_ID))
- projectsList.add(elementProject);
- } catch (CoreException e) {
- J2EEPlugin.logError(e);
- }
- }
- return (IProject[])projectsList.toArray(new IProject[projectsList.size()]);
- }
-
- private boolean runWLPOp(WorkspaceModifyComposedOperation composed) {
- try {
- if (composed != null)
- new ProgressMonitorDialog(propPage.getShell()).run(true, true, composed);
- } catch (InvocationTargetException ex) {
- if (ex.getCause() != null) {
- J2EEUIPlugin.logError(ex.getCause());
- }
- String title = ManifestUIResourceHandler.An_internal_error_occurred_ERROR_;
- String msg = title;
- if (ex.getTargetException() != null && ex.getTargetException().getMessage() != null)
- msg = ex.getTargetException().getMessage();
- MessageDialog.openError(propPage.getShell(), title, msg);
- J2EEUIPlugin.logError(ex);
- return false;
- } catch (InterruptedException e) {
- // cancelled
- return false;
- }
- return true;
- }
-
- private void addTargetRuntimesToNewJavaProjects(IProject[] javaProjects, final IProgressMonitor monitor )
-
- {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
- IProject targetProject = project;
- for (int i = 0; i < javaProjects.length; i++) {
- IProject moduleProject = javaProjects[i];
-
- try {
- final IFacetedProject targetFacetedProject = ProjectFacetsManager.create(targetProject);
-
- final IRuntime targetRuntime = targetFacetedProject.getRuntime();
-
- final IFacetedProject moduleFacetedProject = ProjectFacetsManager.create(moduleProject);
-
- if (moduleFacetedProject != null && !equals(targetRuntime, moduleFacetedProject.getRuntime())) {
- boolean supports = true;
-
- if (targetRuntime != null) {
- for (Iterator itr = moduleFacetedProject.getProjectFacets().iterator(); itr.hasNext();) {
- final IProjectFacetVersion fver = (IProjectFacetVersion) itr.next();
-
- if (!targetRuntime.supports(fver)) {
- supports = false;
- break;
- }
- }
- }
-
- if (supports) {
- moduleFacetedProject.setRuntime(targetRuntime, submon(monitor, 1));
- }
- }
- } catch(CoreException ex) {
- J2EEPlugin.logError(ex);
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
- }
- }
-
- private void createRef(String aComponentName){
- IVirtualComponent archive = ComponentCore.createArchiveComponent(model.getComponent().getProject(), aComponentName);
-
- // To do: check if archive component already exists
- IVirtualReference ref = ComponentCore.createReference(model.getComponent(), archive, new Path("/WEB-INF/lib")); //$NON-NLS-1$
- model.getComponent().addReferences(new IVirtualReference [] { ref });
-
- ClasspathElement element = createClassPathElement(archive, archive.getName());
-// ClassPathSelection selection = createClassPathSelectionForExternalJar(element);
- model.getClassPathSelectionForWLPs().getClasspathElements().add(element);
- }
-
- public void handleSelectExternalJarButton() {
- if (JavaEEProjectUtilities.isDynamicWebProject(project)) {
- IPath[] selected = BuildPathDialogAccess.chooseExternalJAREntries(propPage.getShell());
- if (selected != null) {
- String type = VirtualArchiveComponent.LIBARCHIVETYPE + IPath.SEPARATOR;
- for (int i = 0; i < selected.length; i++) {
- createRef(type + selected[i].toString());
- }
- refresh();
- }
- }
- }
-
- public void handleSelectVariableButton() {
- if (JavaEEProjectUtilities.isDynamicWebProject(project)) {
- IPath existingPath[] = new Path[0];
- IPath[] selected = BuildPathDialogAccess.chooseVariableEntries(propPage.getShell(), existingPath);
-
- if (selected != null) {
- String type = VirtualArchiveComponent.VARARCHIVETYPE + IPath.SEPARATOR;
- for (int i = 0; i < selected.length; i++) {
- IPath resolvedPath = JavaCore.getResolvedVariablePath(selected[i]);
- java.io.File file = new java.io.File(resolvedPath.toOSString());
- if (file.isFile() && file.exists()) {
- createRef(type + selected[i].toString());
- } else {
- // display error
- }
- }
- refresh();
- }
- }
- }
-
- private ClasspathElement createClassPathElement(IVirtualComponent archiveComp, String unresolvedName) {
-
- URI uri = URI.createURI(ModuleURIUtil.getHandleString(archiveComp));
- ClasspathElement element = new ClasspathElement(uri);
- element.setValid(false);
- element.setSelected(true);
- element.setRelativeText(unresolvedName);
- element.setText(unresolvedName);
- element.setEarProject(null);
- return element;
- }
-
-// private ClassPathSelection createClassPathSelectionForExternalJar(ClasspathElement element) {
-// ClassPathSelection selection = new ClassPathSelection();
-// selection.getClasspathElements().add(element);
-// return selection;
-// }
-
-// private ClassPathSelection createClassPathSelectionForProjectJar(ClasspathElement element) {
-// ClassPathSelection selection = new ClassPathSelection();
-// selection.getClasspathElements().add(element);
-// return selection;
-// }
-
- public void handleSelectProjectJarButton() {
- if (JavaEEProjectUtilities.isDynamicWebProject(project)) {
- IPath[] selected = BuildPathDialogAccess.chooseJAREntries(propPage.getShell(), project.getLocation(), new IPath[0]);
- if (selected != null) {
- String type = VirtualArchiveComponent.LIBARCHIVETYPE + IPath.SEPARATOR;
- for (int i = 0; i < selected.length; i++) {
- createRef(type + selected[i].makeRelative().toString());
- }
- refresh();
- }
- }
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java
deleted file mode 100644
index 09187b2de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - derived from WebLibDependencyPropertiesPage for projects referenced just from a dynamic web project.
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Supports UI manipulation of the published/exported classpath entries for projects referenced by dynamic web projects.
- * @deprecated wtp 3.2
- */
-public class WebRefDependencyPropertiesPage extends JARDependencyPropertiesPage {
-
- public WebRefDependencyPropertiesPage(final IProject project, final J2EEDependenciesPage page) {
- super(project, page);
- }
-
- @Override
- public Composite createContents(Composite parent) {
- initialize();
- Composite composite = createBasicComposite(parent);
- if (model.getComponent() != null) {
- if (!isValidComponent()) {
- return composite;
- }
- J2EEDependenciesPage.createDescriptionComposite(composite, ManifestUIResourceHandler.Web_Ref_Desc);
- createListGroup(composite);
- tableManager.refresh();
- setEnablement();
- }
- Dialog.applyDialogFont(parent);
- postCreateContents();
- return composite;
- }
-
- @Override
- 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.fillWebRefComposite(composite);
- }
-
- @Override
- protected boolean isValidComponent() {
- // must have the Java nature and cannot be a dynamic web project
- boolean isJavaProject = false;
- try {
- isJavaProject = project.hasNature(JavaCore.NATURE_ID);
- } catch (CoreException ce) {}
- if (JavaEEProjectUtilities.isDynamicWebProject(project) || !isJavaProject) {
- propPage.setErrorMessage(ManifestUIResourceHandler.Dynamic_Web_Error);
- return false;
- } else if (J2EEProjectUtilities.getReferencingWebProjects(project).length == 0) {
- propPage.setErrorMessage(ManifestUIResourceHandler.No_Web_Reference_Error);
- return false;
- }
- return true;
- }
-
- protected void setEnablement() {
- if (tableManager.availableJARsViewer.getTable().getItems().length == 0) {
- tableManager.selectAllButton.setEnabled(false);
- tableManager.deselectAllButton.setEnabled(false);
- } else {
- tableManager.selectAllButton.setEnabled(true);
- tableManager.deselectAllButton.setEnabled(true);
- }
- }
-
- @Override
- protected void handleClasspathChange() {
- super.handleClasspathChange();
- setEnablement();
- }
-
- @Override
- public boolean performOk() {
- if (model.getComponent() == null || !isValidComponent()) {
- return true;
- }
- if (!isDirty) {
- return true;
- }
- return super.performOk();
- }
-
-}
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 93fc4b0a8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 17, 2005
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * WARNING: This class will be deleted
- *
- * @deprecated use {@link org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation}
- */
-public class WorkspaceModifyComposedOperation extends org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation {
- public WorkspaceModifyComposedOperation(ISchedulingRule rule) {
- super(rule);
- }
-
- public WorkspaceModifyComposedOperation() {
- super();
- }
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule, List nestedRunnablesWithProgress) {
- super(rule, nestedRunnablesWithProgress);
- }
-
- public WorkspaceModifyComposedOperation(List nestedRunnablesWithProgress) {
- super(nestedRunnablesWithProgress);
- }
-
- public WorkspaceModifyComposedOperation(IRunnableWithProgress nestedOp) {
- super(nestedOp);
- }
-
-} \ 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 9d9a71ef2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionDelegate.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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;
- }
-
-
-}
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 b55aeabf2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java
+++ /dev/null
@@ -1,71 +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>.
- */
- @Override
- 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
- */
- @Override
- 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 7d11ac668..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, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-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
- */
- @Override
- 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) {
- 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);
- }
-
-}
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 071b59356..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.
- */
- @Override
- 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(null,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;
- }
-}
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 ccc42ae8c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.actions;
-
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.ui.IActionDelegate;
-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.
- }
-}
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 4a1ed7f1a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/BaseAction.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.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.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 {
-
- protected IStructuredSelection selection = null;
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return J2EEUIPlugin.getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- public void setSelection(IStructuredSelection selection) {
- this.selection = selection;
- }
-
- @Override
- 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) {
- J2EEUIPlugin.logError(t);
- String ERROR_OCCURRED_TITLE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_TITLE"); //$NON-NLS-1$
- String ERROR_OCCURRED_MESSAGE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_MESSAGE"); //$NON-NLS-1$
- 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();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ComponentEditorInput.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ComponentEditorInput.java
deleted file mode 100644
index 1f2bba954..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ComponentEditorInput.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class ComponentEditorInput implements IEditorInput {
-
- private IVirtualComponent component;
-
- public ComponentEditorInput(IVirtualComponent component){
- this.component = component;
- }
-
- public boolean exists() {
- return component.exists();
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return component.getName();
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return ""; //$NON-NLS-1$
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public IVirtualComponent getComponent(){
- return component;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ForceClasspathUpdateAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ForceClasspathUpdateAction.java
deleted file mode 100644
index 340756c8d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ForceClasspathUpdateAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c)2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-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.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.ui.IActionDelegate;
-
-public class ForceClasspathUpdateAction extends Action implements IActionDelegate{
-
- private List projectsList = new ArrayList();
-
- @Override
- public void run() {
- J2EEComponentClasspathUpdater.getInstance().forceUpdate(projectsList);
- }
-
- public void run(IAction action) {
- J2EEComponentClasspathUpdater.getInstance().forceUpdate(projectsList);
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- action.setEnabled(setSelection(selection));
- }
-
- private boolean setSelection(ISelection selection){
- projectsList.clear();
- if(selection != null && selection instanceof IStructuredSelection) {
- IStructuredSelection structuredSelection = (IStructuredSelection)selection;
- if (structuredSelection.size() > 0) {
- Iterator iterator = structuredSelection.iterator();
- while(iterator.hasNext()){
- Object next = iterator.next();
- if (next instanceof IProject) {
- projectsList.add(next);
- } else {
- projectsList.clear();
- return false;
- }
- }
- } else { // empty selection
- return false;
- }
- return true;
- }
- return false;
- }
-
-
-
-}
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 71da360b0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-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 {
- // New creation wizards
- 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 NEW_EAR_COMP_PAGE = J2EEUIPlugin.PLUGIN_ID + ".NEW_EAR_COMP_PAGE"; //$NON-NLS-1$
- public static final String EAR_NEW_MODULE_PROJECTS_PAGE = J2EEUIPlugin.PLUGIN_ID + ".EAR_NEW_MODULE_PROJECTS_PAGE"; //$NON-NLS-1$
- public static final String NEW_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_NEW_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_APPCLIENT_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_NEW_APPCLIENT_WIZARD_PAGE3"; //$NON-NLS-1$
- 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$
- public static final String NEW_CONNECTOR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".JCA_NEWIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_CONNECTOR_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".JCA_NEWIZARD_PAGE3"; //$NON-NLS-1$
- public static final String NEW_JAVA_COMPONENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".NEW_JAVA_COMPONENT_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_JAVA_CLASS_OPTION_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".NEW_JAVA_CLASS_OPTION_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String NEW_UTILITY_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".NEW_UTILITY_WIZARD_P1"; //$NON-NLS-1$
- public static final String NEW_UTILITY_WIZARD_P3 = J2EEUIPlugin.PLUGIN_ID + ".NEW_UTILITY_WIZARD_P3"; //$NON-NLS-1$
-
- // Import, export wizards
- 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_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_IMPORT_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String IMPORT_EJB_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_IMPORT_EJB_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 IMPORT_UTILITY_JAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".IMPORT_UTILITY_JAR_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String IMPORT_UTILITY_JAR_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".IMPORT_UTILITY_JAR_WIZARD_PAGE2"; //$NON-NLS-1$
- public static final String IMPORT_CLASS_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".IMPORT_CLASS_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String IMPORT_CLASS_WIZARD_P2 = J2EEUIPlugin.PLUGIN_ID + ".IMPORT_CLASS_WIZARD_PAGE2"; //$NON-NLS-1$
-
- public static final String EXPORT_EAR_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EAR_EXPORT_PAGE1"; //$NON-NLS-1$
- public static final String EXPORT_APPCLIENT_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".APPCLIENT_EXPORT_APPCLIENT_WIZARD_PAGE1"; //$NON-NLS-1$
- public static final String EXPORT_EJB_WIZARD_P1 = J2EEUIPlugin.PLUGIN_ID + ".EJB_EXPORT_PAGE1"; //$NON-NLS-1$
- public static final String EXPORT_RAR_WIZARD_PAGE = J2EEUIPlugin.PLUGIN_ID + ".EXPORT_RAR_WIZARD_PAGE"; //$NON-NLS-1$
-
- // dialogs
- public static final String DELEATE_EAR_DIALOG_1 = J2EEUIPlugin.PLUGIN_ID + ".navm2000"; //$NON-NLS-1$
- public static final String DELEATE_MODULE_DIALOG_1 = J2EEUIPlugin.PLUGIN_ID + ".navm2010"; //$NON-NLS-1$
- public static final String RENAME_EAR_DIALOG_1 = J2EEUIPlugin.PLUGIN_ID + ".navm3000"; //$NON-NLS-1$
- public static final String RENAME_MODULE_DIALOG_1 = J2EEUIPlugin.PLUGIN_ID + ".navm3010"; //$NON-NLS-1$
- public static final String DEPLOYMENT_ASSEMBLY_PREFERENCE_PAGE_ADD_REFERENCED_PROJECT_CLASSPATH_ENTRIES= J2EEUIPlugin.PLUGIN_ID + ".DEPLOYMENT_ASSEMBLY_PREFERENCE_PAGE_ADD_REFERENCED_PROJECT_CLASSPATH_ENTRIES"; //$NON-NLS-1$
-
-}
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 245b05ef4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.text.MessageFormat;
-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.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.deploy.DeployerRegistry;
-import org.eclipse.jst.j2ee.internal.deploy.J2EEDeployOperation;
-import org.eclipse.jst.j2ee.internal.dialogs.Messages;
-import org.eclipse.jst.j2ee.internal.dialogs.RuntimeSelectionDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.internal.WTPResourceHandler;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-import org.eclipse.wst.server.core.IRuntime;
-
-/**
- * @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)
- */
- @Override
- protected void primRun(Shell shell) {
-
- if (checkEnabled(shell)) {
- final IStructuredSelection deploySelection = selection;
- Job deployJob = new Job(Messages.J2EEDeployAction_Deploy_) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- IStatus result = null;
- J2EEDeployOperation op = new J2EEDeployOperation(deploySelection.toArray());
- try {
- result = op.execute(monitor, null);
- } catch (Exception e) {
- result = new Status(IStatus.ERROR, WTPCommonPlugin.PLUGIN_ID, IStatus.ERROR, WTPResourceHandler.getString("27"), e); //$NON-NLS-1$
- Logger.getLogger().logError(e);
- } finally {
-
- }
- return result;
- }
- };
-
-
- try {
- deployJob.setUser(true);
- deployJob.schedule();
- } catch (Exception e) {
- //Ignore
- }
-
- }
-
- }
-
- /*
- *
- */
- public J2EEDeployAction() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- @Override
- public void selectionChanged(IAction action, ISelection aSelection) {
- super.selectionChanged(action, aSelection);
- action.setEnabled(true);
- }
-
-
- public boolean checkEnabled(Shell shell) {
-
- try {
- DeployerRegistry reg = DeployerRegistry.instance();
-
- List components = DeployerRegistry.getSelectedModules(selection.toArray());
- for (int i = 0; i < components.size(); i++) {
- IVirtualComponent component = (IVirtualComponent) components.get(i);
- IProject proj = component.getProject();
- if (proj == null) {
- displayMessageDialog(J2EEUIMessages.getResourceString("DEPLOY_PROJECT_NOT_FOUND") , shell); //$NON-NLS-1$
- return false;
- }
-
- IRuntime runtime = J2EEProjectUtilities.getServerRuntime(proj);
- if (runtime == null) {
- String message = MessageFormat.format(J2EEUIMessages.getResourceString("DEPLOY_RUNTIME_NOT_FOUND"), new Object []{proj.getName()}); //$NON-NLS-1$
- RuntimeSelectionDialog selectionDialog = new RuntimeSelectionDialog(shell,
- J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE"), //$NON-NLS-1$
- null /* default image */,
- message,
- MessageDialog.ERROR,
- new String[] { IDialogConstants.OK_LABEL }, 0, proj) ;
- selectionDialog.open();
- runtime = J2EEProjectUtilities.getServerRuntime(proj);
- if (runtime == null)
- return false;
- }
- List visitors = reg.getDeployModuleExtensions(proj, runtime);
- if (visitors.isEmpty()) {
- displayMessageDialog(MessageFormat.format(J2EEUIMessages.getResourceString("DEPLOY_PROJECT_NOT_SUPPORTED"), new Object []{proj.getName()}), shell); //$NON-NLS-1$
- return false;
- }
-
- }
-
- return true;
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- return false;
- }
-
- private void displayMessageDialog(String message, Shell shell) {
- String title = J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE"); //$NON-NLS-1$
- MessageDialog dialog = new MessageDialog(shell,
- title,
- null /* default image */,
- message,
- MessageDialog.ERROR,
- new String[] { IDialogConstants.OK_LABEL }, 0) ;
- dialog.open();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEActionFilterExtensionPoint.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEActionFilterExtensionPoint.java
deleted file mode 100644
index f595affc3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEActionFilterExtensionPoint.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 IBM Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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 static org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin.PLUGIN_ID;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * Contains the logic for processing the <code>org.eclipse.jst.j2ee.ui.newjavaeeactionfilter</code>
- * extension point.
- *
- */
-
-public final class NewJavaEEActionFilterExtensionPoint
-{
- public static final String EXTENSION_POINT_ID = "newJavaEEActionFilter"; //$NON-NLS-1$
- public static final String New_JavaEE_Wizard_Id = "newJavaEEWizardId"; //$NON-NLS-1$
- public static final String Filter_Wizard= "filterWizard"; //$NON-NLS-1$
-
- private static Set<String> extensions = null;
-
- public static boolean hasFilter( final String newjavaeewizardId )
- {
- readExtensions();
-
- return extensions.contains(newjavaeewizardId);
- }
-
- private static synchronized void readExtensions()
- {
- if( extensions != null )
- {
- return;
- }
-
- extensions = new HashSet<String>();
-
- for( IConfigurationElement element
- : getTopLevelElements( findExtensions( PLUGIN_ID, EXTENSION_POINT_ID ) ) )
- {
- if( element.getName().equals( New_JavaEE_Wizard_Id ) )
- {
- readExtension( element );
- }
- }
- }
-
- private static void readExtension( final IConfigurationElement config )
-
- {
- String newActionId;
-
-
- newActionId = findRequiredAttribute( config, Filter_Wizard );
-
-
- extensions.add( newActionId );
- }
-
- private static Collection<IConfigurationElement> getTopLevelElements( final Collection<IExtension> extensions )
- {
- final List<IConfigurationElement> elements = new ArrayList<IConfigurationElement>();
-
- for( IExtension extension : extensions )
- {
- for( IConfigurationElement element : extension.getConfigurationElements() )
- {
- elements.add( element );
- }
- }
-
- return elements;
- }
-
- private static Collection<IExtension> findExtensions(final String pluginId, final String extensionPointId) {
- final IExtensionRegistry registry = Platform.getExtensionRegistry();
- final IExtensionPoint point = registry.getExtensionPoint(pluginId, extensionPointId);
-
- if (point == null) {
- throw new RuntimeException();
- }
-
- final List<IExtension> extensions = new ArrayList<IExtension>();
-
- for (IExtension extension : point.getExtensions()) {
- extensions.add(extension);
- }
-
- return extensions;
- }
-
- private static String findRequiredAttribute(final IConfigurationElement el, final String attribute)
-
- {
- final String val = el.getAttribute(attribute);
-
- return val;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java
deleted file mode 100644
index 66a9d94ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007,2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-/**
- * A wizard is added to the "New Java EE Artifact" drop down if it has a parameter 'javaeeartifact':
- * <wizard
- * name="My Java EE Project Wizard"
- * icon="icons/wiz.gif"
- * category="mycategory"
- * id="xx.MyWizard">
- * <class class="org.xx.MyWizard">
- * <parameter name="javaeeartifact" value="true"/>
- * </class>
- * <description>
- * My Wizard
- * </description>
- * </wizard>
- */
-public class NewJavaEEArtifactDropDownAction extends NewJavaEEDropDownAction {
-
- private final static String ATT_JAVAEEARTIFACT = "javaeeartifact";//$NON-NLS-1$
-
- @Override
- protected String getTypeAttribute() {
- return ATT_JAVAEEARTIFACT;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java
deleted file mode 100644
index fd21c0bef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007,2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.internal.ui.util.CoreUtility;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
-import org.eclipse.ui.PlatformUI;
-
-public abstract class NewJavaEEDropDownAction extends Action implements IMenuCreator, IWorkbenchWindowPulldownDelegate2 {
-
- public static class NewJavaEEWizardAction extends Action implements Comparable {
-
- private final static String ATT_NAME = "name";//$NON-NLS-1$
- private final static String ATT_CLASS = "class";//$NON-NLS-1$
- private final static String ATT_ICON = "icon";//$NON-NLS-1$
- private final static String TAG_DESCRIPTION = "description"; //$NON-NLS-1$
-
- private Shell fShell;
- private IStructuredSelection fSelection;
- private IConfigurationElement fConfigurationElement;
-
- private int menuIndex;
-
- public NewJavaEEWizardAction(IConfigurationElement element) {
- fConfigurationElement= element;
- setText(element.getAttribute(ATT_NAME));
-
- String description = getDescriptionFromConfig(fConfigurationElement);
- setDescription(description);
- setToolTipText(description);
- setImageDescriptor(getIconFromConfig(fConfigurationElement));
- setMenuIndex(getMenuIndexFromConfig(fConfigurationElement));
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- @Override
- public void run() {
- Shell shell = getShell();
- try {
- INewWizard wizard = createWizard();
- wizard.init(PlatformUI.getWorkbench(), getSelection());
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- PixelConverter converter = new PixelConverter(JFaceResources.getDialogFont());
- dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70), converter.convertHeightInCharsToPixels(20));
- dialog.create();
- int res = dialog.open();
-
- notifyResult(res == Window.OK);
- } catch (CoreException e) {
- Logger.getLogger().log(e);
- }
- }
-
- /**
- * Returns the configured selection. If no selection has been configured using {@link #setSelection(IStructuredSelection)},
- * the currently selected element of the active workbench is returned.
- * @return the configured selection
- */
- protected IStructuredSelection getSelection() {
- if (fSelection == null) {
- return evaluateCurrentSelection();
- }
- return fSelection;
- }
-
- private IStructuredSelection evaluateCurrentSelection() {
- IWorkbenchWindow window = J2EEUIPlugin.getActiveWorkbenchWindow();
- if (window != null) {
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
- }
- return StructuredSelection.EMPTY;
- }
-
- /**
- * Configures the selection to be used as initial selection of the wizard.
- * @param selection the selection to be set or <code>null</code> to use the selection of the active workbench window
- */
- public void setSelection(IStructuredSelection selection) {
- fSelection = selection;
- }
-
- /**
- * Returns the configured shell. If no shell has been configured using {@link #setShell(Shell)},
- * the shell of the currently active workbench is returned.
- * @return the configured shell
- */
- protected Shell getShell() {
- if (fShell == null) {
- return J2EEUIPlugin.getActiveWorkbenchShell();
- }
- return fShell;
- }
-
- /**
- * Configures the shell to be used as parent shell by the wizard.
- * @param shell the shell to be set or <code>null</code> to use the shell of the active workbench window
- */
- public void setShell(Shell shell) {
- fShell = shell;
- }
-
- private String getDescriptionFromConfig(IConfigurationElement config) {
- IConfigurationElement [] children = config.getChildren(TAG_DESCRIPTION);
- if (children.length >= 1) {
- return children[0].getValue();
- }
- return ""; //$NON-NLS-1$
- }
-
- private ImageDescriptor getIconFromConfig(IConfigurationElement config) {
- String iconName = config.getAttribute(ATT_ICON);
- if (iconName != null) {
- return J2EEUIPlugin.imageDescriptorFromPlugin(config.getContributor().getName(), iconName);
- }
- return null;
- }
-
- private int getMenuIndexFromConfig(IConfigurationElement config) {
- IConfigurationElement[] classElements = config.getChildren(TAG_CLASS);
- if (classElements.length > 0) {
- for (IConfigurationElement classElement : classElements) {
- IConfigurationElement[] paramElements = classElement.getChildren(TAG_PARAMETER);
- for (IConfigurationElement paramElement : paramElements) {
- if (ATT_MENUINDEX.equals(paramElement.getAttribute(TAG_NAME))) {
- return Integer.parseInt(paramElement.getAttribute(TAG_VALUE));
- }
- }
- }
- }
- return Integer.MAX_VALUE;
- }
-
- protected INewWizard createWizard() throws CoreException {
- return (INewWizard) CoreUtility.createExtension(fConfigurationElement, ATT_CLASS);
- }
-
- public int getMenuIndex() {
- return menuIndex;
- }
-
- public void setMenuIndex(int menuIndex) {
- this.menuIndex = menuIndex;
- }
-
- public int compareTo(Object o) {
- NewJavaEEWizardAction action = (NewJavaEEWizardAction) o;
- return getMenuIndex() - action.getMenuIndex();
- }
- }
-
- protected final static String TAG_WIZARD = "wizard";//$NON-NLS-1$
- protected final static String TAG_PARAMETER = "parameter";//$NON-NLS-1$
- protected final static String TAG_NAME = "name";//$NON-NLS-1$
- protected final static String TAG_VALUE = "value";//$NON-NLS-1$
- protected final static String TAG_CLASS = "class"; //$NON-NLS-1$
- protected final static String ATT_MENUINDEX = "menuIndex";//$NON-NLS-1$
- protected final static String PL_NEW = "newWizards"; //$NON-NLS-1$
-
- protected Menu fMenu;
-
- protected Shell fWizardShell;
-
- public NewJavaEEDropDownAction() {
- fMenu = null;
- setMenuCreator(this);
- }
-
- public void dispose() {
- if (fMenu != null) {
- fMenu.dispose();
- fMenu = null;
- }
- }
-
- public Menu getMenu(Menu parent) {
- return null;
- }
-
- public Menu getMenu(Control parent) {
- if (fMenu == null) {
- fMenu = new Menu(parent);
- NewJavaEEWizardAction[] actions = getActionFromDescriptors();
- for (NewJavaEEWizardAction action : actions) {
- action.setShell(fWizardShell);
- ActionContributionItem item = new ActionContributionItem(action);
- item.fill(fMenu, -1);
- }
- }
- return fMenu;
- }
-
- @Override
- public void run() {
- getDefaultAction().run();
- }
-
- public Action getDefaultAction() {
- Action[] actions = getActionFromDescriptors();
- if (actions.length > 0)
- return actions[0];
- return null;
- }
-
- public NewJavaEEWizardAction[] getActionFromDescriptors() {
- ArrayList<NewJavaEEWizardAction> containers = new ArrayList<NewJavaEEWizardAction>();
-
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, PL_NEW);
- if (extensionPoint != null) {
- IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
- for (IConfigurationElement element : elements) {
- if (element.getName().equals(TAG_WIZARD) && isJavaEEProjectWizard(element) && !isFiltered(element)) {
- containers.add(new NewJavaEEWizardAction(element));
- }
- }
- }
-
- NewJavaEEWizardAction[] actions = containers.toArray(new NewJavaEEWizardAction[containers.size()]);
- Arrays.sort(actions);
- return actions;
- }
-
- private boolean isFiltered(IConfigurationElement element) {
- //This checks if a filter is registered, and will skip creating an action if found
- String id = element.getAttribute("id"); //$NON-NLS-1$
- return NewJavaEEActionFilterExtensionPoint.hasFilter(id);
-
- }
-
- protected boolean isJavaEEProjectWizard(IConfigurationElement element) {
- IConfigurationElement[] classElements = element.getChildren(TAG_CLASS);
- if (classElements.length > 0) {
- for (IConfigurationElement classElement : classElements) {
- IConfigurationElement[] paramElements = classElement.getChildren(TAG_PARAMETER);
- for (IConfigurationElement paramElement : paramElements) {
- if (getTypeAttribute().equals(paramElement.getAttribute(TAG_NAME))) {
- return Boolean.valueOf(paramElement.getAttribute(TAG_VALUE)).booleanValue();
- }
- }
- }
- }
- // old way, deprecated
- if (Boolean.valueOf(element.getAttribute(getTypeAttribute())).booleanValue()) {
- return true;
- }
- return false;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- fWizardShell = window.getShell();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- 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) {
-
- }
-
- protected abstract String getTypeAttribute();
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java
deleted file mode 100644
index 78553066b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007,2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-/**
- * A wizard is added to the "New Java EE Project" drop down if it has a parameter 'javaeeproject':
- * <wizard
- * name="My Java EE Project Wizard"
- * icon="icons/wiz.gif"
- * category="mycategory"
- * id="xx.MyWizard">
- * <class class="org.xx.MyWizard">
- * <parameter name="javaeeproject" value="true"/>
- * </class>
- * <description>
- * My Wizard
- * </description>
- * </wizard>
- */
-public class NewJavaEEProjectDropDownAction extends NewJavaEEDropDownAction {
-
- private final static String ATT_JAVAEEPROJECT = "javaeeproject";//$NON-NLS-1$
-
- @Override
- protected String getTypeAttribute() {
- return ATT_JAVAEEPROJECT;
- }
-
-}
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 e1d10b105..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java
+++ /dev/null
@@ -1,460 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.actions;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IFile;
-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.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jdt.core.IClassFile;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveOptions;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.componentcore.util.EJBArtifactEdit;
-import org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities;
-import org.eclipse.jst.j2ee.internal.componentcore.ComponentArchiveOptions;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper;
-import org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.BinaryEditorUtilities;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webservice.wsdd.BeanLink;
-import org.eclipse.jst.j2ee.webservice.wsdd.EJBLink;
-import org.eclipse.jst.j2ee.webservice.wsdd.ServletLink;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-/**
- * 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(J2EEUIMessages.getResourceString(J2EEUIMessages.OPEN_J2EE_RESOURCE_ACTION_0));
- }
-
- /**
- * 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;
- }
-
- protected void openAppropriateEditor(IVirtualComponent c){
- if (c == null){
- return;
- }
- IWorkbenchPage page = null;
- IEditorPart editor = null;
- try {
- page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-
- IEditorInput editorInput = null;
-
- //[Bug 237794] if component c is a JEE 5 archive then editorInput needs to be a BinaryEditorInput
- if (c.isBinary()) {
- JavaEEQuickPeek qp = JavaEEBinaryComponentHelper.getJavaEEQuickPeek(c);
- //[Bug 239440] because Connectors are opened with the basic XML editor and not a specialized editor they need binary editor input
- if( qp.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID || qp.getJavaEEVersion() == JavaEEQuickPeek.JEE_6_0_ID || qp.getType() == JavaEEQuickPeek.CONNECTOR_TYPE) {
- String path = ((EObject)srcObject).eResource().getURI().toString();
- editorInput = BinaryEditorUtilities.getBinaryEditorInput(c, path);
- }
- }
-
- //this is for all other cases
- if(editorInput == null) {
- editorInput = new ComponentEditorInput(c);
- }
-
- editor = page.openEditor(editorInput, currentDescriptor.getId());
- if (editor instanceof ISetSelectionTarget)
- ((ISetSelectionTarget) editor).selectReveal(getStructuredSelection());
- } catch (Exception e) {
- MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), J2EEUIMessages.getResourceString("Problems_Opening_Editor_ERROR_"), e.getMessage()); //$NON-NLS-1$ = "Problems Opening Editor"
- }
- }
-
-
- /**
- * 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();
- if( currentDescriptor != null ){
- editor = page.openEditor(new FileEditorInput((IFile) r), currentDescriptor.getId());
- if (editor instanceof ISetSelectionTarget)
- ((ISetSelectionTarget) editor).selectReveal(getStructuredSelection());
- }
- } catch (Exception e) {
- MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), J2EEUIMessages.getResourceString("Problems_Opening_Editor_ERROR_"), e.getMessage()); //$NON-NLS-1$ = "Problems Opening Editor"
- }
- }
-
- /**
- * The user has invoked this action
- */
- @Override
- public void run() {
- if (!isEnabled())
- return;
-
- if (srcObject instanceof J2EEJavaClassProviderHelper) {
- ((J2EEJavaClassProviderHelper) srcObject).openInEditor();
- return;
- }
-
- if( isEJB3BeanObject(srcObject) ){
- String name = ""; //$NON-NLS-1$
- if( srcObject instanceof org.eclipse.jst.javaee.ejb.SessionBean ){
- org.eclipse.jst.javaee.ejb.SessionBean bean = (org.eclipse.jst.javaee.ejb.SessionBean)srcObject;
- name = bean.getEjbClass();
- }else if(srcObject instanceof org.eclipse.jst.javaee.ejb.MessageDrivenBean){
- org.eclipse.jst.javaee.ejb.MessageDrivenBean bean = (org.eclipse.jst.javaee.ejb.MessageDrivenBean)srcObject;
- name = bean.getEjbClass();
- }else if(srcObject instanceof org.eclipse.jst.javaee.ejb.EntityBean){
- org.eclipse.jst.javaee.ejb.EntityBean bean = (org.eclipse.jst.javaee.ejb.EntityBean)srcObject;
- name = bean.getEjbClass();
- }
- openResourceInEditor(name, (EObject)srcObject);
- return;
- }
-
- if(srcObject instanceof org.eclipse.jst.javaee.web.Servlet ){
- String name = ""; //$NON-NLS-1$
- name = ((org.eclipse.jst.javaee.web.Servlet)srcObject).getServletClass();
- openResourceInEditor(name, (EObject)srcObject);
- return;
- }
- if( srcObject instanceof org.eclipse.jst.javaee.web.Filter ){
- String name = ""; //$NON-NLS-1$
- name = ((org.eclipse.jst.javaee.web.Filter)srcObject).getFilterClass();
- openResourceInEditor(name, (EObject)srcObject);
- return;
- }
-
- if( srcObject instanceof org.eclipse.jst.javaee.core.Listener ){
- String name = ""; //$NON-NLS-1$
- name = ((org.eclipse.jst.javaee.core.Listener)srcObject).getListenerClass();
- openResourceInEditor(name, (EObject)srcObject);
- return;
- }
-
- if (srcObject instanceof EObject) {
- EObject ro = (EObject) srcObject;
- IProject p = ProjectUtilities.getProject(ro);
-
- if (ro instanceof BeanLink) {
- openBeanLinkInJavaEditor((BeanLink) ro, p);
- return;
- }
- IResource resource = WorkbenchResourceHelper.getFile((EObject)srcObject);
- if(resource != null && resource.exists()){
- openAppropriateEditor(resource);
- } else if(ro.eResource() != null) {
- ModuleFile moduleFile = ArchiveUtil.getModuleFile(ro);
- if (moduleFile != null) {
- ArchiveOptions options = moduleFile.getOptions();
- if(options instanceof ComponentArchiveOptions) {
- IVirtualComponent component = ((ComponentArchiveOptions)options).getComponent();
- openAppropriateEditor(component);
- }
- } else {
- //if can't get a ModuleFile then get the component from the archive
- IArchive archive = JavaEEArchiveUtilities.findArchive(ro);
- if(archive != null) {
- IVirtualComponent component = JavaEEArchiveUtilities.findComponent(archive);
- if(component != null){
- openAppropriateEditor(component);
- }
- }
- }
- }
- } else if (srcObject instanceof Resource) {
- openAppropriateEditor(WorkbenchResourceHelper.getFile((Resource)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
- */
- @Override
- 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 if(isEJB3BeanObject(obj)) {
- //[241685] if it is a EJB 3 bean the class is specially opened by the run() method
- srcObject = obj;
- return true;
- } else if(obj instanceof org.eclipse.jst.javaee.web.Servlet ||
- obj instanceof org.eclipse.jst.javaee.web.Filter ||
- obj instanceof org.eclipse.jst.javaee.core.Listener ){
- srcObject = obj;
- return true;
- }else if (obj instanceof EObject) {
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- IFile file = WorkbenchResourceHelper.getFile((EObject)obj);
- if(file != null) {
- if(file.exists()){
- IContentType contentType = IDE.getContentType(file);
- currentDescriptor = registry.getDefaultEditor(file.getName(), contentType);
- } else {
- currentDescriptor = null;
- return false;
- }
- } else if (((EObject)obj).eResource() != null) {
- //[Bug 237794] if the file is null then it maybe a binary resource in an archive
- // attempt to get the resource from the archive and the content type from that
- EObject eObj = (EObject) obj;
- IArchive archive = JavaEEArchiveUtilities.findArchive(eObj);
- if(archive != null) {
- IPath path = new Path(((EObject)obj).eResource().getURI().toString());
- if(archive.containsArchiveResource(path)) {
- InputStream stream = null;
- try {
- IArchiveResource resource = archive.getArchiveResource(path);
- stream = resource.getInputStream();
- IContentType type = Platform.getContentTypeManager().findContentTypeFor(stream, path.lastSegment());
- currentDescriptor = registry.getDefaultEditor(path.lastSegment(),type);
- } catch (FileNotFoundException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- } catch (IOException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- } finally {
- if(stream != null) {
- try {
- stream.close();
- } catch (IOException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- }
- }
- }
-
- }
- }
- }
- }
- else if (obj instanceof Resource) {
- IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
- IFile file = WorkbenchResourceHelper.getFile((Resource)obj);
- IContentType contentType = IDE.getContentType(file);
- currentDescriptor = registry.getDefaultEditor(file.getName(), contentType);
- }
- else {
- currentDescriptor = null;
- return false;
- }
- setAttributesFromDescriptor();
- srcObject = obj;
- return true;
- }
-
- /**
- * @param link
- */
- private void openBeanLinkInJavaEditor(BeanLink link, IProject p) {
- String linkName = null;
- JavaClass javaClass = null;
- IVirtualComponent comp = ComponentUtilities.findComponent(link);
- // Handle EJB Link case
- if (link instanceof EJBLink) {
- linkName = ((EJBLink) link).getEjbLink();
- EJBArtifactEdit artifactEdit = null;
- try {
- artifactEdit = EJBArtifactEdit.getEJBArtifactEditForRead(comp);
- EJBJar ejbJar = artifactEdit.getEJBJar();
- if (ejbJar == null)
- return;
- EnterpriseBean bean = ejbJar.getEnterpriseBeanNamed(linkName);
- if (bean == null)
- return;
- javaClass = bean.getEjbClass();
- } finally {
- if (artifactEdit!=null)
- artifactEdit.dispose();
- }
- }
- // Handle Servlet Link case
- else {
- linkName = ((ServletLink) link).getServletLink();
- WebArtifactEdit artifactEdit = null;
- try {
- artifactEdit = WebArtifactEdit.getWebArtifactEditForRead(comp);
- WebApp webApp = artifactEdit.getWebApp();
- if (webApp == null)
- return;
- Servlet servlet = webApp.getServletNamed(linkName);
- if (servlet == null)
- return;
- javaClass = servlet.getServletClass();
- } finally {
- if (artifactEdit!=null)
- artifactEdit.dispose();
- }
- }
- // Open java editor on the selected objects associated java file
- try {
- J2EEEditorUtility.openInEditor(javaClass, p);
- } catch (Exception cantOpen) {
- J2EEUIPlugin.logError(-1, cantOpen.getMessage(), cantOpen);
- }
- }
-
- 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;
- }
-
- /**
- * Determines if the given object is a EJB 3 Bean
- * [241685] first added
- *
- * @param obj determine weather this object is an EJB 3 bean or not
- * @return true if obj is a EJB 3 bean, false otherwise
- */
- private boolean isEJB3BeanObject(Object obj) {
- boolean isBean =
- obj instanceof org.eclipse.jst.javaee.ejb.SessionBean ||
- obj instanceof org.eclipse.jst.javaee.ejb.MessageDrivenBean ||
- obj instanceof org.eclipse.jst.javaee.ejb.EntityBean;
-
- return isBean;
- }
-
- protected void openResourceInEditor(String name, EObject object){
- IResource resource = WorkbenchResourceHelper.getFile(object);
- if( resource == null )
- return;
-
- IProject project = resource.getProject();
- IJavaProject javaProject = JavaCore.create(project);
- if(javaProject.exists()){
- IType type = null;
- try {
- //if name is null then can't get type
- if(name != null) {
- type = javaProject.findType( name );
- }
-
- //if type is null then can't open its editor, so open editor for the resource
- if(type != null) {
- if( !type.isBinary() ){
- ICompilationUnit cu = type.getCompilationUnit();
- EditorUtility.openInEditor(cu);
- }else{
- IClassFile classFile = type.getClassFile();
- EditorUtility.openInEditor(classFile);
- }
-
- } else{
- if(resource.exists() && resource.getType() == IResource.FILE ){
- IFile file = (IFile)resource;
- IContentType contentType = IDE.getContentType(file);
- currentDescriptor = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName(), contentType);
- }
- openAppropriateEditor(resource);
- }
- } catch (JavaModelException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- } catch (PartInitException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- }
-
- }
- }
-}
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 ec3fac904..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WorkspaceModifyComposedOperation.java
+++ /dev/null
@@ -1,44 +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.List;
-
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-
-/**
- * WARNING: This class will be deleted
- *
- * @deprecated use {@link org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation}
- */
-public class WorkspaceModifyComposedOperation extends org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation {
- public WorkspaceModifyComposedOperation(ISchedulingRule rule) {
- super(rule);
- }
-
- public WorkspaceModifyComposedOperation() {
- super();
- }
-
- public WorkspaceModifyComposedOperation(ISchedulingRule rule, List nestedRunnablesWithProgress) {
- super(rule, nestedRunnablesWithProgress);
- }
-
- public WorkspaceModifyComposedOperation(List nestedRunnablesWithProgress) {
- super(nestedRunnablesWithProgress);
- }
-
- public WorkspaceModifyComposedOperation(IRunnableWithProgress nestedOp) {
- super(nestedOp);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.java
deleted file mode 100644
index f183b33a8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.classpathdep.ui;
-
-import java.net.URL;
-
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-
-public class ClasspathDependencyAttributeConfiguration extends ClasspathAttributeConfiguration {
-
- private static ImageDescriptor descriptor = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canEdit(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public boolean canEdit(ClasspathAttributeAccess attribute) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public boolean canRemove(ClasspathAttributeAccess attribute) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getImageDescriptor(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public ImageDescriptor getImageDescriptor(ClasspathAttributeAccess attribute) {
- if (descriptor == null) {
- final URL gifImageURL = (URL) J2EEPlugin.getPlugin().getImage("CPDep"); //$NON-NLS-1$
- if (gifImageURL != null) {
- descriptor = ImageDescriptor.createFromURL(gifImageURL);
- }
- }
- return descriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getNameLabel(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public String getNameLabel(ClasspathAttributeAccess attribute) {
- return Resources.nameLabel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getValueLabel(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public String getValueLabel(ClasspathAttributeAccess attribute) {
- final IClasspathAttribute attrib = attribute.getClasspathAttribute();
- if (attrib != null) {
- final String value = attrib.getValue();
- if (value != null) {
- if (value.equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER)) {
- return Resources.containerMapping;
- }
- return value;
- }
- }
- return Resources.unspecified;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performEdit(org.eclipse.swt.widgets.Shell, org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public IClasspathAttribute performEdit(Shell shell,
- ClasspathAttributeAccess attribute) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) {
- return JavaCore.newClasspathAttribute(IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, null);
- }
-
- private static final class Resources extends NLS {
- public static String nameLabel;
- public static String unspecified;
- public static String containerMapping;
- static
- {
- initializeMessages( ClasspathDependencyAttributeConfiguration.class.getName(),
- Resources.class );
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.properties
deleted file mode 100644
index 3f050ff33..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 BEA Systems, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# rfrost@bea.com - initial API and implementation
-###############################################################################
-nameLabel = Publish/export dependency
-unspecified = (None)
-containerMapping = Added to parent module \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.java
deleted file mode 100644
index 24bf99739..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.classpathdep.ui;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jst.j2ee.classpathdep.UpdateClasspathAttributeUtil;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IMarkerResolutionGenerator;
-import org.eclipse.wst.validation.internal.ConfigurationConstants;
-
-/**
- * IMarkerResolutionGenerator for classpath dependency validator problem markers.
- */
-public final class ClasspathDependencyValidatorMarkerResolutions implements IMarkerResolutionGenerator {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IMarkerResolutionGenerator#getResolutions(org.eclipse.core.resources.IMarker)
- */
- public IMarkerResolution[] getResolutions(final IMarker marker) {
- // generate resolutions based on type of validation problem marker
- String messageId = null;
- String cpEntryPath = null;
- try {
- messageId = (String) marker.getAttribute(ConfigurationConstants.VALIDATION_MARKER_MESSAGEID);
- cpEntryPath = (String) marker.getAttribute(ConfigurationConstants.VALIDATION_MARKER_GROUP);
- } catch (CoreException ce) {
- Logger.getLogger(J2EEUIPlugin.PLUGIN_ID).logError(ce);
- return new IMarkerResolution[0];
- }
-
- if (messageId == null || cpEntryPath == null || cpEntryPath.length() == 0) {
- return new IMarkerResolution[0];
- }
-
- if (ClasspathDependencyValidator.AppClientProject.equals(messageId)) {
- // can apply to multiple cp entries so not currently supporting a quick fix...
- } else if (ClasspathDependencyValidator.DuplicateClassFolderEntry.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.DuplicateArchiveName.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.FilteredContainer.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.InvalidNonWebRuntimePath.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.InvalidWebRuntimePath.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.NonTaggedExportedClasses.equals(messageId)) {
- IResource resource = marker.getResource();
- if(null != resource && resource.getType() == IResource.PROJECT && !JavaEEProjectUtilities.isApplicationClientProject((IProject)resource)){
- // quick fix adds the dependency, and one to remove it
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, true),
- new AddClasspathNonDependencyAttributeResolution(cpEntryPath)};
- }
- // quick fix removes the dependency
- return new IMarkerResolution[] { new AddClasspathNonDependencyAttributeResolution(cpEntryPath) };
- } else if (ClasspathDependencyValidator.ProjectClasspathEntry.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- } else if (ClasspathDependencyValidator.RootMappingNonEARWARRef.equals(messageId)) {
- // can apply to multiple cp entries so not currently supporting a quick fix...
- } else if (ClasspathDependencyValidator.SourceEntry.equals(messageId)) {
- // quick fix removes the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, false) };
- }
-
- return new IMarkerResolution[0];
- }
-
- private static IClasspathEntry getClasspathEntryForMarker(final IMarker marker, final String cpEntryPath) throws CoreException {
- final IProject proj = marker.getResource().getProject();
- if (proj != null && proj.hasNature(JavaCore.NATURE_ID)) {
- final IJavaProject jProject = JavaCore.create(proj);
- if (cpEntryPath != null) {
- IClasspathEntry[] rawCp = jProject.getRawClasspath();
- for (int i = 0; i < rawCp.length; i++) {
- if (rawCp[i].getPath().toString().equals(cpEntryPath)) {
- return rawCp[i];
- }
- }
- }
- }
- return null;
- }
-
- /* Resolution that add/removes the classpath dependency attribute */
- private static final class UpdateClasspathDependencyAttributeResolution implements IMarkerResolution {
- private final boolean add;
- private final String cpEntryPath;
- public UpdateClasspathDependencyAttributeResolution(final String cpEntryPath, final boolean add) {
- this.add = add;
- this.cpEntryPath = cpEntryPath;
- }
-
- public String getLabel() {
- if (add) {
- return Resources.addClasspathDependencyAttribute;
- }
- return Resources.removeClasspathDependencyAttribute;
- }
-
- public void run(final IMarker marker) {
- final IProject proj = marker.getResource().getProject();
- try {
- final IClasspathEntry cpEntry = getClasspathEntryForMarker(marker, cpEntryPath);
- if (add) {
- UpdateClasspathAttributeUtil.addDependencyAttribute(null, proj.getName(), cpEntry);
- } else {
- UpdateClasspathAttributeUtil.removeDependencyAttribute(null, proj.getName(), cpEntry);
- }
- } catch (CoreException ce){
- ErrorDialog.openError(null, Resources.errorDialogTitle,
- Resources.errorDialogMessage,
- ce.getStatus());
- } catch (ExecutionException ee){
- ErrorDialog.openError(null, Resources.errorDialogTitle,
- Resources.errorDialogMessage,
- new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, ee.getLocalizedMessage(), ee));
- }
- }
- }
-
- /* Resolution that adds the classpath nondependency attribute */
- private static final class AddClasspathNonDependencyAttributeResolution implements IMarkerResolution {
- private final String cpEntryPath;
- public AddClasspathNonDependencyAttributeResolution(final String cpEntryPath) {
- this.cpEntryPath = cpEntryPath;
- }
-
- public String getLabel() {
- return Resources.addClasspathNonDependencyAttribute;
- }
-
- public void run(final IMarker marker) {
- final IProject proj = marker.getResource().getProject();
- try {
- final IClasspathEntry cpEntry = getClasspathEntryForMarker(marker, cpEntryPath);
- UpdateClasspathAttributeUtil.addNonDependencyAttribute(null, proj.getName(), cpEntry);
- } catch (CoreException ce){
- ErrorDialog.openError(null, Resources.errorDialogTitle,
- Resources.errorDialogMessage,
- ce.getStatus());
- } catch (ExecutionException ee){
- ErrorDialog.openError(null, Resources.errorDialogTitle,
- Resources.errorDialogMessage,
- new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, ee.getLocalizedMessage(), ee));
- }
- }
- }
-
- private static final class Resources extends NLS {
- public static String removeClasspathDependencyAttribute;
- public static String addClasspathDependencyAttribute;
- public static String addClasspathNonDependencyAttribute;
- public static String errorDialogTitle;
- public static String errorDialogMessage;
-
- static
- {
- initializeMessages( ClasspathDependencyValidatorMarkerResolutions.class.getName(),
- Resources.class );
- }
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.properties
deleted file mode 100644
index c21e5af92..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-addClasspathDependencyAttribute = Mark the associated raw classpath entry as a publish/export dependency.
-addClasspathNonDependencyAttribute = Exclude the associated raw classpath entry from the set of potential publish/export dependencies.
-removeClasspathDependencyAttribute = Remove publish/export dependency on the associated raw classpath entry.
-errorDialogTitle = Error
-errorDialogMessage = Failed while applying the quick fix. \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.java
deleted file mode 100644
index cad0465fa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * rfrost@bea.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.classpathdep.ui;
-
-import java.net.URL;
-
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-
-public class ClasspathNonDependencyAttributeConfiguration extends ClasspathAttributeConfiguration {
-
- private static ImageDescriptor descriptor = null;
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canEdit(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public boolean canEdit(ClasspathAttributeAccess attribute) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public boolean canRemove(ClasspathAttributeAccess attribute) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getImageDescriptor(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public ImageDescriptor getImageDescriptor(ClasspathAttributeAccess attribute) {
- if (descriptor == null) {
- final URL gifImageURL = (URL) J2EEPlugin.getPlugin().getImage("CPDep"); //$NON-NLS-1$
- if (gifImageURL != null) {
- descriptor = ImageDescriptor.createFromURL(gifImageURL);
- }
- }
- return descriptor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getNameLabel(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public String getNameLabel(ClasspathAttributeAccess attribute) {
- return Resources.nameLabel;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getValueLabel(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public String getValueLabel(ClasspathAttributeAccess attribute) {
- return Resources.unspecified;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performEdit(org.eclipse.swt.widgets.Shell, org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public IClasspathAttribute performEdit(Shell shell,
- ClasspathAttributeAccess attribute) {
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- @Override
- public IClasspathAttribute performRemove(ClasspathAttributeAccess attribute) {
- return JavaCore.newClasspathAttribute(IClasspathDependencyConstants.CLASSPATH_COMPONENT_NON_DEPENDENCY, null);
- }
-
- private static final class Resources extends NLS {
- public static String nameLabel;
- public static String unspecified;
- static
- {
- initializeMessages( ClasspathNonDependencyAttributeConfiguration.class.getName(),
- Resources.class );
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.properties
deleted file mode 100644
index 5234408ef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2007 BEA Systems, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# rfrost@bea.com - initial API and implementation
-###############################################################################
-nameLabel = Excluded from publish/export structure
-unspecified = (None) \ 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 519b60b1e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.AppClientComponentExportWizard;
-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));
- }
-
- @Override
- protected void primRun(Shell shell) {
- AppClientComponentExportWizard wizard = new AppClientComponentExportWizard();
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
- wizard.init(plugin.getWorkbench(), selection);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-}
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 393146f42..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.AppClientComponentImportWizard;
-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));
- }
-
- @Override
- protected void primRun(Shell shell) {
-
- AppClientComponentImportWizard wizard = new AppClientComponentImportWizard();
-
- J2EEUIPlugin plugin = J2EEUIPlugin.getDefault();
-
- wizard.init(plugin.getWorkbench(), StructuredSelection.EMPTY);
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
-
-}
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 acb50d9ce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.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.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);
- }
-
- @Override
- public boolean canExecute() {
- return super.canExecute() && overridable.doCanExecute();
- }
-
- @Override
- public boolean canUndo() {
- return overridable.doCanUndo();
- }
-
- @Override
- 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;
- }
-
- @Override
- 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 313934d19..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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 {
- /**
- * Warning cleanup 12/07/2005
- */
- private static final long serialVersionUID = 8713021573099134096L;
- private Map bindings;
- private Map extensions;
-
- /**
- * J2EEClipboard constructor comment.
- */
- public J2EEClipboard(Collection defaultClipboard) {
- super(defaultClipboard);
- }
-
- @Override
- 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();
- }
-}
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 7fa7913bd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.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.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);
- }
-
- @Override
- 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;
- }
-
- @Override
- 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 2a8f4fa07..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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));
- }
-
- @Override
- public Collection getAffectedObjects() {
- return result;
- }
-
- @Override
- public Collection getResult() {
- return result;
- }
-
- @Override
- 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
- }
-}
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 2c1a1ddc6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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;
- }
-
- @Override
- public Collection getAffectedObjects() {
- return result;
- }
-
- @Override
- public Collection getResult() {
- return result;
- }
-
- @Override
- 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();
- }
-
- @Override
- public void undo() {
- result = null;
- }
-}
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 5d2b7fc89..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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();
- }
-
- @Override
- 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;
- }
- }
- }
-}
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 93cd5a964..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.common.internal.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);
- }
-
- @Override
- 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);
- }
- }
-
- @Override
- public Collection doGetAffectedObjects() {
- return copyCommand.getAffectedObjects();
- }
-
- @Override
- public Collection doGetResult() {
- return copyCommand.getResult();
- }
-
- @Override
- public void doRedo() {
- super.doRedo();
- if (addBindingsCommand != null)
- addBindingsCommand.redo();
- if (addExtensionsCommand != null)
- addExtensionsCommand.redo();
- }
-
- @Override
- 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();
- }
-
- @Override
- protected boolean prepare() {
- if (getJ2EEClipboard() == null)
- return false;
- command = new StrictCompoundCommand();
-
- copyCommand = new J2EECopyFromClipboardCommand((J2EEUIEditingDomain) domain);
- command.append(copyCommand);
-
- command.append(new CommandWrapper() {
- @Override
- 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;
- // }
- // };
- }
-}
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 fad74e7eb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.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
- *******************************************************************************/
-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();
- }
-
- @Override
- 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;
- }
-
- @Override
- 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/deployables/EnterpriseDeployableArtifactAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseDeployableArtifactAdapterFactory.java
deleted file mode 100644
index c4593457a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseDeployableArtifactAdapterFactory.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Jan 18, 2005
- */
-package org.eclipse.jst.j2ee.internal.deployables;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.ui.actions.ILaunchable;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
-
-public class EnterpriseDeployableArtifactAdapterFactory extends ModuleArtifactAdapterDelegate implements IAdapterFactory {
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[] {ILaunchable.class };
- }
-
- @Override
- public IModuleArtifact getModuleArtifact(Object obj) {
- return EnterpriseApplicationDeployableAdapterUtil.getModuleObject(obj);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java
deleted file mode 100644
index 0dc043741..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Feb 21, 2005
- */
-package org.eclipse.jst.j2ee.internal.deployables;
-
-import org.eclipse.debug.ui.actions.ILaunchable;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-
-/**
- * @author blancett
- *
- */
-public class EnterpriseModuleArtifact implements IModuleArtifact {
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModuleArtifact#getModule()
- */
- public IModule getModule() {
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[] { IModuleArtifact.class, ILaunchable.class };
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java
deleted file mode 100644
index 78d7c9898..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * Created on Feb 21, 2005
- */
-package org.eclipse.jst.j2ee.internal.deployables;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.debug.ui.actions.ILaunchable;
-import org.eclipse.wst.server.core.IModuleArtifact;
-
-
-public class J2EEDeployableAdapterFactory implements IAdapterFactory {
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- IModuleArtifact moduleArtifact = null;
-/* if (adapterType == IModuleArtifact.class ) {
-
- if (moduleArtifact == null && Platform.getAdapterManager().hasAdapter(adaptableObject, "org.eclipse.jst.j2ee.internal.web.deployables.WebModuleArtifact")) {
- moduleArtifact = (IModuleArtifact) Platform.getAdapterManager().loadAdapter(adaptableObject, "org.eclipse.jst.j2ee.internal.web.deployables.WebModuleArtifact");
- }
- if (moduleArtifact == null && Platform.getAdapterManager().hasAdapter(adaptableObject, "org.eclipse.jst.j2ee.ejb.internal.deployables.IEJBModuleArtifact")) {
- moduleArtifact = (IModuleArtifact) Platform.getAdapterManager().loadAdapter(adaptableObject, "org.eclipse.jst.j2ee.ejb.internal.deployables.IEJBModuleArtifact");
- }
- if (moduleArtifact == null && Platform.getAdapterManager().hasAdapter(adaptableObject, "org.eclipse.jst.j2ee.internal.deployables.EnterpriseModuleArtifact")) {
- moduleArtifact = (IModuleArtifact) Platform.getAdapterManager().loadAdapter(adaptableObject, "org.eclipse.jst.j2ee.internal.deployables.EnterpriseModuleArtifact");
- }
- if (moduleArtifact == null && Platform.getAdapterManager().hasAdapter(adaptableObject, "org.eclipse.wst.web.internal.deployables.IStaticWebModuleArtifact")) {
- moduleArtifact = (IModuleArtifact) Platform.getAdapterManager().loadAdapter(adaptableObject, "org.eclipse.wst.web.internal.deployables.IStaticWebModuleArtifact");
- }
- }*/
- return moduleArtifact;
- }
-
- public Class[] getAdapterList() {
- return new Class[]{IModuleArtifact.class, ILaunchable.class};
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java
deleted file mode 100644
index d9ac0dd27..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Stefan Dimov, stefan.dimov@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.InputDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.widgets.Shell;
-
-@Deprecated
-public class ChangeLibDirDialog extends InputDialog {
- private boolean warnBlank;
-
- public ChangeLibDirDialog(Shell parentShell, String initialValue, boolean warnBlank) {
- super(parentShell, J2EEUIMessages.getResourceString(J2EEUIMessages.CHANGE_LIB_DIR_HEAD),
- J2EEUIMessages.getResourceString(J2EEUIMessages.NEW_LIB_DIR_PROPMPT), initialValue, null);
- this.warnBlank = warnBlank;
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.OK_ID) {
- String res = getText().getText().trim();
- if (res.length() == 0) {
- if (warnBlank)
- if (!MessageDialog.openQuestion(this.getShell(),
- J2EEUIMessages.getResourceString(J2EEUIMessages.BLANK_LIB_DIR),
- J2EEUIMessages.getResourceString(J2EEUIMessages.BLANK_LIB_DIR_CONFIRM))) return;
- } else {
- res = res.substring(1);
- String[] segments = res.split("" + IPath.SEPARATOR); //$NON-NLS-1$
- Path p = new Path(""); //$NON-NLS-1$
- boolean valid = true;
- for (int i = 0; i < segments.length; i++) {
- valid = p.isValidSegment(segments[i]);
- if (!valid)
- break;
- }
- if (!valid) {
- MessageDialog.openError(null,
- J2EEUIMessages.getResourceString(J2EEUIMessages.INVALID_PATH),
- J2EEUIMessages.getResourceString(J2EEUIMessages.INVALID_PATH_MSG));
- return;
- }
- }
- }
- super.buttonPressed(buttonId);
- }
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java
deleted file mode 100644
index 87d55d5de..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Stefan Dimov, stefan.dimov@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Shell;
-
-public class DependencyConflictResolveDialog extends MessageDialogWithToggle {
-
- public static final int BTN_ID_OK = 0;
- public static final int BTN_ID_CANCEL = 1;
-
- public static final int DLG_TYPE_1 = 1;
- public static final int DLG_TYPE_2 = 2;
-
- public static final String DONT_SHOW_AGAIN = "DependencyConflictResolveDialog.DONT_SHOW_AGAIN"; //$NON-NLS-1$
-
- public DependencyConflictResolveDialog(Shell parentShell,
- int dlgType) {
-
- super(parentShell,
- J2EEUIMessages.getResourceString(J2EEUIMessages.DEPENDENCY_CONFLICT_TITLE),
- null,
- J2EEUIMessages.getResourceString((dlgType == DLG_TYPE_1) ?
- J2EEUIMessages.DEPENDENCY_CONFLICT_MSG_1 :
- J2EEUIMessages.DEPENDENCY_CONFLICT_MSG_2)
-
- , MessageDialog.WARNING,
-
- new String[] { J2EEUIMessages.OK_BUTTON,
- J2EEUIMessages.CANCEL_BUTTON },
- BTN_ID_CANCEL,
- J2EEUIMessages.getResourceString(J2EEUIMessages.DO_NOT_SHOW_WARNING_AGAIN),
- false);
- }
-
- @Override
- public int open() {
- if (getPrefStore().getBoolean(DONT_SHOW_AGAIN))
- return BTN_ID_OK;
- setToggleState(getPrefStore().getBoolean(DONT_SHOW_AGAIN));
- return super.open();
- }
-
- @Override
- public boolean close() {
- getPrefStore().setValue(DONT_SHOW_AGAIN, getToggleState());
- return super.close();
- }
-
- @Override
- public IPreferenceStore getPrefStore() {
- return J2EEUIPlugin.getDefault().getPreferenceStore();
- }
-}
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 48d80d474..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.PlatformUI;
-import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
-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$
- String localMessage = message;
- if (localMessage == null)
- localMessage = J2EEUIMessages.getResourceString("Select_a_file__UI_"); //$NON-NLS-1$
- setMessage(localMessage);
- 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) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this.getParentShell(), helpCode);
- }
-
-}
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 25282a8d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java
+++ /dev/null
@@ -1,212 +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>
- */
- @Override
- 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/Messages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/Messages.java
deleted file mode 100644
index 40b7a5bf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/Messages.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- public static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.dialogs.messages"; //$NON-NLS-1$
- public static String RuntimeSelectionDialog_Configure_Target_Runtime_;
- public static String J2EEDeployAction_Deploy_;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java
deleted file mode 100644
index 16f06f1ad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.runtime.CoreException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.RGB;
-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.dialogs.PreferencesUtil;
-import org.eclipse.ui.forms.events.IHyperlinkListener;
-import org.eclipse.ui.forms.widgets.Hyperlink;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.jst.j2ee.internal.dialogs.Messages;
-
-
-/**
- * @author Administrator
- *
- */
-public class RuntimeSelectionDialog extends MessageDialog {
- private IProject project = null;
- private String configuredMessage;
-
- /**
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
- public RuntimeSelectionDialog(Shell parentShell, String dialogTitle,
- Image dialogTitleImage, String dialogMessage, int dialogImageType,
- String[] dialogButtonLabels, int defaultIndex, IProject project) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage,
- dialogImageType, dialogButtonLabels, defaultIndex);
- this.project = project;
- this.configuredMessage = MessageFormat.format(J2EEUIMessages.getResourceString("DEPLOY_RUNTIME_CONFIGURED"), new Object []{project.getName()}); //$NON-NLS-1$
- }
-
- @Override
- protected Control createCustomArea(Composite parent) {
-
- //Composite composite = new Composite(parent, 0);
- createHyperLink(parent);
- return parent;
-
- }
-
- private void createHyperLink(Composite parent) {
- Hyperlink link = new Hyperlink(parent,SWT.None);
- GridData layout = new GridData(GridData.HORIZONTAL_ALIGN_END);
- layout.horizontalSpan = 2;
- link.setLayoutData(layout);
- link.setUnderlined(true);
- Color color = new Color(parent.getDisplay(),new RGB(0,0,255) );
- link.setForeground(color);
- link.setText(Messages.RuntimeSelectionDialog_Configure_Target_Runtime_);
- link.addHyperlinkListener(new IHyperlinkListener() {
- public static final String DATA_NO_LINK = "PropertyAndPreferencePage.nolink"; //$NON-NLS-1$
-
- public void linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- }
-
- public void linkExited(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- }
-
- public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) {
- String id = getPreferencePageID();
- PreferencesUtil.createPropertyDialogOn(getShell(), project, id, new String[]{id}, DATA_NO_LINK).open(); //
- //(getShell(), id, new String[]{id}, DATA_NO_LINK).open();
- try {
- updateWidgets();
- } catch (Exception ie) {
-
- }
- }
-
- private String getPreferencePageID() {
- return "org.eclipse.wst.common.project.facet.ui.internal.RuntimesPropertyPage"; //$NON-NLS-1$
- }
- });
-
- }
-
- private void updateWidgets() {
- if (getTargetRuntime() != null) {
- messageLabel.setText(configuredMessage);
- imageLabel.setImage(this.getInfoImage());
- } else {
- messageLabel.setText(message);
- imageLabel.setImage(getErrorImage());
- }
-
- }
-
- private IRuntime getTargetRuntime() {
- try {
- IRuntime runtime = J2EEProjectUtilities.getServerRuntime(project);
- return runtime;
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- return null;
- }
-
-}
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 855f5fb3f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.
- *
- * @plannedfor 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 localLeft = left;
- int localRight = right;
- int original_left = localLeft;
- int original_right = localRight;
-
- Object mid = keys[(localLeft + localRight) / 2];
- do {
- while (fComparator.compare(keys[localLeft], mid) < 0)
- localLeft++;
-
- while (fComparator.compare(mid, keys[localRight]) < 0)
- localRight--;
-
- if (localLeft <= localRight) {
- swap(keys, localLeft, localRight);
- swap(values, localLeft, localRight);
- localLeft++;
- localRight--;
- }
- } while (localLeft <= localRight);
-
- if (original_left < localRight)
- internalSort(keys, values, original_left, localRight);
-
- if (localLeft < original_right)
- internalSort(keys, values, localLeft, 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;
- }
-
-}
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 6c430f694..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, 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.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
- }
-
-}
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 353d443b8..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, 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.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 26449e991..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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;
- }
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- return isValid(element);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/messages.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/messages.properties
deleted file mode 100644
index a128a9bce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/messages.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-J2EEDeployAction_Deploy_=Deploy
-RuntimeSelectionDialog_Configure_Target_Runtime_=Configure Target Runtime...
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 36763172f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.ejb.internal.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)
- */
- @Override
- 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)
- */
- @Override
- 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))
- */
- @Override
- 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();
-}
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 4adce7ef3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.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.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);
- }
-
- @Override
- 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
- */
- @Override
- public JavaClass getJavaClass() {
- return getEjb().getEjbClass();
- }
-
- @Override
- protected String getOverlayKey() {
- return "ejb_module_ovr";//$NON-NLS-1$
- }
-
- @Override
- 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 d03ed28bf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ejb.provider;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class EJBUIMessages extends NLS {
-
- private static final String BUNDLE_NAME = "j2ee_ejb_ui";//$NON-NLS-1$
-
- private EJBUIMessages() {
- // Do not instantiate
- }
-
- public static String GroupedEJBJarItemProvider_UI_0;
- public static String GroupedEJBJarItemProvider_UI_1;
- public static String GroupedEJBJarItemProvider_UI_2;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, EJBUIMessages.class);
- }
-}
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 f4d5e4ca0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.ejb.internal.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)
- */
- @Override
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (aRefObject == null || !(aRefObject instanceof ExcludeList))
- return Collections.EMPTY_LIST;
- ExcludeList parentList = (ExcludeList) aRefObject;
- return parentList.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- @Override
- 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)
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof ExcludeList)
- return !((ExcludeList) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- @Override
- 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()
- */
- @Override
- protected EStructuralFeature getMethodElementsReference() {
- return EXCLUDE_ME_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- @Override
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_EL_SF;
- }
-
-}
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 6529545db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-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);
- }
-
- @Override
- public IFile getAssociatedFile() {
-
- try {
- EJBJar ejbJar = (EJBJar) getParent();
- if(ejbJar != null && ejbJar.eResource() != null) {
- return WorkbenchResourceHelperBase.getIFile(ejbJar.eResource().getURI());
- }
- } catch (Throwable t) {
-
- }
- return null;
- }
-
- @Override
- public abstract String getText(Object object);
-}
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 675747042..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-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.EjbPackage;
-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.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.GroupedEJBJarItemProvider_UI_0;
- private static final String ENTITY = EJBUIMessages.GroupedEJBJarItemProvider_UI_1;
- private static final String MESSAGE = EJBUIMessages.GroupedEJBJarItemProvider_UI_2;
-
- // 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;
- }
-
- @Override
- 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);
- orderBeans(entityBeans);
- orderBeans(sessionBeans);
- orderBeans(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 void orderBeans(List beans) {
- Object[] beansArray = beans.toArray();
- Arrays.sort(beansArray, EJBNameComparator.singleton());
- beans.clear();
- beans.addAll(Arrays.asList(beansArray));
- }
-
- 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);
- }
-
- @Override
- 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;
- }
- }
-
- @Override
- 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);
- }
-
- @Override
- 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()
- */
- @Override
- public void dispose() {
- try {
- isDisposing = true;
- super.dispose();
- } finally {
- isDisposing = false;
- }
- }
-}
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 80ef6559c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.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 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);
- }
-
- @Override
- 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 ca49732c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java
+++ /dev/null
@@ -1,39 +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);
- }
-
- @Override
- 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 5fc73a469..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.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 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);
- }
-
- @Override
- 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 2348efa88..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.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.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);
- }
-
- @Override
- 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
- */
- @Override
- public JavaClass getJavaClass() {
- return getEjb().getHomeInterface();
- }
-
- @Override
- protected String getOverlayKey() {
- return "home_interface_overlay_obj";//$NON-NLS-1$
- }
-
- @Override
- 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 2a09f667a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.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.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);
- }
-
- @Override
- 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 ddd17bfa8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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}.
- */
- @Override
- 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}.
- */
- @Override
- 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}.
- */
- @Override
- 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}.
- */
- @Override
- public Adapter createSessionAdapter() {
- if (sessionItemProvider == null) {
- sessionItemProvider = new J2EESessionItemProvider(this);
- }
-
- return sessionItemProvider;
- }
-
- @Override
- public Adapter createMessageDrivenAdapter() {
- if (messageDrivenItemProvider == null) {
- messageDrivenItemProvider = new J2EEMessageDrivenItemProvider(this);
- }
- return messageDrivenItemProvider;
- }
-}
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 e41eee66d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java
+++ /dev/null
@@ -1,44 +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);
- }
-
- @Override
- 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 00fe427db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.jem.util.emf.workbench.ProjectUtilities;
-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;
-
-public abstract class J2EEJavaClassProviderHelper implements IAdaptable {
- private EnterpriseBean ejb;
- public static final Class IRESOURCE_CLASS = IResource.class;
- public static final Class IPROJECT_CLASS = IProject.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());
- if (adapter == IPROJECT_CLASS)
- return getProject();
- return null;
- }
-
-}
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 f56248a3a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java
+++ /dev/null
@@ -1,41 +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);
- }
-
- @Override
- 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 ec372069d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.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
- *******************************************************************************/
-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);
- }
-
- @Override
- 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 22891ad5b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.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.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()
- */
- @Override
- public JavaClass getJavaClass() {
- return getEjb().getLocalHomeInterface();
- }
-
- @Override
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- @Override
- protected String getOverlayKey() {
- return "local_home_interface_overlay_obj"; //$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- @Override
- 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 249aa5953..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.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.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);
- }
-
- @Override
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getJavaClass()
- */
- @Override
- public JavaClass getJavaClass() {
- return getEjb().getLocalInterface();
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- @Override
- protected String getOverlayKey() {
- return "local_interface_overlay_obj";//$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- @Override
- 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 2beda77b6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.ejb.internal.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)
- */
- @Override
- 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)
- */
- @Override
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (aRefObject == null || !(aRefObject instanceof MethodPermission))
- return Collections.EMPTY_LIST;
- MethodPermission parentMP = (MethodPermission) aRefObject;
- return parentMP.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof MethodPermission)
- return !((MethodPermission) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- @Override
- protected EStructuralFeature getMethodElementsReference() {
- return PERMISSION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- @Override
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MP_SF;
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.INotifyChangedListener#notifyChanged(Notification)
- */
- @Override
- 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);
- }
-}
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 0ef2f2632..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.ejb.internal.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)
- */
- @Override
- 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)
- */
- @Override
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (aRefObject == null || !(aRefObject instanceof MethodTransaction))
- return Collections.EMPTY_LIST;
- MethodTransaction parentMT = (MethodTransaction) aRefObject;
- return parentMT.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof MethodTransaction)
- return !((MethodTransaction) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- @Override
- protected EStructuralFeature getMethodElementsReference() {
- return TRANSACTION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- @Override
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MT_SF;
- }
-
-
-
-}
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 437f79787..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.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.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);
- }
-
- @Override
- 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
- */
- @Override
- public JavaClass getJavaClass() {
- return ((Entity) getEjb()).getPrimaryKey();
- }
-
- @Override
- protected String getOverlayKey() {
- return "key_interf_ov";//$NON-NLS-1$
- }
-
- @Override
- 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 a677d5796..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.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.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);
- }
-
- @Override
- 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
- */
- @Override
- public JavaClass getJavaClass() {
- return getEjb().getRemoteInterface();
- }
-
- @Override
- protected String getOverlayKey() {
- return "remote_interface_overlay_obj";//$NON-NLS-1$
- }
-
- @Override
- 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 53528b275..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.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
- *******************************************************************************/
-/*
- * 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);
- }
-
- @Override
- 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
- */
- @Override
- public JavaClass getJavaClass() {
- return ((Session) getEjb()).getServiceEndpoint();
- }
-
- @Override
- protected String getOverlayKey() {
- //TODO: DFH we need an icon
- return "";//$NON-NLS-1$
- }
-
- @Override
- 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/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 be6b1dcfe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.ArrayList;
-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.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.common.internal.emfworkbench.integration.EditModel;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.IValidateEditContext;
-import org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidator;
-
-public class ValidateEditListener extends ShellAdapter implements IValidateEditListener, IValidateEditContext {
-
- 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;
- private boolean inconsistentResult;
- private boolean inconsistentOverwriteResult;
-
- public ValidateEditListener() {
- super();
- try {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- IWorkbench wb = PlatformUI.getWorkbench();
- if (wb == null) return;
- IWorkbenchWindow window = wb.getActiveWorkbenchWindow();
- if (window == null && wb.getWorkbenchWindowCount()>0) {
- for (int i=0; i<wb.getWorkbenchWindows().length; i++) {
- window = wb.getWorkbenchWindows()[i];
- if (window != null)
- break;
- }
-
- }
- if (window!=null)
- setShell(window.getShell());
- }
- });
-
- } catch (Exception e) {
- J2EEUIPlugin.logError(e);
- }
- }
- /**
- * 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 org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter#promptForInconsistentFileRefresh(List)
- */
- public boolean promptForInconsistentFileRefresh(List inconsistentFiles) {
- if (inconsistentFiles == null || inconsistentFiles.size() == 0) // this case should never
- // occur.
- return false;
-
- List inconsistentFileNames = new ArrayList();
- for (int i = 0; inconsistentFiles.size() > i; i++) {
- Object file = inconsistentFiles.get(i);
- if (file instanceof Resource) {
- IFile aFile = WorkbenchResourceHelper.getFile((Resource) file);
- inconsistentFileNames.add(aFile.getFullPath().toOSString());
- } else if (file instanceof IResource) {
- IResource resfile = (IResource) file;
- if (!resfile.exists()) {
- return false;
- }
- inconsistentFileNames.add(resfile.getFullPath().toOSString());
- }
- }
-
- final String title = J2EEUIMessages.getResourceString("Inconsistent_Files_3"); //$NON-NLS-1$
- final String message = J2EEUIMessages.getResourceString("The_following_workspace_files_are_inconsistent_with_the_editor_4") + J2EEUIMessages.getResourceString("Update_the_editor_with_the_workspace_contents__5"); //$NON-NLS-1$ //$NON-NLS-2$
- final String[] fileNames = (String[])inconsistentFileNames.toArray(new String[inconsistentFileNames.size()]);
-
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- inconsistentResult = ListMessageDialog.openQuestion(getShell(), title, message, fileNames);
- }
- });
- return inconsistentResult;
- }
-
- /**
- * @see org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter#getValidateEditContext()
- */
- public Object getValidateEditContext() {
- return getShell();
- }
-
- /**
- * @see org.eclipse.ui.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)
- */
- @Override
- public void shellActivated(ShellEvent event) {
- handleActivation();
- }
-
- /**
- * @see org.eclipse.ui.IPartListener#partBroughtToTop(IWorkbenchPart)
- */
- public void partBroughtToTop(IWorkbenchPart part) {
- //do nothing
- }
-
- /**
- * @see org.eclipse.ui.IPartListener#partClosed(IWorkbenchPart)
- */
- public void partClosed(IWorkbenchPart part) {
- if (part == fPart)
- part.getSite().getPage().removePartListener(this);
- if (getShell() != null)
- getShell().removeShellListener(this);
- }
-
- /**
- * @see org.eclipse.ui.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 org.eclipse.ui.IPartListener#partOpened(IWorkbenchPart)
- */
- public void partOpened(IWorkbenchPart part) {
- //do nothing
- }
-
- public IStatus validateState() {
- IWorkbench wb = PlatformUI.getWorkbench();
- if ((fShell==null) && (wb != null && (wb.getActiveWorkbenchWindow() != null)))
- fShell=wb.getActiveWorkbenchWindow().getShell();
- if (fNeedsStateValidation) {
- setNeedsStateValidation(false);
- try {
- final IStatus status = fValidator.validateState(this);
- if (status.getSeverity() == IStatus.ERROR) {
- setNeedsStateValidation(true);
- if (!fMessageUp) {
- fMessageUp = true;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- MessageDialog.openError(getShell(), J2EEUIMessages.getResourceString("Error_checking_out_files_10"), status.getMessage()); //$NON-NLS-1$
- }
- });
- fMessageUp = false;
- }
- }
- fValidator.checkActivation(this);
- updatePartReadOnly();
- return status;
- } catch (CoreException e) {
- // do nothing for now
- }
- }
- return ResourceStateValidator.OK_STATUS;
- }
-
- /**
- * @see org.eclipse.wst.common.internal.emfworkbench.validateedit.ResourceStateValidatorPresenter#promptForInconsistentFileOverwrite(List)
- */
- public boolean promptForInconsistentFileOverwrite(List inconsistentFiles) {
- int size = inconsistentFiles.size();
- List files = new ArrayList();
- IFile file = null;
- for (int i = 0; i < size; i++) {
- file = (IFile) inconsistentFiles.get(i);
- files.add(file.getFullPath().toString());
- }
- final String[] items = (String[])files.toArray(new String[files.size()]);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- inconsistentOverwriteResult = 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);
- }
- });
- return inconsistentOverwriteResult;
- }
-
- 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;
- }
-
- public void setEditModel(EditModel anEditModel) {
- fValidator = anEditModel;
-
- }
-
- public IStatus validateState(EditModel anEditModel) {
- setEditModel(anEditModel);
- return validateState();
- }
-}
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 4f60738fe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Dec 7, 2004
- */
-package org.eclipse.jst.j2ee.internal.perspective;
-
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.eclipse.ui.views.IViewDescriptor;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-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.ui.navigator.ProjectExplorer"; //$NON-NLS-1$
-
- private static String ID_WST_SNIPPETS_VIEW = "org.eclipse.wst.common.snippets.internal.ui.SnippetsView"; //$NON-NLS-1$
- private static final String ID_SEARCH_VIEW = "org.eclipse.search.ui.views.SearchView"; //$NON-NLS-1$
- private static final String ID_DATA_VIEW = "org.eclipse.datatools.connectivity.DataSourceExplorerNavigator"; //$NON-NLS-1$
- public static final String ID_CONSOLE_VIEW= "org.eclipse.ui.console.ConsoleView"; //$NON-NLS-1$
- public static final String ID_MARKERS_VIEW= "org.eclipse.ui.views.AllMarkersView"; //$NON-NLS-1$
- public static final String ID_TASKLIST_VIEW= "org.eclipse.mylyn.tasks.ui.views.tasks"; //$NON-NLS-1$
-
- public J2EEPerspective() {
- super();
- //If preference exists for alternate view, replace.
- String viewerID = ProductManager.getProperty(IProductConstants.ID_PERSPECTIVE_HIERARCHY_VIEW);
- if (viewerID != null) {
- // verify that the view actually exists
- if (PlatformUI.getWorkbench().getViewRegistry().find(viewerID) != null){
- ID_J2EE_HIERARCHY_VIEW = viewerID;
- }
- } else {
- viewerID = J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.ID_PERSPECTIVE_HIERARCHY_VIEW);
- if (viewerID != null){
- if (PlatformUI.getWorkbench().getViewRegistry().find(viewerID) != null){
- ID_J2EE_HIERARCHY_VIEW = viewerID;
- }
- }
- }
- }
-
- /*
- * (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.jdt.ui.JavaActionSet"); //$NON-NLS-1$
-
- layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
- layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET);
-
- layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
-
- layout.addShowViewShortcut(ID_J2EE_HIERARCHY_VIEW);
- layout.addShowViewShortcut(ID_SERVERS_VIEW);
- layout.addShowViewShortcut(ID_DATA_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
- layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
- layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(ID_WST_SNIPPETS_VIEW);
- layout.addShowViewShortcut(ID_MARKERS_VIEW);
- layout.addShowViewShortcut(ID_TASKLIST_VIEW);
-
- // views - search
- layout.addShowViewShortcut(ID_SEARCH_VIEW);
- // views - debugging
- layout.addShowViewShortcut(ID_CONSOLE_VIEW);
-
- layout.addShowInPart(ID_J2EE_HIERARCHY_VIEW);
- }
-
- public void defineLayout(IPageLayout layout) {
- // Editors are placed for free.
- String editorArea = layout.getEditorArea();
-
- // Top left.
- IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f, editorArea);//$NON-NLS-1$
- topLeft.addView(ID_J2EE_HIERARCHY_VIEW);
- topLeft.addPlaceholder(IPageLayout.ID_RES_NAV);
- topLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
- topLeft.addPlaceholder(JavaUI.ID_PACKAGES_VIEW);
-
- // Bottom right.
- IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, 0.7f, editorArea);//$NON-NLS-1$
- bottomRight.addView(ID_MARKERS_VIEW);
- bottomRight.addView(IPageLayout.ID_PROP_SHEET);
- bottomRight.addView(ID_SERVERS_VIEW);
- addDBViewIfPresent(layout,bottomRight);
- bottomRight.addView(ID_WST_SNIPPETS_VIEW);
-
- bottomRight.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);
- bottomRight.addPlaceholder(IPageLayout.ID_TASK_LIST);
- bottomRight.addPlaceholder(ID_CONSOLE_VIEW);
- bottomRight.addPlaceholder(IPageLayout.ID_BOOKMARKS);
- bottomRight.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
- bottomRight.addPlaceholder(ID_SEARCH_VIEW);
-
- // Top right.
- IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, 0.7f, editorArea);//$NON-NLS-1$
- topRight.addView(IPageLayout.ID_OUTLINE);
- addTLViewIfPresent(layout, topRight);
-
- }
- private void addDBViewIfPresent(IPageLayout page,IFolderLayout bottomRight) {
- IViewDescriptor dbView = PlatformUI.getWorkbench().getViewRegistry().find(ID_DATA_VIEW);
- if (dbView != null)
- bottomRight.addView(ID_DATA_VIEW);
- }
- private void addTLViewIfPresent(IPageLayout page,IFolderLayout topRight) {
- IViewDescriptor tlView = PlatformUI.getWorkbench().getViewRegistry().find(ID_TASKLIST_VIEW);
- if (tlView != null)
- topRight.addView(ID_TASKLIST_VIEW);
- }
-}
-
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java
deleted file mode 100644
index cc9eca421..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
-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.core.runtime.PlatformObject;
-import org.eclipse.jdt.core.IJavaModelStatusConstants;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.jdt.internal.core.JavaModelStatus;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.jee.archive.internal.ArchiveUtil;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class BinaryEditorUtilities {
-
- private static class JarEntryFile extends PlatformObject implements
- IStorage {
- private String entryName;
- private String zipName;
- private IPath path;
-
- public JarEntryFile(String entryName, String zipName) {
- this.entryName = entryName;
- this.zipName = zipName;
- this.path = new Path(this.entryName);
- }
-
- public InputStream getContents() throws CoreException {
-
- try {
- if (JavaModelManager.ZIP_ACCESS_VERBOSE) {
- //$ANALYSIS-IGNORE
- System.out.println("(" + Thread.currentThread() + ") [JarEntryFile.getContents()] Creating ZipFile on " + this.zipName); //$NON-NLS-1$ //$NON-NLS-2$
- }
- ZipFile zipFile = ArchiveUtil.newZipFile(this.zipName);
- ZipEntry zipEntry = zipFile.getEntry(this.entryName);
- if (zipEntry == null) {
- throw new JavaModelException(new JavaModelStatus(
- IJavaModelStatusConstants.INVALID_PATH,
- this.entryName));
- }
- return zipFile.getInputStream(zipEntry);
- } catch (IOException e) {
- throw new JavaModelException(e,
- IJavaModelStatusConstants.IO_EXCEPTION);
- }
- }
-
- /**
- * @see IStorage#getFullPath
- */
- public IPath getFullPath() {
- return this.path;
- }
-
- /**
- * @see IStorage#getName
- */
- public String getName() {
- return this.path.lastSegment();
- }
-
- /**
- * @see IStorage#isReadOnly()
- */
- public boolean isReadOnly() {
- return true;
- }
-
- /**
- * @see IStorage#isReadOnly()
- */
- @Override
- public String toString() {
- return "JarEntryFile[" + this.zipName + "::" + this.entryName + "]"; //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-1$
- }
- }
-
- private static class JarEntryEditorInput implements IStorageEditorInput {
-
- private IStorage fJarEntryFile;
-
- public JarEntryEditorInput(IStorage jarEntryFile) {
- fJarEntryFile = jarEntryFile;
- }
-
- @Override
- public int hashCode() {
- return super.hashCode() + fJarEntryFile.hashCode();
- }
-
- /*
- */
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof JarEntryEditorInput))
- return false;
- JarEntryEditorInput other = (JarEntryEditorInput) obj;
- return fJarEntryFile.equals(other.fJarEntryFile);
- }
-
- /*
- * @see IEditorInput#getPersistable()
- */
- public IPersistableElement getPersistable() {
- return null;
- }
-
- /*
- * @see IEditorInput#getName()
- */
- public String getName() {
- return fJarEntryFile.getName();
- }
-
- /*
- * @see IEditorInput#getToolTipText()
- */
- public String getToolTipText() {
- return fJarEntryFile.getFullPath().toString();
- }
-
- /*
- * @see IEditorInput#getImageDescriptor()
- */
- public ImageDescriptor getImageDescriptor() {
- IEditorRegistry registry = PlatformUI.getWorkbench()
- .getEditorRegistry();
- return registry.getImageDescriptor(fJarEntryFile.getFullPath()
- .getFileExtension());
- }
-
- /*
- * @see IEditorInput#exists()
- */
- public boolean exists() {
- // JAR entries can't be deleted
- return true;
- }
-
- /*
- * @see IAdaptable#getAdapter(Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- /*
- * see IStorageEditorInput#getStorage()
- */
- public IStorage getStorage() {
- return fJarEntryFile;
- }
- }
-
- /**
- *
- * @param component
- * @param archiveRelativePath
- * @return
- * @deprecated
- */
- public static IEditorInput getBinaryEditorInput(
- VirtualArchiveComponent component, String archiveRelativePath) {
- return getBinaryEditorInput((IVirtualComponent)component, archiveRelativePath);
- }
-
- public static IEditorInput getBinaryEditorInput(IVirtualComponent component, String archiveRelativePath) {
- File f = (File)component.getAdapter(File.class);
- return getBinaryEditorInput(f.getAbsolutePath(), archiveRelativePath);
- }
-
-
- public static IEditorInput getBinaryEditorInput(IPath archivePath,
- String archiveRelativePath) {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IWorkspaceRoot root = workspace.getRoot();
- IResource resource = root.findMember(archivePath);
- if (resource == null) {
- return null;
- }
- String archiveOSPath = resource.getLocation().toOSString();
- IEditorInput editorInput = getBinaryEditorInput(archiveOSPath, archiveRelativePath);
- return editorInput;
- }
-
- /**
- * [Bug 238616]
- *
- * Gets binary editor input given an OS relative path to an archive and
- * the archive relative path to a file
- *
- * @param archiveOSPath the OS relative path to the archive
- * @param archiveRelativePath the archive relative path to the file to get binary editor input for
- * @return
- */
- public static IEditorInput getBinaryEditorInput(String archiveOSPath,
- String archiveRelativePath) {
- JarEntryFile jarFile = new JarEntryFile(archiveRelativePath, archiveOSPath);
- JarEntryEditorInput editorInput = new JarEntryEditorInput(jarFile);
- return editorInput;
- }
-
-}
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 0739393d0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-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.PlatformUI;
-
-
-
-/**
- * @author cbridgha
- *
- */
-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() {
- boolean retVal = true;
- IWorkbench workbench = J2EEUIPlugin.getPluginWorkbench();
- IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
- for (int i = 0; retVal && i < windows.length; i++) {
- IWorkbenchPage[] pages = windows[i].getPages();
- for (int x = 0; retVal && x < pages.length; x++) {
- retVal = pages[x].saveAllEditors(true);
- }
- }
- return retVal;
- }
-
- /**
- *
- * This method used to save only the editors specified. It now saves all dirty editors
- * due to changes in the Eclipse platform
- * @param dirtyEditors
- * @return true if it succeeds, false if the user cancels
- * @deprecated due to changes in the Eclipse platform
- */
- public static boolean promptToSaveDirtyEditors(List dirtyEditors) {
- if (dirtyEditors.isEmpty())
- return true;
- return promptToSaveAllDirtyEditors();
- }
-
- /**
- * This will close all editors without prompting for save.
- * @param dirtyEditors
- * @return true is succeeded, false if not
- */
- public static void closeAllEditors() {
-
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- page.closeAllEditors(false);
-
- }
-
- public static boolean promptToSaveDirtyEditorsInProjects(List projects) {
- return promptToSaveDirtyEditors(Arrays.asList(getDirtyEditors(projects)));
- }
-}
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 0d9c37661..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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 msg; // TODO: Perhaps this isn't necessary and protected member "message" from parent should be used?
- //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;
- msg = 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
- @Override
- 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.
- */
- @Override
- 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;
- }
-
- @Override
- 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 (msg != null) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(msg);
- 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;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java
deleted file mode 100644
index db953bdb3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.ui.IActionFilter;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class FacetedProjectActionFilter
-
- implements IActionFilter
-
-{
- public boolean testAttribute( final Object target,
- final String name,
- final String value )
- {
-
- if( name.equals( "facet" ) ) //$NON-NLS-1$
- {
- IProject project = (IProject)target;
- IFacetedProject fproj = null;
- if(project.isAccessible()){
- try {
- fproj = ProjectFacetsManager.create( project );
- } catch (CoreException e1) {
- Logger.getLogger().logError(e1);
- }
- }
-
- if( fproj != null ){
- final int colon = value.indexOf( ':' );
- final String fid;
- final String vexprstr;
-
- if( colon == -1 || colon == value.length() - 1 )
- {
- fid = value;
- vexprstr = null;
- }
- else
- {
- fid = value.substring( 0, colon );
- vexprstr = value.substring( colon + 1 );
- }
-
- if( ! ProjectFacetsManager.isProjectFacetDefined( fid ) )
- {
- return false;
- }
-
- final IProjectFacet f = ProjectFacetsManager.getProjectFacet( fid );
-
- if( ! fproj.hasProjectFacet( f ) )
- {
- return false;
- }
-
- if( vexprstr == null )
- {
- return true;
- }
- final IProjectFacetVersion fv = fproj.getInstalledVersion( f );
-
- try
- {
- if( f.getVersions( vexprstr ).contains( fv ) )
- {
- return true;
- }
- }
- catch( CoreException e )
- {
- //EJBUIPlugin.getDefault().log
- }
- return false;
- }
- return false;
- }
- return true;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java
deleted file mode 100644
index 6bab5445b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.ui.IActionFilter;
-
-public class FacetedProjectAdapterFactory implements IAdapterFactory {
-
-
- private static final Class[] ADAPTER_TYPES = { IActionFilter.class };
-
- public Object getAdapter( final Object adaptable,
- final Class adapterType )
- {
- if( adapterType == IActionFilter.class )
- {
- return new FacetedProjectActionFilter();
- }
- return null;
- }
-
- public Class[] getAdapterList()
- {
- return ADAPTER_TYPES;
- }
-
-
-}
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 6fce02a03..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEEditorUtility.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2002, 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.plugin;
-
-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.ProjectUtilities;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-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;
-
-/**
- * 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;
- input = EditorUtility.getEditorInput(comp);
- if (input != null) {
- return (IFile) input.getAdapter(IFile.class);
- }
- return null;
- }
-
- public static IJavaProject getJavaProject(IProject aProject) {
- if (aProject == null)
- return null;
- IJavaModel javaModel = JemProjectUtilities.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 372f44c2e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIAdapterFactory.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 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
- *******************************************************************************/
-/*
- * 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 7d8053c05..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIContextIds.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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 {
-
- // Delete Enterprise Bean Dialog
- public static final String DELETE_ENTERPRISE_BEAN_DIALOG = J2EEUIPlugin.PLUGIN_ID + ".delb1000"; //$NON-NLS-1$
-
-}
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 ef040c825..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- *******************************************************************************/
-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_RUNTIME_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_SETTINGS = "101"; //$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_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 MODULE_VERSION_LABEL = "100"; //$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 J2EE_EXPORT_RUNTIME = "103"; //$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 J2EE_MODULE_DEPENDENCIES_LABEL = "J2EEModuleDependencies.label"; //$NON-NLS-1$
- public static final String J2EE_MODULE_DEPENDENCIES_LABEL_ACCESSIBILITY = "J2EEModuleDependencies.label_accessibility"; //$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 BROWSE_BUTTON_LABEL_O = getResourceString("BROWSE_BUTTON_LABEL_O"); //$NON-NLS-1$
- public final static String BROWSE_BUTTON_LABEL_W = getResourceString("BROWSE_BUTTON_LABEL_W"); //$NON-NLS-1$
- public final static String BROWSE_BUTTON_LABEL_E = getResourceString("BROWSE_BUTTON_LABEL_E"); //$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 static final String YES_BUTTON = getResourceString("YES_BUTTON"); //$NON-NLS-1$
- public static final String NO_BUTTON = getResourceString("NO_BUTTON"); //$NON-NLS-1$
- public static final String OK_BUTTON = getResourceString("OK_BUTTON"); //$NON-NLS-1$
- public static final String CANCEL_BUTTON = getResourceString("CANCEL_BUTTON"); //$NON-NLS-1$
- public static final String BINARY = getResourceString("BINARY"); //$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$
- public static final String AVAILABLE_J2EE_COMPONENTS="AVAILABLE_J2EE_COMPONENTS"; //$NON-NLS-1$
- public static final String EXTERNAL_JAR="EXTERNAL_JAR";//$NON-NLS-1$
- public static final String PROJECT_JAR="PROJECT_JAR";//$NON-NLS-1$
- public static final String ADDVARIABLE="ADDVARIABLE";//$NON-NLS-1$
- public static final String CHANGE_LIB_DIR ="CHANGE_LIB_DIR";//$NON-NLS-1$
- public static final String NO_DD_MSG_TITLE = "NO_DD_MSG_TITLE";//$NON-NLS-1$
- public static final String GEN_DD_QUESTION = "GEN_DD_QUESTION";//$NON-NLS-1$
-
- public static final String CHANGE_LIB_DIR_HEAD = "CHANGE_LIB_DIR_HEAD";//$NON-NLS-1$
- public static final String NEW_LIB_DIR_PROPMPT = "NEW_LIB_DIR_PROPMPT";//$NON-NLS-1$
- public static final String BLANK_LIB_DIR = "BLANK_LIB_DIR";//$NON-NLS-1$
- public static final String BLANK_LIB_DIR_CONFIRM = "BLANK_LIB_DIR_CONFIRM";//$NON-NLS-1$
- public static final String BLANK_LIB_DIR_WARN_QUESTION = "BLANK_LIB_DIR_WARN_QUESTION";//$NON-NLS-1$
- public static final String INVALID_PATH = "INVALID_PATH";//$NON-NLS-1$
- public static final String INVALID_PATH_MSG = "INVALID_PATH_MSG";//$NON-NLS-1$
- public static final String DEPENDENCY_CONFLICT_TITLE = "DEPENDENCY_CONFLICT_TITLE";//$NON-NLS-1$
- public static final String DEPENDENCY_CONFLICT_MSG_1 = "DEPENDENCY_CONFLICT_MSG_1";//$NON-NLS-1$
- public static final String DEPENDENCY_CONFLICT_MSG_2 = "DEPENDENCY_CONFLICT_MSG_2";//$NON-NLS-1$
- public static final String DO_NOT_SHOW_WARNING_AGAIN = "DO_NOT_SHOW_WARNING_AGAIN";//$NON-NLS-1$
-
- public static final String SUPPORTMULTIPLEMODULES="SUPPORTMULTIPLEMODULES";//$NON-NLS-1$
- public static final String SOURCEFOLDER="SOURCEFOLDER";//$NON-NLS-1$
- public static final String CONTENT_FOLDER = "102"; //$NON-NLS-1$
-
- public static final String HOVER_HELP_FOR_DISABLED_LIBS = "HOVER_HELP_FOR_DISABLED_LIBS"; //$NON-NLS-1$
- public static final String JAVA_EE_PREFERENCE_PAGE_NAME = "JAVA_EE_PREFERENCE_PAGE_NAME"; //$NON-NLS-1$
- public static final String JAVA_EE_PREFERENCE_PAGE_JET_TEMPLATE = "JAVA_EE_PREFERENCE_PAGE_JET_TEMPLATE"; //$NON-NLS-1$
- public static final String JAVA_EE_PREFERENCE_PAGE_DYN_TRANSLATION_BTN_NAME = "JAVA_EE_PREFERENCE_PAGE_DYN_TRANSLATION_BTN_NAME"; //$NON-NLS-1$
- public static final String OPEN_J2EE_RESOURCE_ACTION_0 = "OpenJ2EEResourceAction.0"; //$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()
- */
- @Override
- protected void initializeBundle() {
- try {
- resourceBundle = ResourceBundle.getBundle("j2ee_ui"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- //Ignore
- }
- }
-
-}
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 b67dbf4a4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.plugin;
-
-import java.io.IOException;
-import java.net.URL;
-
-import org.eclipse.core.internal.boot.PlatformURLConnection;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-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.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import java.lang.Throwable;
-
-
-/**
- * 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) {
- logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
- }
- }
- return location;
- }
-
- public static URL getInstallURL() {
- return getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- /**
- * 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 Shell getActiveWorkbenchShell() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null) {
- return window.getShell();
- }
- return null;
- }
-
- public static IStructuredSelection getCurrentSelection() {
- IWorkbenchWindow window = getActiveWorkbenchWindow();
- if (window != null) {
- ISelection selection = window.getSelectionService().getSelection();
- if (selection instanceof IStructuredSelection) {
- return (IStructuredSelection) selection;
- }
-
- }
- return null;
- }
-
-
- /**
- * Record an error against this plugin's log.
- *
- * @param aCode
- * @param aMessage
- * @param anException
- */
- public static void logError(int aCode, String aMessage,
- Throwable anException) {
- getDefault().getLog().log(
- createErrorStatus(aCode, aMessage, anException));
- }
-
- /**
- *
- * Record a message against this plugin's log.
- *
- * @param severity
- * @param aCode
- * @param aMessage
- * @param exception
- */
- public static void log(int severity, int aCode, String aMessage,
- Throwable exception) {
- log(createStatus(severity, aCode, aMessage, exception));
- }
-
- /**
- *
- * Record a status against this plugin's log.
- *
- * @param aStatus
- */
- public static void log(IStatus aStatus) {
- getDefault().getLog().log(aStatus);
- }
-
- /**
- * Create a status associated with this plugin.
- *
- * @param severity
- * @param aCode
- * @param aMessage
- * @param exception
- * @return A status configured with this plugin's id and the given parameters.
- */
- public static IStatus createStatus(int severity, int aCode,
- String aMessage, Throwable exception) {
- return new Status(severity, PLUGIN_ID, aCode,
- aMessage != null ? aMessage : "No message.", exception); //$NON-NLS-1$
- }
-
- /**
- *
- * @param aCode
- * @param aMessage
- * @param exception
- * @return A status configured with this plugin's id and the given parameters.
- */
- public static IStatus createErrorStatus(int aCode, String aMessage,
- Throwable exception) {
- return createStatus(IStatus.ERROR, aCode, aMessage, exception);
- }
-
- public static IStatus createStatus(int severity, String message, Throwable exception) {
- return new Status(severity, PLUGIN_ID, message, exception);
- }
-
- public static IStatus createStatus(int severity, String message) {
- return createStatus(severity, message, null);
- }
-
- public static void logError(Throwable exception) {
- Platform.getLog(Platform.getBundle(PLUGIN_ID)).log( createStatus(IStatus.ERROR, exception.getMessage(), exception));
- }
-
- public static void logError(CoreException exception) {
- Platform.getLog(Platform.getBundle(PLUGIN_ID)).log( exception.getStatus() );
- }
-
- public static void logError(String message, Throwable exception) {
- Platform.getLog(Platform.getBundle(PLUGIN_ID)).log( createStatus(IStatus.ERROR, message, exception));
- }
-
- public static void logError(String message, CoreException exception) {
- MultiStatus status = new MultiStatus(PLUGIN_ID,IStatus.ERROR,new IStatus[]{exception.getStatus()},message,exception);
- Platform.getLog(Platform.getBundle(PLUGIN_ID)).log( status );
- }
-
- public static void logWarning(String message) {
- Platform.getLog(Platform.getBundle(PLUGIN_ID)).log(createStatus(IStatus.WARNING, message));
- }
-
-
-}
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 6c8095bbd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.plugin;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-
-public class J2EEViewerSorter extends ViewerSorter {
-
- /**
- * Constructor for J2EEViewerSorter.
- */
- public J2EEViewerSorter() {
- super();
- }
-
-
-
- /**
- * @see ViewerSorter#compare(Viewer, Object, Object)
- */
- @Override
- 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));
- }
-
-
-}
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 deb4f97e1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/UIProjectUtilities.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.IFile;
-import org.eclipse.core.resources.IProject;
-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.jdt.core.IJavaElement;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.IStructuredSelection;
-
-/**
- * Utility class for retrieving the project from the specified selection
- */
-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) {
- return getSelectedProject(selection, new String[] {expectedNatureId});
- }
-
- /**
- *
- * @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) {
- IProject[] projects = getAllSelectedProjects(selection, possibleNatureIds);
- if (projects == null || projects.length==0)
- return null;
- return projects[0];
- }
-
- /**
- *
- * @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) {
- return getAllSelectedProjects(selection, new String[] {expectedNatureId});
- }
-
- /**
- *
- * @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);
- if (project == null) {
- //Check for IJavaElements.
- IJavaElement javaElement = (IJavaElement) ((IAdaptable) obj).getAdapter(IJavaElement.class);
- if (javaElement != null) {
- project = javaElement.getJavaProject().getProject();
- }
- }
- }
- // Selection may not be adaptable to a project so continue trying to get selected project
- if (project == null && obj instanceof EObject)
- project = ProjectUtilities.getProject((EObject) obj);
- else if (project == null && obj instanceof ItemProvider) {
- Object temp = ((ItemProvider) obj).getParent(EObject.class);
- if (temp != null && temp instanceof EObject)
- project = ProjectUtilities.getProject((EObject) temp);
- }
- else if (project == null && obj instanceof IFile)
- project = ProjectUtilities.getProject(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];
- }
-
-}
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 609bee677..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.IContentProvider;
-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);
- }
-
- @Override
- 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)
- */
- @Override
- 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)
- */
- @Override
- 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)
- */
- @Override
- 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()
- */
- @Override
- public void dispose() {
- super.dispose();
- if (methodsProviderDelegate != null)
- methodsProviderDelegate.dispose();
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- @Override
- public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
- super.inputChanged(aViewer, oldInput, newInput);
- methodsProviderDelegate.inputChanged(aViewer, oldInput, newInput);
- }
-
-}
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 e50d06f37..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-
-import java.io.File;
-import java.net.URL;
-
-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.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.common.CommonPackage;
-import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
-import org.eclipse.jst.j2ee.ejb.internal.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.J2EEPlugin;
-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();
- }
-
- @Override
- 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);
- else if (object instanceof File) {
- URL url = (URL) J2EEPlugin.getPlugin().getImage("jar_obj"); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url).createImage();
- }
- return wbLabelProvider.getImage(object);
- }
-
- @Override
- 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).getName();
- } else if (object instanceof File) {
- return ((File)object).getName();
- }
- 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))
- */
- @Override
- public void notifyChanged(Notification notification) {
- Object feature = notification.getFeature();
- if (feature == ROLE_NAME_SF || feature == ROLES_SF)
- fireLabelProviderChanged();
- }
-}
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 9d2705a19..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.internal.impl.ApplicationFactoryImpl;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationItemProvider;
-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 org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(Object)
- */
- @Override
- 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));
-
- // IProject project = ProjectUtilities.getProject(app);
- // IVirtualComponent ear = ComponentUtilities.findComponent(app);
- // TODO switch to retrieve referenceComponents
- // 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
- */
- @Override
- 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()
- */
- @Override
- 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;
- }
-
- @Override
- 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;
- }
-
-}
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 1df4baf84..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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()
- */
- @Override
- public Adapter createApplicationAdapter() {
- return new J2EEApplicationItemProvider(this);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java
deleted file mode 100644
index 86ae2a26b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-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;
-
-public class J2EEBinaryModulesItemProvider extends J2EEItemProvider {
-
- public J2EEBinaryModulesItemProvider(Application app, AdapterFactory adapterFactory, Collection children) {
- super(adapterFactory, children);
- }
-
- @Override
- public String getText(Object obj) {
- return J2EEUIMessages.BINARY;
- }
-
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
-}
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 a0da2f95b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.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
- *******************************************************************************/
-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;
- }
-
- @Override
- 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/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 fd92251ec..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.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.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();
- }
-
- @Override
- protected Command createCopyToClipboardOverrideCommand(CopyToClipboardCommand copyToClipboardCommand) {
-
- if (copyToClipboardCommand instanceof J2EECopyToClipboardOverrideCommand)
- return null;
- return new J2EECopyToClipboardOverrideCommand(copyToClipboardCommand);
- }
-
- @Override
- protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) {
- if (pasteFromClipboardCommand instanceof J2EEPasteFromClipboardOverrideCommand)
- return null;
- if (!(getClipboard() instanceof J2EEClipboard))
- return null;
- return new J2EEPasteFromClipboardOverrideCommand(pasteFromClipboardCommand);
- }
-
- @Override
- protected Command createRemoveOverrideCommand(RemoveCommand removeCommand) {
- return new J2EERemoveOverrideCommand(removeCommand);
- }
-
- public J2EEClipboard getJ2EEClipboard() {
- return (J2EEClipboard) getClipboard();
- }
-
- @Override
- 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 583452fde..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-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.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-/**
- * @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);
- }
-
- @Override
- public boolean hasChildren(Object object) {
- getChildren(object);
- return !children.isEmpty();
- }
-
- @Override
- 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()
- */
- @Override
- public void dispose() {
- super.dispose();
- UtilityJarResourceChangeListener.INSTANCE.removeUtilityJarItemProvider(ProjectUtilities.getProject(application), this);
-
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.ItemProvider#getChildren(Object)
- */
- private void computeChildren() {
- childrenLoaded = true;
- IVirtualComponent ear = ComponentUtilities.findComponent(application);
- if (ear != null) {
- EARArtifactEdit earEdit = null;
- try {
- earEdit = EARArtifactEdit.getEARArtifactEditForRead(ear);
- IVirtualReference[] modules = earEdit.getUtilityModuleReferences();
- for (int i = 0; i < modules.length; i++) {
- IVirtualComponent module = modules[i].getReferencedComponent();
- if (module.isBinary()) {
- IFile utilityJar = (IFile)module.getAdapter(IFile.class);
- if (utilityJar != null)
- children.add(utilityJar);
- else {
- java.io.File diskFile = (java.io.File)module.getAdapter(java.io.File.class);
- if (diskFile.exists())
- children.add(diskFile);
- }
- }
- if (module.getProject() == null || !module.getProject().isAccessible())
- continue;
- // return only jars for utility components
- if (JavaEEProjectUtilities.isUtilityProject(module.getProject())) {
- IProject project = ProjectUtilities.getProject(application);
- if (project == null)
- continue;
- // we will assume the component name is in synch with the module uri
- IFile utilityJar = project.getFile(module.getName() + IJ2EEModuleConstants.JAR_EXT);
- if (utilityJar != null) {
- if (utilityJar.exists())
- children.add(utilityJar);
- else
- children.add(new UtilityModuleProjectItemProvider(getAdapterFactory(),module.getProject(),this));
- }
-
- }
- }
- } finally {
- if (earEdit != null) {
- earEdit.dispose();
- }
- }
- }
- }
-
- // 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(IJ2EEModuleConstants.JAR_EXT);
- }
-
- public static boolean isComponentFile(IResource member) {
- return member.getType() == IResource.FILE && member.getName().toLowerCase().endsWith(IModuleConstants.COMPONENT_FILE_NAME);
- }
-
-
- /**
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getImage(Object)
- */
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getText(Object)
- */
- @Override
- 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) {
- J2EEUIPlugin.logError(e);
- }
- }
-
- /*
- * (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 (isComponentFile(resource)) {
- List utilityJarItemProviders = getProviders(resource.getProject());
- for (int i = 0; i < utilityJarItemProviders.size(); i++) {
- ((J2EEUtilityJarItemProvider) utilityJarItemProviders.get(i)).getChildren().clear();
- ((J2EEUtilityJarItemProvider) utilityJarItemProviders.get(i)).computeChildren();
- }
- }
- return false;
- }
-
- }
- return false;
- }
- }
-
- @Override
- public IFile getAssociatedFile() {
-
- try {
- if (application != null && application.eResource() != null) {
- return WorkbenchResourceHelperBase.getIFile(application.eResource().getURI());
- }
- } catch (Throwable t) {
-
- }
- return null;
- }
-
-}
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 1200806d7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/MethodsProviderDelegate.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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.ejb.internal.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);
- }
-}
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 ec8f20a76..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-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 org.eclipse.emf.edit.provider.ItemProviderAdapter#getImage(Object)
- */
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- public Application getParentApplication() {
- return (Application) getParent();
- }
-
- @Override
- public IFile getAssociatedFile() {
-
- try {
- Application application = getParentApplication();
- if (application != null && application.eResource() != null) {
- return WorkbenchResourceHelperBase.getIFile(application.eResource().getURI());
- }
- } catch (Throwable t) {
-
- }
- return null;
- }
-
-
- /**
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(Object)
- */
- @Override
- public String getText(Object object) {
- return MODULES;
- }
-
- @Override
- public boolean hasChildren(Object object) {
- getChildren(object);
- return !localChildren.isEmpty();
- }
-
- private List localChildren = null;
-
- @Override
- public Collection getChildren(Object object) {
- return initChildren(object);
- }
-
- protected List initChildren(Object object) {
- localChildren = new ArrayList();
- Application app = (Application) getParent();
- IVirtualComponent ear = ComponentUtilities.findComponent(app);
- List modules = app.getModules();
- List binaryModules = new ArrayList();
- IVirtualReference[] refs = ear.getReferences();
- for (int i = 0; i < modules.size(); i++) {
- Module module = (Module) modules.get(i);
- String moduleURI = module.getUri();
- boolean foundBinary = false;
- if(moduleURI != null) {
- String moduleName = new Path(moduleURI).lastSegment();
- for (int j = 0; j < refs.length && !foundBinary; j++) {
- IVirtualComponent component = refs[j].getReferencedComponent();
- if (component.isBinary()) {
- if (refs[j].getArchiveName().equals(moduleName)) {
- foundBinary = true;
- JavaEEBinaryComponentHelper helper = null;
- try {
- helper = new JavaEEBinaryComponentHelper(component);
- Object binaryModule = helper.getPrimaryRootObject();
- if (binaryModule != null) {
- binaryModules.add(binaryModule);
- }
- } finally {
- if(helper != null){
- helper.dispose();
- }
- }
- }
- }
- }
- }
- if (!foundBinary) {
- localChildren.add(module);
- }
- }
-
- if (!binaryModules.isEmpty()) {
- localChildren.add(new J2EEBinaryModulesItemProvider(app, getAdapterFactory(), binaryModules));
- }
-
- return localChildren;
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/UtilityModuleProjectItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/UtilityModuleProjectItemProvider.java
deleted file mode 100644
index c7eed4408..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/UtilityModuleProjectItemProvider.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-public class UtilityModuleProjectItemProvider extends J2EEItemProvider {
-
- private IProject utilProject;
-
- public UtilityModuleProjectItemProvider(AdapterFactory adapterFactory, IProject project, Object parent) {
- super(adapterFactory);
- setParent(parent);
- utilProject = project;
- }
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("icons/full/obj16/prjutiljar_obj"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getText(Object)
- */
- @Override
- public String getText(Object object) {
-
- return utilProject.getName();
- }
-
- @Override
- public Collection<?> getChildren(Object object) {
- return super.getChildren(object);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.java
deleted file mode 100644
index ebd1d9140..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.java
+++ /dev/null
@@ -1,444 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2010 Oracle
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.ui;
-
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.checkForComponentDependencyAttribute;
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.getDefaultRuntimePath;
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.isClassFolderEntry;
-import static org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil.modifyDependencyPath;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jdt.ui.ISharedImages;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants.DependencyAttributeType;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyExtensions;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.ClasspathEntryProxy;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.ui.internal.taskwizard.IWizardHandle;
-import org.eclipse.wst.common.componentcore.ui.internal.taskwizard.WizardFragment;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
-
-@SuppressWarnings( "restriction" )
-
-public final class AddJavaBuildPathEntriesWizardFragment
-
- extends WizardFragment
-
-{
- public static final String PROP_SELECTION = "selection"; //$NON-NLS-1$
-
- private IWizardHandle wizard;
- private TreeViewer viewer;
- private IJavaProject jproj;
-
- public AddJavaBuildPathEntriesWizardFragment()
- {
- setComplete( false );
- }
-
- @Override
- public boolean hasComposite()
- {
- return true;
- }
-
- @Override
- public Composite createComposite( final Composite parent,
- final IWizardHandle handle )
- {
- this.wizard = handle;
-
- handle.setTitle( Resources.title );
- handle.setDescription( Resources.description );
- handle.setImageDescriptor( JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY );
-
- final Composite composite = new Composite( parent, SWT.NONE );
- composite.setLayout( new GridLayout() );
-
- this.viewer = new TreeViewer( composite, SWT.MULTI | SWT.BORDER );
-
- final GridData gd = new GridData( GridData.FILL_BOTH );
- gd.widthHint = 390;
- gd.heightHint = 185;
-
- this.viewer.getTree().setLayoutData( gd );
-
- this.viewer.setContentProvider( new BuildPathEntriesContentProvider() );
- this.viewer.setLabelProvider( new BuildPathEntriesLabelProvider() );
-
- this.viewer.addSelectionChangedListener
- (
- new ISelectionChangedListener()
- {
- public void selectionChanged( final SelectionChangedEvent event )
- {
- handleSelectionChanged();
- }
- }
- );
-
- this.viewer.addDoubleClickListener
- (
- new IDoubleClickListener()
- {
- public void doubleClick( final DoubleClickEvent event )
- {
- handleDoubleClick();
- }
- }
- );
-
- final IProject proj = (IProject) getTaskModel().getObject( IReferenceWizardConstants.PROJECT );
- this.jproj = JavaCore.create( proj );
-
- this.viewer.setInput( new Object() );
-
- return composite;
- }
-
- private void handleSelectionChanged()
- {
- final List<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
- final IStructuredSelection selection = (IStructuredSelection) this.viewer.getSelection();
- final IVirtualComponent virtualComponent = ComponentCore.createComponent(this.jproj.getProject());
- final boolean isWebApp = JavaEEProjectUtilities.isDynamicWebProject( this.jproj.getProject() );
-
- for( Iterator<?> itr = selection.iterator(); itr.hasNext(); )
- {
- final Object obj = itr.next();
-
- if( obj instanceof IClasspathEntry )
- {
- final IClasspathEntry cpeOriginal = (IClasspathEntry) obj;
-
- IPath runtimePath = null;
- if(virtualComponent == null){
- runtimePath = getDefaultRuntimePath( isWebApp, isClassFolderEntry( cpeOriginal ) );
- } else {
- runtimePath = getDefaultRuntimePath(virtualComponent, cpeOriginal);
- }
- final IClasspathEntry cpeTagged = modifyDependencyPath( cpeOriginal, runtimePath );
-
- list.add( cpeTagged );
- }
- else
- {
- list.clear();
- break;
- }
- }
-
- getTaskModel().putObject( PROP_SELECTION, list );
-
- setComplete( ! list.isEmpty() );
- this.wizard.update();
- }
-
- private void handleDoubleClick()
- {
- advanceToNextPageOrFinish();
- }
-
- private IJavaProject getJavaProject()
- {
- return this.jproj;
- }
-
- public static String getClasspathEntryText( final IJavaProject jproj,
- final IClasspathEntry cpe )
- {
- final int type = cpe.getEntryKind();
-
- if( type == IClasspathEntry.CPE_CONTAINER )
- {
- try
- {
- final IClasspathContainer container = JavaCore.getClasspathContainer( cpe.getPath(), jproj );
- return container.getDescription();
- }
- catch( Exception e )
- {
- J2EEUIPlugin.logError(e);
- }
- }
- else if( type == IClasspathEntry.CPE_LIBRARY )
- {
- final IPath path = cpe.getPath();
-
- final StringBuilder buf = new StringBuilder();
- buf.append( path.lastSegment() );
- buf.append( " - " ); //$NON-NLS-1$
- buf.append( path.removeLastSegments( 1 ).toOSString() );
-
- return buf.toString();
- }
-
- return cpe.getPath().toPortableString();
- }
-
- public static Image getClasspathEntryImage( final IJavaProject jproj,
- final IClasspathEntry cpe )
- {
- final int type = cpe.getEntryKind();
- final String imgId;
-
- if( type == IClasspathEntry.CPE_CONTAINER )
- {
- imgId = ISharedImages.IMG_OBJS_LIBRARY;
- }
- else if( type == IClasspathEntry.CPE_LIBRARY )
- {
- imgId = ISharedImages.IMG_OBJS_JAR;
- }
- else if( type == IClasspathEntry.CPE_VARIABLE )
- {
- imgId = ISharedImages.IMG_OBJS_CLASSPATH_VAR_ENTRY;
- }
- else
- {
- imgId = null;
- }
-
- return ( imgId == null ? null : JavaUI.getSharedImages().getImage( imgId ) );
- }
-
- private final class BuildPathEntriesContentProvider
-
- implements ITreeContentProvider
-
- {
- public Object[] getElements( final Object input )
- {
- final List<IClasspathEntry> elements = new ArrayList<IClasspathEntry>();
- final List<?> filteredContainerIds = ClasspathDependencyExtensions.get().getFilteredClasspathContainerIDs();
-
- try
- {
- for( IClasspathEntry cpe : getJavaProject().getRawClasspath() )
- {
- final int type = cpe.getEntryKind();
- final IPath path = cpe.getPath();
- boolean relevant = false;
-
- if( type == IClasspathEntry.CPE_CONTAINER )
- {
- if( path.segmentCount() > 0 && ! filteredContainerIds.contains( path.segment( 0 ) ) )
- {
- relevant = true;
- }
- }
- else if( type == IClasspathEntry.CPE_LIBRARY || type == IClasspathEntry.CPE_VARIABLE )
- {
- relevant = true;
- }
-
- if( relevant )
- {
- if( checkForComponentDependencyAttribute( cpe, DependencyAttributeType.CLASSPATH_COMPONENT_NONDEPENDENCY ) != null )
- {
- relevant = false;
- }
- }
-
- if( relevant )
- {
- boolean found = false;
-
- for( Object directive : (List<?>) getTaskModel().getObject( IReferenceWizardConstants.ALL_DIRECTIVES ) )
- {
- if( directive instanceof ClasspathEntryProxy )
- {
- final ClasspathEntryProxy proxy = (ClasspathEntryProxy) directive;
-
- if( type == proxy.entry.getEntryKind() && path.equals( proxy.entry.getPath() ) )
- {
- found = true;
- break;
- }
- }
- }
-
- if( found )
- {
- relevant = false;
- }
- }
-
- if( relevant )
- {
- elements.add( cpe );
- }
- }
- }
- catch( CoreException e )
- {
- J2EEUIPlugin.logError(e);
- }
-
- return elements.toArray();
- }
-
- public boolean hasChildren( final Object element )
- {
- return ( element instanceof IClasspathEntry ) &&
- ( ( (IClasspathEntry) element ).getEntryKind() == IClasspathEntry.CPE_CONTAINER );
- }
-
- public Object[] getChildren( final Object parent )
- {
- if( parent instanceof IClasspathEntry )
- {
- final IClasspathEntry cpe = (IClasspathEntry) parent;
-
- if( cpe.getEntryKind() == IClasspathEntry.CPE_CONTAINER )
- {
- final List<ChildClasspathEntry> children = new ArrayList<ChildClasspathEntry>();
-
- try
- {
- final IClasspathContainer container = JavaCore.getClasspathContainer( cpe.getPath(), getJavaProject() );
-
- if( container != null )
- {
- for( IClasspathEntry child : container.getClasspathEntries() )
- {
- children.add( new ChildClasspathEntry( cpe, child ) );
- }
- }
- }
- catch( Exception e )
- {
- J2EEUIPlugin.logError(e);
- }
-
- return children.toArray();
- }
- }
-
- return new Object[ 0 ];
- }
-
- public Object getParent( final Object element )
- {
- if( element instanceof ChildClasspathEntry )
- {
- return ( (ChildClasspathEntry) element ).parent;
- }
-
- return null;
- }
-
- public void inputChanged( final Viewer viewer,
- final Object oldInput,
- final Object newInput )
- {
- }
-
- public void dispose()
- {
- }
- }
-
- private final class BuildPathEntriesLabelProvider
-
- extends LabelProvider
-
- {
- @Override
- public String getText( final Object element )
- {
- final IClasspathEntry cpe;
-
- if( element instanceof IClasspathEntry )
- {
- cpe = (IClasspathEntry) element;
- }
- else
- {
- cpe = ( (ChildClasspathEntry) element ).entry;
- }
-
- return getClasspathEntryText( getJavaProject(), cpe );
- }
-
- @Override
- public Image getImage( final Object element )
- {
- final IClasspathEntry cpe;
-
- if( element instanceof IClasspathEntry )
- {
- cpe = (IClasspathEntry) element;
- }
- else
- {
- cpe = ( (ChildClasspathEntry) element ).entry;
- }
-
- return getClasspathEntryImage( getJavaProject(), cpe );
- }
- }
-
- private static final class ChildClasspathEntry
- {
- public final IClasspathEntry parent;
- public final IClasspathEntry entry;
-
- public ChildClasspathEntry( final IClasspathEntry parent,
- final IClasspathEntry entry )
- {
- this.parent = parent;
- this.entry = entry;
- }
- }
-
- public static final class Resources extends NLS
- {
- public static String title;
- public static String description;
-
- static
- {
- initializeMessages( AddJavaBuildPathEntriesWizardFragment.class.getName(), Resources.class );
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.properties
deleted file mode 100644
index 665e65920..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/AddJavaBuildPathEntriesWizardFragment.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-title = Java Build Path Entries
-description = Select build path entries to include in the deployment assembly.
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableItem.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableItem.java
deleted file mode 100644
index a4b6e46a6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableItem.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Stefan Dimov, stefan.dimov@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jst.j2ee.internal.SecondCheckBoxStateChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-public class DoubleCheckboxTableItem extends TableItem {
-
- protected int mSecondCheckboxColumnIndex;
- protected Button secondCheckBox;
- protected SelectionListener selLstnr;
- protected ICheckStateListener tblLstnr = null;
- protected DoubleCheckboxTableViewer tableViewer;
-
- public DoubleCheckboxTableItem (Table parent, int style, int secondCheckboxColumnIndex, DoubleCheckboxTableViewer tableViewer) {
- super(parent, style);
- mSecondCheckboxColumnIndex = secondCheckboxColumnIndex;
- this.tableViewer = tableViewer;
- createCheckBox(parent);
- }
-
- public DoubleCheckboxTableItem(Table parent, int style, int index, int secondCheckboxColumnIndex, DoubleCheckboxTableViewer tableViewer) {
- super(parent, style, index);
- mSecondCheckboxColumnIndex = secondCheckboxColumnIndex;
- this.tableViewer = tableViewer;
- createCheckBox(parent);
- }
-
- public void setSecondChecked (boolean checked) {
- secondCheckBox.setSelection(checked);
- }
-
- public boolean getSecondChecked() {
- return secondCheckBox.getSelection();
- }
-
- public void setSecondGrayed(boolean grayed) {
- secondCheckBox.setGrayed(grayed);
- }
-
- public boolean getSecondGrayed() {
- return secondCheckBox.getGrayed();
- }
-
- public void setSecondEnabled(boolean enabled) {
- secondCheckBox.setEnabled(enabled);
- }
-
- public boolean getSecondEnabled() {
- return secondCheckBox.getEnabled();
- }
-
- public boolean isSecondEnabled() {
- return secondCheckBox.isEnabled();
- }
-
- private void createCheckBox(Table parentTable) {
- secondCheckBox = new Button(parentTable, SWT.CHECK | SWT.FLAT);
- secondCheckBox.pack();
- final DoubleCheckboxTableItem th = this;
- selLstnr = new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- SecondCheckBoxStateChangedEvent evt = new SecondCheckBoxStateChangedEvent(tableViewer,
- getData(),
- getChecked());
- evt.setTableItem(th);
- tblLstnr.checkStateChanged(evt);
- }
- public void widgetDefaultSelected(SelectionEvent e) {}
- };
- secondCheckBox.addSelectionListener(selLstnr);
- }
-
- public Button getSecondCheckBox() {
- return secondCheckBox;
- }
-
- @Override
- public void dispose() {
- disposeSecondCheckbox();
- super.dispose();
- }
-
- protected void disposeSecondCheckbox() {
- if (secondCheckBox != null) {
- secondCheckBox.removeSelectionListener(selLstnr);
- secondCheckBox.dispose();
- secondCheckBox = null;
- }
- selLstnr = null;
- }
-
- void setTableListener(ICheckStateListener tblLstnr) {
- this.tblLstnr = tblLstnr;
- }
-
- @Override
- protected void checkSubclass () {}
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java
deleted file mode 100644
index 31510f437..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Stefan Dimov, stefan.dimov@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import java.util.ArrayList;
-import java.util.Hashtable;
-
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ViewerRow;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TableEditor;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-public class DoubleCheckboxTableViewer extends CheckboxTableViewer {
-
- protected int mSecondCheckboxColumnIndex;
- protected ICheckStateListener lstnr = null;
-
- public DoubleCheckboxTableViewer(Table table, int secondCheckBoxColumnIndex) {
- super(table);
- if (secondCheckBoxColumnIndex < 1)
- throw new IllegalArgumentException(
- "The index of the second column with check box must be bigger than zero"); //$NON-NLS-1$
-
- mSecondCheckboxColumnIndex = secondCheckBoxColumnIndex;
- }
-
- @Override
- public void addCheckStateListener(ICheckStateListener listener) {
- super.addCheckStateListener(listener);
- lstnr = listener;
- }
-
- @Override
- public void removeCheckStateListener(ICheckStateListener listener) {
- super.removeCheckStateListener(listener);
- lstnr = null;
- getTable().getItems();
- for (int i = 0; i < getTable().getItems().length; i++) {
- DoubleCheckboxTableItem it = (DoubleCheckboxTableItem)getTable().getItem(i);
- it.setTableListener(null);
- }
- }
-
- @Override
- protected ViewerRow internalCreateNewRowPart(int style, int rowIndex) {
- DoubleCheckboxTableItem item;
- if (rowIndex >= 0) {
- item = new DoubleCheckboxTableItem(getTable(), style, rowIndex, mSecondCheckboxColumnIndex, this);
- } else {
- item = new DoubleCheckboxTableItem(getTable(), style, mSecondCheckboxColumnIndex, this);
- }
- item.setTableListener(lstnr);
- TableEditor editor = new TableEditor(getTable());
- editor.minimumWidth = item.getSecondCheckBox().getSize ().x;
- editor.horizontalAlignment = SWT.CENTER;
- editor.setEditor(item.getSecondCheckBox(), item, mSecondCheckboxColumnIndex);
- return getViewerRowFromItem(item);
- }
-
- public Object[] getSecondCheckedItems() {
- TableItem[] children = getTable().getItems();
- ArrayList v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)children[i];
- if (item.getSecondChecked()) {
- v.add(item);
- }
- }
- return v.toArray();
- }
-
- public void setAllSecondChecked(boolean state) {
- TableItem[] children = getTable().getItems();
- for (int i = 0; i < children.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)children[i];
- item.setSecondChecked(state);
- }
- }
-
- public Object[] getSingleCheckedElements() {
- TableItem[] children = getTable().getItems();
- ArrayList v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)children[i];
- if (item.getChecked() && (!item.getSecondChecked())) {
- v.add(item.getData());
- }
- }
- return v.toArray();
- }
-
- public Object[] getDoubleCheckedElements() {
- TableItem[] children = getTable().getItems();
- ArrayList v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)children[i];
- if (item.getChecked() && item.getSecondChecked()) {
- v.add(item.getData());
- }
- }
- return v.toArray();
- }
-
- public Object[] getUncheckedItems() {
- TableItem[] children = getTable().getItems();
- ArrayList v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- TableItem item = children[i];
- if (!item.getChecked()) {
- v.add(item);
- }
- }
- return v.toArray();
- }
-
-
- public Object[] getSecondUncheckedElements() {
- TableItem[] children = getTable().getItems();
- ArrayList v = new ArrayList(children.length);
- for (int i = 0; i < children.length; i++) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)children[i];
- if (!item.getSecondChecked()) {
- v.add(item.getData());
- }
- }
- return v.toArray();
- }
-
- public void setSecondCheckedItems(Object[] inputItems) {
- assertElementsNotNull(inputItems);
- Hashtable set = new Hashtable();
- for (int i = 0; i < inputItems.length; ++i) {
- set.put(inputItems[i], inputItems[i]);
- }
- TableItem[] items = getTable().getItems();
- for (int i = 0; i < items.length; ++i) {
- DoubleCheckboxTableItem item = (DoubleCheckboxTableItem)items[i];
- boolean check = set.containsKey(item);
- if (item.getSecondChecked() != check) {
- item.setSecondChecked(check);
- }
-
- }
- }
-
- @Override
- protected void doRemove(int start, int end) {
- // ensure that the second check box is disposed
- for (int i = start; i <= end; i++) {
- disposeSecondCheckboxOfItem(i);
- }
-
- super.doRemove(start, end);
- }
-
- @Override
- protected void doRemove(int[] indices) {
- // ensure that the second check box is disposed
- for (int i : indices) {
- disposeSecondCheckboxOfItem(i);
- }
-
- super.doRemove(indices);
- }
-
- private void disposeSecondCheckboxOfItem(int index) {
- TableItem item = getTable().getItem(index);
- if (item instanceof DoubleCheckboxTableItem) {
- ((DoubleCheckboxTableItem) item).disposeSecondCheckbox();
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/IJavaEEDeploymentAssemblySectionBuilder.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/IJavaEEDeploymentAssemblySectionBuilder.java
deleted file mode 100644
index 0374c296a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/IJavaEEDeploymentAssemblySectionBuilder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
-
-public interface IJavaEEDeploymentAssemblySectionBuilder {
-
- /**
- * Builds the section
- * @param parent - The composite to which this section will be added
- */
- public void buildSection(Composite parent);
-
- public void loadContents();
-
- public boolean saveContents();
-
- public void directiveAdded(Object element);
-
- public void directiveRemoved(Object element);
-
- public IStatus validate(IStatus currentStatus);
-
- public void componentResourceModified(ComponentResourceProxy originalResource, ComponentResourceProxy modifiedResource);
-
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java
deleted file mode 100644
index 4860f5dc5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEDependencyPageProvider.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2010 Red Hat and Others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Rob Stryker - initial implementation and ongoing maintenance
- * Konstantin Komissarchik - misc. UI cleanup
- ******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.common.internal.modulecore.util.JavaModuleComponentUtility;
-import org.eclipse.jst.common.ui.internal.assembly.wizard.ManifestModuleDependencyControl;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-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.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
-import org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class J2EEDependencyPageProvider implements IDependencyPageProvider {
-
- private IModuleDependenciesControl[] controls;
-
- public boolean canHandle(IFacetedProject project) {
- return isJavaEENotEarWeb(project);
- }
-
- protected boolean isJavaEENotEarWeb(IFacetedProject fp) {
- return fp.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EJB_MODULE)) ||
- fp.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_APPCLIENT_MODULE)) ||
- fp.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_CONNECTOR_MODULE)) ||
- fp.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_UTILITY_MODULE)) ||
- fp.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEBFRAGMENT_MODULE));
- }
-
- public IModuleDependenciesControl[] createPages(IFacetedProject project,
- ModuleAssemblyRootPage parent) {
-
- if( isStandalone(project.getProject()))
- return new IModuleDependenciesControl[] {
- new J2EEModuleDependenciesPropertyPage(project.getProject(), parent)};
-
- return new IModuleDependenciesControl[] {
- new J2EEModuleDependenciesPropertyPage(project.getProject(), parent),
- new ManifestModuleDependencyControl(project.getProject(), parent)};
-
- }
-
- /*
- * This now allows extenders to say whether this project is standalone or not
- */
- protected boolean isStandalone(IProject project) {
- return JavaModuleComponentUtility.findParentProjects(project).length == 0;
- }
-
- public Composite createRootControl(IFacetedProject project,IModuleDependenciesControl[] pages,
- Composite parent) {
-
- if( isStandalone(project.getProject()))
- return pages[0].createContents(parent);
-
- final TabFolder folder = new TabFolder(parent, SWT.LEFT);
- folder.setLayoutData(new GridData(GridData.FILL_BOTH));
- folder.setFont(parent.getFont());
-
- // Create the two tabs
- controls = new IModuleDependenciesControl[2];
- controls[0] = pages[0];
- controls[1] = pages[1];
-
- TabItem tab = new TabItem(folder, SWT.NONE);
- tab.setControl(create(controls[0],folder));
- tab.setText(Messages.J2EEDependencyPageProvider_4);
- tab = new TabItem(folder, SWT.NONE);
- tab.setControl(create(controls[1],folder));
- tab.setText(Messages.J2EEDependencyPageProvider_5);
-
- folder.setSelection(0);
- return folder;
- }
-
- private static Control create( final IModuleDependenciesControl control,
- final Composite parent )
- {
- final Composite composite = new Composite( parent, SWT.NONE );
- composite.setLayout( new GridLayout() );
- final Composite inner = control.createContents( composite );
- inner.setLayoutData( new GridData( GridData.FILL_BOTH ) );
-
- return composite;
- }
-
- protected boolean isWeb(IFacetedProject project) {
- return project.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE));
- }
-
- public String getPageTitle(IProject project) {
-
- if (JavaEEProjectUtilities.isEJBProject(project))
- return Messages.J2EEDependencyPageProvider_1;
- if (JavaEEProjectUtilities.isApplicationClientProject(project))
- return Messages.J2EEDependencyPageProvider_2;
- if (JavaEEProjectUtilities.isJCAProject(project))
- return Messages.J2EEDependencyPageProvider_3;
- return Messages.J2EEDependencyPageProvider_4;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDependenciesPropertyPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDependenciesPropertyPage.java
deleted file mode 100644
index ed70408b8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDependenciesPropertyPage.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2009, 2011 Red Hat and Others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Rob Stryker - initial implementation and ongoing maintenance
- * Chuck Bridgham - additional support
- * Konstantin Komissarchik - misc. UI cleanup
- * Roberto Sanchez - Add Advanced section
- ******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-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.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.common.jdt.internal.javalite.IJavaProjectLite;
-import org.eclipse.jst.common.jdt.internal.javalite.JavaCoreLite;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants.DependencyAttributeType;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEModuleHandler;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.common.componentcore.internal.IModuleHandler;
-import org.eclipse.wst.common.componentcore.internal.impl.TaskModel;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ComponentDependencyContentProvider;
-import org.eclipse.wst.common.componentcore.ui.internal.taskwizard.TaskWizard;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants.ProjectConverterOperationProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class J2EEModuleDependenciesPropertyPage extends
- AddModuleDependenciesPropertiesPage {
-
- private IJavaEEDeploymentAssemblySectionBuilder advancedHelper;
-
- public J2EEModuleDependenciesPropertyPage(IProject project,
- ModuleAssemblyRootPage page) {
- super(project, page);
- advancedHelper = getAdvancedSectionBuilder();
- }
-
- public class ClasspathEntryProxy {
- public IClasspathEntry entry;
- public ClasspathEntryProxy(IClasspathEntry entry){
- this.entry = entry;
- }
- }
-
- protected List <IClasspathEntry> originalClasspathEntries = new ArrayList<IClasspathEntry>();
- protected List <ClasspathEntryProxy> currentClasspathEntries = new ArrayList<ClasspathEntryProxy>();
-
- @Override
- protected void initialize() {
- super.initialize();
- resetClasspathEntries();
- }
-
- @Override
- protected void createTableComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gData);
- fillTableComposite(composite);
- addAdvancedComposite(composite);
- }
-
- private void resetClasspathEntries() {
- originalClasspathEntries.clear();
- currentClasspathEntries.clear();
- originalClasspathEntries.addAll(readRawEntries());
- for(IClasspathEntry entry:originalClasspathEntries){
- currentClasspathEntries.add(new ClasspathEntryProxy(entry));
- }
- }
-
- @Override
- public void performDefaults() {
- resetClasspathEntries();
- if (advancedHelper != null)
- advancedHelper.loadContents();
- super.performDefaults();
- }
-
- protected List <IClasspathEntry> readRawEntries(){
- return readRawEntries(rootComponent);
- }
-
- public static List <IClasspathEntry> readRawEntries(IVirtualComponent component){
- List <IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
- if (!component.getProject().isAccessible()){
- return entries;
- }
- IJavaProjectLite javaProjectLite = JavaCoreLite.create(component.getProject());
- try {
- Map<IClasspathEntry, IClasspathAttribute> rawComponentClasspathDependencies = ClasspathDependencyUtil.getRawComponentClasspathDependencies(javaProjectLite, DependencyAttributeType.CLASSPATH_COMPONENT_DEPENDENCY);
- entries.addAll(rawComponentClasspathDependencies.keySet());
- } catch (CoreException e) {
- J2EEUIPlugin.logError(e);
- }
- return entries;
- }
-
- @Override
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- @Override
- protected void handleRemoved(ArrayList<IVirtualReference> removed) {
- super.handleRemoved(removed);
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- @Override
- protected void remove(Object selectedItem) {
- if(selectedItem instanceof ClasspathEntryProxy){
- ClasspathEntryProxy entry = (ClasspathEntryProxy)selectedItem;
- currentClasspathEntries.remove(entry);
- } else {
- super.remove(selectedItem);
- }
- if (advancedHelper != null)
- advancedHelper.directiveRemoved(selectedItem);
- }
-
- @Override
- protected String getModuleAssemblyRootPageDescription() {
- if (JavaEEProjectUtilities.isEJBProject(project))
- return Messages.J2EEModuleDependenciesPropertyPage_3;
- if (JavaEEProjectUtilities.isApplicationClientProject(project))
- return Messages.J2EEModuleDependenciesPropertyPage_4;
- if (JavaEEProjectUtilities.isJCAProject(project))
- return Messages.J2EEModuleDependenciesPropertyPage_5;
- return super.getModuleAssemblyRootPageDescription();
- }
-
- @Override
- protected IModuleHandler getModuleHandler() {
- if(moduleHandler == null)
- moduleHandler = new JavaEEModuleHandler();
- return moduleHandler;
- }
-
- @Override
- protected void setCustomReferenceWizardProperties(TaskModel model) {
- model.putObject(IReferenceWizardConstants.PROJECT_CONVERTER_OPERATION_PROVIDER, getConverterProvider());
- }
-
- public ProjectConverterOperationProvider getConverterProvider() {
- return new ProjectConverterOperationProvider() {
- public IDataModelOperation getConversionOperation(IProject project) {
- return J2EEProjectUtilities.createFlexJavaProjectForProjectOperation(project);
- }
- };
- }
-
- @Override
- protected ComponentDependencyContentProvider createProvider() {
- JavaEEComponentDependencyContentProvider provider = new JavaEEComponentDependencyContentProvider(this);
- provider.setClasspathEntries(currentClasspathEntries);
- return provider;
- }
-
- @Override
- protected boolean canRemove(Object selectedObject) {
- return super.canRemove(selectedObject) && !(selectedObject instanceof JavaEEComponentDependencyContentProvider.ConsumedClasspathEntryProxy);
- }
-
- @Override
- protected RuntimePathCellModifier getRuntimePathCellModifier() {
- return new AddModuleDependenciesPropertiesPage.RuntimePathCellModifier(){
- @Override
- public boolean canModify(Object element, String property) {
- if( property.equals(DEPLOY_PATH_PROPERTY) && element instanceof ClasspathEntryProxy) {
- return true;
- }
- return super.canModify(element, property);
- }
-
- @Override
- public Object getValue(Object element, String property) {
- if(element instanceof ClasspathEntryProxy){
- IClasspathEntry entry = ((ClasspathEntryProxy)element).entry;
- IPath runtimePath = ClasspathDependencyUtil.getRuntimePath(entry);
- if(runtimePath.isRoot())
- return runtimePath.toString();
- return runtimePath.makeRelative().toString();
- }
- return super.getValue(element, property);
- }
-
- @Override
- public void modify(Object element, String property, Object value) {
- ComponentResourceProxy originalResource = null;
- ComponentResourceProxy modifiedResource = null;
- if (property.equals(DEPLOY_PATH_PROPERTY)) {
- TreeItem item = (TreeItem) element;
- if( item.getData() instanceof ComponentResourceProxy) {
- modifiedResource = (ComponentResourceProxy)item.getData();
- originalResource = new ComponentResourceProxy(modifiedResource.source, modifiedResource.runtimePath);
- }
- if(item.getData() instanceof ClasspathEntryProxy){
- TreeItem[] components = availableComponentsViewer.getTree().getItems();
- int tableIndex = -1;
- for(int i=0; i < components.length; i++) {
- if(components[i] == item) {
- tableIndex = i;
- break;
- }
- }
- ClasspathEntryProxy proxy = (ClasspathEntryProxy)item.getData();
- IPath runtimePath = new Path(((String)value).trim()).makeRelative();
- if(runtimePath.isEmpty())
- runtimePath = runtimePath.makeAbsolute();
- if(tableIndex >= 0)
- components[tableIndex].setText(AddModuleDependenciesPropertiesPage.DEPLOY_COLUMN, runtimePath.toString());
- if(!ClasspathDependencyUtil.isMappedIntoContainer(runtimePath.toString()))
- runtimePath = runtimePath.makeAbsolute();
- IClasspathEntry newEntry = ClasspathDependencyUtil.modifyDependencyPath(proxy.entry, runtimePath);
- proxy.entry = newEntry;
- resourceMappingsChanged = true;
- }
- }
- super.modify(element, property, value);
- if (originalResource != null && advancedHelper != null)
- advancedHelper.componentResourceModified(originalResource, modifiedResource);
- }
- };
- }
-
- protected boolean shouldSaveClasspathEntires() {
- return true;
- }
-
- @Override
- protected boolean saveReferenceChanges() {
- boolean subResult = super.saveReferenceChanges();
- if(!subResult){
- return subResult;
- }
-
- if( !shouldSaveClasspathEntires())
- return true;
-
- Map <IPath, IClasspathEntry> modified = new HashMap <IPath, IClasspathEntry>();
-
- Map <IPath, IClasspathEntry> originalMap = new HashMap <IPath, IClasspathEntry>();
- for(IClasspathEntry originalEntry : originalClasspathEntries){
- originalMap.put(originalEntry.getPath(), originalEntry);
- }
-
- for(ClasspathEntryProxy proxy: currentClasspathEntries){
- IClasspathEntry currentEntry = proxy.entry;
- IPath path = currentEntry.getPath();
- IClasspathEntry originalEntry = originalMap.remove(path);
- if(currentEntry.equals(originalEntry)){
- //no change
- continue;
- }
- modified.put(path, currentEntry);
- }
-
- Map <IPath, IClasspathEntry> removed = originalMap;
-
- IJavaProject javaProject = JavaCore.create(rootComponent.getProject());
- try {
- final IClasspathEntry [] rawClasspath = javaProject.getRawClasspath();
- List <IClasspathEntry> newClasspath = new ArrayList <IClasspathEntry>();
- for(IClasspathEntry entry:rawClasspath){
- IPath path = entry.getPath();
- if(removed.containsKey(path)){
- //user removed entry
- IClasspathEntry newEntry = ClasspathDependencyUtil.modifyDependencyPath(entry, null);
- newClasspath.add(newEntry);
- } else if(modified.containsKey(path)){
- //user changed path value
- IClasspathEntry newEntry = modified.get(path);
- IPath runtimePath = ClasspathDependencyUtil.getRuntimePath(newEntry);
- if(runtimePath.toString().length() == 0){
- //prevent the user from specifying no path
- newEntry = ClasspathDependencyUtil.modifyDependencyPath(newEntry, new Path("/")); //$NON-NLS-1$
- }
- newClasspath.add(newEntry);
- } else {
- //no change
- newClasspath.add(entry);
- }
- }
- javaProject.setRawClasspath( newClasspath.toArray( new IClasspathEntry[ newClasspath.size() ] ), null );
-
- originalClasspathEntries.clear();
- currentClasspathEntries.clear();
- resetClasspathEntries();
- } catch (JavaModelException e) {
- J2EEUIPlugin.logError(e);
- return false;
- }
- return true;
- }
-
- @Override
- protected void handleAddDirective( final TaskWizard wizard )
- {
- final List<IClasspathEntry> classpathEntries
- = (List<IClasspathEntry>) wizard.getTaskModel().getObject( AddJavaBuildPathEntriesWizardFragment.PROP_SELECTION );
-
- if( classpathEntries != null && ! classpathEntries.isEmpty() )
- {
- for( IClasspathEntry cpe : classpathEntries )
- {
- this.currentClasspathEntries.add( new ClasspathEntryProxy( cpe ) );
- }
- }
- else
- {
- super.handleAddDirective(wizard);
- }
- if (advancedHelper != null)
- advancedHelper.directiveAdded(wizard.getTaskModel());
- }
-
- @Override
- protected void verify() {
- propPage.refreshProblemsView();
- }
-
- @Override
- public IStatus validate() {
- ArrayList<ComponentResourceProxy> allMappings = new ArrayList<ComponentResourceProxy>();
- allMappings.addAll(resourceMappings);
- allMappings.addAll(hiddenMappings);
- IStatus status = J2EEModuleDeploymentAssemblyVerifierHelper.verify(rootComponent, runtime, currentReferences, allMappings,resourceMappingsChanged, currentClasspathEntries);
- if (advancedHelper != null)
- status = advancedHelper.validate(status);
- return status;
- }
-
- protected void addAdvancedComposite(Composite parent) {
- if (advancedHelper != null) {
- advancedHelper.buildSection(parent);
- advancedHelper.loadContents();
- }
- }
-
- @Override
- public boolean performOk() {
- boolean result = super.performOk();
- if (advancedHelper != null)
- result = result & advancedHelper.saveContents();
- return result;
- }
-
- protected IJavaEEDeploymentAssemblySectionBuilder getAdvancedSectionBuilder(){
- if (advancedHelper == null){
- advancedHelper = new JavaEEDeploymentAssemblyAdvancedSectionBuilder(rootComponent, this);
- }
- return advancedHelper;
- }
-
-//
-// @Override
-// protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
-// return new AddComponentToEnterpriseApplicationDataModelProvider();
-// }
-//
-// protected void addToManifest(ArrayList<IVirtualComponent> components) {
-// StringBuffer newComps = getCompsForManifest(components);
-// if(newComps.toString().length() > 0) {
-// UpdateManifestOperation op = createManifestOperation(newComps.toString());
-// try {
-// op.run(new NullProgressMonitor());
-// } catch (InvocationTargetException e) {
-// J2EEUIPlugin.logError(e);
-// } catch (InterruptedException e) {
-// J2EEUIPlugin.logError(e);
-// }
-// }
-// }
-//
-// protected void addOneComponent(IVirtualComponent component, IPath path, String archiveName) throws CoreException {
-// //Find the Ear's that contain this component
-// IProject[] earProjects = EarUtilities.getReferencingEARProjects(rootComponent.getProject());
-// for (int i = 0; i < earProjects.length; i++) {
-// IProject project = earProjects[i];
-//
-// IDataModelProvider provider = getAddReferenceDataModelProvider(component);
-// IDataModel dm = DataModelFactory.createDataModel(provider);
-//
-// dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, ComponentCore.createComponent(project));
-// dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, Arrays.asList(component));
-//
-// //[Bug 238264] the uri map needs to be manually set correctly
-// Map<IVirtualComponent, String> uriMap = new HashMap<IVirtualComponent, String>();
-// uriMap.put(component, archiveName);
-// dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, uriMap);
-// dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, path);
-//
-// IStatus stat = dm.validateProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST);
-// if (stat != OK_STATUS)
-// throw new CoreException(stat);
-// try {
-// dm.getDefaultOperation().execute(new NullProgressMonitor(), null);
-// } catch (ExecutionException e) {
-// ModuleCoreUIPlugin.logError(e);
-// }
-// }
-// }
-//
-//
-// protected StringBuffer getCompsForManifest(ArrayList<IVirtualComponent> components) {
-// StringBuffer newComps = new StringBuffer();
-// for (Iterator iterator = components.iterator(); iterator.hasNext();) {
-// IVirtualComponent comp = (IVirtualComponent) iterator.next();
-// String archiveName = new Path(derivedRefsObjectToRuntimePath.get(comp)).lastSegment();
-// newComps.append(archiveName);
-// newComps.append(' ');
-// }
-// return newComps;
-// }
-//
-// protected UpdateManifestOperation createManifestOperation(String newComps) {
-// return new UpdateManifestOperation(project.getName(), newComps, false);
-// }
-//
-// private void removeFromManifest(ArrayList<IVirtualComponent> removed) {
-// String sourceProjName = project.getName();
-// IProgressMonitor monitor = new NullProgressMonitor();
-// IFile manifestmf = J2EEProjectUtilities.getManifestFile(project);
-// ArchiveManifest mf = J2EEProjectUtilities.readManifest(project);
-// if (mf == null)
-// return;
-// IDataModel updateManifestDataModel = DataModelFactory.createDataModel(new UpdateManifestDataModelProvider());
-// updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.PROJECT_NAME, sourceProjName);
-// updateManifestDataModel.setBooleanProperty(UpdateManifestDataModelProperties.MERGE, false);
-// updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.MANIFEST_FILE, manifestmf);
-// String[] cp = mf.getClassPathTokenized();
-// List cpList = new ArrayList();
-//
-// for (int i = 0; i < cp.length; i++) {
-// boolean foundMatch = false;
-// for (Iterator iterator = removed.iterator(); iterator.hasNext();) {
-// IVirtualComponent comp = (IVirtualComponent) iterator.next();
-// String cpToRemove = new Path(derivedRefsOldComponentToRuntimePath.get(comp)).lastSegment();
-// if (cp[i].equals(cpToRemove))
-// foundMatch = true;
-// }
-// if (!foundMatch)
-// cpList.add(cp[i]);
-// }
-// updateManifestDataModel.setProperty(UpdateManifestDataModelProperties.JAR_LIST, cpList);
-// try {
-// updateManifestDataModel.getDefaultOperation().execute(monitor, null );
-// } catch (ExecutionException e) {
-// J2EEUIPlugin.logError(e);
-// }
-// }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierData.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierData.java
deleted file mode 100644
index af9bb7a32..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierData.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.ClasspathEntryProxy;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.verifier.DeploymentAssemblyVerifierData;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
-import org.eclipse.wst.server.core.IRuntime;
-
-public class J2EEModuleDeploymentAssemblyVerifierData extends DeploymentAssemblyVerifierData{
-
- public J2EEModuleDeploymentAssemblyVerifierData(IVirtualComponent component, IRuntime runtime, ArrayList<IVirtualReference> currentReferences,
- ArrayList<ComponentResourceProxy> resourceMappings, boolean resourceMappingsChanged, List<ClasspathEntryProxy> currentClasspathEntries2) {
- super(component, runtime, currentReferences,resourceMappings, resourceMappingsChanged);
- this.currentClasspathEntries = currentClasspathEntries2;
- }
- private List<ClasspathEntryProxy> currentClasspathEntries;
-
- public List<ClasspathEntryProxy> getCurrentClasspathEntries() {
- return currentClasspathEntries;
- }
- public void setCurrentClasspathEntries(List<ClasspathEntryProxy> currentClasspathEntries) {
- this.currentClasspathEntries = currentClasspathEntries;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierHelper.java
deleted file mode 100644
index c8b14682d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEModuleDeploymentAssemblyVerifierHelper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.ClasspathEntryProxy;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.Messages;
-import org.eclipse.wst.common.componentcore.ui.ModuleCoreUIPlugin;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.verifier.DeploymentAssemblyVerifierHelper;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.verifier.IDeploymentAssemblyVerifier;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.verifier.VerifierRegistryReader;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
-import org.eclipse.wst.server.core.IRuntime;
-
-public class J2EEModuleDeploymentAssemblyVerifierHelper {
-
-
- /**
- * This method will use the facet framework to find all registered verifiers based on installed facets and runtimes.
- * All the verifiers will have an opportunity to verify and return status on the proposed component mappings
- * @param component
- * @param runtime
- * @param resourceMappingsChanged
- * @param resourceMappings
- * @param currentReferences
- * @param currentClasspathEntries
- * @return IStatus
- */
- public static IStatus verify(IVirtualComponent component,IRuntime runtime, ArrayList<IVirtualReference> currentReferences, ArrayList<ComponentResourceProxy> resourceMappings, boolean resourceMappingsChanged, List<ClasspathEntryProxy> currentClasspathEntries) {
- IProject project = component.getProject();
-
- List verifiers = DeploymentAssemblyVerifierHelper.collectAllVerifiers(project,runtime);
- if (verifiers.isEmpty()) return Status.OK_STATUS;
- MultiStatus masterStatus = new MultiStatus(ModuleCoreUIPlugin.PLUGIN_ID, IStatus.OK, Messages.DeploymentAssemblyVerifierHelper_0,null);
-
- for (int i = 0; i < verifiers.size(); i++) {
- if (!(verifiers.get(i) instanceof IConfigurationElement))
- continue;
- IDeploymentAssemblyVerifier verifier = null;
- try {
- verifier = (IDeploymentAssemblyVerifier) ((IConfigurationElement) verifiers.get(i)).createExecutableExtension(VerifierRegistryReader.VERIFIER_CLASS);
- J2EEModuleDeploymentAssemblyVerifierData data = new J2EEModuleDeploymentAssemblyVerifierData(component, runtime,currentReferences,resourceMappings,resourceMappingsChanged,currentClasspathEntries );
- IStatus verifyStatus = verifier.verify(data);
- if(verifyStatus != null && verifyStatus.isMultiStatus()) {
- masterStatus.addAll(verifyStatus);
- } else {
- masterStatus.add(verifyStatus);
- }
- } catch (Exception e) {
- ModuleCoreUIPlugin.log(e);
- continue;
- }
-
- }
- return masterStatus;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java
deleted file mode 100644
index 4c5c2f047..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.ui;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jst.j2ee.internal.J2EEPropertiesConstants;
-import org.eclipse.jst.j2ee.internal.ui.refactoring.RenameContextRootChange;
-import org.eclipse.jst.j2ee.internal.ui.refactoring.RenameContextRootRefactoringProcessor;
-import org.eclipse.jst.j2ee.internal.ui.refactoring.RenameContextRootWizard;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-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.util.ComponentUtilities;
-
-public class J2EEPropertiesPage extends PropertyPage implements J2EEPropertiesConstants {
-
- private Text contextRootNameField;
- private boolean dirty = false;
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createContents(Composite)
- */
- @Override
- protected Control createContents(Composite parent) {
- Composite c = parent;
- IProject project = getProject();
- if (project != null
- && JavaEEProjectUtilities.getJ2EEProjectType(project).equals(
- JavaEEProjectUtilities.DYNAMIC_WEB)
- || JavaEEProjectUtilities.getJ2EEProjectType(project).equals(
- JavaEEProjectUtilities.STATIC_WEB)) {
-
- c = new Composite(parent, SWT.NONE);
-
- Label contextRootLabel = new Label(c, SWT.NONE);
- contextRootLabel.setText(J2EEPropertiesConstants.WEB_CONTEXT_ROOT);
-
- contextRootNameField = new Text(c, SWT.BORDER);
- contextRootNameField.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- dirty = !contextRootNameField.getText().equals(
- ComponentUtilities.getServerContextRoot(getProject()));
- validateText();
- }
- });
- GridLayoutFactory.fillDefaults().numColumns(2).applyTo(c);
- GridDataFactory.defaultsFor(contextRootLabel).applyTo(contextRootLabel);
- GridDataFactory.defaultsFor(contextRootNameField).grab(true, false).applyTo(
- contextRootNameField);
- }
- applyDialogFont(c);
- return c;
- }
-
- @Override
- public void createControl(Composite parent) {
- super.createControl(parent);
- refresh();
- refreshApplyButton();
- }
-
- private void validateText() {
- IStatus status = RenameContextRootChange
- .validateContextRoot(contextRootNameField.getText());
- if (!status.isOK()) {
- setErrorMessage(status.getMessage());
- setValid(false);
- }
- else {
- setErrorMessage(null);
- setValid(true);
- refreshApplyButton();
- }
- }
-
- private void refreshApplyButton() {
- if (dirty) {
- if (getApplyButton() != null) {
- getApplyButton().setEnabled(true);
- }
- }
- else {
- if (getApplyButton() != null) {
- getApplyButton().setEnabled(false);
- }
- }
- }
-
- public void refresh() {
- if (contextRootNameField != null) {
- String s = ComponentUtilities.getServerContextRoot(getProject());
- if (s == null) {
- s = ""; //$NON-NLS-1$
- }
- contextRootNameField.setText(s);
- validateText();
- }
- }
-
- private IProject getProject() {
-
- Object element = getElement();
- if (element == null) {
- return null;
- }
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- return project;
- }
- return null;
-
- }
-
- private int doRefactor() {
- int id = IDialogConstants.OK_ID;
- if (dirty) {
- RenameContextRootRefactoringProcessor processor = new RenameContextRootRefactoringProcessor();
- processor.setProject(getProject());
- processor.setNewName(contextRootNameField.getText());
- RenameContextRootWizard wizard = new RenameContextRootWizard(processor,
- RefactoringWizard.DIALOG_BASED_USER_INTERFACE);
- wizard.setPrompt(false);
- RefactoringWizardOpenOperation operation = new RefactoringWizardOpenOperation(wizard);
-
- try {
- id = operation.run(getShell(), ""); //$NON-NLS-1$
- }
- catch (InterruptedException ee) {
-
- }
- if (id == IDialogConstants.OK_ID) {
- dirty = false;
- refresh();
- }
- }
-
- return id;
- }
-
- @Override
- protected void performApply() {
- doRefactor();
- }
-
- @Override
- protected void performDefaults() {
- refresh();
- }
-
- @Override
- public boolean performOk() {
- return doRefactor() == IDialogConstants.OK_ID;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEComponentDependencyContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEComponentDependencyContentProvider.java
deleted file mode 100644
index dd50b9490..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEComponentDependencyContentProvider.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package org.eclipse.jst.j2ee.internal.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathAttribute;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants.DependencyAttributeType;
-import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.ClasspathEntryProxy;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.ModuleCoreUIPlugin;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ComponentDependencyContentProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage;
-
-/**
- * Same as {@link ComponentDependencyContentProvider} except this pulls in
- * references tagged in the classpath to be pulled up by modules with ../
- *
- * @author jsholl
- *
- */
-public class JavaEEComponentDependencyContentProvider extends ComponentDependencyContentProvider {
-
- public JavaEEComponentDependencyContentProvider(AddModuleDependenciesPropertiesPage addModuleDependenciesPropertiesPage) {
- super(addModuleDependenciesPropertiesPage);
- }
-
- public class ConsumedClasspathEntryProxy {
- public IClasspathEntry entry;
- public ConsumedClasspathEntryProxy(IClasspathEntry entry){
- this.entry = entry;
- }
- }
-
- protected List<ClasspathEntryProxy> classpathEntries = null;
-
- public void setClasspathEntries(List<ClasspathEntryProxy> classpathEntries) {
- this.classpathEntries = classpathEntries;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- @SuppressWarnings("restriction")
- Object[] superElements = super.getElements(inputElement);
- List<Object> elements = new ArrayList<Object>();
- for (Object obj : superElements) {
- elements.add(obj);
- }
- elements.addAll(classpathEntries);
- return elements.toArray();
- }
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- if (element instanceof ClasspathEntryProxy || element instanceof ConsumedClasspathEntryProxy) {
- IClasspathEntry classpathEntry = ((element instanceof ConsumedClasspathEntryProxy) ? ((ConsumedClasspathEntryProxy)element).entry : ((ClasspathEntryProxy) element).entry);
- if (columnIndex == AddModuleDependenciesPropertiesPage.SOURCE_COLUMN) {
- final IJavaProject jproj = JavaCore.create(getComponent().getProject());
- return AddJavaBuildPathEntriesWizardFragment.getClasspathEntryText(jproj, classpathEntry);
- } else if (columnIndex == AddModuleDependenciesPropertiesPage.DEPLOY_COLUMN) {
- IClasspathAttribute attribute = ClasspathDependencyUtil.checkForComponentDependencyAttribute(classpathEntry, DependencyAttributeType.CLASSPATH_COMPONENT_DEPENDENCY);
- if (attribute != null) {
- IPath runtimePath = new Path(attribute.getValue());
- if(runtimePath.isRoot())
- return runtimePath.toString();
- return runtimePath.makeRelative().toString();
- }
- return null;
- }
- }
- return super.getColumnText(element, columnIndex);
- }
-
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- if (element instanceof ClasspathEntryProxy || element instanceof ConsumedClasspathEntryProxy) {
- if (columnIndex == AddModuleDependenciesPropertiesPage.SOURCE_COLUMN) {
- final IJavaProject jproj = JavaCore.create(getComponent().getProject());
- IClasspathEntry classpathEntry = ((element instanceof ConsumedClasspathEntryProxy) ? ((ConsumedClasspathEntryProxy)element).entry : ((ClasspathEntryProxy) element).entry);
- return AddJavaBuildPathEntriesWizardFragment.getClasspathEntryImage(jproj, classpathEntry);
- } else if(columnIndex == AddModuleDependenciesPropertiesPage.DEPLOY_COLUMN) {
- if(element instanceof ConsumedClasspathEntryProxy){
- IClasspathEntry classpathEntry = ((ConsumedClasspathEntryProxy)element).entry;
- if(classpathEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY){
- final IJavaProject jproj = JavaCore.create(getComponent().getProject());
- return AddJavaBuildPathEntriesWizardFragment.getClasspathEntryImage(jproj, classpathEntry);
- }
- }
- return ModuleCoreUIPlugin.getInstance().getImage("folder"); //$NON-NLS-1$
- }
- }
- return super.getColumnImage(element, columnIndex);
- }
-
-
- @Override
- public boolean hasChildren(Object element) {
- Object [] children = getChildren(element);
- return children != null && children.length > 0;
- }
-
- @Override
- public Object getParent(Object element) {
- return null;
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if(parentElement instanceof IVirtualReference){
- IVirtualReference ref = (IVirtualReference)parentElement;
- IPath refRuntimePath = ref.getRuntimePath();
- IVirtualComponent comp = ref.getReferencedComponent();
- if(!comp.isBinary()){
- List <IClasspathEntry> originalClasspathEntries = J2EEModuleDependenciesPropertyPage.readRawEntries(comp);
- List <ConsumedClasspathEntryProxy> relativeClasspathEntries = new ArrayList<ConsumedClasspathEntryProxy>();
- for(IClasspathEntry classpathEntry : originalClasspathEntries){
- IClasspathAttribute attribute = ClasspathDependencyUtil.checkForComponentDependencyAttribute(classpathEntry, DependencyAttributeType.CLASSPATH_COMPONENT_DEPENDENCY);
- if (attribute != null) {
- String rawValue = attribute.getValue();
- if(rawValue.startsWith("../")){ //$NON-NLS-1$
- IPath basePath = new Path(rawValue);
- IPath path = refRuntimePath.append(basePath.removeFirstSegments(1));
- if(classpathEntry.getEntryKind() == IClasspathEntry.CPE_LIBRARY){
- path = path.append(classpathEntry.getPath().lastSegment());
- }
- IClasspathEntry relativeEntry = ClasspathDependencyUtil.modifyDependencyPath(classpathEntry, path);
- relativeClasspathEntries.add(new ConsumedClasspathEntryProxy(relativeEntry));
- }
- }
- }
- return relativeClasspathEntries.toArray();
- }
- }
- return super.getChildren(parentElement);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java
deleted file mode 100644
index e1026e787..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/JavaEEDeploymentAssemblyAdvancedSectionBuilder.java
+++ /dev/null
@@ -1,440 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-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.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.events.ExpansionAdapter;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-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.impl.TaskModel;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ResourceMappingFilterExtensionRegistry;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
-
-/**
- * This is a helper class to build and handle the logic of the "Advanced" section
- * of the Deployment Assembly page that is common to all the Java EE modules (EAR
- * project, Web project, etc.)
- *
- */
-
-public class JavaEEDeploymentAssemblyAdvancedSectionBuilder implements IJavaEEDeploymentAssemblySectionBuilder, SelectionListener {
-
- private Label defaulDDFolderLabel;
- private Combo rootSourceMappings;
-
- private IVirtualComponent rootComponent;
- private AddModuleDependenciesPropertiesPage page;
- private String currentSelectedDDFolder = null;
- private List<String> resourceMappingsList = new ArrayList<String>();
- boolean shouldDisplaySection;
-
- String folderToLook;
- String fileToLook;
- String projectType;
-
-
- public JavaEEDeploymentAssemblyAdvancedSectionBuilder(IVirtualComponent component, AddModuleDependenciesPropertiesPage page){
- rootComponent = component;
- this.page = page;
- shouldDisplaySection = !JavaEEProjectUtilities.isUtilityProject(rootComponent.getProject());
- IVirtualFolder rootFolder = rootComponent.getRootFolder();
- IPath defaultDDFolder = J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(rootFolder);
- shouldDisplaySection &= (defaultDDFolder == null);
- projectType = JavaEEProjectUtilities.getJ2EEProjectType(component.getProject());
- if (projectType.equals(IJ2EEFacetConstants.APPLICATION_CLIENT)) {
- folderToLook = J2EEConstants.META_INF;
- fileToLook = J2EEConstants.APP_CLIENT_DD_URI;
- }
- else if (projectType.equals(IJ2EEFacetConstants.JCA)) {
- folderToLook = J2EEConstants.META_INF;
- fileToLook = J2EEConstants.RAR_DD_URI;
- }
- else if (projectType.equals(IJ2EEFacetConstants.EJB)){
- folderToLook = J2EEConstants.META_INF;
- fileToLook = J2EEConstants.EJBJAR_DD_URI;
- }
- else if (projectType.equals(IJ2EEFacetConstants.DYNAMIC_WEB)) {
- folderToLook = J2EEConstants.WEB_INF;
- fileToLook = J2EEConstants.WEBAPP_DD_URI;
- }
- else if (projectType.equals(IJ2EEFacetConstants.ENTERPRISE_APPLICATION)) {
- folderToLook = J2EEConstants.META_INF;
- fileToLook = J2EEConstants.APPLICATION_DD_URI;
- }
- else if (projectType.equals(IJ2EEFacetConstants.WEBFRAGMENT)) {
- folderToLook = J2EEConstants.META_INF;
- fileToLook = J2EEConstants.WEBFRAGMENT_DD_URI;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ui.IJavaEEDeploymentAssemblySectionBuilder#buildSection(org.eclipse.swt.widgets.Composite)
- */
- public void buildSection(Composite parent){
- if (shouldDisplaySection()) {
- Composite advancedSectionComposite = createAdvancedSection(parent);
- addDefaultDeploymentDescriptorFolderFields(advancedSectionComposite);
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ui.IJavaEEDeploymentAssemblySectionBuilder#loadContents()
- */
- public void loadContents(){
- if (shouldDisplaySection()){
- loadDefaultDeploymentDescriptorFolderContents();
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.ui.IJavaEEDeploymentAssemblySectionBuilder#saveContents()
- */
- public boolean saveContents(){
- boolean success = true;
- if (shouldDisplaySection()){
- success = saveDefaultDeploymentDescriptorFolderContents();
- loadContents();
- }
- return success;
- }
-
-
- private void loadDefaultDeploymentDescriptorFolderContents(){
- resourceMappingsList.clear();
- // First, retrieve all the mappings to root. Assume there are no duplicated mappings.
- IPath[] allRootMappings = findAllRootMappings();
- // Now, see if any of that is tagged as default root mapping
- IVirtualFolder rootFolder = rootComponent.getRootFolder();
- IPath defaultDDFolder = J2EEModuleVirtualComponent.getDefaultDeploymentDescriptorFolder(rootFolder);
-
- currentSelectedDDFolder = defaultDDFolder == null?null:defaultDDFolder.toString();
-
- for (IPath mapping:allRootMappings){
- resourceMappingsList.add(mapping.toString());
- }
-
- updateSourceMappingsCombo(currentSelectedDDFolder, resourceMappingsList);
- }
-
-
- private List<String> filterMappings(List <String> mappings){
- Set<String> mappingWithDD = new HashSet<String>();
- Set<String> mappingWithFolder = new HashSet<String>();
-
- IProject project = this.rootComponent.getProject();
- for (String mapping :mappings){
- if (fileToLook != null && !fileToLook.equals("")){ //$NON-NLS-1$
- IFile ddFile = project.getFile(new Path(mapping).addTrailingSeparator() + fileToLook);
- if (ddFile != null && ddFile.exists()){
- mappingWithDD.add(mapping);
- }
- }
- if (folderToLook != null && !folderToLook.equals("")){ //$NON-NLS-1$
- IFolder ddFolder = project.getFolder(new Path(mapping).addTrailingSeparator() + folderToLook);
- if (ddFolder != null && ddFolder.exists()){
- mappingWithFolder.add(mapping);
- }
- }
- }
- if (!mappingWithDD.isEmpty()){
- // return only the mappings that contain a DD file.
- return new ArrayList<String>(mappingWithDD);
- }
- return new ArrayList<String>(mappingWithFolder);
- }
-
- private void updateSourceMappingsCombo(String selectedDDFolder, List<String> resourceMappings) {
-
- List<String> filteredMappings = filterMappings(resourceMappings);
-
- ArrayList<String> tmpList = new ArrayList<String>(filteredMappings);
- if (selectedDDFolder == null){
- tmpList.add(0, Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER);
- }
- rootSourceMappings.setItems(tmpList.toArray(new String[]{}));
- if (selectedDDFolder == null){
- //No tagged source folder, so select "None"
- rootSourceMappings.select(tmpList.indexOf(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER));
- }
- else {
- rootSourceMappings.select(tmpList.indexOf(selectedDDFolder.toString()));
- }
- }
-
- private boolean saveDefaultDeploymentDescriptorFolderContents(){
- if (currentSelectedDDFolder != null){
- IVirtualFolder rootFolder = rootComponent.getRootFolder();
- J2EEModuleVirtualComponent.setDefaultDeploymentDescriptorFolder(rootFolder, new Path(currentSelectedDDFolder), null);
- }
- return true;
- }
-
- private IPath[] findAllRootMappings(){
-
- StructureEdit structureEdit = null;
- try {
- structureEdit = StructureEdit.getStructureEditForRead(rootComponent.getProject());
- WorkbenchComponent component = structureEdit.getComponent();
- Object[] arr = component.getResources().toArray();
- Set <IPath> result = new LinkedHashSet<IPath>();
- for( int i = 0; i < arr.length; i++ ){
- ComponentResource resource = (ComponentResource)arr[i];
- if (resource.getRuntimePath().equals(IVirtualComponent.ROOT) && !ResourceMappingFilterExtensionRegistry.shouldFilter(resource.getSourcePath())){
- result.add(((ComponentResource)arr[i]).getSourcePath());
- }
- }
- return result.toArray(new IPath[]{});
- } catch (NullPointerException e) {
- J2EEUIPlugin.logError(e);
- } finally {
- if(structureEdit != null)
- structureEdit.dispose();
- }
- return new IPath[]{};
- }
-
- protected boolean shouldDisplaySection(){
- return shouldDisplaySection;
- }
-
- /*
- * Creates the Advanced section. Returns the composite to which all the other
- * widgets should be added.
- */
- private Composite createAdvancedSection(Composite parent){
-
- // Build the expandable composite
- ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE
- | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.COMPACT);
- excomposite.setText(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED);
- excomposite.setExpanded(false);
- excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1));
- excomposite.addExpansionListener(new ExpansionAdapter() {
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- expandedStateChanged((ExpandableComposite) e.getSource());
- }
- });
-
- // Build the composite has the contents of the expandable widget
- Composite innerComposite = new Composite(excomposite, SWT.NONE);
- excomposite.setClient(innerComposite);
- GridLayout gl = new GridLayout(2, false);
- gl.marginHeight = 0;
- gl.marginWidth = 0;
- innerComposite.setLayout(gl);
- return innerComposite;
- }
-
- private void addDefaultDeploymentDescriptorFolderFields(Composite parent) {
- defaulDDFolderLabel = new Label(parent, SWT.NONE);
- defaulDDFolderLabel.setText(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_DDFOLDER);
- rootSourceMappings = new Combo(parent, SWT.READ_ONLY);
- rootSourceMappings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- rootSourceMappings.addSelectionListener(this);
- }
-
-
- private final void expandedStateChanged(ExpandableComposite expandable) {
- // Get the scrolled composite of the deployment assembly page, and the child
- // composite of this scrolled composite that contains the expandable composite
- Composite[] composites = getCompositesToResize(expandable);
- ScrolledComposite parentScrolledComposite = (ScrolledComposite)composites[0];
- Composite childComposite = composites[1];
- if (parentScrolledComposite != null && childComposite != null) {
- parentScrolledComposite.layout(true, true);
- // Resize the scrolled composite so the scroll bars are shown if necessary
- parentScrolledComposite.setMinSize(childComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true));
-
- }
- }
-
- /*
- * Returns an array of composites used to resize the deployment assembly page
- * when the advanced section is expanded.
- * The first element is the scrolled composite (instance of ScrolledComposite) of the
- * deployment assembly page
- * The second element is the composite with the contents of the deployment assembly page
- */
- private Composite[] getCompositesToResize(Control control) {
- Control parent = control.getParent();
- Control previousParent = null;
- Composite[] result = new Composite[2];
- while (!(parent instanceof ScrolledComposite) && parent != null) {
- previousParent = parent;
- parent = parent.getParent();
- }
- if (parent instanceof ScrolledComposite) {
- result[0] = (ScrolledComposite)parent;
- }
- if (previousParent instanceof Composite) {
- result[1] = (Composite)previousParent;
- }
- return result;
- }
-
- public void directiveAdded(Object element) {
- if (shouldDisplaySection()){
- if (!(element instanceof TaskModel))
- return;
- TaskModel model = (TaskModel)element;
- final Object folderMapping = model.getObject(IReferenceWizardConstants.FOLDER_MAPPING);
- if( folderMapping != null && folderMapping instanceof ComponentResourceProxy){
- ComponentResourceProxy proxy = (ComponentResourceProxy)folderMapping;
- //if ((proxy.runtimePath.equals(IVirtualComponent.ROOT) && !resourceMappingsList.contains(proxy.source.toString()))){
- if ((proxy.runtimePath.equals(IVirtualComponent.ROOT))){
- resourceMappingsList.add(proxy.source.toString());
- updateSourceMappingsCombo(currentSelectedDDFolder, resourceMappingsList);
- }
- }
- }
- }
-
- public void directiveRemoved(Object element) {
- if (shouldDisplaySection()){
- if( element instanceof ComponentResourceProxy){
- ComponentResourceProxy proxy = (ComponentResourceProxy)element;
- if (proxy.runtimePath.equals(IVirtualComponent.ROOT)){
- String proxySource = proxy.source.toString();
- if (resourceMappingsList.contains(proxySource)){
- resourceMappingsList.remove(proxySource);
- if (proxySource.equals(currentSelectedDDFolder)){
- currentSelectedDDFolder = null;
- }
- updateSourceMappingsCombo(currentSelectedDDFolder, resourceMappingsList);
- }
- }
- }
- }
- }
-
- public void widgetDefaultSelected(SelectionEvent event) {
- // Intentionally left blank
-
- }
-
- public void widgetSelected(SelectionEvent event) {
- if (event.getSource() == rootSourceMappings){
- String tmp = rootSourceMappings.getText();
- if (tmp != null){
- if (tmp.equals(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER) && currentSelectedDDFolder == null){
- // Do nothing, because the value did not change.
- return;
- }
- if (tmp.equals(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER)){
- // This means the user selected None, but there was already a value selected (this should not happen)
- J2EEUIPlugin.logWarning("Unexpected condition when validating deployment descriptor folder"); //$NON-NLS-1$
- return;
- }
- // We now the user selected something different from None, so remove this item so it cannot be selected again
- if (rootSourceMappings.indexOf(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER) != -1)
- rootSourceMappings.remove(Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER);
- // Only refresh if changing from None to a folder
- boolean shouldRefresh = (currentSelectedDDFolder == null);
- if (!tmp.equals(currentSelectedDDFolder)){
- currentSelectedDDFolder = tmp;
- if (shouldRefresh)
- page.refresh();
- }
- }
- }
-
- }
-
- public IStatus validate(IStatus currentStatus) {
- IStatus status = currentStatus!=null?currentStatus:Status.OK_STATUS;
- if (shouldDisplaySection()){
- if (currentSelectedDDFolder == null && resourceMappingsList.size()>1){
- // Only show the warning if none of the root mappings is selected and there are more than 1 root mapping
- int severity = Status.WARNING;
- status = appendStatusMessage(status, Messages.J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDERWARNING, severity);
- }
- }
- return status;
- }
- private IStatus appendStatusMessage(IStatus existingStatus, String message, int severity) {
- MultiStatus multiStatus;
- IStatus newStatus = new Status(severity, J2EEUIPlugin.PLUGIN_ID, message);
- int newSeverity = severity;
- if(existingStatus.getSeverity() > severity)
- newSeverity = existingStatus.getSeverity();
- if(existingStatus instanceof MultiStatus){
- multiStatus = (MultiStatus)existingStatus;
- multiStatus.merge(newStatus);
- } else {
- if(!existingStatus.isMultiStatus() && existingStatus.isOK()) {
- return newStatus;
- }
- IStatus [] children = new IStatus [] {existingStatus, newStatus};
- multiStatus = new MultiStatus(J2EEUIPlugin.PLUGIN_ID, newSeverity, children, null, null);
- }
- return multiStatus;
- }
-
- public void componentResourceModified(ComponentResourceProxy originalResource, ComponentResourceProxy modifiedResource) {
- if (shouldDisplaySection()){
- // We are interested only in two cases:
- // 1. When the deploy path changes from / to any other thing...
- if (originalResource.runtimePath.isRoot() && !modifiedResource.runtimePath.isRoot()){
- resourceMappingsList.remove(originalResource.source.toString());
- if (originalResource.source.toString().equals(currentSelectedDDFolder)){
- currentSelectedDDFolder = null;
- }
- updateSourceMappingsCombo(currentSelectedDDFolder, resourceMappingsList);
- page.refresh();
- }
- // 2. When the deploy path changes from any thing to /
- else if (!originalResource.runtimePath.isRoot() && modifiedResource.runtimePath.isRoot()){
- resourceMappingsList.add(originalResource.source.toString());
- updateSourceMappingsCombo(currentSelectedDDFolder, resourceMappingsList);
- page.refresh();
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java
deleted file mode 100644
index 9e1b48577..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/Messages.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.jst.j2ee.internal.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.ui.messages"; //$NON-NLS-1$
- public static String J2EEDependencyPageProvider_0;
- public static String J2EEDependencyPageProvider_1;
- public static String J2EEDependencyPageProvider_2;
- public static String J2EEDependencyPageProvider_3;
- public static String J2EEDependencyPageProvider_4;
- public static String J2EEDependencyPageProvider_5;
- public static String J2EEModuleDependenciesPropertyPage_0;
- public static String J2EEModuleDependenciesPropertyPage_1;
- public static String J2EEModuleDependenciesPropertyPage_2;
- public static String J2EEModuleDependenciesPropertyPage_3;
- public static String J2EEModuleDependenciesPropertyPage_4;
- public static String J2EEModuleDependenciesPropertyPage_5;
- public static String J2EEModuleDependenciesPropertyPage_6;
- public static String J2EEModuleDependenciesPropertyPage_ADVANCED;
- public static String J2EEModuleDependenciesPropertyPage_ADVANCED_DDFOLDER;
- public static String J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER;
- public static String J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDERWARNING;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java
deleted file mode 100644
index 567b4b8d9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2010, 2008 Oracle
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- * Paul Fullbright - [324111] Need better enablement behavior for WTP library providers
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.ui;
-
-import static org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_ENABLED;
-import static org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED;
-
-import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener;
-import org.eclipse.jst.common.project.facet.ui.libprov.osgi.OsgiBundlesLibraryProviderInstallPanel;
-import org.eclipse.jst.j2ee.internal.common.classpath.WtpOsgiBundlesLibraryProviderInstallOperationConfig;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public class WtpOsgiBundlesLibraryProviderInstallPanel
-
- extends OsgiBundlesLibraryProviderInstallPanel
-
-{
- @Override
- protected Control createFooter( final Composite composite )
- {
- final WtpOsgiBundlesLibraryProviderInstallOperationConfig cfg
- = (WtpOsgiBundlesLibraryProviderInstallOperationConfig) getOperationConfig();
-
- final Button copyOnPublishCheckBox = new Button( composite, SWT.CHECK );
- copyOnPublishCheckBox.setText( Resources.copyLibraries );
- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() );
- copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() );
-
- copyOnPublishCheckBox.addSelectionListener
- (
- new SelectionAdapter()
- {
- @Override
- public void widgetSelected( final SelectionEvent event )
- {
- cfg.setIncludeWithApplicationEnabled( copyOnPublishCheckBox.getSelection() );
- }
- }
- );
-
- final IPropertyChangeListener listener = new IPropertyChangeListener()
- {
- public void propertyChanged( final String property,
- final Object oldValue,
- final Object newValue )
- {
- if( PROP_INCLUDE_WITH_APPLICATION_ENABLED.equals( property ) )
- {
- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() );
- }
- else if( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED.equals( property ) )
- {
- copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() );
- }
- }
- };
-
- cfg.addListener( listener, PROP_INCLUDE_WITH_APPLICATION_ENABLED, PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED );
-
- copyOnPublishCheckBox.addDisposeListener
- (
- new DisposeListener()
- {
- public void widgetDisposed( final DisposeEvent event )
- {
- cfg.removeListener( listener );
- }
- }
- );
-
- return copyOnPublishCheckBox;
- }
-
- private static final class Resources extends NLS
- {
- public static String copyLibraries;
-
- static
- {
- initializeMessages( WtpOsgiBundlesLibraryProviderInstallPanel.class.getName(), Resources.class );
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.properties
deleted file mode 100644
index fc11daf61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpOsgiBundlesLibraryProviderInstallPanel.properties
+++ /dev/null
@@ -1 +0,0 @@
-copyLibraries = &Include libraries with this application
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java
deleted file mode 100644
index 380355aa8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2010, 2008 Oracle
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial implementation and ongoing maintenance
- * Paul Fullbright - [324111] Need better enablement behavior for WTP library providers
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.internal.ui;
-
-import static org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_ENABLED;
-import static org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig.PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED;
-
-import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener;
-import org.eclipse.jst.common.project.facet.ui.libprov.user.UserLibraryProviderInstallPanel;
-import org.eclipse.jst.j2ee.internal.common.classpath.WtpUserLibraryProviderInstallOperationConfig;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
- */
-
-public class WtpUserLibraryProviderInstallPanel
-
- extends UserLibraryProviderInstallPanel
-
-{
- @Override
- protected Control createFooter( final Composite parent )
- {
- final WtpUserLibraryProviderInstallOperationConfig cfg
- = (WtpUserLibraryProviderInstallOperationConfig) getOperationConfig();
-
- final Button copyOnPublishCheckBox = new Button( parent, SWT.CHECK );
- copyOnPublishCheckBox.setText( Resources.copyLibraries );
- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() );
- copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() );
-
- copyOnPublishCheckBox.addSelectionListener
- (
- new SelectionAdapter()
- {
- @Override
- public void widgetSelected( final SelectionEvent event )
- {
- cfg.setIncludeWithApplicationEnabled( copyOnPublishCheckBox.getSelection() );
- }
- }
- );
-
- final IPropertyChangeListener listener = new IPropertyChangeListener()
- {
- public void propertyChanged( final String property,
- final Object oldValue,
- final Object newValue )
- {
- if( PROP_INCLUDE_WITH_APPLICATION_ENABLED.equals( property ) )
- {
- copyOnPublishCheckBox.setSelection( cfg.isIncludeWithApplicationEnabled() );
- }
- else if( PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED.equals( property ) )
- {
- copyOnPublishCheckBox.setEnabled( cfg.isIncludeWithApplicationSettingEnabled() );
- }
- }
- };
-
- cfg.addListener( listener, PROP_INCLUDE_WITH_APPLICATION_ENABLED, PROP_INCLUDE_WITH_APPLICATION_SETTING_ENABLED );
-
- copyOnPublishCheckBox.addDisposeListener
- (
- new DisposeListener()
- {
- public void widgetDisposed( final DisposeEvent event )
- {
- cfg.removeListener( listener );
- }
- }
- );
-
- return copyOnPublishCheckBox;
- }
-
- private static final class Resources extends NLS
- {
- public static String copyLibraries;
-
- static
- {
- initializeMessages( WtpUserLibraryProviderInstallPanel.class.getName(), Resources.class );
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.properties
deleted file mode 100644
index fc11daf61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/WtpUserLibraryProviderInstallPanel.properties
+++ /dev/null
@@ -1 +0,0 @@
-copyLibraries = &Include libraries with this application
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties
deleted file mode 100644
index 87c77fd8f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/messages.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-J2EEDependencyPageProvider_0=Web Deployment Assembly
-J2EEDependencyPageProvider_1=EJB Deployment Assembly
-J2EEDependencyPageProvider_2=Application Client Deployment Assembly
-J2EEDependencyPageProvider_3=Connector Deployment Assembly
-J2EEDependencyPageProvider_4=Deplo&yment Assembly
-J2EEDependencyPageProvider_5=&Manifest Entries
-J2EEModuleDependenciesPropertyPage_0=Add EJB Module Folder...
-J2EEModuleDependenciesPropertyPage_1=Add App Client Module Folder...
-J2EEModuleDependenciesPropertyPage_2=Add Connector Module Folder...
-J2EEModuleDependenciesPropertyPage_3=Assemble packaging structure for this EJB project
-J2EEModuleDependenciesPropertyPage_4=Assemble packaging structure for this Application Client project
-J2EEModuleDependenciesPropertyPage_5=Assemble packaging structure for this Connector project
-J2EEModuleDependenciesPropertyPage_6=Derived References
-J2EEModuleDependenciesPropertyPage_ADVANCED=Advanced
-J2EEModuleDependenciesPropertyPage_ADVANCED_DDFOLDER=Folder for deplo&yment descriptor:
-J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDER=(None)
-J2EEModuleDependenciesPropertyPage_ADVANCED_NODEFAULTDDFOLDERWARNING=A deployment descriptor folder should be selected. See the Advanced section.
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/ClasspathDependencyComponentLabelProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/ClasspathDependencyComponentLabelProvider.java
deleted file mode 100644
index d963d98c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/ClasspathDependencyComponentLabelProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.jst.j2ee.internal.ui.preferences;
-
-import org.eclipse.jst.j2ee.internal.modulecore.util.DummyClasspathDependencyContainerVirtualComponent;
-import org.eclipse.jst.j2ee.internal.wizard.AvailableJarsProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.IVirtualComponentLabelProvider;
-
-public class ClasspathDependencyComponentLabelProvider implements
- IVirtualComponentLabelProvider {
-
- public ClasspathDependencyComponentLabelProvider() {
- // Do nothing
- }
-
- public boolean canHandle(IVirtualComponent component) {
- if( component instanceof DummyClasspathDependencyContainerVirtualComponent)
- return true;
- return false;
- }
-
- public String getSourceText(IVirtualComponent component) {
- return Messages.ChildClasspathDependencyDescription;
- }
-
- public Image getSourceImage(IVirtualComponent component) {
- return AvailableJarsProvider.getClasspathDependencyImage();
- }
- public void dispose() {
- // Do nothing
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/CustomEARProjectReferenceWizardFragment.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/CustomEARProjectReferenceWizardFragment.java
deleted file mode 100644
index 07ec2b025..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/CustomEARProjectReferenceWizardFragment.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2009 IBM
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Aidyl Kareh - initial implementation
- ******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.preferences;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualReference;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ProjectReferenceWizardFragment;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
-
-public class CustomEARProjectReferenceWizardFragment extends ProjectReferenceWizardFragment {
-
- public CustomEARProjectReferenceWizardFragment() {
- super();
- }
-
- @Override
- public void performFinish(IProgressMonitor monitor) throws CoreException {
- super.performFinish(monitor);
- VirtualReference[] refs = (VirtualReference []) getTaskModel().getObject(IReferenceWizardConstants.FINAL_REFERENCE);
- for (int i = 0; i < refs.length; i++) {
- IProject proj = refs[i].getReferencedComponent().getProject();
- if (JavaEEProjectUtilities.isApplicationClientProject(proj) ||
- JavaEEProjectUtilities.isEJBProject(proj) ||
- JavaEEProjectUtilities.isDynamicWebProject(proj) ||
- JavaEEProjectUtilities.isJCAProject(proj)) {
- refs[i].setRuntimePath(new Path("/").makeAbsolute()); //$NON-NLS-1$
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependenciesPropertyPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependenciesPropertyPage.java
deleted file mode 100644
index f08563f6e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependenciesPropertyPage.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2009, 2011 Red Hat, IBM
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Rob Stryker - initial implementation and ongoing maintenance
- * Chuck Bridgham - additional support
- * Roberto Sanchez - Add Advanced section
- ******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.preferences;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.fieldassist.ControlDecoration;
-import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
-import org.eclipse.jst.j2ee.application.internal.operations.AddReferenceToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.RemoveReferenceFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEModuleHandler;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.ui.IJavaEEDeploymentAssemblySectionBuilder;
-import org.eclipse.jst.j2ee.internal.ui.J2EEModuleDependenciesPropertyPage.ClasspathEntryProxy;
-import org.eclipse.jst.j2ee.internal.ui.JavaEEComponentDependencyContentProvider;
-import org.eclipse.jst.j2ee.internal.ui.JavaEEDeploymentAssemblyAdvancedSectionBuilder;
-import org.eclipse.jst.j2ee.model.IEARModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.javaee.application.Application;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.wst.common.componentcore.internal.IModuleHandler;
-import org.eclipse.wst.common.componentcore.internal.impl.TaskModel;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.ComponentDependencyContentProvider;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.DependencyPageExtensionManager;
-import org.eclipse.wst.common.componentcore.ui.internal.propertypage.DependencyPageExtensionManager.ReferenceExtension;
-import org.eclipse.wst.common.componentcore.ui.internal.taskwizard.TaskWizard;
-import org.eclipse.wst.common.componentcore.ui.propertypage.AddModuleDependenciesPropertiesPage;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IReferenceWizardConstants.ProjectConverterOperationProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-public class EarModuleDependenciesPropertyPage extends
- AddModuleDependenciesPropertiesPage {
- private String libDir = null;
- private Text libDirText;
- private ControlDecoration libDirTextErrorDecoration = null;
- private static String earDefaultLirDir = new Path(J2EEConstants.EAR_DEFAULT_LIB_DIR).makeRelative().toString();
- boolean previousLibDirIsValid = true;
- private IJavaEEDeploymentAssemblySectionBuilder advancedHelper;
-
- public EarModuleDependenciesPropertyPage(IProject project,
- ModuleAssemblyRootPage page) {
- super(project, page);
- advancedHelper = getAdvancedSectionBuilder();
- }
-
- @Override
- protected void createTableComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridData gData = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(gData);
- fillTableComposite(composite);
- if(JavaEEProjectUtilities.isJEEComponent(rootComponent, JavaEEProjectUtilities.DD_VERSION) && JavaEEProjectUtilities.isJEEComponent(rootComponent, JavaEEProjectUtilities.FACET_VERSION))
- addLibDirComposite(composite);
- addAdvancedComposite(composite);
- }
-
- private String loadLibDirString() {
- return EarUtilities.getEARLibDir(rootComponent);
- }
-
- protected void addLibDirComposite(Composite parent) {
- libDir = loadLibDirString();
- if(libDir != null) {
- Composite c = new Composite(parent, SWT.NONE);
- GridData mainData = new GridData(GridData.FILL_HORIZONTAL);
- c.setLayoutData(mainData);
-
- GridLayout gl = new GridLayout(2,false);
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- c.setLayout(gl);
- Label l = new Label(c, SWT.NONE);
- l.setText(Messages.EarModuleDependenciesPropertyPage_LIBDIR);
- libDirText = new Text(c, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
- libDirText.setText(libDir);
- libDirText.setLayoutData(gd);
- libDirTextErrorDecoration = new ControlDecoration(libDirText, SWT.TOP | SWT.LEAD);
- libDirTextErrorDecoration.hide();
- libDirText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- libDirTextModified();
- } });
- new Label(parent, SWT.NONE); //Place holder to fill the second column
- }
- }
-
- protected void libDirTextModified() {
- boolean refresh = mustRefreshLibDirValidationMessages(libDir, libDirText.getText());
- libDir = libDirText.getText();
- if(refresh)
- propPage.refreshProblemsView();
- }
-
- protected boolean mustRefreshLibDirValidationMessages(String oldLibDir, String newLibDir) {
- boolean newIsValid = isValidLibDir(newLibDir);
- boolean newIsEmpty = (newLibDir != null && newLibDir.trim().length() == 0);
- // Both are valid; no need to refresh
- if(previousLibDirIsValid && newIsValid && !newIsEmpty)
- return false;
- boolean oldIsValid = isValidLibDir(oldLibDir);
- boolean oldIsEmpty = (oldLibDir != null && oldLibDir.trim().length() == 0);
- // Both are invalid and no change in reason for being invalid; no need to refresh
- if(!previousLibDirIsValid && oldIsValid == newIsValid && oldIsEmpty == newIsEmpty)
- return false;
- return true;
- }
-
- protected void validatelibDirText() {
- if(libDirTextErrorDecoration != null) {
- if(!isValidLibDir(libDir)) {
- libDirTextErrorDecoration.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR).getImage());
- libDirTextErrorDecoration.setDescriptionText(Messages.EarModuleDependenciesPropertyPage_ERROR_INVALID_LIBDIR);
- libDirTextErrorDecoration.show();
- previousLibDirIsValid = false;
- }else if(libDir != null && libDir.trim().length() == 0){
- libDirTextErrorDecoration.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage());
- libDirTextErrorDecoration.setDescriptionText(Messages.EarModuleDependenciesPropertyPage_WARNING_EMPTY_LIB_DIR);
- libDirTextErrorDecoration.show();
- previousLibDirIsValid = false;
- } else if(!previousLibDirIsValid){
- previousLibDirIsValid = true;
- libDirTextErrorDecoration.setImage(null);
- libDirTextErrorDecoration.setDescriptionText(null);
- libDirTextErrorDecoration.hide();
- }
- }
- }
-
- private boolean isValidLibDir(String libraryDirectory) {
- if(libraryDirectory != null && libraryDirectory.trim().length() > 0 && new Path(libraryDirectory.trim()).isAbsolute()) {
- return false;
- }
- return true;
- }
-
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- @Override
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- @Override
- protected void handleRemoved(ArrayList<IVirtualReference> removed) {
- super.handleRemoved(removed);
- boolean binariesRemoved = false;
- for(IVirtualReference ref : removed){
- IVirtualComponent comp = ref.getReferencedComponent();
- if(comp.isBinary()){
- binariesRemoved = true;
- break;
- }
- }
- if(binariesRemoved){
- JavaEEBinaryComponentHelper.clearDisconnectedArchivesInEAR(rootComponent);
- }
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- @Override
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualReference component) {
- return new AddReferenceToEnterpriseApplicationDataModelProvider();
- }
-
- @Override
- protected String getModuleAssemblyRootPageDescription() {
- return Messages.EarModuleDependenciesPropertyPage_3;
- }
-
- @Override
- protected IDataModelProvider getRemoveReferenceDataModelProvider(IVirtualReference component) {
- return new RemoveReferenceFromEnterpriseApplicationDataModelProvider();
- }
-
- @Override
- protected void filterReferenceTypes( final List<ReferenceExtension> extensions )
- {
- // Replace the default one with our own custom one, in class CustomEARProjectReferenceWizardFragment
-
- for( int i = 0, n = extensions.size(); i < n; i++ )
- {
- final ReferenceExtension ext = extensions.get( i );
-
- if( ext.getId().equals( "org.eclipse.wst.common.componentcore.ui.newProjectReference" ) ) //$NON-NLS-1$
- {
- extensions.set( i, DependencyPageExtensionManager.getManager().findReferenceExtension( "org.eclipse.jst.j2ee.internal.ui.preferences.CustomEARProjectReferenceWizardFragment" ) ); //$NON-NLS-1$
- }
- }
- }
-
- protected void createDD(IProgressMonitor monitor) {
- if( rootComponent != null ){
- IDataModelOperation op = generateEARDDOperation();
- try {
- op.execute(monitor, null);
- } catch (ExecutionException e) {
- J2EEUIPlugin.logError(e);
- }
- }
- }
-
- @Override
- public void handleEvent(Event event) {
- super.handleEvent(event);
- }
-
- @Override
- public boolean performOk() {
- boolean result = super.performOk();
- if(JavaEEProjectUtilities.isJEEComponent(rootComponent, JavaEEProjectUtilities.DD_VERSION) && JavaEEProjectUtilities.isJEEComponent(rootComponent, JavaEEProjectUtilities.FACET_VERSION) && libDir != null)
- updateLibDir();
- if (advancedHelper != null)
- result = result & advancedHelper.saveContents();
- return result;
- }
-
- private void updateLibDir() {
- if (!libDir.equals(earDefaultLirDir)) {
- IVirtualFile vFile = rootComponent.getRootFolder().getFile(new Path(J2EEConstants.APPLICATION_DD_URI));
- if (!vFile.exists()) {
- if (!MessageDialog.openQuestion(null,
- J2EEUIMessages.getResourceString(J2EEUIMessages.NO_DD_MSG_TITLE),
- J2EEUIMessages.getResourceString(J2EEUIMessages.GEN_DD_QUESTION)))
- return;
- createDD(new NullProgressMonitor());
- }
- }
-
- final IEARModelProvider earModel = (IEARModelProvider)ModelProviderManager.getModelProvider(project);
- Application app = (Application)earModel.getModelObject();
- String oldLibDir = app.getLibraryDirectory();
- if (libDir.equals(earDefaultLirDir)) {
- if(oldLibDir != null) {
- earModel.modify(new Runnable() {
- public void run() {
- Application app2 = (Application)earModel.getModelObject();
- app2.setLibraryDirectory(null);
- }}, null);
- }
- } else if ((oldLibDir != null && !oldLibDir.equals(libDir)) || oldLibDir == null) {
- earModel.modify(new Runnable() {
- public void run() {
- Application app2 = (Application)earModel.getModelObject();
- app2.setLibraryDirectory(libDir);
- }}, null);
- }
- }
-
- @Override
- protected void setCustomReferenceWizardProperties(TaskModel model) {
- model.putObject(IReferenceWizardConstants.DEFAULT_LIBRARY_LOCATION, libDir);
- model.putObject(IReferenceWizardConstants.PROJECT_CONVERTER_OPERATION_PROVIDER, getConverterProvider());
- }
-
- public ProjectConverterOperationProvider getConverterProvider() {
- return new ProjectConverterOperationProvider() {
- public IDataModelOperation getConversionOperation(IProject project) {
- return J2EEProjectUtilities.createFlexJavaProjectForProjectOperation(project);
- }
- };
- }
-
- @Override
- protected IModuleHandler getModuleHandler() {
- if(moduleHandler == null)
- moduleHandler = new JavaEEModuleHandler();
- return moduleHandler;
- }
-
- @Override
- protected ComponentDependencyContentProvider createProvider() {
- JavaEEComponentDependencyContentProvider provider = new JavaEEComponentDependencyContentProvider(this);
- provider.setClasspathEntries(new ArrayList<ClasspathEntryProxy>());
- return provider;
- }
-
- @Override
- protected boolean canRemove(Object selectedObject) {
- return super.canRemove(selectedObject) && !(selectedObject instanceof JavaEEComponentDependencyContentProvider.ConsumedClasspathEntryProxy);
- }
-
- @Override
- protected void remove(Object selectedItem) {
- super.remove(selectedItem);
- advancedHelper.directiveRemoved(selectedItem);
- }
-
- @Override
- public IStatus validate() {
- IStatus status = super.validate();
- validatelibDirText();
- if(libDirTextErrorDecoration != null && libDirTextErrorDecoration.getImage() != null) {
- int severity = Status.ERROR;
- if(libDirTextErrorDecoration.getImage().equals(FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING).getImage()))
- severity = Status.WARNING;
- status = appendStatusMessage(status, libDirTextErrorDecoration.getDescriptionText(), severity);
- }
- status = advancedHelper.validate(status);
- return status;
- }
-
- @Override
- public void performDefaults() {
- libDir = loadLibDirString();
- if(libDir != null)
- libDirText.setText(libDir);
- if (advancedHelper != null)
- advancedHelper.loadContents();
- super.performDefaults();
- }
-
- private IStatus appendStatusMessage(IStatus existingStatus, String message, int severity) {
- MultiStatus multiStatus;
- IStatus newStatus = new Status(severity, J2EEUIPlugin.PLUGIN_ID, message);
- int newSeverity = severity;
- if(existingStatus.getSeverity() > severity)
- newSeverity = existingStatus.getSeverity();
- if(existingStatus instanceof MultiStatus){
- multiStatus = (MultiStatus)existingStatus;
- multiStatus.merge(newStatus);
- } else {
- if(!existingStatus.isMultiStatus() && existingStatus.isOK()) {
- return newStatus;
- }
- IStatus [] children = new IStatus [] {existingStatus, newStatus};
- multiStatus = new MultiStatus(J2EEUIPlugin.PLUGIN_ID, newSeverity, children, null, null);
- }
- return multiStatus;
- }
-
- @Override
- protected void handleAddDirective( final TaskWizard wizard )
- {
- final Object folderMapping = wizard.getTaskModel().getObject(IReferenceWizardConstants.FOLDER_MAPPING);
-
- if( folderMapping != null && folderMapping instanceof ComponentResourceProxy || libDir == null)
- {
- super.handleAddDirective(wizard);
- }
- else
- {
- Object reference = wizard.getTaskModel().getObject(IReferenceWizardConstants.FINAL_REFERENCE);
-
- if( reference != null )
- {
- IVirtualReference[] referenceArray = reference instanceof IVirtualReference ?
- new IVirtualReference[] { (IVirtualReference)reference } :
- (IVirtualReference[])reference;
- for(int i = 0; i < referenceArray.length; i++) {
- IVirtualComponent component = referenceArray[i].getReferencedComponent();
- if(component instanceof VirtualArchiveComponent) {
- JavaEEQuickPeek qp = JavaEEBinaryComponentHelper.getJavaEEQuickPeek(component);
- switch (qp.getType()) {
- case JavaEEQuickPeek.EJB_TYPE:
- case JavaEEQuickPeek.WEB_TYPE:
- case JavaEEQuickPeek.APPLICATION_CLIENT_TYPE:
- case JavaEEQuickPeek.CONNECTOR_TYPE:
- referenceArray[i].setRuntimePath(new Path("/")); //$NON-NLS-1$
- }
- }
- currentReferences.add(referenceArray[i]);
- }
- }
- }
- advancedHelper.directiveAdded(wizard.getTaskModel());
- }
-
- protected void addAdvancedComposite(Composite parent) {
- if (advancedHelper != null) {
- advancedHelper.buildSection(parent);
- advancedHelper.loadContents();
- }
- }
-
- protected IJavaEEDeploymentAssemblySectionBuilder getAdvancedSectionBuilder(){
- if (advancedHelper == null){
- advancedHelper = new JavaEEDeploymentAssemblyAdvancedSectionBuilder(rootComponent, this);
- }
- return advancedHelper;
- }
-
- @Override
- protected RuntimePathCellModifier getRuntimePathCellModifier() {
- return new AddModuleDependenciesPropertiesPage.RuntimePathCellModifier(){
- @Override
- public void modify(Object element, String property, Object value) {
- ComponentResourceProxy originalResource = null;
- ComponentResourceProxy modifiedResource = null;
- if (property.equals(DEPLOY_PATH_PROPERTY)) {
- TreeItem item = (TreeItem) element;
- if( item.getData() instanceof ComponentResourceProxy) {
- modifiedResource = (ComponentResourceProxy)item.getData();
- originalResource = new ComponentResourceProxy(modifiedResource.source, modifiedResource.runtimePath);
- }
- }
- super.modify(element, property, value);
- if (originalResource != null && advancedHelper != null)
- advancedHelper.componentResourceModified(originalResource, modifiedResource);
- }
- };
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependencyPageProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependencyPageProvider.java
deleted file mode 100644
index 4c2724a27..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/EarModuleDependencyPageProvider.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2009 Red Hat, IBM
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Rob Stryker - initial implementation and ongoing maintenance
- * Chuck Bridgham - Additional support
- ******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.preferences;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
-import org.eclipse.wst.common.componentcore.ui.propertypage.ModuleAssemblyRootPage;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-public class EarModuleDependencyPageProvider implements IDependencyPageProvider {
-
- public boolean canHandle(IFacetedProject project) {
- boolean isEAR = project.hasProjectFacet(ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE));
- return isEAR;
- }
-
- public IModuleDependenciesControl[] createPages(IFacetedProject project,
- ModuleAssemblyRootPage parent) {
- return new IModuleDependenciesControl[] {
- new EarModuleDependenciesPropertyPage(project.getProject(), parent)
- };
- }
-
- public Composite createRootControl(IFacetedProject project,IModuleDependenciesControl[] pages,
- Composite parent) {
- if( pages.length == 1 && pages[0] != null)
- return pages[0].createContents(parent);
- return null;
- }
-
- public String getPageTitle(IProject project) {
- return Messages.EarModuleDependencyPageProvider_0;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/IJavaEEPreferencePageExtender.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/IJavaEEPreferencePageExtender.java
deleted file mode 100644
index 925a54b4b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/IJavaEEPreferencePageExtender.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.preferences;
-
-import org.eclipse.swt.widgets.Composite;
-
-public abstract interface IJavaEEPreferencePageExtender {
-
- Composite extendPage(Composite parent);
- void performDefaults();
- boolean performOk();
- void dispose();
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePage.java
deleted file mode 100644
index 983de2dd7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePage.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.preferences;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.preference.PreferencePage;
-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.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-
-public class JavaEEPreferencePage extends PreferencePage implements
- IWorkbenchPreferencePage {
-
- private Preferences preferences;
- private String name = J2EEPlugin.DYNAMIC_TRANSLATION_OF_JET_TEMPLATES_PREF_KEY;
- private Button showReferences;
- private boolean dynamicTranslation;
- private ArrayList<IJavaEEPreferencePageExtender> extenders = new ArrayList();
-
- public JavaEEPreferencePage() {
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVA_EE_PREFERENCE_PAGE_NAME));
- }
-
- @Override
- protected void performDefaults() {
- preferences.setToDefault(name);
- J2EEPlugin.getDefault().savePluginPreferences();
- dynamicTranslation = preferences.getBoolean(name);
- showReferences.setSelection(dynamicTranslation);
- for(IJavaEEPreferencePageExtender extender : extenders ){
- extender.performDefaults();
- }
-
- super.performDefaults();
- }
-
- @Override
- protected Control createContents(Composite parent) {
- Composite result= new Composite(parent, SWT.NONE);
- GridLayout layout= new GridLayout();
- layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth= 0;
- layout.verticalSpacing= convertVerticalDLUsToPixels(10);
- layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- result.setLayout(layout);
- Group buttonComposite= new Group(result, SWT.NONE);
- buttonComposite.setLayout(new GridLayout());
- buttonComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- buttonComposite.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVA_EE_PREFERENCE_PAGE_JET_TEMPLATE));
-
- showReferences = new Button(buttonComposite, SWT.CHECK);
- showReferences.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVA_EE_PREFERENCE_PAGE_DYN_TRANSLATION_BTN_NAME));
- showReferences.setSelection(dynamicTranslation);
- showReferences.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- dynamicTranslation = showReferences.getSelection();
- }
- });
- invokeExtensions(result);
-
- return result;
- }
-
- public void init(IWorkbench workbench) {
- preferences = J2EEPlugin.getDefault().getPluginPreferences();
- dynamicTranslation = preferences.getBoolean(name);
- }
-
- @Override
- public boolean performOk() {
- preferences.setValue(name, showReferences.getSelection());
- J2EEPlugin.getDefault().savePluginPreferences();
- boolean result = false;
- for(IJavaEEPreferencePageExtender extender : extenders ){
- result = extender.performOk();
- }
- result = super.performOk();
- return result;
- }
-
-
- protected void invokeExtensions(Composite parent){
- List<JavaEEPreferencePageExtension> list = JavaEEPreferencePageExtensionReader.getInstance().getJavaEEPageExtenders();
- for(JavaEEPreferencePageExtension pageExtension : list ){
- IJavaEEPreferencePageExtender extender = pageExtension.getInstance();
- extenders.add(extender);
- extender.extendPage(parent);
- }
- }
-
- @Override
- public void dispose(){
- for(IJavaEEPreferencePageExtender extender : extenders ){
- extender.dispose();
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtension.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtension.java
deleted file mode 100644
index a20e33855..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtension.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.preferences;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.wst.common.internal.emf.utilities.Assert;
-
-
-
-
-
-public class JavaEEPreferencePageExtension {
-
- public static final String ATT_ID = "id"; //$NON-NLS-1$
- public static final String ATT_CLASS = "class"; //$NON-NLS-1$
- public static final String JAVAEE_PAGE_EXTENSION = "javaeepageextender"; //$NON-NLS-1$
-
- private String id = null;
- private IConfigurationElement element;
- private IJavaEEPreferencePageExtender instance;
- private boolean errorCondition = false;
-
- public JavaEEPreferencePageExtension(){
- super();
- }
-
- private void init() {
- id = element.getAttribute(ATT_ID);
- }
-
- /**
- * @return Returns the id.
- */
- public String getId() {
- return id;
- }
-
- /**
- * @param id
- * The id to set.
- */
- public void setId(String id) {
- this.id = id;
- }
-
- public JavaEEPreferencePageExtension(IConfigurationElement element) {
- Assert.isLegal(JAVAEE_PAGE_EXTENSION.equals(element.getName()), "Extensions must be of the type \"" + JAVAEE_PAGE_EXTENSION + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
- this.element = element;
- init();
- }
-
- public IJavaEEPreferencePageExtender getInstance() {
- try {
- if (instance == null && !errorCondition)
- instance = (IJavaEEPreferencePageExtender) element.createExecutableExtension("className"); //$NON-NLS-1$
- } catch (Throwable e) {
- errorCondition = true;
- }
- return instance;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtensionReader.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtensionReader.java
deleted file mode 100644
index 0dafb3157..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/JavaEEPreferencePageExtensionReader.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.preferences;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-
-
-
-public class JavaEEPreferencePageExtensionReader extends RegistryReader {
-
- private static JavaEEPreferencePageExtensionReader instance = null;
- private List<JavaEEPreferencePageExtension> pageExtenders = null;
-
- public JavaEEPreferencePageExtensionReader(){
- super("org.eclipse.jst.j2ee.ui", "JavaEEPreferencePageExtender"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-
- public static JavaEEPreferencePageExtensionReader getInstance() {
- if (instance == null) {
- instance = new JavaEEPreferencePageExtensionReader();
- instance.readRegistry();
- }
- return instance;
- }
-
- @Override
- public boolean readElement(IConfigurationElement element) {
- if (JavaEEPreferencePageExtension.JAVAEE_PAGE_EXTENSION.equals(element.getName())) {
- addExtension(element);
- return true;
- }
- return false;
- }
-
- protected void addExtension(IConfigurationElement newExtension) {
- getJavaEEPageExtenders().add(new JavaEEPreferencePageExtension(newExtension));
- }
-
- public List<JavaEEPreferencePageExtension> getJavaEEPageExtenders() {
- if (pageExtenders == null)
- pageExtenders = new ArrayList();
- return pageExtenders;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/Messages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/Messages.java
deleted file mode 100644
index 211843936..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/Messages.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.jst.j2ee.internal.ui.preferences;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.ui.preferences.messages"; //$NON-NLS-1$
- public static String EarModuleDependenciesPropertyPage_0;
- public static String EarModuleDependenciesPropertyPage_1;
- public static String EarModuleDependenciesPropertyPage_2;
- public static String EarModuleDependenciesPropertyPage_3;
- public static String EarModuleDependenciesPropertyPage_LIBDIR;
- public static String EarModuleDependenciesPropertyPage_ERROR_INVALID_LIBDIR;
- public static String EarModuleDependenciesPropertyPage_WARNING_EMPTY_LIB_DIR;
- public static String EarModuleDependencyPageProvider_0;
- public static String WebDependencyPropertyPage_0;
- public static String WebDependencyPropertyPage_1;
- public static String ChildClasspathDependencyDescription;
- public static String ClasspathDependencyFragmentTitle;
- public static String ClasspathDependencyFragmentDescription;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/messages.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/messages.properties
deleted file mode 100644
index c839fb5df..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/preferences/messages.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-EarModuleDependenciesPropertyPage_0=Add Ear Module Folder...
-EarModuleDependenciesPropertyPage_1=Add Ear Module Reference...
-EarModuleDependenciesPropertyPage_2=Edit Ear Module Reference...
-EarModuleDependenciesPropertyPage_3=Define packaging structure for this Java EE Application project.
-EarModuleDependenciesPropertyPage_LIBDIR=EAR &library directory:
-EarModuleDependenciesPropertyPage_ERROR_INVALID_LIBDIR=Library directory value cannot begin with a slash character. Specify as relative path to the root of the project.
-EarModuleDependenciesPropertyPage_WARNING_EMPTY_LIB_DIR=An empty library directory field indicates that no library directory will be used when creating the class paths! Set the value to 'lib' to use the default library directory.
-EarModuleDependencyPageProvider_0=Ear Module Assembly
-WebDependencyPropertyPage_0=Add Web Library Reference...
-WebDependencyPropertyPage_1=Define packaging structure for this Java EE Web Application project.
-ChildClasspathDependencyDescription=Pull in classpath elements from referenced projects.
-ClasspathDependencyFragmentTitle=Manage referenced classpath entries
-ClasspathDependencyFragmentDescription=Here you can adjust which referenced projects' classpath entries should be pulled into this component. \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/ContextRootInputPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/ContextRootInputPage.java
deleted file mode 100644
index 4c49b496c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/ContextRootInputPage.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.refactoring;
-
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.ui.refactoring.UserInputWizardPage;
-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.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class ContextRootInputPage extends UserInputWizardPage {
-
- private final RenameContextRootRefactoringProcessor fProcessor;
- private Text fNameField;
-
- public ContextRootInputPage(String name, RenameContextRootRefactoringProcessor processor) {
- super(name);
- this.fProcessor = processor;
- }
-
- public void createControl(Composite parent) {
- Composite c = new Composite(parent, SWT.NONE);
-
- Label label = new Label(c, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString("NewContextRoot")); //$NON-NLS-1$
-
- fNameField = new Text(c, SWT.BORDER);
- fNameField.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
-
- fNameField.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- validatePage();
- }
-
- });
- String oldName = fProcessor.getOldContextRoot();
- if (oldName != null && oldName.length() > 0) {
- fNameField.setText(oldName);
- fNameField.setSelection(0, oldName.length());
- }
-
- GridLayoutFactory.swtDefaults().numColumns(2).applyTo(c);
-
- setControl(c);
- fNameField.setFocus();
-
- validatePage();
- }
-
- private void validatePage() {
- String text = fNameField.getText();
- RefactoringStatus status = fProcessor.validateNewElementName(text);
- setPageComplete(status);
- }
-
- @Override
- protected boolean performFinish() {
- initializeRefactoring();
- return super.performFinish();
- }
-
- @Override
- public IWizardPage getNextPage() {
- initializeRefactoring();
- return super.getNextPage();
- }
-
- private void initializeRefactoring() {
- fProcessor.setNewName(fNameField.getText());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootChange.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootChange.java
deleted file mode 100644
index f7d14406c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootChange.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
- package org.eclipse.jst.j2ee.internal.ui.refactoring;
-
-import org.eclipse.core.resources.IProject;
-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.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-
-import com.ibm.icu.text.UTF16;
-import com.ibm.icu.util.StringTokenizer;
-
-public class RenameContextRootChange extends Change {
-
- private final IProject project;
- private final String newContextRoot;
- private final String oldContextRoot;
-
- public RenameContextRootChange(IProject project, String newContextRoot, String oldContextRoot) {
- this.project = project;
- this.oldContextRoot = oldContextRoot;
- this.newContextRoot = newContextRoot;
- }
-
- @Override
- public Object getModifiedElement() {
- return project;
- }
-
- @Override
- public String getName() {
- return J2EEUIMessages.getResourceString("RenameContextRootFromXtoY", new String[]{oldContextRoot, //$NON-NLS-1$
- newContextRoot});
- }
-
- @Override
- public void initializeValidationData(IProgressMonitor pm) {
-
- }
-
- public static IStatus validateContextRoot(String name) {
- IStatus status = Status.OK_STATUS;
- if (name == null || name.length() == 0) {
- // this was added because the error message shouldnt be shown
- // initially. It should be shown only if context
- // root field is edited to
- status = new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID,
- ProjectSupportResourceHandler.getString(
- ProjectSupportResourceHandler.Context_Root_cannot_be_empty_2,
- new Object[0]));
-
- } else if (!(name.indexOf(' ') > -1)) {
- StringTokenizer stok = new StringTokenizer(name, "."); //$NON-NLS-1$
- while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- int cp;
- for (int i = 0; i < token.length(); i += UTF16.getCharCount(cp)) {
- cp = UTF16.charAt(token, i);
- if (!(token.charAt(i) == '_') && !(token.charAt(i) == '-')
- && !(token.charAt(i) == '/')
- && Character.isLetterOrDigit(token.charAt(i)) == false) {
- if (Character.isWhitespace(token.charAt(i)) == false) {
- String invalidCharString = null;
- if (UTF16.getCharCount(cp)>1)
- {
- invalidCharString = UTF16.valueOf(cp);
- }
- else
- {
- invalidCharString = (new Character(token.charAt(i))).toString();
- }
- Object[] invalidChar = new Object[]{invalidCharString};
- status = new Status(
- IStatus.ERROR,
- J2EEUIPlugin.PLUGIN_ID,
- ProjectSupportResourceHandler
- .getString(
- ProjectSupportResourceHandler.The_character_is_invalid_in_a_context_root,
- invalidChar));
-
- }
- }
- }
- }
- } // en/ end of if(name.trim
- else {
- status = new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID,
- ProjectSupportResourceHandler.getString(
- ProjectSupportResourceHandler.Names_cannot_contain_whitespace_,
- new Object[0]));
-
- }
- return status;
-
- }
-
- @Override
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
- IStatus phase1 = validateContextRoot(newContextRoot);
- if (phase1.isOK())
- return new RefactoringStatus();
- return RefactoringStatus.create(phase1);
- }
-
- @Override
- public Change perform(IProgressMonitor pm) throws CoreException {
-
- ComponentUtilities.setServerContextRoot(project, newContextRoot);
-
- return new RenameContextRootChange(project, oldContextRoot, newContextRoot);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootRefactoringProcessor.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootRefactoringProcessor.java
deleted file mode 100644
index 2564e1b5c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootRefactoringProcessor.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.refactoring;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-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.ParticipantManager;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
-import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.ltk.core.refactoring.participants.SharableParticipants;
-
-public class RenameContextRootRefactoringProcessor extends RenameProcessor {
-
- private IProject fProject;
- private String fNewName;
- private boolean fUpdateReferences;
-
- @Override
- public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
- CheckConditionsContext context) throws CoreException, OperationCanceledException {
- if (!isApplicable())
- return RefactoringStatus.createErrorStatus(J2EEUIMessages
- .getResourceString("RefactoringNoInit")); //$NON-NLS-1$
- return validateNewElementName(fNewName);
- }
-
- @Override
- public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
- return new RefactoringStatus();
- }
-
- @Override
- public Change createChange(IProgressMonitor pm) throws CoreException,
- OperationCanceledException {
- if (isApplicable() && fNewName != null)
- return new RenameContextRootChange(getProject(), fNewName, getOldContextRoot());
- return null;
- }
-
- @Override
- public Object[] getElements() {
- if (getProject() == null)
- return new Object[0];
- return new Object[] {
- getProject()
- };
- }
-
- @Override
- public String getIdentifier() {
- return "org.eclipse.jst.j2ee.ChangeContextRootRefactoringProcessor"; //$NON-NLS-1$
- }
-
- @Override
- public String getProcessorName() {
- return J2EEUIMessages.getResourceString("RenameContextRoot"); //$NON-NLS-1$
- }
-
- public IProject getProject() {
- return fProject;
- }
-
- @Override
- public boolean isApplicable() throws CoreException {
- return getProject() != null;
- }
-
- private RenameArguments getRenameArguments() {
- return new RenameArguments(fNewName, fUpdateReferences);
- }
-
- @Override
- public RefactoringParticipant[] loadParticipants(RefactoringStatus status,
- SharableParticipants sharedParticipants) throws CoreException {
- String[] natures = new String[0];
- IProject project = getProject();
- if (project != null && fNewName != null) {
- natures = project.getDescription().getNatureIds();
- return ParticipantManager.loadRenameParticipants(status, this, project,
- getRenameArguments(), natures, sharedParticipants);
- }
- return new RefactoringParticipant[0];
- }
-
- public void setProject(IProject project) {
- this.fProject = project;
- }
-
- public void setNewName(String newName) {
- this.fNewName = newName;
- }
-
- public void setUpdateReferences(boolean updateReferences) {
- this.fUpdateReferences = updateReferences;
- }
-
- public RefactoringStatus validateNewElementName(String newName) {
- return RefactoringStatus.create(RenameContextRootChange.validateContextRoot(newName));
- }
-
- public String getOldContextRoot() {
- return J2EEProjectUtilities.getServerContextRoot(getProject());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootWizard.java
deleted file mode 100644
index 2919f8d44..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootWizard.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ui.refactoring;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ltk.core.refactoring.participants.RenameRefactoring;
-import org.eclipse.ltk.ui.refactoring.RefactoringWizard;
-
-public class RenameContextRootWizard extends RefactoringWizard {
-
- private boolean prompt = true;
-
- public RenameContextRootWizard(RenameContextRootRefactoringProcessor processor, int flags) {
- super(new RenameRefactoring(processor), flags);
- setDefaultPageTitle(J2EEUIMessages.getResourceString("RenameContextRoot")); //$NON-NLS-1$
-
- setChangeCreationCancelable(true);
- setHelpAvailable(false);
- setNeedsProgressMonitor(true);
- }
-
- @Override
- protected void addUserInputPages() {
- if (prompt) {
- addPage(new ContextRootInputPage("", //$NON-NLS-1$
- (RenameContextRootRefactoringProcessor) getRefactoring().getAdapter(
- RenameContextRootRefactoringProcessor.class)));
- }
- }
-
- public void setPrompt(boolean prompt) {
- this.prompt = prompt;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/AnnotationIconDecorator.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/AnnotationIconDecorator.java
deleted file mode 100644
index 47b799693..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/AnnotationIconDecorator.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on Aug 18, 2004
- */
-package org.eclipse.jst.j2ee.internal.ui.util;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILightweightLabelDecorator;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsController;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsControllerHelper;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsControllerManager;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.ejb.provider.BeanClassProviderHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Add overlay for annotated objects
- */
-public class AnnotationIconDecorator extends LabelProvider implements ILightweightLabelDecorator {
-
- protected static final String ANNOTATION_IMAGE_DESC_STRING = "annotation_bean_overlay"; //$NON-NLS-1$
- protected static final String ANNOTATION_DISABLED_IMAGE_DESC_STRING = "dis_annotation_bean_overlay"; //$NON-NLS-1$
- private static final ImageDescriptor ANNOTATION_IMG_DESC = getImageDescriptor(ANNOTATION_IMAGE_DESC_STRING);
- private static final ImageDescriptor ANNOTATION_DISABLED_IMG_DESC = getImageDescriptor(ANNOTATION_DISABLED_IMAGE_DESC_STRING);
-
- public AnnotationIconDecorator() {
- super();
- }
-
- /**
- * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object,
- * org.eclipse.jface.viewers.IDecoration)
- */
- private boolean isAnnotatedSupported(EObject target) {
- boolean bAnnotationSupported = false;
- if (AnnotationsControllerHelper.INSTANCE.isAnnotated(target)) {
- bAnnotationSupported = true;
- }
- return bAnnotationSupported;
- }
-
- private AnnotationsController getControllerForProject(IProject targetProject) {
- AnnotationsController controller = AnnotationsControllerManager.INSTANCE.getAnnotationsController(targetProject);
- return controller;
- }
-
- public void decorate(Object element, IDecoration decoration) {
- EObject eObject = null;
- if (element instanceof BeanClassProviderHelper) {
- BeanClassProviderHelper beanClassHelper = (BeanClassProviderHelper) element;
- eObject = beanClassHelper.getEjb();
- } else if (element instanceof EnterpriseBean || element instanceof Servlet)
- eObject = (EObject) element;
- if (eObject == null)
- return;
- if (isAnnotatedSupported(eObject)) {
- if (isAnnotationEnabled(eObject)) {
- if (ANNOTATION_IMG_DESC != null)
- decoration.addOverlay(ANNOTATION_IMG_DESC);
- } else {
- if (ANNOTATION_DISABLED_IMG_DESC != null)
- decoration.addOverlay(ANNOTATION_DISABLED_IMG_DESC);
- }
- }
- }
-
- /**
- * @param bean
- * @return
- */
- private boolean isAnnotationEnabled(EObject eObject) {
- IFile annotatedSource = null;
- /* short circuit if possible */
- if (AnnotationsControllerManager.INSTANCE.isAnyAnnotationsSupported()) {
- IProject targetProject = ProjectUtilities.getProject(eObject);
- AnnotationsController controller = getControllerForProject(targetProject);
- if (controller != null)
- annotatedSource = controller.getEnabledAnnotationFile(eObject);
- }
- return (annotatedSource != null) ? true : false;
- }
-
- public Image decorateImage(Image image, Object element) {
- return image;
- }
-
- /**
- * @see ILabelDecorator#decorateText(String, Object)
- */
- public String decorateText(String text, Object element) {
- return text;
- }
-
- protected static ImageDescriptor getImageDescriptor(String imageFileName) {
- if (imageFileName != null)
- return J2EEUIPlugin.getDefault().getImageDescriptor(imageFileName);
- return null;
- }
-}
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 42056563f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/BinaryProjectUIHelper.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ui.util;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-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 = JemProjectUtilities.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 d039bbd62..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.lang.ref.WeakReference;
-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.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationWrapper;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppItemProvider;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webservice.wsclient.WebServicesClient;
-import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientPackage;
-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 boolean isInitializing = false;
- private WebErrorPageGroupItemProvider webErrorPageGroup;
- private WebServletGroupItemProvider webServletGroup;
- private WebServletMappingGroupItemProvider webServletMappingGroup;
- private WebFiltersGroupItemProvider webFiltersGroup;
- private WebFilterMappingGroupItemProvider webFilterMappingGroup;
- private WebReferencesGroupItemProvider webRefsGroup;
- private WebSecurityGroupItemProvider webSecurityGroup;
- private J2EEWebServiceClientDDManager clientMgr;
- private WebListenerGroupItemProvider webListenerGroup;
- private WebWelcomeFileGroupItemProvider webWelcomeFileGroup;
- private WebContextParamGroupItemProvider webContextParamGroup;
-
- /**
- * Listen and fire updates for 1.3 web service clients
- */
- private class J2EEWebServiceClientDDManager extends AdapterImpl implements EditModelListener {
- WebServicesClient client;
-
- public J2EEWebServiceClientDDManager(WeakReference weakWebApp) {
- init();
- }
-
- public void init() {
- // TODO fix up notification
- // 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) {
- // TODO fix up notification
- // if (editModel == null)
- // init();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- @Override
- 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() {
- // TODO fix up notification
-
- webErrorPageGroup.dispose();
- webContextParamGroup.dispose();
- webWelcomeFileGroup.dispose();
- webServletGroup.dispose();
- webServletMappingGroup.dispose();
- webFiltersGroup.dispose();
- webFilterMappingGroup.dispose();
- webRefsGroup.dispose();
- webSecurityGroup.dispose();
- webListenerGroup.dispose();
-
- weakWebApp = null;
- if (client != null)
- client.eAdapters().remove(this);
- children.clear();
- }
- }
-
- /**
- * Default constructor
- */
- public J2EEWebAppItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * Initialize the list of children
- */
- private void initChildren(WebApp webApp) {
- if (isInitializing)
- return;
-
- isInitializing = true;
- try {
- children.clear();
- if (clientMgr == null) {
- clientMgr = new J2EEWebServiceClientDDManager(weakWebApp);
- }
-// if (!((WebApp)weakWebApp.get()).getErrorPages().isEmpty()) {
-// children.add(webErrorPageGroup = new WebErrorPageGroupItemProvider(adapterFactory, weakWebApp));
-// } else {
-// WebErrorPageGroupItemProvider child = null;
-// for (int i=0; i < children.size(); i++) {
-// Object object = children.get(i);
-// if (object instanceof WebErrorPageGroupItemProvider) {
-// child = (WebErrorPageGroupItemProvider) object;
-// break;
-// }
-// }
-// if (child != null) {
-// child.dispose();
-// }
-// }
-// if (!((WebApp)weakWebApp.get()).getContextParams().isEmpty()) {
-// children.add(webContextParamGroup = new WebContextParamGroupItemProvider(adapterFactory, weakWebApp));
-// } else {
-// WebContextParamGroupItemProvider child = null;
-// for (int i=0; i < children.size(); i++) {
-// Object object = children.get(i);
-// if (object instanceof WebContextParamGroupItemProvider) {
-// child = (WebContextParamGroupItemProvider) object;
-// break;
-// }
-// }
-// if (child != null) {
-// child.dispose();
-// }
-// }
-// WelcomeFileList welcomeFileList = ((WebApp)weakWebApp.get()).getFileList();
-// if (welcomeFileList != null && !welcomeFileList.getFile().isEmpty()) {
-// children.add(webWelcomeFileGroup = new WebWelcomeFileGroupItemProvider(adapterFactory, weakWebApp));
-// } else {
-// WebWelcomeFileGroupItemProvider child = null;
-// for (int i=0; i < children.size(); i++) {
-// Object object = children.get(i);
-// if (object instanceof WebWelcomeFileGroupItemProvider) {
-// child = (WebWelcomeFileGroupItemProvider) object;
-// break;
-// }
-// }
-// if (child != null) {
-// child.dispose();
-// }
-// }
-
- children.add(webErrorPageGroup = new WebErrorPageGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webContextParamGroup = new WebContextParamGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webWelcomeFileGroup = new WebWelcomeFileGroupItemProvider(adapterFactory, weakWebApp));
-
- children.add(webServletGroup = new WebServletGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webServletMappingGroup = new WebServletMappingGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webRefsGroup = new WebReferencesGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webSecurityGroup = new WebSecurityGroupItemProvider(adapterFactory, weakWebApp));
-
- // show the below nodes only if Web 2.3 and greater
- if (J2EEVersionUtil.convertVersionStringToInt(webApp.getVersion()) > J2EEVersionConstants.SERVLET_2_2) {
- children.add(webFiltersGroup = new WebFiltersGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webFilterMappingGroup = new WebFilterMappingGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webListenerGroup = new WebListenerGroupItemProvider(adapterFactory, weakWebApp));
- }
- } finally {
- isInitializing = false;
- }
- }
-
- protected WeakReference weakWebApp = null;
-
- @Override
- public Collection getChildren(Object object) {
- if (object instanceof WebApp) {
- WebApp webApp = (WebApp) object;
- // If uninitialized or web app needs to re-initialize, init the children
- if(weakWebApp == null || children.isEmpty() || webApp != weakWebApp.get()) {
- weakWebApp = new WeakReference(webApp);
- initChildren(webApp);
- }
-// if (isInitializing) return children;
-// isInitializing = true;
-// updateContextParams(webApp);
-// updateWelcomePages(webApp);
-// isInitializing = false;
- return children;
- }
- return Collections.EMPTY_LIST;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- @Override
- 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__ERROR_PAGES :
- notifier = webErrorPageGroup;
- break;
- case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS :
- notifier = webContextParamGroup;
- break;
- case WebapplicationPackage.WEB_APP__FILE_LIST :
- notifier = webWelcomeFileGroup;
- break;
- 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);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.IDisposable#dispose()
- */
- @Override
- public void dispose() {
- if (clientMgr != null)
- clientMgr.dispose();
- super.dispose();
- }
-}
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 6882f431c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.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
- *******************************************************************************/
-/*
- * 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()
- */
- @Override
- 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/WebContextParamGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebContextParamGroupItemProvider.java
deleted file mode 100644
index 269ee08da..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebContextParamGroupItemProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * SAP AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-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 WebContextParamGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebContextParamGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (weakWebApp!=null) {
- Object webApp = weakWebApp.get();
- if(null != webApp){
- result.addAll(((WebApp)webApp).getContextParams());
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("initializ_parameter_context"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Context_Parameters_2"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java
deleted file mode 100644
index e432a46c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * SAP AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-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 WebErrorPageGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebErrorPageGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (weakWebApp!=null) {
- Object webApp = weakWebApp.get();
- if(null != webApp){
- result.addAll(((WebApp)webApp).getErrorPages());
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("error_page"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Error_Pages_1"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
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 7d9bfcf83..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.Collections;
-
-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
- */
-public class WebFilterMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebFilterMappingGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory,weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- Object webApp = weakWebApp.get();
- if(null != webApp){
- return ((WebApp)webApp).getFilterMappings();
- }
- return Collections.EMPTY_LIST;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter_mapping"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Filter_Mappings_1"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
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 7191d06bb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.lang.ref.WeakReference;
-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, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /**
- * This returns Filter.gif.
- */
- @Override
- 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)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- Object webApp = weakWebApp.get();
- if(webApp != null){
- result.addAll(((WebApp)webApp).getFilters());
- }
- return getSortedChildren(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-}
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 9084a9df5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Aug 11, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-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
- */
-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 WeakReference weakWebApp;
-
- public WebGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory);
- this.weakWebApp = weakWebApp;
- }
-
- public Collection getSortedChildren(List theChildren) {
- Collections.sort(theChildren, new WebGroupComparator());
- return theChildren;
- }
-
- @Override
- public void dispose() {
- super.dispose();
- weakWebApp = null;
- }
-
-
- @Override
- public IFile getAssociatedFile() {
-
- try {
- WebApp webapp = (WebApp) weakWebApp.get();
- if(webapp != null && webapp.eResource() != null) {
- return WorkbenchResourceHelperBase.getIFile(webapp.eResource().getURI());
- }
- } catch (Throwable t) {
-
- }
- return null;
- }
-}
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 49608e78e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-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
- */
-public class WebListenerGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebListenerGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /**
- * This returns Filter.gif.
- */
- @Override
- 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)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- Object webApp = weakWebApp.get();
- if(webApp != null){
- result.addAll(((WebApp)webApp).getListeners());
- }
- return getSortedChildren(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-}
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 4a7ca31c5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.lang.ref.WeakReference;
-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.WSDLServiceExtManager;
-import org.eclipse.jst.j2ee.internal.webservices.WSDLServiceHelper;
-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, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- Object obj = weakWebApp.get();
- if (null != obj) {
- WebApp webApp = (WebApp) obj;
- 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());
- if (!webApp.getServiceRefs().isEmpty())
- result.addAll(webApp.getServiceRefs());
- Collection serviceRefs = null;
- try {
- WSDLServiceHelper serviceHelper = WSDLServiceExtManager.getServiceHelper();
- serviceRefs = serviceHelper.get13ServiceRefs(webApp);
- } catch (Exception re) {
- serviceRefs = Collections.EMPTY_LIST;
- }
-
- if (serviceRefs != null && !serviceRefs.isEmpty())
- result.addAll(serviceRefs);
- }
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getDefault().getImage("resourceRef_obj"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("References_1"); //$NON-NLS-1$
- }
-
-}
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 ae999877c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.lang.ref.WeakReference;
-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, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- 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)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- Object obj = weakWebApp.get();
- if (null != obj) {
- WebApp webApp = (WebApp) obj;
- 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()
- */
- @Override
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("security_role");//$NON-NLS-1$
- }
-}
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 16d0bb55c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-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, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (weakWebApp!=null) {
- Object webApp = weakWebApp.get();
- if(null != webApp){
- result.addAll(((WebApp)webApp).getServlets());
- }
- }
- return getSortedChildren(result);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
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 a3560992b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-import java.util.Collection;
-import java.util.Collections;
-
-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
- */
-public class WebServletMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebServletMappingGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- Object webApp = weakWebApp.get();
- if (null != webApp) {
- return ((WebApp) webApp).getServletMappings();
- }
- return Collections.EMPTY_LIST;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet_mapping"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- 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)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java
deleted file mode 100644
index 4a97b4461..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 SAP AG and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * SAP AG - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.lang.ref.WeakReference;
-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;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFileList;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebWelcomeFileGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebWelcomeFileGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- @Override
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- if (weakWebApp!=null) {
- Object webApp = weakWebApp.get();
- if (null != webApp) {
- WelcomeFileList fileList = ((WebApp)webApp).getFileList();
- if (fileList != null) {
- result.addAll(fileList.getFile());
- }
- }
- }
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- @Override
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("welcome_list"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- @Override
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Welcome_Pages_1"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- @Override
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- @Override
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-}
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 e977b505b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AnnotationsStandaloneGroup.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * 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.jface.dialogs.Dialog;
-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.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;
-
-/**
- * @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 Object model;
- protected Object synchHelper;
- protected Button useAnnotations;
- private boolean isForBean;
- private boolean useServletString = false;
- public static final String EJBTAGSET = "ejb"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public AnnotationsStandaloneGroup(Composite parent, Object model, boolean forBean) {
- this(parent, model, forBean, false);
- }
-
- /**
- * Constructor
- */
- public AnnotationsStandaloneGroup(Composite parent, Object model, boolean forBean, boolean useServlet) {
- super();
- synchHelper = new DataModelSynchHelper((IDataModel)model);
- this.model = model;
- this.isForBean = forBean;
- this.useServletString = useServlet;
-
- 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);
- ((DataModelSynchHelper)synchHelper).synchCheckbox(useAnnotations, IAnnotationsDataModel.USE_ANNOTATIONS, null);
- GridData gd2 = new GridData(GridData.FILL_HORIZONTAL);
- gd2.horizontalSpan = 2;
- useAnnotations.setLayoutData(gd2);
- Dialog.applyDialogFont(parent);
- }
-
- public void dispose() {
- ((IDataModel)model).removeListener((DataModelSynchHelper)synchHelper);
- synchHelper = null;
- model = null;
- }
-
- public void setEnablement(IProject project) {
- //TODO Remove - this is to be handled by the provider of the DataModel.
- }
-
-
-
- public void setUseServlet(boolean aBoolean) {
- useServletString = aBoolean;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentExportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentExportWizard.java
deleted file mode 100644
index 85131f7b6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentExportWizard.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.jst.j2ee.application.internal.operations.AppClientComponentExportDataModelProvider;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-/**
- * <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 AppClientComponentExportWizard 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 AppClientComponentExportWizard() {
- 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 AppClientComponentExportWizard(IDataModel model) {
- super(model);
- }
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new AppClientComponentExportDataModelProvider();
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link AppClientExportPage}as the main wizard page ({@link #MAIN_PG})
- * </ul>
- * </p>
- */
- @Override
- public void doAddPages() {
- addPage(new AppClientExportPage(getDataModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- @Override
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_EXPORT_WIZARD_BANNER));
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java
deleted file mode 100644
index 43be19efb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-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.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentImportPage extends J2EEModuleImportPage {
- /**
- * @param model
- * @param pageName
- */
- public AppClientComponentImportPage(IDataModel 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()
- */
- @Override
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_FILE_LABEL);
- }
-
- @Override
- protected String getFileNamesStoreID() {
- return "APP_CLIENT"; //$NON-NLS-1$;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- @Override
- protected String[] getFilterExpression() {
- return new String[]{"*.jar"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
- */
- @Override
- protected String getProjectImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_PROJECT_LABEL);
- }
-
- // protected J2EEComponentCreationDataModel getNewProjectCreationDataModel() {
- // return getAppClientDataModel().getJ2eeArtifactCreationDataModel();
- // }
- //
- // private AppClientModuleImportDataModel getAppClientDataModel() {
- // return (AppClientModuleImportDataModel) model;
- // }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.IMPORT_APPCLIENT_WIZARD_P1);
- return super.createTopLevelComposite(parent);
- }
-
- @Override
- protected String getModuleFacetID(){
- return J2EEProjectUtilities.APPLICATION_CLIENT;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java
deleted file mode 100644
index 86c868559..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientComponentImportDataModelProvider;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-/**
- * <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 AppClientComponentImportWizard extends J2EEComponentImportWizard {
-
- /**
- * <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 AppClientComponentImportWizard() {
- 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 AppClientComponentImportWizard(IDataModel model) {
- super(model);
- }
-
- /**
- * <p>
- * Adds an {@link AppClientImportPage}as the main wizard page ({@link #MAIN_PG}).
- * </p>
- */
- @Override
- public void doAddPages() {
- addPage(new AppClientComponentImportPage(getDataModel(), MAIN_PG));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default wizard page image.
- * </p>
- */
- @Override
- public final void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_IMPORT_WIZARD_BANNER));
- }
-
- @Override
- protected String[] getModuleValidatorStrings() {
- return new String[]{"org.eclipse.jst.j2ee.internal.validation.UIApplicationClientValidator"}; //$NON-NLS-1$
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new AppClientComponentImportDataModelProvider();
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_APPCLIENT);
- }
-}
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 42dfa68ed..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.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.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @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(IDataModel 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()
- */
- @Override
- protected String getComponentLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJ_LBL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- @Override
- 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)
- */
- @Override
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof ApplicationClient;
- }
-
- @Override
- protected String getInfopopID() {
- return IJ2EEUIContextIds.EXPORT_APPCLIENT_WIZARD_P1;
- }
-
- @Override
- protected String getComponentID() {
- return "JST_APPCLIENT"; //$NON-NLS-1$
- }
-
-}
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 9efe70082..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableJarsProvider.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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;
- protected static Image classpathImage;
-
- /**
- * 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();
-
- if (cp.isClasspathEntry()) {
- return getClasspathDependencyImage();
- }
-
- 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$
- }
-
- public static Image getEjbImage() {
- if (ejbImage == null)
- ejbImage = getImageDescriptor("EJBJar").createImage();//$NON-NLS-1$
- return ejbImage;
- }
-
- public static Image getEjbClientImage() {
- if (ejbClientImage == null)
- ejbClientImage = getImageDescriptor("ejbclientjar_obj").createImage();//$NON-NLS-1$
- return ejbClientImage;
- }
-
- public static Image getClasspathDependencyImage() {
- if (classpathImage == null)
- classpathImage = getImageDescriptor("CPDep").createImage();//$NON-NLS-1$
- return classpathImage;
- }
-
- /**
- * 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;
- }
-
- public 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;
- }
-
- public 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
- }
-}
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 a42118eda..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Arrays;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-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.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveWrapper;
-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 ArchiveWrapper){
- ArchiveWrapper wrapper = (ArchiveWrapper)inputElement;
- List <ArchiveWrapper> utilities = wrapper.getEARUtilitiesAndWebLibs();
- if (utilities.size() > 0){
- filterEJBClientJars(utilities, wrapper);
- Object [] array = utilities.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 void filterEJBClientJars(List <ArchiveWrapper> utilities, ArchiveWrapper earWrapper) {
- List <ArchiveWrapper> modules = earWrapper.getEarModules();
- for(ArchiveWrapper module : modules){
- if(module.isEJBJarFile()){
- ArchiveWrapper clientWrapper = earWrapper.getEJBClientArchiveWrapper(module);
- if(null != clientWrapper){
- boolean removed = false;
- for(int i=0;i<utilities.size() && !removed; i++){
- if(clientWrapper.getUnderLyingArchive() == utilities.get(i).getUnderLyingArchive()){
- utilities.remove(i);
- removed = true;
- }
- }
- }
- }
- }
- }
-
- /*
- * (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) {
- ArchiveWrapper wrapper = (ArchiveWrapper)element;
- IPath path = wrapper.getPath();
- if(path.toString().startsWith(ArchiveConstants.WEBAPP_LIB_URI)){
- return wrapper.getParent().getName()+"#"+wrapper.getPath(); //$NON-NLS-1$
- }
- return wrapper.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
- }
-
-}
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 8dbb87e00..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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.datamodel.properties.IJ2EEUtilityJarListImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @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();
- IDataModel model = null;
- if (inputElement instanceof IDataModel)
- model = (IDataModel) inputElement;
- if (model != null) {
-
- String fileName = model.getStringProperty(IJ2EEUtilityJarListImportDataModelProperties.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(IJ2EEModuleConstants.JAR_EXT))collectedJars.add(availableFiles[i]);
- }
- }
- 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
- }
-
-}
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 aa77126e3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/DefaultJ2EEComponentCreationWizard.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 23, 2005
- */
-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.DefaultJ2EEComponentCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.IDefaultJ2EEComponentCreationDataModelProperties;
-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.png"); //$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()
- */
- @Override
- public void doAddPages() {
- addPage(new NewJ2EEComponentSelectionPage(getDataModel(), SELECTION_PG));
- }
-
- @Override
- public boolean canFinish() {
- if (!super.canFinish()) {
- return false;
- }
- return getDataModel().getBooleanProperty(IDefaultJ2EEComponentCreationDataModelProperties.ENABLED);
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new DefaultJ2EEComponentCreationDataModelProvider();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportPage.java
deleted file mode 100644
index 0a883f075..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportPage.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-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.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARComponentExportPage extends J2EEExportPage {
- /**
- * @param model
- * @param pageName
- */
- public EARComponentExportPage(IDataModel 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()
- */
- @Override
- protected String getComponentLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_PROJECT_FOR_MODULE_CREATION);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- @Override
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- /**
- * @return
- */
- @Override
- protected boolean shouldShowProjectFilesCheckbox() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
- */
- @Override
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof Application;
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentExportDataModelProperties.PROJECT_NAME, IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION, IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING};
- }
-
- @Override
- protected String getInfopopID() {
- return IJ2EEUIContextIds.EXPORT_EAR_WIZARD_P1;
- }
-
- @Override
- protected String getComponentID() {
- return "JST_EAR"; //$NON-NLS-1$
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java
deleted file mode 100644
index 20a0b78bf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.jst.j2ee.application.internal.operations.EARComponentExportDataModelProvider;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-/**
- * <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 EARComponentExportWizard 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 EARComponentExportWizard() {
- 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 EARComponentExportWizard(IDataModel model) {
- super(model);
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new EARComponentExportDataModelProvider();
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link EARComponentExportPage}as the main wizard page ({@link #MAIN_PG})
- * </ul>
- * </p>
- */
- @Override
- public void doAddPages() {
- addPage(new EARComponentExportPage(getDataModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- @Override
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_EXPORT_WIZARD_BANNER));
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java
deleted file mode 100644
index 2262415e7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveWrapper;
-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.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARComponentImportOptionsPage extends DataModelWizardPage {
- private Button deselectAllButton;
- private Button selectAllButton;
- private Label moduleProjectLocationLabel;
- protected Button browseButton;
- protected Button useAlternateRootBtn;
- protected Text systemDefaultText;
- protected ArchiveWrapper aWrapper;
- public CheckboxTableViewer availableJARsViewer;
- public boolean utilJarSelectionChanged = false;
-
- /**
- * @param model
- * @param pageName
- */
- public EARComponentImportOptionsPage(IDataModel 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)
- */
- @Override
- 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));
- 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);
-
- model.addListener(new IDataModelListener() {
- public void propertyChanged(DataModelEvent event) {
- if (event.getPropertyName().equals(IEARComponentImportDataModelProperties.UTILITY_LIST)) {
- availableJARsViewer.setCheckedElements(((List) model.getProperty(IEARComponentImportDataModelProperties.UTILITY_LIST)).toArray());
- }
- }
- });
- }
-
- private void handleDeselectAllButtonPressed() {
- ArrayList emptySelection = new ArrayList(2);
- model.setProperty(IEARComponentImportDataModelProperties.UTILITY_LIST, emptySelection);
- validatePage();
- }
-
- private void handleSelectAllButtonPressed() {
- ArrayList allSelection = new ArrayList(2);
- Object selection = null;
- for (int i = 0; (null != (selection = availableJARsViewer.getElementAt(i))); i++) {
- allSelection.add(selection);
- }
- model.setProperty(IEARComponentImportDataModelProperties.UTILITY_LIST, allSelection);
- validatePage();
- }
-
- /**
- * 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(Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- 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));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- gd.widthHint = 160;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON));
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- gd.widthHint = 160;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleDeselectAllButtonPressed();
- }
- });
- }
-
- 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, IEARComponentImportDataModelProperties.NESTED_MODULE_ROOT, null);
-
- browseButton = new Button(group, SWT.PUSH);
- browseButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL));
- gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
- browseButton.setLayoutData(gd);
- browseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleBrowseButtonPressed();
- }
- });
- }
-
- private void refreshEARFileIfNecessary() {
- if (isEARFileChanged()) {
- aWrapper = (ArchiveWrapper) model.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- 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(aWrapper);
- }
-
- public boolean isEARFileChanged() {
- return aWrapper != model.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- }
-
- @Override
- protected void enter() {
- super.enter();
- refreshEARFileIfNecessary();
- }
-
- public void availableJARCheckStateChanged(CheckStateChangedEvent event) {
- model.setProperty(IEARComponentImportDataModelProperties.UTILITY_LIST, getJARsForProjects());
- validatePage();
- }
-
- public List getJARsForProjects() {
- refreshEARFileIfNecessary();
- List result = new ArrayList();
- result.addAll(Arrays.asList(availableJARsViewer.getCheckedElements()));
- return result;
- }
-
- protected boolean isNullOrEmpty(String aString) {
- return aString == null || aString.length() == 0;
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{};
- }
-
- protected void restoreWidgetValues() {
- // This page doesn't implement...
- }
-
- @Override
- public void storeDefaultSettings() {
- // This page doesn't implement...
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java
deleted file mode 100644
index 9ad4663d0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * 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.jface.dialogs.Dialog;
-import org.eclipse.jst.j2ee.application.internal.operations.EARComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEArtifactImportDataModelProvider;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-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.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARComponentImportPage extends J2EEImportPage {
- protected Combo serverTargetCombo;
-
- /**
- * @param model
- * @param pageName
- */
- public EARComponentImportPage(IDataModel dataModel, String pageName) {
- super(dataModel, 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)
- */
- @Override
- 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);
- createAnnotationsStandaloneGroup(composite);
- restoreWidgetValues();
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- @Override
- protected String getProjectImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_PROJECT_LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- @Override
- 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()
- */
- @Override
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- /*
- * (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()
- */
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentImportDataModelProperties.FILE_NAME,
- IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME,
- EARComponentImportDataModelProvider.EAR_NAME_VALIDATION,
- IFacetProjectCreationDataModelProperties.FACET_RUNTIME,
- IAnnotationsDataModel.USE_ANNOTATIONS,
- J2EEArtifactImportDataModelProvider.FACET_RUNTIME};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileNamesStoreID()
- */
- @Override
- protected String getFileNamesStoreID() {
- return "EAR";//$NON-NLS-1$
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java
deleted file mode 100644
index 63fd90a5c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.EARComponentImportDataModelProvider;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-/**
- * <p>
- * Wizard used to import J2EE Application structures into the Eclipse Workbench from an existing
- * Enterprise Application Archive *.ear file.
- * </p>
- */
-public final class EARComponentImportWizard extends J2EEArtifactImportWizard{
-
- /**
- * <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 EARComponentImportWizard() {
- 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 EARComponentImportWizard(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("38")); //$NON-NLS-1$
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link EARComponentImportPage}as the main wizard page ({@link #MAIN_PG})
- * <li>{@link EARComponentImportOptionsPage}as the options wizard page ({@link #OPTIONS_PG})
- * <li>{@link EARComponentProjectsPage}as the project wizard page ({@link #PROJECT_PG})
- * </ul>
- *
- * </p>
- */
- @Override
- public void doAddPages() {
- addPage(new EARComponentImportPage(getDataModel(), MAIN_PG));
- addPage(new EARComponentImportOptionsPage(getDataModel(), OPTIONS_PG));
- addPage(new EARComponentProjectsPage(getDataModel(), PROJECT_PG));
- }
-
-
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default wizard page image.
- * </p>
- */
- @Override
- protected void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
-
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new EARComponentImportDataModelProvider();
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_EAR);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java
deleted file mode 100644
index aeacb7d57..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.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.EARComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-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.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @author cbridgha
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class EARComponentProjectsPage extends DataModelWizardPage {
-
- 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 EARComponentProjectsPage(IDataModel 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));
- }
-
- @Override
- 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));
- 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 = 3;
- 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 | GridData.VERTICAL_ALIGN_FILL);
- //gd.horizontalSpan = 1;
- //gd.heightHint = 22;
- gd.widthHint = 140;
- selectNotInWorkspace.setLayoutData(gd);
- selectNotInWorkspace.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- List list = (List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
- List selectedList = (List) model.getProperty(IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST);
- List newList = new ArrayList();
- newList.addAll(selectedList);
- IDataModel importDM = null;
- for (int i = 0; i < list.size(); i++) {
- importDM = (IDataModel) list.get(i);
- if (!newList.contains(importDM)) {
- IVirtualComponent tempComponent = (IVirtualComponent) importDM.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT);
- if(tempComponent == null || !tempComponent.exists()){
- newList.add(importDM);
- }
- }
- }
- model.setProperty(IEARComponentImportDataModelProperties.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 | GridData.VERTICAL_ALIGN_FILL);
- //gd.horizontalSpan = 1;
- //gd.heightHint = 22;
- gd.widthHint = 140;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- List list = (List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
- List newList = new ArrayList();
- newList.addAll(list);
- model.setProperty(IEARComponentImportDataModelProperties.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 | GridData.VERTICAL_ALIGN_FILL);
- ////gd.horizontalSpan = 1;
- //gd.heightHint = 22;
- gd.widthHint = 140;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- List newList = new ArrayList();
- model.setProperty(IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST, newList);
- }
- });
- }
-
- @Override
- public void propertyChanged(DataModelEvent event) {
- if (event.getPropertyName().equals(IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST)) {
- if(earFileListViewer != null){
- updateGUICheckSelection();
- }
- }
- super.propertyChanged(event);
- }
-
- public void setFileListViewerInput() {
- TableObjects files = new TableObjects();
- Iterator iterator = ((List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST)).iterator();
- while (iterator.hasNext()) {
- files.tableObjectsList.add(iterator.next());
- }
- earFileListViewer.setInput(files);
- updateGUICheckSelection();
- }
-
- private void updateGUICheckSelection() {
- List selectedList = (List) model.getProperty(IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST);
- List projectList = (List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
- 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()
- */
- @Override
- 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);
- 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) {
- List result = new ArrayList();
- result.addAll(Arrays.asList(earFileListViewer.getCheckedElements()));
- model.setProperty(IEARComponentImportDataModelProperties.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));
- fileNameColumns.setResizable(true);
-
- TableColumn importNameColumn = new TableColumn(earFileListTable, SWT.NONE);
- importNameColumn.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_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(new ICellModifier() {
- public boolean canModify(Object element, String property) {
- return PROJECT_COLUMN.equals(property);
- }
-
- public Object getValue(Object element, 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);
- ((IDataModel) elementHolder.getData()).setProperty(IJ2EEComponentImportDataModelProperties.PROJECT_NAME, value);
- }
- }
- });
- }
-
-
- protected void restoreWidgetValues() {
- // This page doesn't implement...
- }
-
- @Override
- public void storeDefaultSettings() {
- // This page doesn't implement...
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST, EARComponentImportDataModelProvider.NESTED_PROJECTS_VALIDATION};
- }
-
-
-}
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 902325124..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveWrapper;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-
-/**
- * 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) {
- IDataModel dataModel = (IDataModel) element;
- if (columnIndex == 0) {
- ArchiveWrapper wrapper = (ArchiveWrapper) dataModel.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- if (wrapper.getPath().toString().startsWith(ArchiveConstants.WEBAPP_LIB_URI)) {
- String parentWarFileName = wrapper.getParent().getName();
- return parentWarFileName + "#" + wrapper.getName(); //$NON-NLS-1$
- }
- return wrapper.getPath().toString();
- } else if (columnIndex == 1) {
- return dataModel.getStringProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME);
- }
- return ""; //$NON-NLS-1$
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // do nothing
- }
-
- @Override
- public void dispose() {
- // dispose
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java
deleted file mode 100644
index d9f11fd02..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
-import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension;
-import org.eclipse.jdt.ui.wizards.NewElementWizardPage;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer;
-import org.eclipse.osgi.util.NLS;
-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.Text;
-
-public class EARLibrariesContainerPage extends NewElementWizardPage implements IClasspathContainerPage, IClasspathContainerPageExtension {
-
- protected IClasspathEntry entry = null;
-
- public EARLibrariesContainerPage() {
- super("EARLibrariesContainerPage"); //$NON-NLS-1$
- setTitle(EARLibrariesMessages.EARLibrariesContainerPage_0);
- setDescription(EARLibrariesMessages.EARLibrariesContainerPage_1);
- }
-
- public boolean finish() {
- return true;
- }
-
- public IClasspathEntry getSelection() {
- return JavaCore.newContainerEntry(J2EEComponentClasspathContainer.CONTAINER_PATH);
- }
-
- public void setSelection(IClasspathEntry containerEntry) {
- }
-
- public void createControl(Composite parent) {
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- final Text text = new Text(composite, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
- text.setText(getDescription());
- text.setLayoutData(new GridData(GridData.FILL_BOTH));
- setControl(composite);
- }
-
- public void initialize(IJavaProject project, IClasspathEntry[] currentEntries) {
- }
-
-
- public static class EARLibrariesMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.wizard.earlibraries"; //$NON-NLS-1$
-
- public static String EARLibrariesContainerPage_0;
-
- public static String EARLibrariesContainerPage_1;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, EARLibrariesMessages.class);
- }
-
- private EARLibrariesMessages() {
- }
- }
-
-}
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 7b3772c15..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARValidationHelper.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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 java.util.ArrayList;
-import java.util.Arrays;
-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.project.J2EEProjectUtilities;
-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 = Arrays.asList(J2EEProjectUtilities.getAllProjectsInWorkspaceOfType(J2EEProjectUtilities.ENTERPRISE_APPLICATION));
- 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;
- //TODO migrate to use artifact edits and components
-// Object accessorKey = new Object();
-// 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);
- }
-
-}
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 8ca0623aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-/**
- * <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 com.ibm.etools.j2ee.common.wizard.datamodel.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 DataModelWizard {
-
- /**
- * <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(IDataModel 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;
-
-//TODO: enable selection defaults
-// if (this.currentSelection.size() > 0) {
-// Object element = this.currentSelection.getFirstElement();
-// IProject project = ProjectUtilities.getProject(element);
-// if (project != null) {
-// IDataModel m = getDataModel();
-// Object originalProjectName = m.getProperty(IJ2EEComponentExportDataModelProperties.COMPONENT_NAME);
-// m.setProperty(IJ2EEComponentExportDataModelProperties.COMPONENT_NAME, project.getName());
-// if (!m.validateProperty(IJ2EEComponentExportDataModelProperties.COMPONENT_NAME).isOK()) {
-// m.setProperty(IJ2EEComponentExportDataModelProperties.COMPONENT_NAME, originalProjectName);
-// }
-// }
-// }
- setNeedsProgressMonitor(true);
- doInit();
- }
-
- /**
- * <p>
- * Calls {@link #doDispose()}and then nulls out fields that are no longer needed once the
- * wizard completes.
- * </p>
- *
- * @see com.ibm.etools.j2ee.common.wizard.datamodel.WTPWizard#dispose()
- */
- @Override
- public final void dispose() {
- super.dispose();
- doDispose();
- this.currentSelection = null;
- }
-
- @Override
- 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
- */
- protected final J2EEExportPage getMainPage() {
- return (J2EEExportPage) getPage(MAIN_PG);
- }
-
-}
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 39a1e6272..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-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.internal.plugin.CommonEditorUtility;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-import org.eclipse.wst.web.internal.DelegateConfigurationElement;
-
-/**
- * <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 DataModelWizard 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 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(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) {
- this.selection = aSelection;
- setNeedsProgressMonitor(true);
- doInit();
- }
-
- /**
- * <p>
- * Calls {@link #doDispose()}and then nulls out fields that are no longer needed once the
- * wizard completes.
- * </p>
- *
- * @see com.ibm.etools.j2ee.common.wizard.datamodel.WTPWizard#dispose()
- */
- @Override
- 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 null;
- }
-
- /**
- * <p>
- * Prompts the user to save open, dirty editors.
- * </p>
- *
- * @return true only if all editors are saved
- */
- @Override
- protected final boolean prePerformFinish() {
- if (!CommonEditorUtility.promptToSaveAllDirtyEditors()) {
- return false;
- }
- //Must have selected to not save, but should close all remaining
- CommonEditorUtility.closeAllEditors();
- 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()
- */
- @Override
- protected final void postPerformFinish() throws InvocationTargetException {
- super.postPerformFinish();
- if (getFinalPerspectiveID() != null && getFinalPerspectiveID().length() > 0) {
- final IConfigurationElement element = new DelegateConfigurationElement(configurationElement) {
- @Override
- public String getAttribute(String aName) {
- if (aName.equals("finalPerspective")) { //$NON-NLS-1$
- return getFinalPerspectiveID();
- }
- return super.getAttribute(aName);
- }
- };
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- BasicNewProjectResourceWizard.updatePerspective(element);
- }
- });
- } else {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- 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;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java
deleted file mode 100644
index ddea2930f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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 java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetProjectCreationDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.ui.project.facet.EarSelectionPanel;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-
-public abstract class J2EEComponentFacetCreationWizardPage extends DataModelFacetCreationWizardPage {
-
- private static final String STORE_LABEL = "LASTEARNAME_"; //$NON-NLS-1$
-
- protected EarSelectionPanel earPanel;
-
- private boolean shouldAddEARComposite = true;
-
-
-
- public J2EEComponentFacetCreationWizardPage(IDataModel dataModel, String pageName) {
- super(dataModel, pageName);
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- final Composite top = super.createTopLevelComposite(parent);
- if(isShouldAddEARComposite()){
- createEarComposite(top);
- createWorkingSetGroupPanel(top, new String[] { RESOURCE_WORKING_SET, JAVA_WORKING_SET });
- }
- return top;
- }
-
- private void createEarComposite(Composite top)
- {
- final IFacetedProjectWorkingCopy fpjwc
- = (IFacetedProjectWorkingCopy) this.model.getProperty( FACETED_PROJECT_WORKING_COPY );
-
- final String moduleFacetId = getModuleFacetID();
- final IProjectFacet moduleFacet = ProjectFacetsManager.getProjectFacet( moduleFacetId );
- final IFacetedProject.Action action = fpjwc.getProjectFacetAction( moduleFacet );
-
- earPanel = new EarSelectionPanel( (IDataModel) action.getConfig(), top );
- }
-
- protected abstract String getModuleFacetID();
-
- @Override
- protected String getModuleTypeID() {
- return getModuleFacetID();
- }
-
- @Override
- public void dispose() {
- super.dispose();
- if (earPanel != null)
- earPanel.dispose();
- }
-
- @Override
- public void storeDefaultSettings() {
- super.storeDefaultSettings();
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- FacetDataModelMap map = (FacetDataModelMap)model.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- String facetID = getModuleFacetID();
- IDataModel j2eeModel = map.getFacetDataModel(facetID);
- if(j2eeModel.getBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR)){
- String lastEARName = j2eeModel.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME);
- settings.put(STORE_LABEL, lastEARName);
- }
- }
- }
-
- @Override
- public void restoreDefaultSettings() {
- //get the values from the selected EAR to restore.
- IProject selectedEARProject = getSelectedEAR();
- if (selectedEARProject != null){
- restoreEARName(selectedEARProject);
- restoreEARRuntime(selectedEARProject);
- } else{
- restoreStoredLabelEARName();
- }
- super.restoreDefaultSettings();
- }
-
- /* Restore the EAR Name from the user selected EAR if there is any
- * @param earName
- */
- private void restoreEARName(IProject earProject){
- String earName = earProject.getName();
- if (earName != null){
- setEarName(earName, false);
- }
- }
-
- /* Restore the EAR Name from the last created EAR Project
- */
- private void restoreStoredLabelEARName(){
- IDialogSettings settings = getDialogSettings();
- String earName = settings.get(STORE_LABEL);
- if (earName != null){
- setEarName(earName, true); //last ear created, old behavior
- }
- }
-
- /* Sets the EAR Name to the the J2ee model and model
- * @param String EAR Project Name
- * @param boolean specifying if only the LAST_EAR_NAME property should be updated.
- */
- private void setEarName(String earName, boolean lastEAROnly) {
- if (earName != null){
- FacetDataModelMap map = (FacetDataModelMap)model.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- String facetID = getModuleFacetID();
- IDataModel j2eeModel = map.getFacetDataModel(facetID);
- j2eeModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.LAST_EAR_NAME, earName);
- if (!lastEAROnly)
- j2eeModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME, earName);
-
- }
- }
-
- /* Sets the Runtime to the J2EE model and common model
- * @param IProject
- */
- public void restoreEARRuntime(IProject proj) {
- FacetDataModelMap map = (FacetDataModelMap)model.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- String facetID = getModuleFacetID();
- IDataModel j2eeModel = map.getFacetDataModel(facetID);
- IRuntime currentRuntime = getTargetRuntime(proj);
- if (currentRuntime != null){
- j2eeModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.RUNTIME_TARGET_ID, currentRuntime);
- model.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, currentRuntime);
- }
-
- }
-
- /* Gets the Runtime from the user selected EAR if there is any
- * @param IRuntime
- */
- public static IRuntime getTargetRuntime(IProject project) {
- IFacetedProject fProject = null;
- try {
- fProject = ProjectFacetsManager.create(project);
- } catch (CoreException ex) {
- J2EEUIPlugin.logError(ex);
- }
- if(fProject != null)
- return fProject.getRuntime() ;
- return null;
- }
-
- /*
- * Gets the EAR Name selected on the view (ActivePart).
- * @return IProject or null if there is nothing selected.
- */
- private IProject getSelectedEAR(){
- IProject retVal = null;
- ISelection selection = getSelectionFromWorkbenchWindow();
- if (selection instanceof IStructuredSelection) {
- IProject selProject = getEARProjectFromSelection((IStructuredSelection)selection);
- if (selProject != null){
- if (JavaEEProjectUtilities.isEARProject(selProject)) {
- retVal = selProject;
- }
- }
- }
- return retVal;
- }
-
- /*
- * Gets the Selection from Workbench Window.
- * @return ISelection
- */
- private ISelection getSelectionFromWorkbenchWindow() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- ISelection selection = window.getSelectionService().getSelection();
- return selection;
- }
-
-
- /*
- * Extract the first element selected and checks for an EAR Project
- * @param IStructuredSelection selection
- * @return IProject EAR or null if there is Not selected EAR project.
- */
- private IProject getEARProjectFromSelection(IStructuredSelection selection) {
- if (selection != null){
- if (!selection.isEmpty()){
- Object firstSelectedElement = selection.getFirstElement();
- if (firstSelectedElement instanceof IProject) {
- return (IProject)firstSelectedElement;
-
- }
- }
- }
- return null;
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- String[] superProperties = super.getValidationPropertyNames();
- List list = Arrays.asList(superProperties);
- ArrayList arrayList = new ArrayList();
- arrayList.addAll( list );
- arrayList.add( IJ2EEFacetProjectCreationDataModelProperties.EAR_PROJECT_NAME );
- arrayList.add( IJ2EEFacetProjectCreationDataModelProperties.ADD_TO_EAR );
- arrayList.add( IJ2EEFacetProjectCreationDataModelProperties.FACET_RUNTIME);
- return (String[])arrayList.toArray( new String[0] );
- }
-
- protected boolean isShouldAddEARComposite() {
- return shouldAddEARComposite;
- }
-
- protected void setShouldAddEARComposite(boolean shouldAddEARComposite) {
- this.shouldAddEARComposite = shouldAddEARComposite;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java
deleted file mode 100644
index f685333d9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * <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 J2EEComponentImportWizard extends J2EEArtifactImportWizard {
-
- /**
- * <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 J2EEComponentImportWizard() {
- 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 J2EEComponentImportWizard(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("38"));//$NON-NLS-1$
- }
-
- /**
- * <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();
-
-}
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 99e1cd8f9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Milen Manov, milen.manov@sap.com - bugs 248623
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.swt.graphics.Image;
-
-public class J2EEComponentLabelProvider extends LabelProvider {
-
- ITableLabelProvider tableLableProvider;
-
- private J2EEComponentLabelProvider instance;
-
- public J2EEComponentLabelProvider(ITableLabelProvider tableLableProvider){
- this.tableLableProvider = tableLableProvider;
- instance = this;
- tableLableProvider.addListener(new ILabelProviderListener(){
- public void labelProviderChanged(LabelProviderChangedEvent event) {
- LabelProviderChangedEvent newEvent = new LabelProviderChangedEvent(instance);
- fireLabelProviderChanged(newEvent);
- }
- });
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- @Override
- public Image getImage(Object element) {
- return tableLableProvider.getColumnImage(element, 1);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- @Override
- public String getText(Object element) {
- return tableLableProvider.getColumnText(element, 1);
-// if(element instanceof IVirtualComponent){
-// IVirtualComponent comp = (IVirtualComponent)element;
-// return comp.getProject().getName();
-// }
-//
-// if (element instanceof IProject) {
-// IProject handle = (IProject)element;
-// return handle.getName();
-// }
-// return null;
- }
-
-}
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 01df3cde8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java
+++ /dev/null
@@ -1,575 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * 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 java.util.List;
-
-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.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties.IArchiveExportParticipantData;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.ui.archive.IArchiveExportParticipantPanelFactory;
-import org.eclipse.jst.j2ee.ui.archive.internal.ArchiveExportParticipantPanelsExtensionPoint;
-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.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelPropertyDescriptor;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @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 DataModelWizardPage {
-
- public static boolean isWindows = SWT.getPlatform().toLowerCase().startsWith("win"); //$NON-NLS-1$
-
- protected IStructuredSelection currentResourceSelection;
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
- protected static final String STORE_LABEL = "J2EE_EXPORT_"; //$NON-NLS-1$
- protected static final String OVERWRITE_LABEL = "OVERWRITE"; //$NON-NLS-1$
- protected static final String SOURCE_LABEL = "SOURCE"; //$NON-NLS-1$
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL);
- protected String LABEL_DESTINATION = J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_DESTINATION);
- protected String LABEL_RUNTIME = J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_RUNTIME);
- private Combo resourceNameCombo;
- private Combo destinationNameCombo;
- private Button optimizeForRuntimeCheckbox;
- private Combo runtimeNameCombo;
- private Button destinationBrowseButton;
- protected Button overwriteExistingFilesCheckbox;
- private Button sourceFilesCheckbox;
-
- /**
- * @param model
- * @param pageName
- */
- public J2EEExportPage(IDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName);
- currentResourceSelection = selection;
- Object element = currentResourceSelection.getFirstElement();
- IProject project = ProjectUtilities.getProject(element);
- if (project != null) {
- String projectName = project.getName();
- DataModelPropertyDescriptor [] validProjectNames = model.getValidPropertyDescriptors(IJ2EEComponentExportDataModelProperties.PROJECT_NAME);
- boolean projectNameSet = false;
- for(int i=0;i<validProjectNames.length && !projectNameSet; i++){
- if(projectName.equals(validProjectNames[i].getPropertyDescription())){
- projectNameSet = true;
- model.setProperty(IJ2EEComponentExportDataModelProperties.PROJECT_NAME, projectName);
- }
- }
- if(!projectNameSet && validProjectNames.length > 0){
- //if export dialog is invoked by selecting a non EAR project, get the corresponding EAR
- IProject[] earProjects = EarUtilities.getReferencingEARProjects(project);
- if( earProjects.length > 0 ){
- model.setProperty(IJ2EEComponentExportDataModelProperties.PROJECT_NAME, earProjects[0].getName());
- }else
- model.setProperty(IJ2EEComponentExportDataModelProperties.PROJECT_NAME, validProjectNames[0].getPropertyDescription());
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- @Override
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- @Override
- 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);
- createRuntimeGroup(composite);
- createOptionsGroup(composite);
-
- //setupBasedOnInitialSelections();
- setupInfopop(composite);
- restoreWidgetValues();
- Dialog.applyDialogFont(parent);
- 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);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- composite.setLayoutData(data);
- createExportComponentGroup(composite);
- createDestinationGroup(composite);
-
- }
- /**
- * 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 createExportComponentGroup(Composite parent) {
-
- //Project label
- Label projectLabel = new Label(parent, SWT.NONE);
- projectLabel.setText(getComponentLabel());
- //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, IJ2EEComponentExportDataModelProperties.PROJECT_NAME, null);
-
-
- new Label(parent, SWT.NONE);//Pad label
- }
-
- /**
- * @return
- */
- protected abstract String getComponentLabel();
-
- 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, IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION, null);
-
- // destination browse button
- destinationBrowseButton = new Button(parent, SWT.PUSH);
- destinationBrowseButton.setText(defBrowseButtonLabel);
- // bug 290709
-// destinationBrowseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- destinationBrowseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleDestinationBrowseButtonPressed();
- }
- });
- destinationBrowseButton.setEnabled(true);
-
- }
-
- protected void createRuntimeGroup( final Composite parent )
- {
- final Group group = new Group( parent, SWT.NONE );
- group.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
- group.setLayout( new GridLayout( 1, false ) );
- group.setText( LABEL_RUNTIME );
-
- this.optimizeForRuntimeCheckbox = new Button( group, SWT.CHECK );
- this.optimizeForRuntimeCheckbox.setText( J2EEWizardNLS.J2EEExportPage_Optimize_for_a_specific_server_runt_ );
- this.synchHelper.synchCheckbox( this.optimizeForRuntimeCheckbox, IJ2EEComponentExportDataModelProperties.OPTIMIZE_FOR_SPECIFIC_RUNTIME, null );
-
- final GridData gd = new GridData();
- gd.verticalIndent = 2;
-
- this.optimizeForRuntimeCheckbox.setLayoutData( gd );
-
- this.runtimeNameCombo = new Combo( group, SWT.READ_ONLY | SWT.SINGLE | SWT.BORDER );
- this.runtimeNameCombo.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
- this.synchHelper.synchCombo( this.runtimeNameCombo, IJ2EEComponentExportDataModelProperties.RUNTIME, null );
-
- final Composite extComposite = new EnhancedComposite( group, SWT.NONE );
- extComposite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
-
- final GridLayout layout = new GridLayout( 1, false );
- layout.marginWidth = 10;
- layout.marginHeight = 1;
-
- extComposite.setLayout( layout );
-
- getDataModel().addListener
- (
- new IDataModelListener()
- {
- public void propertyChanged( final DataModelEvent event )
- {
- if( event.getPropertyName().equals( IJ2EEComponentExportDataModelProperties.RUNTIME ) &&
- event.getFlag() == IDataModel.VALUE_CHG )
- {
- refreshExtensionsComposite( extComposite, true );
- }
- else if( event.getPropertyName().equals( IJ2EEComponentExportDataModelProperties.OPTIMIZE_FOR_SPECIFIC_RUNTIME ) &&
- event.getFlag() == IDataModel.VALUE_CHG )
- {
- final boolean optimize = ( (Boolean) event.getProperty() ).booleanValue();
- extComposite.setEnabled( optimize );
- }
- }
- }
- );
-
- refreshExtensionsComposite( extComposite, false );
- }
-
- private void refreshExtensionsComposite( final Composite extComposite, boolean forceRefresh )
- {
- for( Control child : extComposite.getChildren() )
- {
- child.dispose();
- }
-
- final List<IArchiveExportParticipantData> extensions
- = (List<IArchiveExportParticipantData>) getDataModel().getProperty( IJ2EEComponentExportDataModelProperties.RUNTIME_SPECIFIC_PARTICIPANTS );
-
- if( extensions != null )
- {
- Composite innerComposite = null;
-
- for( IArchiveExportParticipantData extension : extensions )
- {
- final String id = extension.getId();
-
- final ArchiveExportParticipantPanelsExtensionPoint.PanelFactoryInfo panelExtInfo
- = ArchiveExportParticipantPanelsExtensionPoint.getExtension( id );
-
- if( panelExtInfo != null )
- {
- final IArchiveExportParticipantPanelFactory panelFactory = panelExtInfo.loadPanelFactory();
-
- if( panelFactory != null )
- {
- if( innerComposite == null )
- {
- innerComposite = new EnhancedComposite( extComposite, SWT.NONE );
- innerComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
-
- final GridLayout innerCompositeLayout = new GridLayout( 1, false );
- innerCompositeLayout.marginWidth = 0;
- innerCompositeLayout.marginHeight = 0;
-
- innerComposite.setLayout( innerCompositeLayout );
- }
-
- try
- {
- panelFactory.createPanel( innerComposite, extension.getDataModel() );
- }
- catch( Exception e )
- {
- J2EEUIPlugin.logError( -1, e.getMessage(), e );
- }
- }
- }
- }
- }
-
- if (forceRefresh) {
- extComposite.getShell().layout( true, true );
- }
- }
-
- /**
- * 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);
- }
- }
-
- protected void createOverwriteExistingFilesCheckbox(Composite optionsGroup) {
- //Overwrite checkbox
- overwriteExistingFilesCheckbox = new Button(optionsGroup, SWT.CHECK | SWT.LEFT);
- overwriteExistingFilesCheckbox.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_EXPORT_OVERWRITE_CHECKBOX));
- overwriteExistingFilesCheckbox.setEnabled(true);
- synchHelper.synchCheckbox(overwriteExistingFilesCheckbox, IJ2EEComponentExportDataModelProperties.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));
- synchHelper.synchCheckbox(sourceFilesCheckbox, IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES, null);
- }
-
- /**
- * @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();
-//TODO: find a way to select an existing component
-// 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 = getDataModel().getStringProperty(IJ2EEComponentExportDataModelProperties.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(IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING, overwrite);
- boolean includeSource = settings.getBoolean(STORE_LABEL + SOURCE_LABEL);
- model.setBooleanProperty(IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES, includeSource);
- }
- }
-
- @Override
- 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(IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING));
- settings.put(STORE_LABEL + SOURCE_LABEL, model.getBooleanProperty(IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES));
- }
- }
-
- /**
- * @return
- */
- protected String getFileNamesStoreID() {
- return getComponentID();
- }
-
- @Deprecated
- protected String getCompnentID() {
- return null;
- }
-
- protected String getComponentID() {
- return getCompnentID();
- }
-
- /**
- * @return
- */
- protected String[] getFilterExpression() {
- return new String[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- @Override
- 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()
- */
- @Override
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- private static class EnhancedComposite
-
- extends Composite
-
- {
- public EnhancedComposite( final Composite parent,
- final int style )
- {
- super( parent, style );
- }
-
- @Override
- public void setEnabled( boolean enabled )
- {
- super.setEnabled( enabled );
-
- for( Control child : getChildren() )
- {
- child.setEnabled( enabled );
- }
- }
- }
-
-}
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 f21049d49..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java
+++ /dev/null
@@ -1,290 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-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.swt.widgets.Shell;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-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;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-
-public abstract class J2EEImportPage extends DataModelWizardPage {
-
- private Combo componentCombo;
- 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);
-
- /**
- * @param model
- * @param pageName
- */
- public J2EEImportPage(IDataModel model, String pageName) {
- super(model, pageName);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- @Override
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- @Override
- 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);
- restoreWidgetValues();
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createProjectNameComposite(Composite parent) {
-// if (FlexibleJavaProjectPreferenceUtil.getMultipleModulesPerProjectProp()) {
-// new NewModuleDataModelGroup(parent, getDataModel(), synchHelper);
-// } else {
- Label componentLabel = new Label(parent, SWT.NONE);
-
- componentLabel.setText(getProjectImportLabel());
- componentLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-
- // setting up combo
- componentCombo = new Combo(parent, SWT.SINGLE | SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- componentCombo.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(componentCombo, IJ2EEComponentImportDataModelProperties.PROJECT_NAME, new Control[]{componentLabel});
- new Label(parent, SWT.NULL);
- createServerTargetComposite(parent);
- //}
- }
-
-
-
- protected void createServerTargetComposite(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.TARGET_RUNTIME_LBL));
- Combo 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.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- newServerTargetButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- //FlexibleProjectCreationWizardPage.launchNewRuntimeWizard(getShell(), model);
- launchNewRuntimeWizard(getShell(), model);
- }
- });
- Control[] deps = new Control[]{label, newServerTargetButton};
- synchHelper.synchCombo(serverTargetCombo, IFacetProjectCreationDataModelProperties.FACET_RUNTIME, deps);
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- 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.HORIZONTAL_ALIGN_END)));
- browseButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleFileBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
-
- synchHelper.synchCombo(fileNameCombo, IJ2EEComponentImportDataModelProperties.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(IJ2EEComponentImportDataModelProperties.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$
- }
- fileNameCombo.setItems(sourceNames);
- }
- }
-
- @Override
- 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);
-
- DataModelFacetCreationWizardPage.saveRuntimeSettings(settings, model);
- }
- }
-
- @Override
- public void restoreDefaultSettings() {
- IDialogSettings settings = getDialogSettings();
- DataModelFacetCreationWizardPage.restoreRuntimeSettings(settings, model);
- }
-
- /**
- * @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()
- */
- @Override
- protected void enter() {
- super.enter();
- }
-
- private boolean launchNewRuntimeWizard(Shell shell, IDataModel model) {
- DataModelPropertyDescriptor[] preAdditionDescriptors = model.getValidPropertyDescriptors(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
- boolean isOK = ServerUIUtil.showNewRuntimeWizard(shell, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
- if (isOK) {
- DataModelPropertyDescriptor[] postAdditionDescriptors = model.getValidPropertyDescriptors(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
- 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(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, IDataModel.VALID_VALUES_CHG);
- if (newAddition != null)
- model.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, newAddition);
- }
- return isOK;
- }
-
-}
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 10648012d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-/**
- * @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(IDataModel model, String pageName, IStructuredSelection selection) {
- super(model, pageName, selection);
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentExportDataModelProperties.PROJECT_NAME, IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION, IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING};
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java
deleted file mode 100644
index dc714afc8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.ui.project.facet.EarSelectionPanel;
-import org.eclipse.osgi.util.NLS;
-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.Display;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetInstallPage;
-
-public abstract class J2EEModuleFacetInstallPage extends DataModelFacetInstallPage implements IJ2EEModuleFacetInstallDataModelProperties {
-
- private IDataModelListener facetVersionListener = null;
- protected Button addDD;
-
- public J2EEModuleFacetInstallPage(String pageName) {
- super(pageName);
- }
-
- /**
- * @deprecated This member should not be used any more. The EAR Panel is moved to the first wizard page.
- */
- protected EarSelectionPanel earPanel;
-
- @Override
- public void dispose() {
- if (null != earPanel) {
- earPanel.dispose();
- }
- this.model.removeListener( this.facetVersionListener );
- super.dispose();
- }
-
- /**
- * @deprecated This method should not be called any more. The EAR Panel is moved to the first wizard page.
- */
- protected void setupEarControl(final Composite parent) {
- Composite c = new Composite(parent, SWT.NONE);
- c.setLayoutData(gdhfill());
- final GridLayout layout = new GridLayout(3, false);
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- c.setLayout(layout);
- this.earPanel = new EarSelectionPanel(model, c);
- }
-
- protected void createGenerateDescriptorControl(Composite parent) {
- createGenerateDescriptorControl(parent, null);
- }
-
- protected void createGenerateDescriptorControl(Composite parent, String ddFileName) {
- this.addDD = new Button(parent, SWT.CHECK);
- if (ddFileName == null) {
- this.addDD.setText(Resources.generateDeploymentDescriptor);
- } else {
- this.addDD.setText(NLS.bind(Resources.generateDeploymentDescriptorWithFileName, ddFileName));
- }
- //synchHelper.synchCheckbox(addDD, GENERATE_DD, null); bug 215284 - see enter()
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- this.addDD.setLayoutData(gd);
- }
-
- protected void registerFacetVersionChangeListener()
- {
- this.facetVersionListener = new IDataModelListener()
- {
- public void propertyChanged( final DataModelEvent event )
- {
- if( event.getFlag() == DataModelEvent.VALUE_CHG &&
- event.getPropertyName().equals( FACET_VERSION ) )
- {
- final Runnable runnable = new Runnable()
- {
- public void run()
- {
- handleFacetVersionChangedEvent();
- }
- };
- if(Thread.currentThread() == Display.getDefault().getThread()){
- runnable.run();
- } else {
- Display.getDefault().asyncExec( runnable );
- }
- }
- }
- };
-
- this.model.addListener( facetVersionListener );
- handleFacetVersionChangedEvent();
- }
-
- protected void handleFacetVersionChangedEvent()
- {
- // The default implementation doesn't do anything. The subclass should override
- // to handle this event.
- }
-
- private static final class Resources extends NLS {
- public static String generateDeploymentDescriptor;
- public static String generateDeploymentDescriptorWithFileName;
-
- static {
- initializeMessages(J2EEModuleFacetInstallPage.class.getName(), Resources.class);
- }
- }
-
- @Override
- protected void enter() {
- if (isFirstTimeToPage() && addDD != null)
- {
- synchHelper.synchCheckbox(addDD, GENERATE_DD, null);
- }
- super.enter();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties
deleted file mode 100644
index 321d1dbf2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-generateDeploymentDescriptor = &Generate deployment descriptor
-generateDeploymentDescriptorWithFileName = &Generate {0} deployment descriptor
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 df8521027..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * 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.J2EEArtifactImportDataModelProvider;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetProjectCreationDataModelProperties;
-import org.eclipse.jst.j2ee.ui.project.facet.EarSelectionPanel;
-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.PlatformUI;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties.FacetDataModelMap;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-/**
- * @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
- */
-
- protected EarSelectionPanel earPanel;
-
- public J2EEModuleImportPage(IDataModel model, String pageName) {
- super(model, pageName);
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = super.createTopLevelComposite(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, getInfopopID());
- createServerEarAndStandaloneGroup(composite);
- createAnnotationsStandaloneGroup(composite);
- return composite;
- }
-
- /**
- * @param composite
- */
- protected void createAnnotationsStandaloneGroup(Composite composite) {
- }
-
- protected abstract String getModuleFacetID();
- /**
- * @param composite
- */
-
- private void createServerEarAndStandaloneGroup(Composite composite) {
- IDataModel creationDM = getDataModel().getNestedModel(IJ2EEComponentImportDataModelProperties.NESTED_MODEL_J2EE_COMPONENT_CREATION);
- FacetDataModelMap map = (FacetDataModelMap) creationDM.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel facetModel = (IDataModel) map.get(getModuleFacetID());
-
- Composite c = new Composite(composite, SWT.NONE);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- c.setLayoutData(data);
- final GridLayout layout = new GridLayout(3, false);
- layout.marginWidth = 0;
- layout.marginHeight = 0;
- layout.horizontalSpacing = 0;
- c.setLayout(layout);
- earPanel = new EarSelectionPanel(facetModel, c);
- }
-
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentImportDataModelProperties.FILE_NAME,
- IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME,
- IFacetProjectCreationDataModelProperties.FACET_RUNTIME,
- IJ2EEFacetProjectCreationDataModelProperties.EAR_PROJECT_NAME,
- IJ2EEFacetProjectCreationDataModelProperties.ADD_TO_EAR,
- J2EEArtifactImportDataModelProvider.FACET_RUNTIME};
- }
-
- @Override
- public void dispose() {
- super.dispose();
- if (earPanel != null)
- earPanel.dispose();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java
deleted file mode 100644
index 325311037..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * 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.Dialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEUtilityJarListImportDataModelProperties;
-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.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.datamodel.DataModelEvent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelListener;
-
-/**
- * @author mdelder
- */
-public class J2EEUtilityJarImportPageNew 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 J2EEUtilityJarImportPageNew(IDataModel 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));
- setInfopopID(IJ2EEUIContextIds.IMPORT_UTILITY_JAR_WIZARD_P1);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- @Override
- 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();
- Dialog.applyDialogFont(parent);
- 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() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleBrowseButtonPressed();
- }
- });
- browseButton.setEnabled(true);
-
- synchHelper.synchCombo(availableJarsCombo, IJ2EEUtilityJarListImportDataModelProperties.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$
- final Text linkedPathText = new Text(checkboxGroup, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
- linkedPathText.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_5")); //$NON-NLS-1$
- linkedPathText.setEnabled(true);
-
- getDataModel().addListener(new IDataModelListener() {
- public void propertyChanged(DataModelEvent event) {
- if(IJ2EEUtilityJarListImportDataModelProperties.CREATE_LINKED_PATH_VARIABLE.equals(event.getPropertyName())) {
- linkedPathText.setEnabled(getDataModel().isPropertyEnabled(IJ2EEUtilityJarListImportDataModelProperties.CREATE_LINKED_PATH_VARIABLE));
- }
-
- }
- });
-
- 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, IJ2EEUtilityJarListImportDataModelProperties.LINKED_PATH_VARIABLE, new Control[]{availableLinkedPathsCombo});
-
- synchHelper.synchCheckbox(linkedPathCheckbox, IJ2EEUtilityJarListImportDataModelProperties.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(model);
-
- /* getModel().addListener(getOperationDataModelListener()); */
- synchHelper.synchCheckBoxTableViewer(availableJARsViewer, IJ2EEUtilityJarListImportDataModelProperties.UTILITY_JAR_LIST, null);
-
-
- model.addListener(new IDataModelListener() {
-
- public void propertyChanged(DataModelEvent event) {
- if (IJ2EEUtilityJarListImportDataModelProperties.AVAILABLE_JARS_DIRECTORY.equals(event.getPropertyName()))
- availableJARsViewer.setInput(model);
- }
- });
- }
-
- private void handleDeselectAllButtonPressed() {
- model.setProperty(IJ2EEUtilityJarListImportDataModelProperties.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);
- }
- model.setProperty(IJ2EEUtilityJarListImportDataModelProperties.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));
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- 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 = 2;
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleDeselectAllButtonPressed();
- }
- });
- }
-
- 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, IJ2EEUtilityJarListImportDataModelProperties.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);
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEUtilityJarListImportDataModelProperties.UTILITY_JAR_LIST, IJ2EEUtilityJarListImportDataModelProperties.OVERWRITE_IF_NECESSARY, IJ2EEUtilityJarListImportDataModelProperties.LINKED_PATH_VARIABLE};
- }
-
- @Override
- 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);
- }
- }
-
- @Override
- 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()
- */
- @Override
- protected String getFileNamesStoreID() {
- return "UTIL";//$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- @Override
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_7"); //$NON-NLS-1$
- }
-
-
- @Override
- public void restoreDefaultSettings() {
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java
deleted file mode 100644
index b7f43d4b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java
+++ /dev/null
@@ -1,374 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * Created on May 13, 2004
- */
-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.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEUtilityJarListImportDataModelProperties;
-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.jst.j2ee.project.EarUtilities;
-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.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @author mdelder
- */
-public class J2EEUtilityJarImportTypePageNew extends DataModelWizardPage {
-
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL);
-
- 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 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 J2EEUtilityJarImportTypePageNew(IDataModel 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));
- setInfopopID(IJ2EEUIContextIds.IMPORT_UTILITY_JAR_WIZARD_P2);
- }
-
- public J2EEUtilityJarImportTypePageNew(IDataModel 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 J2EEUtilityJarImportTypePageNew(IDataModel 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()
- */
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEUtilityJarListImportDataModelProperties.EAR_PROJECT_NAME, IJ2EEUtilityJarListImportDataModelProperties.PROJECT_ROOT};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- @Override
- 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);
- // TODO The binary / project location options are not yet (re-) supported by the import operations.
- createProjectCreationOptions(composite);
-
- setupBasedOnInitialSelections();
- Dialog.applyDialogFont(parent);
- 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, IJ2EEUtilityJarListImportDataModelProperties.CREATE_PROJECT, null);
-
- createLinkedProjects = new Button(typesGroup, SWT.RADIO);
- createLinkedProjects.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_4")); //$NON-NLS-1$
- synchHelper.synchRadio(createLinkedProjects, IJ2EEUtilityJarListImportDataModelProperties.CREATE_LINKED_PROJECT, null);
-
- copyJarIntoEAR = new Button(typesGroup, SWT.RADIO);
- copyJarIntoEAR.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_5")); //$NON-NLS-1$
- synchHelper.synchRadio(copyJarIntoEAR, IJ2EEUtilityJarListImportDataModelProperties.COPY, null);
-
- linkJarIntoEAR = new Button(typesGroup, SWT.RADIO);
- linkJarIntoEAR.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_6")); //$NON-NLS-1$
- /* linkJarIntoEAR.addSelectionListener(getTypeSelectionListener()); */
- synchHelper.synchRadio(linkJarIntoEAR, IJ2EEUtilityJarListImportDataModelProperties.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));
-
- overrideProjectRootCheckbox = new Button(projectOptionsGroup, SWT.CHECK);
- overrideProjectRootCheckbox.setText(J2EEUIMessages.getResourceString("J2EEUtilityJarImportTypePage_UI_11")); //$NON-NLS-1$
- createProjectRootComposite(projectOptionsGroup);
-
- synchHelper.synchCheckbox(overrideProjectRootCheckbox, IJ2EEUtilityJarListImportDataModelProperties.OVERRIDE_PROJECT_ROOT, new Control[]{/*
- * moduleProjectLocationLabel,
- * projectRootLocationText,
- * browseButton
- */});
- }
-
- /**
- *
- * @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, IJ2EEUtilityJarListImportDataModelProperties.EAR_PROJECT_NAME, 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() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleRootProjectBrowseButtonPressed();
- }
- });
-
- synchHelper.synchText(projectRootLocationText, IJ2EEUtilityJarListImportDataModelProperties.PROJECT_ROOT, new Control[]{moduleProjectLocationLabel, projectRootLocationText, browseButton});
- }
-
-
- /**
- * 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 && EarUtilities.isEARProject((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 isMetaTypeSupported(Object o) {
- return o instanceof EARFile || o instanceof Application;
- }
-
- protected void enableProjectOptions(boolean enabled) {
- overrideProjectRootCheckbox.setEnabled(enabled);
-
- if (overrideProjectRootCheckbox.getSelection() && enabled)
- projectRootLocationText.setEnabled(true);
- else
- projectRootLocationText.setEnabled(false);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#isPageComplete()
- */
- @Override
- public boolean isPageComplete() {
- return model.validateProperty(IJ2EEUtilityJarListImportDataModelProperties.EAR_PROJECT_NAME).isOK();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.java
deleted file mode 100644
index 0047efc3c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarListImportDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-
-
-/**
- * <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 J2EEUtilityJarImportWizardNew extends J2EEArtifactImportWizard{
-
- /**
- * <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$
-
-
- /**
- * <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 J2EEUtilityJarImportWizardNew() {
- 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 J2EEUtilityJarImportWizardNew(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString("38")); //$NON-NLS-1$
- }
-
- /**
- * <p>
- * Adds the following pages:
- * <ul>
- * <li>{@link J2EEUtilityJarImportTypePageNew}as the main wizard page ({@link #IMPORT_TYPE})
- * <li>{@link J2EEUtilityJarImportPageNew}as the main wizard page ({@link #SELECT_JARS})
- * </ul>
- * </p>
- */
- @Override
- public void doAddPages() {
- this.addPage(new J2EEUtilityJarImportTypePageNew(getDataModel(), IMPORT_TYPE, getSelection()));
- this.addPage(new J2EEUtilityJarImportPageNew(getDataModel(), SELECT_JARS));
- }
-
- @Override
- protected IDataModelProvider getDefaultProvider() {
- return new J2EEUtilityJarListImportDataModelProvider();
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_UTILITY);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEWizardNLS.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEWizardNLS.java
deleted file mode 100644
index 15611dfa1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEWizardNLS.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.osgi.util.NLS;
-
-public class J2EEWizardNLS extends NLS {
-
- public static final String BUNDLE_NAME = "org.eclipse.jst.j2ee.internal.wizard.messages"; //$NON-NLS-1$
- public static String J2EEExportPage_Optimize_for_a_specific_server_runt_;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, J2EEWizardNLS.class);
- }
-
-}
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 accebf1c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java
+++ /dev/null
@@ -1,530 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-/*
- * Created on Mar 23, 2005
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.Dialog;
-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.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-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;
-import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-
-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()
- */
- @Override
- 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)
- */
- @Override
- 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();
- Dialog.applyDialogFont(parent);
- 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)
- */
- @Override
- 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();
- setDefaultModulesSelection(true);
- } else {
- setDefaultModulesSelection(false);
- showNewModulesCompsite();
- }
- setButtonEnablement();
- validatePage();
- }
-
- private void setDefaultModulesSelection(boolean selection) {
- getDataModel().setBooleanProperty(CREATE_APPCLIENT, selection);
- getDataModel().setBooleanProperty(CREATE_CONNECTOR, selection);
- getDataModel().setBooleanProperty(CREATE_EJB, selection);
- getDataModel().setBooleanProperty(CREATE_WEB, selection);
- }
-
- 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()
- */
- @Override
- protected IWizard createWizard() {
- return createChildWizard("org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard", NESTED_MODEL_CLIENT); //$NON-NLS-1$
- }
- };
- }
- 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()
- */
- @Override
- protected IWizard createWizard() {
- return createChildWizard("org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorProjectWizard", NESTED_MODEL_JCA); //$NON-NLS-1$
- }
- };
- }
- 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()
- */
- @Override
- protected IWizard createWizard() {
- return createChildWizard("org.eclipse.jst.ejb.ui.project.facet.EjbProjectWizard", NESTED_MODEL_EJB); //$NON-NLS-1$
- }
- };
- }
- 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()
- */
- @Override
- protected IWizard createWizard() {
- return createChildWizard("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard", NESTED_MODEL_WEB); //$NON-NLS-1$
- }
- };
- }
- return webNode;
- }
-
- private IWizard createChildWizard(String id, String parentWizModelName) {
- NewProjectDataModelFacetWizard wizard = null;
- IWizardRegistry newWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
- IWizardDescriptor wizardDescriptor = newWizardRegistry.findWizard(id);
- try {
- // retrieve the model of the parent wizard
- IDataModel parentWizModel = getDataModel().getNestedModel(parentWizModelName);
-
- // create the child wizard and retrieve its model
- wizard = (NewProjectDataModelFacetWizard) wizardDescriptor.createWizard();
- IDataModel childWizModel = wizard.getDataModel();
-
- // copy the properties of the parent wizard's model to the child wizard's model
- Iterator props = parentWizModel.getBaseProperties().iterator();
- while (props.hasNext()) {
- String prop = (String) props.next();
- if(!prop.equals(IFacetProjectCreationDataModelProperties.FACETED_PROJECT_WORKING_COPY)){
- childWizModel.setProperty(prop, parentWizModel.getProperty(prop));
- }
- }
- } catch (CoreException ce) {
- Logger.getLogger().log(ce);
- }
- return wizard;
- }
-
- /**
- * @param selectedNode
- * The selectedNode to set.
- */
- private void setSelectedNode(GenericWizardNode selectedNode) {
- this.selectedNode = selectedNode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#canFlipToNextPage()
- */
- @Override
- 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.
- */
- @Override
- 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(null,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()
- */
- @Override
- protected void validatePage() {
- if (!defaultModulesButton.getSelection()) {
- setPageComplete(false);
- setErrorMessage(null);
- } else
- super.validatePage();
- }
-
-}
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 c64ddd4c6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-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.JavaPluginImages;
-import org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog;
-import org.eclipse.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jface.dialogs.Dialog;
-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.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
-import org.eclipse.jst.j2ee.internal.dialogs.TypeSearchEngine;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardPage;
-
-/**
- * @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 DataModelWizardPage {
-
- protected Button publicButton;
- protected Button abstractButton;
- protected Button finalButton;
- protected TableViewer interfaceViewer;
- protected Button addButton;
- protected Button removeButton;
- protected Button inheritButton;
- protected Button constructorButton;
- protected Button mainMethodButton;
-
- /**
- * @param model
- * @param pageName
- */
- public NewJavaClassOptionsWizardPage(IDataModel model, String pageName, String pageDesc, String pageTitle) {
- super(model, pageName);
- setDescription(pageDesc);
- this.setTitle(pageTitle);
- setInfopopID(IJ2EEUIContextIds.NEW_JAVA_CLASS_OPTION_WIZARD_P1);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{INewJavaClassDataModelProperties.MODIFIER_ABSTRACT, INewJavaClassDataModelProperties.MODIFIER_FINAL};
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jem.util.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- @Override
- 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());
- Dialog.applyDialogFont(parent);
- 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, INewJavaClassDataModelProperties.MODIFIER_PUBLIC, null);
-
- abstractButton = new Button(composite, SWT.CHECK);
- abstractButton.setText(J2EEUIMessages.JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(abstractButton, INewJavaClassDataModelProperties.MODIFIER_ABSTRACT, null);
-
- finalButton = new Button(composite, SWT.CHECK);
- finalButton.setText(J2EEUIMessages.JAVA_CLASS_FINAL_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(finalButton, INewJavaClassDataModelProperties.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 TableViewer(composite, SWT.BORDER | SWT.MULTI);
- interfaceViewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
- interfaceViewer.setContentProvider(getInterfaceContentProvider());
- interfaceViewer.setLabelProvider(getInterfaceLabelProvider());
- interfaceViewer.getControl().addKeyListener(getInterfaceKeyListener());
- interfaceViewer.setInput(model.getProperty(INewJavaClassDataModelProperties.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, INewJavaClassDataModelProperties.MAIN_METHOD, null);
-
- inheritButton = new Button(buttonCompo, SWT.CHECK);
- inheritButton.setText(J2EEUIMessages.JAVA_CLASS_INHERIT_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(inheritButton, INewJavaClassDataModelProperties.ABSTRACT_METHODS, null);
-
- constructorButton = new Button(buttonCompo, SWT.CHECK);
- constructorButton.setText(J2EEUIMessages.JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL);
- synchHelper.synchCheckbox(constructorButton, INewJavaClassDataModelProperties.CONSTRUCTOR, null);
- }
-
- @Override
- protected void enter() {
- super.enter();
- //set the intefaces on every page enter (not only on viewer creation)
- interfaceViewer.setInput(model.getProperty(INewJavaClassDataModelProperties.INTERFACES));
- }
-
- /**
- * @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 List) {
- ret = ((List) 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 JavaPluginImages.get(JavaPluginImages.IMG_OBJS_INTERFACE);
- }
-
- 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
- }
- };
- }
-
- protected KeyListener getInterfaceKeyListener() {
- return new KeyListener() {
-
- public void keyPressed(KeyEvent e) {
- }
-
- public void keyReleased(KeyEvent e) {
- if (e.keyCode == SWT.DEL) {
- handleInterfaceRemoveButtonSelected();
- }
- }
-
- };
- }
-
- /**
- * Browse for a new Super Interface Class
- */
- protected void handleInterfaceAddButtonSelected() {
- IProject project = (IProject) model.getProperty(INewJavaClassDataModelProperties.PROJECT);
- IRunnableContext context = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
- // this eliminates the non-exported classpath entries
- final IJavaSearchScope scope = TypeSearchEngine.createJavaSearchScopeForAProject(javaProject, true, true);
- FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),false, context, scope,IJavaSearchConstants.INTERFACE);
- dialog.setTitle(J2EEUIMessages.INTERFACE_SELECTION_DIALOG_TITLE);
- if (dialog.open() == Window.OK) {
- IType type = (IType) dialog.getFirstResult();
- String newInterface = ""; //$NON-NLS-1$
- if (type != null) {
- newInterface = type.getFullyQualifiedName();
- List valueList = getInterfaceViewerItems();
- if (!valueList.contains(newInterface)) {
- interfaceViewer.add(newInterface);
- model.setProperty(INewJavaClassDataModelProperties.INTERFACES, getInterfaceViewerItems());
- }
- }
- }
- }
-
- /**
- * Remove an interface from the SuperInterface List
- */
- protected void handleInterfaceRemoveButtonSelected() {
- IStructuredSelection selection = (IStructuredSelection) interfaceViewer.getSelection();
- List items = selection.toList();
- if (!items.isEmpty()) {
- List valueList = getInterfaceViewerItems();
- for (int i = 0; i < items.size(); i++) {
- valueList.remove(items.get(i));
- }
- interfaceViewer.setInput(valueList);
- model.setProperty(INewJavaClassDataModelProperties.INTERFACES, valueList);
- }
- }
-
- private List getInterfaceViewerItems() {
- ArrayList<String> list = new ArrayList<String>();
- TableItem[] items = interfaceViewer.getTable().getItems();
- for (TableItem item : items) {
- list.add(item.getText());
- }
- return list;
- }
-}
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 2365c9210..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java
+++ /dev/null
@@ -1,748 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-
-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.core.runtime.Platform;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.core.ICompilationUnit;
-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.FilteredTypesSelectionDialog;
-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.dialogs.Dialog;
-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.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-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.INewJavaClassDataModelProperties;
-import org.eclipse.jst.j2ee.internal.dialogs.TypeSearchEngine;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-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.Label;
-import org.eclipse.swt.widgets.Text;
-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.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.contentoutline.ContentOutline;
-import org.eclipse.wst.common.componentcore.internal.operation.IArtifactEditOperationDataModelProperties;
-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.DataModelWizardPage;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-
-/**
- *
- */
-public class NewJavaClassWizardPage extends DataModelWizardPage {
-
- private Text folderText;
- private Button folderButton;
- protected Text packageText;
- protected Button packageButton;
- protected Label packageLabel;
- protected Text classText;
- protected Label classLabel;
- protected Text superText;
- protected Button superButton;
- protected Label superLabel;
- protected Label projectNameLabel;
- private Combo projectNameCombo;
- protected String projectType;
- private String projectName;
-
- /**
- * @param model
- * @param pageName
- */
- public NewJavaClassWizardPage(IDataModel model, String pageName, String pageDesc, String pageTitle,
- String moduleType) {
- super(model, pageName);
- setDescription(pageDesc);
- this.setTitle(pageTitle);
- setPageComplete(false);
- this.projectType = moduleType;
- this.projectName = null;
- }
-
- /**
- *
- */
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{IArtifactEditOperationDataModelProperties.PROJECT_NAME,
- IArtifactEditOperationDataModelProperties.COMPONENT_NAME,
- INewJavaClassDataModelProperties.SOURCE_FOLDER,
- INewJavaClassDataModelProperties.JAVA_PACKAGE,
- INewJavaClassDataModelProperties.CLASS_NAME,
- INewJavaClassDataModelProperties.SUPERCLASS};
- }
-
- /**
- *
- */
- @Override
- 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);
- addFolderGroup(composite);
- addSeperator(composite, 3);
- addPackageGroup(composite);
- addClassnameGroup(composite);
- addSuperclassGroup(composite);
-
- // set the cursor focus
- // - to the "Java package" if it is empty
- // - to the "Class name" - otherwise
- if (packageText.getText().trim().length() == 0) {
- packageText.setFocus();
- } else {
- classText.setFocus();
- }
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, getInfopopID());
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- /**
- * Add project group
- */
- private void addProjectNameGroup(Composite parent) {
- // set up project name label
- projectNameLabel = new Label(parent, SWT.NONE);
- projectNameLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.MODULES_DEPENDENCY_PAGE_TABLE_PROJECT));
- 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() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- IProject project = ProjectUtilities.getProject(projectNameCombo.getText());
- validateProjectRequirements(project);
- }
- });
- synchHelper.synchCombo(projectNameCombo, IArtifactEditOperationDataModelProperties.PROJECT_NAME, null);
- initializeProjectList();
- new Label(parent, SWT.NONE);
- }
-
- /**
- *
- **/
- private IFolder getDefaultJavaSourceFolder(IProject project) {
-
- if (project == null)
- return null;
- IPackageFragmentRoot[] sources = J2EEProjectUtilities.getSourceContainers(project);
- // Try and return the first source folder
- if (sources.length > 0) {
- try {
- return (IFolder) sources[0].getCorrespondingResource();
- } catch (Exception e) {
- return null;
- }
- }
- return null;
- }
-
- /**
- * This method is used by the project list initializer. The method checks
- * if the specified project is valid to include it in the project list.
- *
- * <p>Subclasses of this wizard page should override this method to
- * adjust filtering of the projects to their needs. </p>
- *
- * @param project reference to the project to be checked
- *
- * @return <code>true</code> if the project is valid to be included in
- * the project list, <code>false</code> - otherwise.
- */
- protected boolean isProjectValid(IProject project) {
- boolean result;
- try {
- result = project.isAccessible() &&
- project.hasNature(IModuleConstants.MODULE_NATURE_ID) &&
- JavaEEProjectUtilities.getJ2EEProjectType(project).equals(projectType);
- } catch (CoreException ce) {
- result = false;
- }
- return result;
- }
-
- /**
- *
- */
- private void initializeProjectList() {
- IProject[] workspaceProjects = ProjectUtilities.getAllProjects();
- List items = new ArrayList();
- for (int i = 0; i < workspaceProjects.length; i++) {
- IProject project = workspaceProjects[i];
- if (isProjectValid(project))
- items.add(project.getName());
- }
- if (items.isEmpty()) return;
- String[] names = new String[items.size()];
- for (int i = 0; i < items.size(); i++) {
- names[i] = (String) items.get(i);
- }
- projectNameCombo.setItems(names);
- IProject selectedProject = null;
- try {
- if (model !=null) {
- String projectNameFromModel = model.getStringProperty(IArtifactEditOperationDataModelProperties.COMPONENT_NAME);
- if (projectNameFromModel!=null && projectNameFromModel.length()>0)
- selectedProject = ProjectUtilities.getProject(projectNameFromModel);
- }
- } catch (Exception e) {}
- try {
- if (selectedProject == null)
- selectedProject = getSelectedProject();
- if (selectedProject != null && selectedProject.isAccessible()
- && selectedProject.hasNature(IModuleConstants.MODULE_NATURE_ID)) {
- projectNameCombo.setText(selectedProject.getName());
- validateProjectRequirements(selectedProject);
- model.setProperty(IArtifactEditOperationDataModelProperties.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);
- validateProjectRequirements(ProjectUtilities.getProject(projectName));
- model.setProperty(IArtifactEditOperationDataModelProperties.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, INewJavaClassDataModelProperties.SOURCE_FOLDER, null);
-
- IPackageFragmentRoot root = getSelectedPackageFragmentRoot();
- String projectName = model.getStringProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME);
- if (projectName != null && projectName.length() > 0) {
- IProject targetProject = ProjectUtilities.getProject(projectName);
- if (root == null || !root.getJavaProject().getProject().equals(targetProject)) {
- IFolder folder = getDefaultJavaSourceFolder(targetProject);
- if (folder != null)
- folderText.setText(folder.getFullPath().toOSString());
- } else {
- folderText.setText(root.getPath().toString());
- }
- }
-
- folderButton = new Button(composite, SWT.PUSH);
- folderButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL_O);
- 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
- 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));
- synchHelper.synchText(packageText, INewJavaClassDataModelProperties.JAVA_PACKAGE, null);
-
- IPackageFragment packageFragment = getSelectedPackageFragment();
- String targetProject = model.getStringProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME);
- if (packageFragment != null && packageFragment.exists() &&
- packageFragment.getJavaProject().getElementName().equals(targetProject)) {
- IPackageFragmentRoot root = getPackageFragmentRoot(packageFragment);
- if (root != null)
- folderText.setText(root.getPath().toString());
- model.setProperty(INewJavaClassDataModelProperties.JAVA_PACKAGE, packageFragment.getElementName());
- }
-
- packageButton = new Button(composite, SWT.PUSH);
- packageButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL_W);
- 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
- }
- });
- }
-
- protected IPackageFragmentRoot getPackageFragmentRoot(IPackageFragment packageFragment) {
- if (packageFragment == null)
- return null;
- else if (packageFragment.getParent() instanceof IPackageFragment)
- return getPackageFragmentRoot((IPackageFragment) packageFragment.getParent());
- else if (packageFragment.getParent() instanceof IPackageFragmentRoot)
- return (IPackageFragmentRoot) packageFragment.getParent();
- else
- return null;
- }
-
- /**
- * Add classname group to composite
- */
- private void addClassnameGroup(Composite composite) {
- // class name
- 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, INewJavaClassDataModelProperties.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
- 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, INewJavaClassDataModelProperties.SUPERCLASS, null);
-
- superButton = new Button(composite, SWT.PUSH);
- superButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL_E);
- 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);
- String projectName = model.getStringProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME);
- if (projectName==null || projectName.length()==0)
- return;
- IProject project = ProjectUtilities.getProject(projectName);
- 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
- }
-
- }
- }
-
- protected void handlePackageButtonPressed() {
- IPackageFragmentRoot packRoot = (IPackageFragmentRoot) model.getProperty(INewJavaClassDataModelProperties.JAVA_PACKAGE_FRAGMENT_ROOT);
- 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 = (IPackageFragmentRoot) model.getProperty(INewJavaClassDataModelProperties.JAVA_PACKAGE_FRAGMENT_ROOT);
- 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()} );
- FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),false, getWizard().getContainer(), scope, IJavaSearchConstants.CLASS);
- 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() {
- @Override
- public boolean select(Viewer viewer, Object parent, Object element) {
- if (element instanceof IProject) {
- IProject project = (IProject) element;
- return project.getName().equals(model.getProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME));
- } else if (element instanceof IFolder) {
- IFolder folder = (IFolder) element;
- // only show source folders
- IProject project = ProjectUtilities.getProject(model.getStringProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME));
- IPackageFragmentRoot[] sourceFolders = J2EEProjectUtilities.getSourceContainers(project);
- for (int i = 0; i < sourceFolders.length; i++) {
- if (sourceFolders[i].getResource()!= null && sourceFolders[i].getResource().equals(folder))
- return true;
- }
- }
- return false;
- }
- };
- }
-
-
-
- /**
- * @return
- */
- private IProject getSelectedProject() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- if (!(selection instanceof IStructuredSelection))
- return null;
- IJavaElement element = getInitialJavaElement(selection);
- if (element != null && element.getJavaProject() != null)
- return element.getJavaProject().getProject();
- IStructuredSelection stucturedSelection = (IStructuredSelection) selection;
- if (stucturedSelection.getFirstElement() instanceof EObject)
- return ProjectUtilities.getProject(stucturedSelection.getFirstElement());
- IProject project = getExtendedSelectedProject(stucturedSelection.getFirstElement());
- if(project != null) {
- return project;
- }
- if(selection instanceof TreeSelection && (((TreeSelection)selection).getPaths().length > 0)){
- TreePath path = (((TreeSelection)selection).getPaths()[0]);
- if(path.getSegmentCount() > 0 && path.getSegment(0) instanceof IProject) {
- return (IProject) path.getSegment(0);
- }
- }
- return null;
- }
-
- protected IProject getExtendedSelectedProject(Object selection) {
- return null;
- }
-
- /**
- * @return
- */
- private IPackageFragment getSelectedPackageFragment() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- ISelection selection = window.getSelectionService().getSelection();
- if (selection == null)
- return null;
- IJavaElement element = getInitialJavaElement(selection);
- if (element != null) {
- if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
- return (IPackageFragment) element;
- } else if (element.getElementType() == IJavaElement.COMPILATION_UNIT) {
- IJavaElement parent = ((ICompilationUnit) element).getParent();
- if (parent.getElementType() == IJavaElement.PACKAGE_FRAGMENT) {
- return (IPackageFragment) parent;
- }
- } else if (element.getElementType() == IJavaElement.TYPE) {
- return ((IType) element).getPackageFragment();
- }
- }
- return null;
- }
-
- private IPackageFragmentRoot getSelectedPackageFragmentRoot() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().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_ROOT)
- return (IPackageFragmentRoot) element;
- }
- 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();
- jelem = getJavaElement(selectedElement);
- if (jelem == null) {
- IResource resource = getResource(selectedElement);
- 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) {
- IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null)
- return null;
- IWorkbenchPart part = window.getActivePage().getActivePart();
- if (part instanceof ContentOutline) {
- part = window.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();
- }
-
- public void setProjectName(String projectName) {
- this.projectName = projectName;
- }
-
- protected void validateProjectRequirements(IProject project)
- {
- // nothing to do in most cases
- }
-
- protected IJavaElement getJavaElement(Object obj) {
- if (obj == null)
- return null;
-
- if (obj instanceof IJavaElement)
- return (IJavaElement) obj;
-
- if (obj instanceof IAdaptable)
- return (IJavaElement) ((IAdaptable) obj).getAdapter(IJavaElement.class);
-
- return (IJavaElement) Platform.getAdapterManager().getAdapter(obj, IJavaElement.class);
- }
-
- protected IResource getResource(Object obj) {
- if (obj == null)
- return null;
-
- if (obj instanceof IResource)
- return (IResource) obj;
-
- if (obj instanceof IAdaptable)
- return (IResource) ((IAdaptable) obj).getAdapter(IResource.class);
-
- return (IResource) Platform.getAdapterManager().getAdapter(obj, IResource.class);
- }
-}
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 d0e6af58a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetComboHelper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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
- *******************************************************************************/
-/*
- * 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;
- }
-}
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 bef30d4d1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ServerTargetUIHelper.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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.Arrays;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-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.ServerUtil;
-
-/**
- * @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) {
- return true;
- }
-
- // 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);
-// }
- }
-
-
- public static ServerTargetComboHelper getValidServerTargetComboItems(String j2eeType, String selectedVersion) {
- IRuntime[] validServerTargets = ServerUtil.getRuntimes(j2eeType, selectedVersion);
- String[] serverTargetList = null;
- if (validServerTargets.length>0) {
- int serverTargetListSize = validServerTargets.length;
- serverTargetList = new String[serverTargetListSize];
- for (int i = 0; i < validServerTargets.length; i++) {
- IRuntime runtime = validServerTargets[i];
- serverTargetList[i] = runtime.getName() + " (" + runtime.getRuntimeType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return new ServerTargetComboHelper(Arrays.asList(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);
- }
- }
-}
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 a124c90eb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-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.ITableLabelProvider;
-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.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-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.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @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 implements ITableLabelProvider {
- public Image getColumnImage(Object element, int columnIndex) {
- if (columnIndex == 0) {
- return labelProviderImage;
- }
- return null;
- }
-
- public String getColumnText(Object element, int columnIndex) {
- String[] array = (String[]) element;
- return array[columnIndex];
- }
-
- @Override
- public Image getImage(Object element) {
- return labelProviderImage;
- }
-
- @Override
- public String getText(Object element) {
- String[] array = (String[]) element;
- if (array.length > 0) {
- return array[0];
- }
- return super.getText(element);
- }
- }
-
- protected class AddStringArrayDialog extends Dialog implements ModifyListener {
- 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.
- */
- @Override
- 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();
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- @Override
- protected Control createContents(Composite parent) {
- Composite composite = (Composite) super.createContents(parent);
-
- for (int i = 0; i < texts.length; i++) {
- texts[i].addModifyListener(this);
- }
-
- updateOKButton();
-
- return composite;
- }
-
- @Override
- protected void okPressed() {
- stringArray = callback.retrieveResultStrings(texts);
- super.okPressed();
- }
-
- public String[] getStringArray() {
- return stringArray;
- }
-
- public void modifyText(ModifyEvent e) {
- updateOKButton();
- }
-
- private void updateOKButton() {
- getButton(IDialogConstants.OK_ID).setEnabled(callback.validate(texts));
- }
- }
-
- protected class EditStringArrayDialog extends AddStringArrayDialog {
- protected String[] valuesForTextField;
- /**
- * CMPFieldDialog constructor comment.
- */
- public EditStringArrayDialog(Shell shell, String windowTitle, String[] labelsForTextField, String[] valuesForTextField) {
- super(shell, windowTitle, labelsForTextField);
- this.valuesForTextField = valuesForTextField;
- }
- /**
- * CMPFieldDialog constructor comment.
- */
- @Override
- public Control createDialogArea(Composite parent) {
-
- Composite composite = (Composite) super.createDialogArea(parent);
-
- int n = valuesForTextField.length;
- for (int i = 0; i < n; i++) {
- texts[i].setText(valuesForTextField[i]);
- }
-
- return composite;
- }
- }
-
- /**
- * Callback interface used by the Add/Edit-StringArrayDialog classes.
- */
- public interface StringArrayDialogCallback {
-
- /**
- * Validates the text fields.
- * <p>Used to decide wheather to enable the OK button of the dialog.
- * If the method returns <code>true</code> the OK button is enabled,
- * otherwise the OK button is disabled.</p>
- *
- * @param reference to the text fields in the dialog
- *
- * @return <code>true</code> if the values in the text fields are
- * valid, <code>false</code> otherwise.
- */
- public boolean validate(Text[] texts);
-
- /**
- * Retrieves the strings from the text fields of the dialog.
- * <p>Implementers of the callback can use these method to do some
- * preprocessing (like trimming) of the data in the text fields before
- * using it. The returned values will be the actual data that will be
- * put in the table viewer.</p>
- *
- * @param texts reference to the text fields in the dialog
- *
- * @return the values retreived from the text fields
- */
- public String[] retrieveResultStrings(Text[] texts);
-
- }
-
- /**
- * Default adapter with basic implementation of the
- * <code>StringArrayDialogCallback</code> interface.
- */
- protected class StringArrayDialogCallbackAdapter implements StringArrayDialogCallback {
-
- /**
- * Returns always <code>true</code>.
- */
- public boolean validate(Text[] texts) {
- return true;
- }
-
- /**
- * Just retreives the unmodified values of the text fields as a
- * string array.
- */
- public String[] retrieveResultStrings(Text[] texts) {
- int n = texts.length;
- String[] result = new String[n];
- for (int i = 0; i < n; i++) {
- result[i] = texts[i].getText();
- }
- return result;
- }
-
- }
-
- private TableViewer viewer;
- private Button addButton;
- private Button editButton;
- private Button removeButton;
- private String dialogTitle;
- private String[] fieldLabels;
- private IDataModel model;
- private String propertyName;
- private Image labelProviderImage;
- private StringArrayDialogCallback callback;
-
- public StringArrayTableWizardSection(Composite parent, String title, String addButtonLabel, String removeButtonLabel,
- String[] labelsForText, Image labelProviderImage, IDataModel model, String propertyName) {
- this(parent, title, addButtonLabel, null, removeButtonLabel, labelsForText, labelProviderImage, model, propertyName);
- }
-
- public StringArrayTableWizardSection(Composite parent, String title, String addButtonLabel, String editButtonLabel, String removeButtonLabel,
- String[] labelsForText, Image labelProviderImage, IDataModel model, String propertyName) {
- this(parent, title, title, addButtonLabel, editButtonLabel, removeButtonLabel, labelsForText, labelsForText, labelProviderImage, model, propertyName);
- }
-
- public StringArrayTableWizardSection(Composite parent, String componentLabel, String dialogTitle, String addButtonLabel, String editButtonLabel, String removeButtonLabel,
- String[] columnTitles, String[] fieldLabels, Image labelProviderImage, IDataModel model, String propertyName) {
- super(parent, SWT.NONE);
- this.dialogTitle = dialogTitle;
- this.fieldLabels = fieldLabels;
- 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(componentLabel);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- titleLabel.setLayoutData(data);
-
- Table table = new Table(this, SWT.FULL_SELECTION | SWT.BORDER);
- viewer = new TableViewer(table);
- table.setLayoutData(new GridData(GridData.FILL_BOTH));
- viewer.setContentProvider(new StringArrayListContentProvider());
- viewer.setLabelProvider(new StringArrayListLabelProvider());
-
- final 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();
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
-
- if (editButtonLabel != null) {
- editButton = new Button(buttonCompo, SWT.PUSH);
- editButton.setText(editButtonLabel);
- editButton.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_FILL));
- editButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent event) {
- handleEditButtonSelected();
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
- editButton.setEnabled(false);
- }
-
- 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();
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- //Do nothing
- }
- });
- removeButton.setEnabled(false);
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (editButton != null) {
- boolean enabled = ((IStructuredSelection) selection).size() == 1;
- editButton.setEnabled(enabled);
- }
- removeButton.setEnabled(!selection.isEmpty());
- }
- });
-
- if (editButton != null) {
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- handleEditButtonSelected();
- }
- });
- }
-
- if (columnTitles.length > 1) {
- for (int i = 0; i < columnTitles.length; i++) {
- TableColumn tableColumn = new TableColumn(table, SWT.NONE);
- tableColumn.setText(columnTitles[i]);
- }
- table.setHeaderVisible(true);
- this.addControlListener(new ControlAdapter() {
- @Override
- public void controlResized(ControlEvent e) {
- Table table = viewer.getTable();
- TableColumn[] columns = table.getColumns();
- Point buttonArea = buttonCompo.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Rectangle area = table.getParent().getClientArea();
- Point preferredSize = viewer.getTable().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int width = area.width - 2 * table.getBorderWidth() - buttonArea.x - columns.length * 2;
- if (preferredSize.y > area.height + table.getHeaderHeight()) {
- // Subtract the scrollbar width from the total column width
- // if a vertical scrollbar will be required
- Point vBarSize = table.getVerticalBar().getSize();
- width -= vBarSize.x;
- }
- Point oldSize = table.getSize();
- int consumeWidth = 0;
- for (int i = 0; i < columns.length; i++) {
- if (oldSize.x > area.width) {
- // table is getting smaller so make the columns
- // smaller first and then resize the table to
- // match the client area width
- consumeWidth = setColumntWidth(width, columns, consumeWidth, i);
- table.setSize(area.width - buttonArea.x - columns.length * 2, area.height);
- } else {
- // table is getting bigger so make the table
- // bigger first and then make the columns wider
- // to match the client area width
- table.setSize(area.width - buttonArea.x - columns.length * 2, area.height);
- consumeWidth = setColumntWidth(width, columns, consumeWidth, i);
- }
- }
- }
-
- private int setColumntWidth(int width, TableColumn[] columns, int consumeWidth, int i) {
- int localConsumeWidth = consumeWidth;
- if (i < columns.length - 1) {
- columns[i].setWidth(width / columns.length);
- localConsumeWidth += columns[i].getWidth();
- } else {
- columns[i].setWidth(width - localConsumeWidth);
- }
- return localConsumeWidth;
- }
- });
- }
-
- callback = new StringArrayDialogCallbackAdapter();
- }
-
- private void handleAddButtonSelected() {
- AddStringArrayDialog dialog = new AddStringArrayDialog(getShell(), dialogTitle, fieldLabels);
- dialog.open();
- String[] stringArray = dialog.getStringArray();
- addStringArray(stringArray);
- }
-
- private void handleEditButtonSelected() {
- ISelection s = viewer.getSelection();
- if (!(s instanceof IStructuredSelection))
- return;
- IStructuredSelection selection = (IStructuredSelection) s;
- if (selection.size() != 1)
- return;
-
- Object selectedObj = selection.getFirstElement();
- String[] valuesForText = (String[]) selectedObj;
-
- EditStringArrayDialog dialog = new EditStringArrayDialog(getShell(), dialogTitle, fieldLabels, valuesForText);
- dialog.open();
- String[] stringArray = dialog.getStringArray();
- editStringArray(valuesForText, stringArray);
- }
-
- private void handleRemoveButtonSelected() {
- ISelection selection = viewer.getSelection();
- if (selection.isEmpty() || !(selection instanceof IStructuredSelection))
- return;
- List selectedObj = ((IStructuredSelection) selection).toList();
- removeStringArrays(selectedObj);
- }
-
- public void addStringArray(String[] stringArray) {
- if (stringArray == null)
- return;
- List valueList = (List) viewer.getInput();
- if (valueList == null)
- valueList = new ArrayList();
- valueList.add(stringArray);
- setInput(valueList);
- }
-
- public void editStringArray(String[] oldStringArray, String[] newStringArray) {
- if (newStringArray == null)
- return;
-
- List valueList = (List) viewer.getInput();
- if (valueList == null)
- valueList = new ArrayList();
-
- int index = valueList.indexOf(oldStringArray);
- if (index == -1) {
- valueList.add(newStringArray);
- } else {
- valueList.set(index, newStringArray);
- }
-
- setInput(valueList);
- }
-
- public void removeStringArray(Object selectedStringArray) {
- List valueList = (List) viewer.getInput();
- valueList.remove(selectedStringArray);
- setInput(valueList);
- }
-
- public void removeStringArrays(Collection selectedStringArrays) {
- List valueList = (List) viewer.getInput();
- valueList.removeAll(selectedStringArrays);
- 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 getEditButton() {
- return editButton;
- }
-
- public Button getRemoveButton() {
- return removeButton;
- }
-
- /**
- * Set callback for customizing the preprocessing of the user input.
- *
- * @param callback an implementation of the callback interface.
- */
- public void setCallback(StringArrayDialogCallback callback) {
- this.callback = callback;
- }
-}
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/earlibraries.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/earlibraries.properties
deleted file mode 100644
index b815ca648..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/earlibraries.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-EARLibrariesContainerPage_0=EAR Libraries
-EARLibrariesContainerPage_1=The EAR Libraries classpath container dynamically computes the Java EE project's module classpath dependencies using the META-INF/MANIFEST.MF Class-Path entries.
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/messages.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/messages.properties
deleted file mode 100644
index 1ed5a8b71..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-J2EEExportPage_Optimize_for_a_specific_server_runt_=Optimi&ze for a specific server runtime
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/IArchiveExportParticipantPanelFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/IArchiveExportParticipantPanelFactory.java
deleted file mode 100644
index 5a897177b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/IArchiveExportParticipantPanelFactory.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.archive;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * Used in conjunction with the <code>org.eclipse.jst.j2ee.ui.archiveExportParticipantPanels</code>
- * extension point in order to extend the UI of the base module archive export wizard.
- *
- * @since 3.0
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public interface IArchiveExportParticipantPanelFactory
-{
- /**
- * Creates a composite containing the UI elements appropriate for the export participant
- * that this panel factory is registered with.
- *
- * @param parent the parent composite
- * @param dataModel the data model of the export participant
- * @return the created composite
- */
-
- Composite createPanel( Composite parent,
- IDataModel dataModel );
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/internal/ArchiveExportParticipantPanelsExtensionPoint.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/internal/ArchiveExportParticipantPanelsExtensionPoint.java
deleted file mode 100644
index 38b1307b7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/archive/internal/ArchiveExportParticipantPanelsExtensionPoint.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.archive.internal;
-
-import static org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.findExtensions;
-import static org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.findRequiredAttribute;
-import static org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.getTopLevelElements;
-import static org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.instantiate;
-import static org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin.PLUGIN_ID;
-import static org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin.log;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.InvalidExtensionException;
-import org.eclipse.jst.j2ee.ui.archive.IArchiveExportParticipantPanelFactory;
-
-/**
- * Contains the logic for processing the <code>org.eclipse.jst.j2ee.ui.archiveExportParticipantPanels</code>
- * extension point.
- *
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class ArchiveExportParticipantPanelsExtensionPoint
-{
- public static final String EXTENSION_POINT_ID = "archiveExportParticipantPanels"; //$NON-NLS-1$
-
- private static final String EL_PANEL_FACTORY = "panel-factory"; //$NON-NLS-1$
- private static final String ATTR_ARCHIVE_EXPORT_PARTICIPANT_ID = "archiveExportParticipantId"; //$NON-NLS-1$
- private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
-
- private static Map<String,PanelFactoryInfo> extensions = null;
-
- public static class PanelFactoryInfo
- {
- private String archiveExportParticipantId;
- private String pluginId = null;
- private String className = null;
-
- public String getArchiveExportExtensionId()
- {
- return this.archiveExportParticipantId;
- }
-
- public IArchiveExportParticipantPanelFactory loadPanelFactory()
- {
- try
- {
- return instantiate( this.pluginId, this.className,
- IArchiveExportParticipantPanelFactory.class );
- }
- catch( CoreException e )
- {
- log( e.getStatus() );
- return null;
- }
- }
- }
-
- public static PanelFactoryInfo getExtension( final String archiveExportParticipantId )
- {
- readExtensions();
-
- return extensions.get( archiveExportParticipantId );
- }
-
- private static synchronized void readExtensions()
- {
- if( extensions != null )
- {
- return;
- }
-
- extensions = new HashMap<String,PanelFactoryInfo>();
-
- for( IConfigurationElement element
- : getTopLevelElements( findExtensions( PLUGIN_ID, EXTENSION_POINT_ID ) ) )
- {
- if( element.getName().equals( EL_PANEL_FACTORY ) )
- {
- try
- {
- readExtension( element );
- }
- catch( InvalidExtensionException e )
- {
- // Continue. The problem has been reported to the user via the log.
- }
- }
- }
- }
-
- private static void readExtension( final IConfigurationElement config )
-
- throws InvalidExtensionException
-
- {
- final PanelFactoryInfo ext = new PanelFactoryInfo();
-
- ext.archiveExportParticipantId = findRequiredAttribute( config, ATTR_ARCHIVE_EXPORT_PARTICIPANT_ID );
- ext.pluginId = config.getContributor().getName();
- ext.className = findRequiredAttribute( config, ATTR_CLASS );
-
- extensions.put( ext.archiveExportParticipantId, ext );
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.java
deleted file mode 100644
index 326dd76b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.java
+++ /dev/null
@@ -1,428 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2009 BEA Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- * Milen Manov, milen.manov@sap.com - bugs 248623
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-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.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelDecorator;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.earcreation.IEarFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.internal.AvailableJ2EEComponentsForEARContentProvider;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-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.jst.j2ee.internal.wizard.DefaultJ2EEComponentCreationWizard;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEComponentLabelProvider;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-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.TableItem;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public class EarFacetInstallPage extends J2EEModuleFacetInstallPage implements IEarFacetInstallDataModelProperties {
-
- private Button selectAllButton;
- private Button deselectAllButton;
- private Button newModuleButton;
-
- private Label moduleProjectsLabel;
- private CheckboxTableViewer moduleProjectsViewer;
-
- private boolean ignoreCheckedState = false;
-
- private Label contentDirLabel;
- private Text contentDir;
-
- public EarFacetInstallPage() {
- super("ear.facet.install.page"); //$NON-NLS-1$
- 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));
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{CONTENT_DIR, J2EE_PROJECTS_LIST};
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.NEW_EAR_ADD_MODULES_PAGE);
-
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(gdhfill());
-
- createModuleProjectOptions(composite);
- createContentDirGroup(composite);
-
- createGenerateDescriptorControl(composite, J2EEConstants.APPLICATION_DD_SHORT_NAME);
- registerFacetVersionChangeListener();
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- protected int getJ2EEVersion() {
- IProjectFacetVersion version = (IProjectFacetVersion)getDataModel().getProperty(FACET_VERSION);
- return J2EEVersionUtil.convertVersionStringToInt(version.getVersionString());
- }
-
- /**
- * @param parent
- */
- private void createModuleProjectOptions(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- moduleProjectsLabel = new Label(composite, SWT.NONE);
- moduleProjectsLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_MODULE_DEPENDENCIES_LABEL));
- GridData gd = gdhfill();
- gd.horizontalSpan = 2;
- moduleProjectsLabel.setLayoutData(gd);
-
- moduleProjectsViewer = CheckboxTableViewer.newCheckList(composite, 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 = getJ2EEVersion();
- ILabelDecorator decorator = PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator();
- AvailableJ2EEComponentsForEARContentProvider provider = new AvailableJ2EEComponentsForEARContentProvider(null, j2eeVersion, decorator);
- moduleProjectsViewer.setContentProvider(provider);
- final J2EEComponentLabelProvider labelProvider = new J2EEComponentLabelProvider(provider);
- decorator.addListener(new ILabelProviderListener(){
-
- public void labelProviderChanged(LabelProviderChangedEvent event) {
- if(!moduleProjectsViewer.getTable().isDisposed()){
- moduleProjectsViewer.refresh(true);
- }
- }
- });
- moduleProjectsViewer.setLabelProvider(labelProvider);
- setCheckedItemsFromModel();
-
- moduleProjectsViewer.addCheckStateListener(new ICheckStateListener() {
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (!ignoreCheckedState) {
- getDataModel().setProperty(J2EE_PROJECTS_LIST, getCheckedJ2EEElementsAsList());
- getDataModel().setProperty(JAVA_PROJECT_LIST, getCheckedJavaProjectsAsList());
- }
- }
- });
- TableLayout tableLayout = new TableLayout();
- moduleProjectsViewer.getTable().setLayout(tableLayout);
- moduleProjectsViewer.getTable().setHeaderVisible(false);
- moduleProjectsViewer.getTable().setLinesVisible(false);
- moduleProjectsViewer.setSorter(null);
- this.moduleProjectsViewer.getTable().getAccessible().addAccessibleListener(
- new AccessibleAdapter() {
- @Override
- public void getName(AccessibleEvent e) {
- e.result = J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_MODULE_DEPENDENCIES_LABEL_ACCESSIBILITY);
- }});
-
- createButtonsGroup(composite);
- }
-
- /**
- *
- */
- private void setCheckedItemsFromModel() {
- List components = (List) getDataModel().getProperty(J2EE_PROJECTS_LIST);
-
- TableItem [] items = moduleProjectsViewer.getTable().getItems();
-
- List list = new ArrayList();
-
- for( int i=0; i< items.length; i++ ){
- Object element = items[i].getData();
- if( element instanceof IVirtualComponent){
- IVirtualComponent comp = (IVirtualComponent)element;
- Iterator it = components.iterator();
- while( it.hasNext() ){
- IProject project = (IProject)it.next();
- if( comp.getProject().getName().equals(project.getName()) ){
- list.add(comp);
- }
- }
- }
- }
- moduleProjectsViewer.setCheckedElements(list.toArray());
- }
-
- private void refreshModules() {
- moduleProjectsViewer.refresh();
- setCheckedItemsFromModel();
- }
-
- protected List getCheckedJ2EEElementsAsList() {
- Object[] elements = moduleProjectsViewer.getCheckedElements();
- List list;
- if (elements == null || elements.length == 0)
- list = Collections.EMPTY_LIST;
- else{
- list = new ArrayList();
- for( int i=0; i< elements.length; i++){
- if( elements[i] instanceof IVirtualComponent ) {
- list.add(((IVirtualComponent)elements[i]).getProject());
- }
- }
- }
- return list;
- }
-
- protected List getCheckedJavaProjectsAsList() {
- Object[] elements = moduleProjectsViewer.getCheckedElements();
- List list;
- if (elements == null || elements.length == 0)
- list = Collections.EMPTY_LIST;
- else{
- list = new ArrayList();
- for( int i=0; i< elements.length; i++){
- if( elements[i] instanceof IProject ) {
- list.add(elements[i]);
- }
- }
- }
- return list;
- }
-
-
- protected void createButtonsGroup(Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- buttonGroup.setLayout(new GridLayout());
- buttonGroup.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
-
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_SELECT));
- selectAllButton.addListener(SWT.Selection, this);
- GridDataFactory.defaultsFor( selectAllButton ).applyTo( selectAllButton );
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESELECT));
- deselectAllButton.addListener(SWT.Selection, this);
- GridDataFactory.defaultsFor( deselectAllButton ).applyTo( deselectAllButton );
-
- new Label(buttonGroup, SWT.NONE); // pad
-
- newModuleButton = new Button(buttonGroup, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_NEW));
- newModuleButton.addListener(SWT.Selection, this);
- GridDataFactory.defaultsFor( newModuleButton ).applyTo( newModuleButton );
- }
-
- private void createContentDirGroup(Composite modulesGroup) {
- final Composite composite = new Composite(modulesGroup, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- composite.setLayoutData(gdhfill());
-
- this.contentDirLabel = new Label(composite, SWT.NONE);
- this.contentDirLabel.setText(Resources.contentDirLabel);
- this.contentDirLabel.setLayoutData(new GridData());
-
- this.contentDir = new Text(composite, SWT.BORDER);
- this.contentDir.setLayoutData(gdhfill());
-
- synchHelper.synchText(contentDir, CONTENT_DIR, null);
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- @Override
- 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);
- }
-
- @Override
- protected void handleFacetVersionChangedEvent()
- {
- String fv = model.getStringProperty(FACET_VERSION_STR);
- boolean isEAR50OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv) >= J2EEVersionConstants.VERSION_5_0;
- this.addDD.setVisible(isEAR50OrGreater);
- }
-
- /**
- *
- */
- 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);
- setNewModules(aModel);
- refreshModules();
- }
- }
- /**
- * @param model
- */
- private void setNewModules(IDataModel defaultModel) {
- List newComponents = new ArrayList();
- collectNewComponents(defaultModel, newComponents);
- List oldComponents = (List) getDataModel().getProperty(J2EE_PROJECTS_LIST);
- newComponents.addAll(oldComponents);
- getDataModel().setProperty(J2EE_PROJECTS_LIST, newComponents);
- }
-
- private void collectNewComponents(IDataModel defaultModel, List newProjects) {
- collectComponents(defaultModel.getNestedModel(IDefaultJ2EEComponentCreationDataModelProperties.NESTED_MODEL_EJB), newProjects);
- collectComponents(defaultModel.getNestedModel(IDefaultJ2EEComponentCreationDataModelProperties.NESTED_MODEL_WEB), newProjects);
- collectComponents(defaultModel.getNestedModel(IDefaultJ2EEComponentCreationDataModelProperties.NESTED_MODEL_CLIENT), newProjects);
- collectComponents(defaultModel.getNestedModel(IDefaultJ2EEComponentCreationDataModelProperties.NESTED_MODEL_JCA), newProjects);
- }
- private void collectComponents(IDataModel compDM, List newProjects) {
- if (compDM != null) {
- String projectName = compDM.getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
- if(projectName == null) return;
- IProject project = ProjectUtilities.getProject(projectName);
- if (project != null && project.exists())
- newProjects.add(project);
- }
- }
-
- private IDataModel createNewModuleModel() {
- IDataModel defaultModel = DataModelFactory.createDataModel(new DefaultJ2EEComponentCreationDataModelProvider());
- // transfer properties, project name
- String projectName = model.getStringProperty(FACET_PROJECT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.PROJECT_NAME, projectName);
- // ear component name
- String earName = model.getStringProperty(FACET_PROJECT_NAME);
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME, earName);
- // ear j2ee version
- int j2eeVersion = getJ2EEVersion();
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.J2EE_VERSION, new Integer(j2eeVersion));
-
- FacetedProjectWorkingCopy fpwc = (FacetedProjectWorkingCopy)model.getProperty(FACETED_PROJECT_WORKING_COPY);
- IRuntime rt = fpwc.getPrimaryRuntime();
- defaultModel.setProperty(IDefaultJ2EEComponentCreationDataModelProperties.FACET_RUNTIME, rt);
-
- return defaultModel;
- }
-
- /**
- *
- */
- private void handleDeselectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(false);
- //getDataModel().setProperty(J2EE_COMPONENT_LIST, null);
- //IDataModel nestedModel = (IDataModel)getDataModel().getProperty(NESTED_ADD_COMPONENT_TO_EAR_DM);
- //(nestedModel).setProperty(AddComponentToEnterpriseApplicationDataModelProvider., getCheckedJ2EEElementsAsList());
- getDataModel().setProperty(J2EE_PROJECTS_LIST, null);
- getDataModel().setProperty(JAVA_PROJECT_LIST, null);
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- /**
- *
- */
- private void handleSelectAllButtonPressed() {
- ignoreCheckedState = true;
- try {
- moduleProjectsViewer.setAllChecked(true);
- //getDataModel().setProperty(J2EE_COMPONENT_LIST, getCheckedElementsAsList());
- //IDataModel nestedModel = (IDataModel)getDataModel().getProperty(NESTED_ADD_COMPONENT_TO_EAR_DM);
- //(nestedModel).setProperty(AddComponentToEnterpriseApplicationDataModelProvider., getCheckedJ2EEElementsAsList());
-
- getDataModel().setProperty(J2EE_PROJECTS_LIST, getCheckedJ2EEElementsAsList());
- getDataModel().setProperty(JAVA_PROJECT_LIST, getCheckedJavaProjectsAsList());
-
- } finally {
- ignoreCheckedState = false;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#enter()
- */
- @Override
- protected void enter() {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- super.enter();
- }
-
-
- private static final class Resources
-
- extends NLS
- {
- public static String contentDirLabel;
-
- static {
- initializeMessages(EarFacetInstallPage.class.getName(), Resources.class);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties
deleted file mode 100644
index 2b4b77c06..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-contentDirLabel = &Content directory:
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java
deleted file mode 100644
index 1c8ba60d3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import org.eclipse.jface.dialogs.IDialogSettings;
-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;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-
-public class EarProjectFirstPage extends DataModelFacetCreationWizardPage {
-
- public EarProjectFirstPage(IDataModel dataModel, String pageName) {
- super(dataModel, 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));
- setInfopopID(IJ2EEUIContextIds.NEW_EAR_WIZARD_P1);
- }
-
- @Override
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- @Override
- protected String getModuleTypeID() {
- return IModuleConstants.JST_EAR_MODULE;
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- final Composite top = super.createTopLevelComposite(parent);
- createWorkingSetGroupPanel(top, new String[] { RESOURCE_WORKING_SET });
- return top;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java
deleted file mode 100644
index ae391d161..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.facet.EARFacetProjectCreationDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-import org.osgi.framework.Bundle;
-
-public class EarProjectWizard extends NewProjectDataModelFacetWizard {
-
- public EarProjectWizard(IDataModel model){
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_WIZ_TITLE));
- }
-
- public EarProjectWizard(){
- super();
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_COMPONENT_WIZ_TITLE));
- }
-
- @Override
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new EARFacetProjectCreationDataModelProvider());
- }
-
- public void setRuntimeInDataModel(IRuntime runtime){
- model.setProperty(FACET_RUNTIME, runtime);
- }
-
- @Override
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle("org.eclipse.jst.j2ee.ui"); //$NON-NLS-1$
- final URL url = bundle.getEntry("icons/ear-wiz-banner.gif"); //$NON-NLS-1$
-
- return ImageDescriptor.createFromURL(url);
- }
-
- @Override
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.ear"); //$NON-NLS-1$
- }
-
- @Override
- protected IWizardPage createFirstPage() {
- return new EarProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_EAR);
- }
-
- public void setEARName( String earName ){
- model.setProperty(FACET_PROJECT_NAME, earName);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java
deleted file mode 100644
index 1ece7b35d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2009 BEA Systems, Inc. and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
-import org.eclipse.osgi.util.NLS;
-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.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelSynchHelper;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class EarSelectionPanel implements IWebFacetInstallDataModelProperties
-
-{
- private final Button addToEar;
- private final Combo combo;
- private final Button newButton;
- private final Label label;
-
- private final IDataModel model;
- private DataModelSynchHelper synchhelper;
-
- public EarSelectionPanel( final IDataModel model, final Composite parent)
- {
- this.model = model;
- this.synchhelper = new DataModelSynchHelper(model);
-
- final Group group = new Group( parent, SWT.NONE );
- group.setLayoutData( gdhfill() );
- group.setLayout( new GridLayout( 3, false ) );
- group.setText( Resources.earMemberShip );
-
- this.addToEar = new Button( group, SWT.CHECK );
- this.addToEar.setText( Resources.addToEarLabel );
- GridDataFactory.defaultsFor(this.addToEar).span(3, 1).applyTo(this.addToEar);
- synchhelper.synchCheckbox(addToEar, ADD_TO_EAR, null);
-
- label = new Label(group, SWT.NULL);
- label.setText(Resources.earProjectLabel);
- this.combo = new Combo(group, SWT.NONE);
- this.combo.setLayoutData( gdhfill() );
-
- this.newButton = new Button( group, SWT.PUSH );
- this.newButton.setText( Resources.newButtonLabel );
- GridDataFactory.defaultsFor(this.newButton).applyTo(this.newButton);
-
- this.newButton.addSelectionListener( new SelectionAdapter()
- {
- @Override
- public void widgetSelected( final SelectionEvent event )
- {
- handleAddButton();
- }
- } );
-
- synchhelper.synchCombo(combo, EAR_PROJECT_NAME, new Control[]{label, newButton});
- Dialog.applyDialogFont(parent);
- }
-
- private void handleAddButton()
- {
- final EarProjectWizard wizard = new EarProjectWizard();
-
- final WizardDialog dialog
- = new WizardDialog( newButton.getShell(), wizard );
-
- IRuntime runtime = (IRuntime)model.getProperty(FACET_RUNTIME);
- wizard.setRuntimeInDataModel(runtime);
-
- if( dialog.open() != Window.CANCEL )
- {
- model.notifyPropertyChange(EAR_PROJECT_NAME, IDataModel.VALID_VALUES_CHG);
- final String earproj = wizard.getProjectName();
- model.setProperty(EAR_PROJECT_NAME, earproj);
- }
- }
-
- private static GridData gdhfill()
- {
- return new GridData( GridData.FILL_HORIZONTAL );
- }
-
- public static final GridData gdhspan( final GridData gd,
- final int span )
- {
- gd.horizontalSpan = span;
- return gd;
- }
-
- private static final class Resources
-
- extends NLS
-
- {
- public static String addToEarLabel;
- public static String newButtonLabel;
- public static String earProjectLabel;
- public static String earMemberShip;
-
- static
- {
- initializeMessages( EarSelectionPanel.class.getName(),
- Resources.class );
- }
- }
-
- public void dispose() {
- if(synchhelper != null){
- synchhelper.dispose();
- synchhelper = null;
- }
- }
-
- public String getComboText(){
- return combo.getText();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.properties
deleted file mode 100644
index f7ab1930e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-# SAP AG - adding keyboard shortcuts
-###############################################################################
-addToEarLabel = &Add project to an EAR
-newButtonLabel = New &Project...
-earProjectLabel=&EAR project name:
-earMemberShip=EAR membership
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.java
deleted file mode 100644
index bcc777df1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005-2007 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IMarkerResolutionGenerator;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class RuntimeMismatchMarkerResolutions
-
- implements IMarkerResolutionGenerator
-
-{
- private static final String ATTR_RUNTIME1 = "runtime1"; //$NON-NLS-1$
- private static final String ATTR_RUNTIME2 = "runtime2"; //$NON-NLS-1$
- private static final String ATTR_MODULE_PROJECT = "moduleProject"; //$NON-NLS-1$
-
- public IMarkerResolution[] getResolutions( final IMarker marker )
- {
- final List resolutions = new ArrayList( 2 );
-
- try
- {
- final IProject earProject = marker.getResource().getProject();
- final IFacetedProject earFacetedProject = ProjectFacetsManager.create( earProject );
- final IProject modProject = getModuleProject( marker );
- final IFacetedProject modFacetedProject = ProjectFacetsManager.create( modProject );
-
- for( Iterator itr = getRuntimes( marker ).iterator(); itr.hasNext(); )
- {
- final IRuntime runtime = (IRuntime) itr.next();
-
- if( earFacetedProject.isTargetable( runtime ) &&
- modFacetedProject.isTargetable( runtime ) )
- {
- final Resolution resolution
- = new Resolution( earFacetedProject, modFacetedProject, runtime );
-
- resolutions.add( resolution );
- }
- }
- }
- catch( CoreException e )
- {
- J2EEUIPlugin.logError( -1, null, e );
- }
-
- IMarkerResolution[] array = new IMarkerResolution[ resolutions.size() ];
- resolutions.toArray( array );
-
- return array;
- }
-
- private static IProject getModuleProject( final IMarker marker )
- {
- final IWorkspace ws = ResourcesPlugin.getWorkspace();
- final String moduleProjectName = marker.getAttribute( ATTR_MODULE_PROJECT, null );
- return ws.getRoot().getProject( moduleProjectName );
- }
-
- private static List getRuntimes( final IMarker marker )
- {
- final List runtimes = new ArrayList();
-
- IRuntime r = getRuntimeByName( marker.getAttribute( ATTR_RUNTIME1, null ) );
- if( r != null ) runtimes.add( r );
-
- r = getRuntimeByName( marker.getAttribute( ATTR_RUNTIME2, null ) );
- if( r != null ) runtimes.add( r );
-
- return runtimes;
- }
-
- private static IRuntime getRuntimeByName( final String name )
- {
- if( RuntimeManager.isRuntimeDefined( name ) )
- {
- return RuntimeManager.getRuntime( name );
- }
- return null;
- }
-
- private static final class Resolution
-
- implements IMarkerResolution
-
- {
- private final IFacetedProject earProject;
- private final IFacetedProject moduleProject;
- private final IRuntime runtime;
-
- public Resolution( final IFacetedProject earProject,
- final IFacetedProject moduleProject,
- final IRuntime runtime )
- {
- this.earProject = earProject;
- this.moduleProject = moduleProject;
- this.runtime = runtime;
- }
-
- public String getLabel()
- {
- return NLS.bind( Resources.useSameRuntime, this.runtime.getLocalizedName() );
- }
-
- public void run( final IMarker marker )
- {
- try
- {
- setRuntime( this.earProject, this.runtime );
- setRuntime( this.moduleProject, this.runtime );
- }
- catch( CoreException e )
- {
- ErrorDialog.openError( null, Resources.errorDialogTitle,
- Resources.errorDialogMessage, e.getStatus() );
- }
- }
-
- private void setRuntime( final IFacetedProject fproj,
- final IRuntime runtime )
-
- throws CoreException
-
- {
- final IRuntime currentPrimaryRuntime = fproj.getPrimaryRuntime();
-
- if( currentPrimaryRuntime != null &&
- ! currentPrimaryRuntime.getName().equals( runtime.getName() ) )
- {
- if( ! fproj.isTargeted( runtime ) )
- {
- fproj.addTargetedRuntime( runtime, null );
- }
-
- fproj.setPrimaryRuntime( runtime, null );
- }
- }
- }
-
- private static final class Resources
-
- extends NLS
-
- {
- public static String useSameRuntime;
- public static String errorDialogTitle;
- public static String errorDialogMessage;
-
- static
- {
- initializeMessages( RuntimeMismatchMarkerResolutions.class.getName(),
- Resources.class );
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.properties
deleted file mode 100644
index f8b03d64b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-useSameRuntime = Switch both projects to {0}
-errorDialogTitle = Error
-errorDialogMessage = Failed while applying the quick fix. \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java
deleted file mode 100644
index 29bbeb7dd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEComponentFacetCreationWizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class UtilityProjectFirstPage extends J2EEComponentFacetCreationWizardPage {
-
- public UtilityProjectFirstPage(IDataModel dataModel, String pageName) {
- super(dataModel, pageName);
- setTitle(Resources.pageTitle);
- setDescription(Resources.pageDescription);
- setInfopopID(IJ2EEUIContextIds.NEW_UTILITY_WIZARD_P1);
- }
-
- private static final class Resources extends NLS {
- public static String pageTitle;
- public static String pageDescription;
-
- static {
- initializeMessages(UtilityProjectFirstPage.class.getName(), Resources.class);
- }
- }
-
- @Override
- protected String getModuleFacetID() {
- return J2EEProjectUtilities.UTILITY;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.properties
deleted file mode 100644
index 0a6de07aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-pageTitle = Utility Module
-pageDescription = Configure utility module settings. \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java
deleted file mode 100644
index f801445c4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005 BEA Systems, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Konstantin Komissarchik - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.jst.j2ee.ui.project.facet;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.project.facet.UtilityProjectCreationDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-import org.osgi.framework.Bundle;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public class UtilityProjectWizard extends NewProjectDataModelFacetWizard {
-
- public UtilityProjectWizard(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVAUTIL_COMPONENT_WIZ_TITLE));
- }
-
- public UtilityProjectWizard(){
- super();
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.JAVAUTIL_COMPONENT_WIZ_TITLE));
- }
-
- @Override
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new UtilityProjectCreationDataModelProvider());
- }
-
- @Override
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle("org.eclipse.jst.j2ee.ui"); //$NON-NLS-1$
- final URL url = bundle.getEntry("icons/util-wiz-banner.gif"); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- }
-
- @Override
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.utility"); //$NON-NLS-1$
- }
-
- @Override
- protected IWizardPage createFirstPage() {
- return new UtilityProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_UTILITY);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java
deleted file mode 100644
index 9ecebbbc8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet.appclient;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
-import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class AppClientFacetInstallPage extends J2EEModuleFacetInstallPage implements IAppClientFacetInstallDataModelProperties {
-
- private Button createMainClass;
-
- public AppClientFacetInstallPage() {
- super("appclient.facet.install.page"); //$NON-NLS-1$
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJECT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_SETTINGS));
- }
-
- @Override
- protected String[] getValidationPropertyNames() {
- return new String[]{EAR_PROJECT_NAME, CONFIG_FOLDER, CREATE_DEFAULT_MAIN_CLASS};
- }
-
- @Override
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.NEW_APPCLIENT_WIZARD_P3);
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- createMainClass = new Button(composite, SWT.CHECK);
- createMainClass.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_CREATE_MAIN));
- synchHelper.synchCheckbox(createMainClass, CREATE_DEFAULT_MAIN_CLASS, null);
-
- createGenerateDescriptorControl(composite, J2EEConstants.APP_CLIENT_DD_SHORT_NAME);
- registerFacetVersionChangeListener();
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- @Override
- protected void handleFacetVersionChangedEvent()
- {
- final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
- boolean isJEE5OrGreater = J2EEVersionUtil.convertVersionStringToInt(fv.getVersionString()) >= J2EEVersionConstants.JEE_5_0_ID;
- this.addDD.setVisible(isJEE5OrGreater);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java
deleted file mode 100644
index b9d0fe42a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet.appclient;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jst.common.project.facet.JavaFacetUtils;
-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.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEComponentFacetCreationWizardPage;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-public class AppClientProjectFirstPage extends J2EEComponentFacetCreationWizardPage {
-
- public AppClientProjectFirstPage(IDataModel dataModel, String pageName) {
- super(dataModel, pageName);
- setTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJECT_MAIN_PG_TITLE));
- setDescription(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJECT_MAIN_PG_DESC));
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_PROJECT_WIZARD_BANNER));
- setInfopopID(IJ2EEUIContextIds.NEW_APPCLIENT_WIZARD_P1);
- }
-
- @Override
- protected String getModuleFacetID() {
- return J2EEProjectUtilities.APPLICATION_CLIENT;
- }
-
- @Override
- protected Set<IProjectFacetVersion> getFacetConfiguration( final IProjectFacetVersion primaryFacetVersion )
- {
- IRuntime runtime = (IRuntime)model.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME);
- final Set<IProjectFacetVersion> facets = new HashSet<IProjectFacetVersion>( 2 );
-
- if(runtime != null) {
- facets.addAll(super.getFacetConfiguration(primaryFacetVersion));
- }
- else {
- facets.add( primaryFacetVersion );
-
- if( primaryFacetVersion == IJ2EEFacetConstants.APPLICATION_CLIENT_60)
- {
- facets.add( JavaFacetUtils.JAVA_60 );
- }
- else if(primaryFacetVersion == IJ2EEFacetConstants.APPLICATION_CLIENT_50)
- {
- facets.add( JavaFacetUtils.JAVA_50 );
- }
- else if( primaryFacetVersion == IJ2EEFacetConstants.APPLICATION_CLIENT_14)
- {
- facets.add( JavaFacetUtils.JAVA_14 );
- }
- else if( primaryFacetVersion == IJ2EEFacetConstants.APPLICATION_CLIENT_13 ||
- primaryFacetVersion == IJ2EEFacetConstants.APPLICATION_CLIENT_12 )
- {
- facets.add( JavaFacetUtils.JAVA_13 );
- }
- }
- return Collections.unmodifiableSet( facets );
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java
deleted file mode 100644
index 3bd07a0f1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.ui.project.facet.appclient;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientFacetProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectTemplate;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.project.facet.IProductConstants;
-import org.eclipse.wst.project.facet.ProductManager;
-import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
-import org.osgi.framework.Bundle;
-
-public class AppClientProjectWizard extends NewProjectDataModelFacetWizard {
-
- public AppClientProjectWizard(IDataModel model) {
- super(model);
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJECT_WIZ_TITLE));
- }
-
- public AppClientProjectWizard() {
- super();
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_PROJECT_WIZ_TITLE));
- }
-
- @Override
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new AppClientFacetProjectCreationDataModelProvider());
- }
-
- @Override
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle(J2EEUIPlugin.PLUGIN_ID);
- final URL url = bundle.getEntry("icons/full/wizban/appclient_wiz.gif"); //$NON-NLS-1$
- return ImageDescriptor.createFromURL(url);
- }
-
- @Override
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.appclient"); //$NON-NLS-1$
- }
-
- @Override
- protected IWizardPage createFirstPage() {
- return new AppClientProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- @Override
- protected String getFinalPerspectiveID() {
- return ProductManager.getProperty(IProductConstants.FINAL_PERSPECTIVE_APPCLIENT);
- }
-
-}
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 9824ea772..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.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=Java EE
-client.jar.file_ui_=App Client JAR file
-client.import.description_ui_=Import an external Application Client JAR file into an Application Client project
-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
-j2ee.category_ui_=Java EE
-j2ee.actions.description_ui_=Actions for Java EE Development
-create.enterprise.application_ui_=Create an Enterprise Application
-create.client.module_ui_=Create an Application Client project
-ejb.export.action.description_ui_=Export EJB JAR File...
-utility_jar_import_wizard=Java EE Utility Jar
-ear_component_ui_=Enterprise Application Project
-new.ear.component.description_ui_=Create a Java EE EAR project
-appclient_component_ui_=Application Client Project
-new.appclient.component.description_ui_=Create a Java EE application client project
-J2EEDependenciesPage.name = Java EE Module Dependencies
-util-project-wizard-name = Utility Project
-util-project-wizard-description = Create a Utility project
-utility.import.description_ui_=Import one or more external *.jar files as Java EE Utility Projects or *.jars.
-Web_Project_Settings=Web Project Settings
-update-ear-libraries=Update EAR Libraries
-update-ear-libraries-tooltip=Recompute the contents of the EAR Libraries classpath container.
-earLibrariesContainerName=EAR Libraries
-
-Bundle-Name.0 = WTP J2EE UI Plug-in
-Bundle-Vendor.0 = Eclipse Web Tools Platform
-javaee.ui.popupMenu=Java EE Tools
-
-Project=Project
-AddJavaBuildPathEntriesWizardFragment-Name = Java Build Path Entries \ 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 c38f3b37d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml
+++ /dev/null
@@ -1,857 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
- <extension-point
- id="archiveExportParticipantPanels"
- name="Archive Export Participant Panels Extension Point"
- schema="schema/archiveExportParticipantPanels.exsd"/>
-
- <extension-point id="JavaEEPreferencePageExtender"
- name="JavaEEPreferencePage"
- schema="schema/JavaEEPreferencePageExtender.exsd"/>
- <extension-point id="newJavaEEActionFilter" name="newJavaEEActionFilter" schema="schema/newjavaeeactionfilter.exsd"/>
-
-<!--================================-->
-<!-- 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"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard">
- <class class="org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard">
- <parameter name="javaeeproject" value="true" />
- <parameter name="menuIndex" value="30" />
- </class>
- <description>
- %new.ear.component.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource" />
- </wizard>
-<!-- Application Client Component Wizard -->
- <wizard
- name="%appclient_component_ui_"
- icon="icons/full/ctool16/newappclient_wiz.gif"
- category="org.eclipse.jst.j2ee.internal"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard">
- <class class="org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard">
- <parameter name="javaeeproject" value="true"/>
- <parameter name="menuIndex" value="40" />
- </class>
- <description>
- %new.appclient.component.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource" />
- </wizard>
-<!-- Utility Component Wizard -->
- <wizard
- name="%util-project-wizard-name"
- icon="icons/util-wiz-icon.gif"
- category="org.eclipse.jst.j2ee.internal"
- project="true"
- finalPerspective="org.eclipse.jst.j2ee.J2EEPerspective"
- id="org.eclipse.jst.j2ee.ui.project.facet.UtilityProjectWizard">
- <class class="org.eclipse.jst.j2ee.ui.project.facet.UtilityProjectWizard">
- <parameter name="javaeeproject" value="true"/>
- <parameter name="menuIndex" value="60" />
- </class>
- <description>
- %util-project-wizard-description
- </description>
- <selection
- class="org.eclipse.core.resources.IResource" />
- </wizard>
-
- </extension>
-
-<!--================================-->
-<!-- Import Wizard Contributions -->
-<!--================================-->
- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentImportWizard"
- icon="icons/full/ctool16/appclient_import_wiz.gif"
- id="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentImportWizard"
- name="%client.jar.file_ui_">
- <description>
- %client.import.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.EARComponentImportWizard"
- icon="icons/full/ctool16/import_ear.gif"
- id="org.eclipse.jst.j2ee.internal.wizard.EARComponentImportWizard"
- name="%ear.file_ui_">
- <description>
- %ear.import.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizardNew"
- icon="icons/util-wiz-icon.gif"
- id="org.eclipse.jst.j2ee.internal.wizard.J2EEUtilityJarImportWizardNew"
- name="%utility_jar_import_wizard">
- <description>
- %utility.import.description_ui_
- </description>
- <selection class="org.eclipse.core.resources.IResource"/>
- </wizard>
- <category
- id="org.eclipse.jst.j2ee.internal"
- name="%j2ee.category_ui_"/>
- </extension>
-
- <!-- <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
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentExportWizard"
- icon="icons/full/ctool16/appclient_export.gif"
- id="org.eclipse.jst.j2ee.internal.wizard.AppClientComponentExportWizard"
- name="%client.jar.file_ui_">
- <description>
- %client.export.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <wizard
- category="org.eclipse.jst.j2ee.internal"
- class="org.eclipse.jst.j2ee.internal.wizard.EARComponentExportWizard"
- icon="icons/full/ctool16/export_ear.gif"
- id="org.eclipse.jst.j2ee.internal.wizard.EARComponentExportWizard"
- name="%ear.file_ui_">
- <description>
- %ear.export.description_ui_
- </description>
- <selection
- class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- <category
- id="org.eclipse.jst.j2ee.internal"
- name="%j2ee.category_ui_"/>
- </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>
-
- <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.ui.navigator.ProjectExplorer">
- </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.ui.navigator.ProjectExplorer">
- </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.ui.navigator.ProjectExplorer">
- </view>
- </adapterFactory>
- </extension>
- <extension point="org.eclipse.ui.popupMenus">
- <objectContribution objectClass="org.eclipse.core.resources.IProject" adaptable="true" id="org.eclipse.jst.j2ee.ui.popupMenu">
- <menu label="%javaee.ui.popupMenu" id="javeeUIPopupMenuCategory">
- <separator name="slot1"/> <!-- New/featured Java EE actions -->
- <separator name="slot2"/> <!-- Create files category -->
- <separator name="slot3"/> <!-- Project creation(clients) -->
- <separator name="slot4"/> <!-- Legacy(J2EE) actions -->
- </menu>
- </objectContribution>
- <!-- additional object contribution -->
- <objectContribution objectClass="org.eclipse.jdt.core.IJavaElement" adaptable="true" id="org.eclipse.jst.j2ee.ui.javaElement.popupMenu">
- <menu label="%javaee.ui.popupMenu" id="javeeUIPopupMenuCategory.javaElement">
- <separator name="slot1"/>
- <separator name="slot2"/>
- <separator name="slot3"/>
- <separator name="slot4"/>
- </menu>
- </objectContribution>
- </extension>
- <extension
- point="org.eclipse.ui.popupMenus">
- <objectContribution
- objectClass="org.eclipse.core.resources.IProject"
- adaptable="true"
- id="org.eclipse.jst.j2ee.internal.actions.ForceClasspathUpdateAction">
- <action
- label="%update-ear-libraries"
- tooltip="%update-ear-libraries-tooltip"
- class="org.eclipse.jst.j2ee.internal.actions.ForceClasspathUpdateAction"
- menubarPath="javeeUIPopupMenuCategory/slot1"
- enablesFor="+"
- icon="icons/full/obj16/library_obj.gif"
- id="org.eclipse.jst.j2ee.internal.actions.ForceClasspathUpdateAction">
- </action>
- <enablement>
- <adapt type="org.eclipse.core.resources.IProject">
- <and>
-
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.frameworks.actions.show"
- args="org.eclipse.jst.j2ee.internal.actions.ForceClasspathUpdateAction"/>
-
-
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.web" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.ejb" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.utility" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.ear" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.appclient" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.connector" />
- </or>
- </and>
- </adapt>
- </enablement>
- </objectContribution>
- </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>
-
- <objectState
- name="projectNature"
- value="org.eclipse.wst.common.componentcore.ModuleCoreNature">
- </objectState>
-
- </or>
- </visibility>
- </objectContribution>
- </extension> -->
-<!-- Navigator Object Contributions -->
-
-
-
-
-<!-- =========== org.eclipse.jst.j2ee.internal.J2EEDependencyPage ============ -->
-
- <extension point="org.eclipse.ui.propertyPages">
- <page
- adaptable="true"
- objectClass="org.eclipse.core.resources.IProject"
- name="%Web_Project_Settings"
- class="org.eclipse.jst.j2ee.internal.ui.J2EEPropertiesPage"
- id="J2EEPropertiesPage">
- <enabledWhen>
- <and>
- <adapt
- type="org.eclipse.core.resources.IProject">
- <or>
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.web" />
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="wst.web" />
- </or>
- </adapt>
- </and>
- </enabledWhen>
- </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.wst.common.modulecore.ModuleCoreNature" />
-
- </iterate>
- </with>
- <with variable="element">
- <instanceof value="org.eclipse.core.resources.IProject" />
-
- </with>
- </enablement>
- </renameParticipant>
- </extension>
-
- <extension point="org.eclipse.ltk.core.refactoring.renameParticipants">
-
- <renameParticipant
- class="org.eclipse.jst.j2ee.internal.actions.J2EEComponentRenameParticipant"
- id="org.eclipse.jst.j2ee.internal.actions.J2EEComponentRenameParticipant"
- name="J2EE Rename Participant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.wst.common.modulecore.ModuleCoreNature" />
- </iterate>
- </with>
- <with
- variable="element">
- <instanceof
- value="org.eclipse.wst.common.componentcore.resources.IVirtualComponent">
- </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.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.jst.j2ee.J2EEPerspective">
- <perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective"/>
- <perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective"/>
- <perspectiveShortcut id="org.eclipse.ui.resourcePerspective"/>
- <perspectiveShortcut id="org.eclipse.wst.web.ui.webDevPerspective"/>
-
- <newWizardShortcut id="org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard"/>
- <newWizardShortcut id="org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard"/>
- <newWizardShortcut id="org.eclipse.jst.ejb.ui.project.facet.EjbProjectWizard"/>
- <newWizardShortcut id="org.eclipse.jst.j2ee.jca.ui.internal.wizard.ConnectorProjectWizard"/>
- <newWizardShortcut id="org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard"/>
- <newWizardShortcut id="org.eclipse.wst.web.ui.internal.wizards.SimpleWebProjectWizard"/>
- <newWizardShortcut id="org.eclipse.jpt.ui.wizard.newJpaProject"/>
- <newWizardShortcut id="org.eclipse.jst.servlet.ui.internal.wizard.AddServletWizard"/>
- <newWizardShortcut id="org.eclipse.jst.ejb.ui.internal.wizard.AddSessionBeanWizard"/>
- <newWizardShortcut id="org.eclipse.jst.ejb.ui.internal.wizard.AddMessageDrivenBeanWizard"/>
- <newWizardShortcut id="org.eclipse.jpt.ui.wizard.newEntity"/>
- <newWizardShortcut id="org.eclipse.jst.ws.creation.ui.wizard.serverwizard"/>
- <newWizardShortcut id="org.eclipse.ui.wizards.new.folder"/>
- <newWizardShortcut id="org.eclipse.ui.wizards.new.file"/>
- <actionSet id="org.eclipse.wst.server.ui.internal.webbrowser.actionSet"/>
- <actionSet id="org.eclipse.debug.ui.breakpointActionSet"/>
- </perspectiveExtension>
- <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
- <perspectiveShortcut id="org.eclipse.jst.j2ee.J2EEPerspective"/>
- </perspectiveExtension>
- <perspectiveExtension targetID="org.eclipse.wst.web.ui.webDevPerspective">
- <perspectiveShortcut id="org.eclipse.jst.j2ee.J2EEPerspective"/>
- </perspectiveExtension>
- </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>
-
- <extension
- id="context.Sensitive.Class.workingCopyManager"
- name="Working Copy Manager - UI Context Class"
- point="org.eclipse.jem.util.uiContextSensitiveClass">
- <uiContextSensitiveClass
- context="UI"
- key="workingCopyManager"
- className="org.eclipse.jst.common.jdt.internal.integration.ui.WTPUIWorkingCopyManager">
- </uiContextSensitiveClass>
- </extension>
-
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory"
- adaptableType="org.eclipse.core.resources.IProject">
- <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory"
- adaptableType="org.eclipse.jst.j2ee.application.Application">
- <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory"
- adaptableType="org.eclipse.core.resources.IFile">
- <adapter type= "org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- adaptableType="org.eclipse.jst.j2ee.internal.ejb.provider.J2EEJavaClassProviderHelper"
- class="org.eclipse.jst.j2ee.internal.ClassHelperAdapterFactory">
- <adapter type="org.eclipse.core.resources.IFile"/>
- <adapter type="org.eclipse.core.resources.IResource"/>
- </factory>
-
- <!--
- <factory
- class="org.eclipse.jst.j2ee.internal.plugin.FacetedProjectAdapterFactory"
- adaptableType="org.eclipse.core.resources.IProject" >
- <adapter type="org.eclipse.ui.IActionFilter"/>
- </factory>
- -->
- </extension>
-
- <extension
- point="org.eclipse.wst.server.core.moduleArtifactAdapters">
- <moduleArtifactAdapter
- id="org.eclipse.jst.j2ee.server.ear1"
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory">
- <enablement>
- <with variable="selection">
- <adapt type="org.eclipse.jst.j2ee.application.Application"/>
- </with>
- </enablement>
- </moduleArtifactAdapter>
-
- <moduleArtifactAdapter
- id="org.eclipse.jst.j2ee.server.ear2"
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory">
- <enablement>
- <with variable="selection">
- <adapt type="org.eclipse.core.resources.IProject">
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.ear:1.4]" />
- </adapt>
-
- </with>
- </enablement>
- </moduleArtifactAdapter>
-
- <moduleArtifactAdapter
- id="org.eclipse.jst.j2ee.server.ear3"
- class="org.eclipse.jst.j2ee.internal.deployables.EnterpriseDeployableArtifactAdapterFactory">
- <enablement>
- <with variable="selection">
- <adapt type="org.eclipse.core.resources.IFile">
- <test forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.ear:1.4]" />
- </adapt>
- </with>
- </enablement>
- </moduleArtifactAdapter>
- </extension>
-
- <extension point="org.eclipse.wst.common.project.facet.ui.wizardPages">
- <wizard-pages action="jst.ear.install">
- <page class="org.eclipse.jst.j2ee.ui.project.facet.EarFacetInstallPage"/>
- </wizard-pages>
- <wizard-pages action="jst.appclient.install">
- <page class="org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientFacetInstallPage"/>
- </wizard-pages>
- </extension>
-
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- markerType="org.eclipse.jst.j2ee.differentRuntimesDetected"
- class="org.eclipse.jst.j2ee.ui.project.facet.RuntimeMismatchMarkerResolutions">
- </markerResolutionGenerator>
- </extension>
-
- <extension
- point="org.eclipse.jem.util.uiContextSensitiveClass">
- <uiContextSensitiveClass
- key="ValidateEditContext"
- className="org.eclipse.jst.j2ee.internal.listeners.ValidateEditListener"
- context="UI"/>
- </extension>
-
- <extension point="org.eclipse.jdt.ui.classpathAttributeConfiguration">
- <classpathAttributeConfiguration
- attributeName="org.eclipse.jst.component.dependency"
- class="org.eclipse.jst.j2ee.internal.classpathdep.ui.ClasspathDependencyAttributeConfiguration">
- </classpathAttributeConfiguration>
- </extension>
-
- <extension point="org.eclipse.jdt.ui.classpathAttributeConfiguration">
- <classpathAttributeConfiguration
- attributeName="org.eclipse.jst.component.nondependency"
- class="org.eclipse.jst.j2ee.internal.classpathdep.ui.ClasspathNonDependencyAttributeConfiguration">
- </classpathAttributeConfiguration>
- </extension>
-
- <extension
- point="org.eclipse.ui.ide.markerResolution">
- <markerResolutionGenerator
- markerType="org.eclipse.jst.j2ee.ClasspathDependencyValidatorMarker"
- class="org.eclipse.jst.j2ee.internal.classpathdep.ui.ClasspathDependencyValidatorMarkerResolutions">
- </markerResolutionGenerator>
- </extension>
-
- <extension
- point="org.eclipse.jdt.ui.classpathContainerPage">
- <classpathContainerPage
- name="%earLibrariesContainerName"
- class="org.eclipse.jst.j2ee.internal.wizard.EARLibrariesContainerPage"
- id="org.eclipse.jst.j2ee.internal.module.container">
- </classpathContainerPage>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- class="org.eclipse.jst.j2ee.internal.ui.preferences.JavaEEPreferencePage"
- id="org.eclipse.jst.j2ee.ui.preferencePages.JavaEE"
- name="%j2ee">
- </page>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.modulecore.ui.moduleDependencyPropertyPage">
- <dependencyPage
- class="org.eclipse.jst.j2ee.internal.ui.preferences.EarModuleDependencyPageProvider"
- id="org.eclipse.jst.j2ee.internal.ui.preferences.EarModuleDependencyPageProvider">
- </dependencyPage>
- </extension>
-
-
- <!--
- *****************************
- * WTP User Library Provider *
- *****************************
- -->
-
- <extension point="org.eclipse.jst.common.project.facet.ui.libraryProviderActionPanels">
- <panel
- provider="wtp-user-library-provider"
- class="org.eclipse.jst.j2ee.internal.ui.WtpUserLibraryProviderInstallPanel"/>
- </extension>
-
- <!--
- *************************************
- * WTP OSGi Bundles Library Provider *
- *************************************
- -->
-
- <extension point="org.eclipse.jst.common.project.facet.ui.libraryProviderActionPanels">
- <panel
- provider="wtp-osgi-bundles-library-provider"
- class="org.eclipse.jst.j2ee.internal.ui.WtpOsgiBundlesLibraryProviderInstallPanel"/>
- </extension>
-
-
- <extension
- point="org.eclipse.wst.common.modulecore.ui.moduleDependencyPropertyPage">
- <dependencyPage
- class="org.eclipse.jst.j2ee.internal.ui.J2EEDependencyPageProvider"
- id="org.eclipse.jst.j2ee.internal.ui.J2EEDependencyPageProvider">
- </dependencyPage>
- </extension>
- <extension
- point="org.eclipse.wst.common.modulecore.ui.virtualComponentLabelProvider">
- <provider
- class="org.eclipse.jst.j2ee.internal.ui.preferences.ClasspathDependencyComponentLabelProvider"
- weight="5">
- </provider>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.modulecore.ui.referenceWizardFragment">
- <referenceFragment
- class="org.eclipse.jst.j2ee.internal.ui.preferences.CustomEARProjectReferenceWizardFragment"
- hidden="true"
- icon="icons/prj_obj.gif"
- id="org.eclipse.jst.j2ee.internal.ui.preferences.CustomEARProjectReferenceWizardFragment"
- name="%Project">
- </referenceFragment>
- </extension>
-
- <extension point="org.eclipse.wst.common.modulecore.ui.referenceWizardFragment">
- <referenceFragment
- class="org.eclipse.jst.j2ee.internal.ui.AddJavaBuildPathEntriesWizardFragment"
- icon="icons/util-wiz-icon.gif"
- id="org.eclipse.jst.j2ee.internal.ui.AddJavaBuildPathEntriesWizardFragment"
- name="%AddJavaBuildPathEntriesWizardFragment-Name">
- <enablement>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="java" forcePluginActivation="true"/>
- </enablement>
- </referenceFragment>
- </extension>
-
- <extension point="org.eclipse.wst.common.modulecore.ui.deploymentAssemblyVerifier">
- <verifier
- class="org.eclipse.wst.common.componentcore.ui.internal.propertypage.verifier.DefaultDeploymentAssemblyVerifier">
- <runtime runtime_server_id="org.eclipse.wst.common.modulecore.ui.deploymentAssemblyVerifier.anyruntime"/>
- <component component_type="jst.ear"/>
- <component component_type="jst.ejb"/>
- <component component_type="jst.web"/>
- <component component_type="jst.webfragment"/>
- <component component_type="jst.connector"/>
- <component component_type="jst.appclient"/>
- <component component_type="jst.utility"/>
- </verifier>
- </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/UtilityFacetInstallPage.properties b/plugins/org.eclipse.jst.j2ee.ui/property_files/UtilityFacetInstallPage.properties
deleted file mode 100644
index 0a6de07aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/UtilityFacetInstallPage.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 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
-###############################################################################
-pageTitle = Utility Module
-pageDescription = Configure utility module settings. \ No newline at end of file
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 0ada37472..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_figures.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 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
-###############################################################################
-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 773359355..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/ejb_ui.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-KEY_0=Failed to find the image "{0}".
-KEY_1=New EJB Project
-KEY_2=EJB version:
-KEY_3=EJB Project
-KEY_4=Create an EJB project and add it to a new or existing Enterprise Application.
-KEY_5=Import an EJB jar from the file system
-KEY_6=EJB Jar Import
-KEY_7=EJB Jar file:
-KEY_8=EJB Project:
-KEY_9=EJB Jar Export
-KEY_10=Export EJB project to the local file system.
-KEY_11=EJB client JAR Creation
-KEY_12=Use this wizard to create an EJB client JAR from your existing EJB
-KEY_13=Client JAR URI:
-KEY_14=Project name:
-KEY_15=Project location:
-KEY_16=EJB Project:
-KEY_17=Delete Bean Only
-KEY_18=Delete Bean Classes
-KEY_19=Delete Access Bean
-KEY_20=Delete Deployed Code
-KEY_21=Select All
-KEY_22=Deselect All
-KEY_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.
-KEY_24=Delete...
-KEY_25=Cannot delete Enterprise Bean
-KEY_26=Cannot delete the bean named "{0}" because it is in a binary project.
-KEY_27=Delete Enterprise Bean(s)
-KEY_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 Project
-NewEJBModuleAction_UI_0=EJB Project
-pageTitle=Ejb Module
-pageDescription=Configure ejb module settings.
-configFolderLabel=Config Folder:
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 7e16333bb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties
+++ /dev/null
@@ -1,362 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-1=Project location:
-2=&Target runtime:
-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 &project:
-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 pro&ject:
-22=Web project:
-23=Connector &project:
-24=New Application Client Project
-25=Application Client module
-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 fi&le:
-37=Application Client pro&ject:
-38=Import
-39=Import an Enterprise Application project based on selected resources.
-40=Enterprise Application Import
-41=EAR fi&le:
-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. Unselected modules will be imported as JARs in the EAR.
-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=Over&write 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
-74=Allow nested projects overwrites (module and utility projects)
-75=Delete project on overwrite
-76=EAR pro&ject:
-
-#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=Br&owse...
-94=Na&me:
-95=&Create a default Main class
-96=Create a default stateless session bean
-98=&Generate a XDoclet annotated class
-
-97=Select the utility JARs from the &list to be imported as utility projects or jars:
-99=Project Name:
-100=Module Version:
-101=Configure Application Client module settings.
-102=Content Folder:
-103=&Target runtime
-Entity_UI_=Entity Beans (1.x-2.x)
-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}
-RefactoringNoInit=Refactoring not initialized properly
-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 Java EE delete options are not available for the selected Java EE 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.
-DEPLOY_PROJECT_NOT_FOUND=Cannot get handle to the project.
-DEPLOY_RUNTIME_NOT_FOUND=Target runtime not configured for project {0}.
-DEPLOY_RUNTIME_CONFIGURED=Target runtime configured successfully for project {0}.
-DEPLOY_PROJECT_NOT_SUPPORTED=Project {0} cannot be deployed with configured runtime or installed facets.
-
-NewModuleSelectionPage.appClient=&Application Client
-NewModuleSelectionPage.ejb=&Enterprise Java Bean
-NewModuleSelectionPage.web=&Web
-NewModuleSelectionPage.jca=&Connector
-
-NewApplClientModuleAction_UI_0=Application Client Module
-NewContextRoot=New context root:
-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 Java EE 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=Over&write 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
-
-J2EEUtilityJarImportTypePage_UI_0=Utility Jar Import
-J2EEUtilityJarImportTypePage_UI_1=Import dependent Utility Jars for Java EE 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=Cop&y 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
-RenameDotDotDot=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
-RenameContextRoot=Rename Context Root
-RenameContextRootFromXtoY=Rename context root from "{0}" to "{1}"
-Also_rename_module_and_utility_Java_projects_13=Also rename module and utility Java projects
-Project_already_exists.=Project {0} already exists.
-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
-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 Java EE 1.2 or Java EE 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 Java EE 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 Java EE 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 Java EE 1.3 Enterprise Applications.
-CONNECTOR_15_DESCRIPTION=Connector Architecture 1.5 modules may only be included in Java EE 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=J2EE Project
-FlexibleProjectCreationWizard.mainPage.desc=Create a Java EE project.
-FlexibleProjectCreationWizard.title=J2EE Project
-EARComponentCreationWizard.title=New EAR Application Project
-EARComponentCreationWizard.mainPage.title=EAR Application Project
-EARComponentCreationWizard.mainPage.desc=Create a EAR application.
-EARComponentCreationWizard.secondPage.title=Enterprise Application
-EARComponentCreationWizard.secondPage.desc=Configure enterprise application settings.
-J2EEModuleDependencies.label=&Java EE module dependencies:
-J2EEModuleDependencies.label_accessibility=Java EE module dependencies
-AppClientComponentCreationWizard.title=New Application Client Project
-AppClientComponentCreationWizard.mainPage.title=Application Client Project
-AppClientComponentCreationWizard.mainPage.desc=Create a Application Client.
-DefaultJ2EEComponentCreationWizard.title=Create default Java EE modules.
-DefaultJ2EEComponentCreationWizard.page.title=New Java EE Module
-DefaultJ2EEComponentCreationWizard.page.desc=Create a new Java EE 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=Source fol&der:
-BROWSE_BUTTON_LABEL=Browse...
-BROWSE_BUTTON_LABEL_O=Br&owse...
-BROWSE_BUTTON_LABEL_W=Bro&wse...
-BROWSE_BUTTON_LABEL_E=Brows&e...
-JAVA_PACKAGE_LABEL=Java pac&kage:
-CLASS_NAME_LABEL=Class na&me:
-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=abs&tract
-JAVA_CLASS_FINAL_CHECKBOX_LABEL=fina&l
-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=In&herited abstract methods
-ADD_BUTTON_LABEL=&Add...
-REMOVE_BUTTON=&Remove
-YES_BUTTON=Yes
-NO_BUTTON=No
-OK_BUTTON=OK
-OpenJ2EEResourceAction.0=Open
-CANCEL_BUTTON=Cancel
-BINARY=Binary
-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 Utility Module
-JAVA_EE_PREFERENCE_PAGE_NAME=General settings for Java EE development:
-JAVA_EE_PREFERENCE_PAGE_JET_TEMPLATE=JET templates
-JAVA_EE_PREFERENCE_PAGE_DYN_TRANSLATION_BTN_NAME=Use dynamic translation of JET templates
-AVAILABLE_J2EE_COMPONENTS= Available Java EE modules
-EXTERNAL_JAR=Add External JARs...
-PROJECT_JAR=Add JARs...
-ADDVARIABLE=Add Variable...
-CHANGE_LIB_DIR=Change &Library Directory...
-NO_DD_MSG_TITLE=No Deployment Descriptor
-GEN_DD_QUESTION=Changing the library directory must be reflected in the deployment descriptor. This EAR has no deployment descriptor yet and one will be generated now. Do you want to proceed?
-CHANGE_LIB_DIR_HEAD=Change Library Directory
-NEW_LIB_DIR_PROPMPT=New library directory location:
-BLANK_LIB_DIR=Blank Library Directory
-BLANK_LIB_DIR_CONFIRM=You've entered a blank library directory. In result, all the libraries will be packed in the root directory. In order to be able to pack any libraries in the library directory you must enter a non-blank library directory. Do you really want the library directory to be blank?
-BLANK_LIB_DIR_WARN_QUESTION=The specified library directory is blank. In result, all the libraries will be packed in the root directory. Are you sure you want this? (If you want to leave the bundled libraries directory blank, click 'Yes'. If you want to change it, click 'No')
-INVALID_PATH=Invalid Path
-INVALID_PATH_MSG=The entered path is invalid for a library directory. Please enter a valid path, different from root!
-DEPENDENCY_CONFLICT_TITLE=Dependencies Conflict
-DEPENDENCY_CONFLICT_MSG_1=This JAR is a bundled library of an EAR project and is supposed to be packed in the EAR's library directory. It conflicts with the manifest class path dependency you are trying to create. If you create this dependency, the JAR will be packed in the root (not library) directory of the EAR. Are you sure you want to proceed?
-DEPENDENCY_CONFLICT_MSG_2=This JAR is also a manifest class path dependency of a module in this EAR. It conflicts with packing the JAR in the library directory. If you want this JAR packed in the library directory, then it will be removed as a manifest class path dependency from all modules in this EAR. Are you sure you want to proceed?
-DO_NOT_SHOW_WARNING_AGAIN=Do not show this warning again
-SUPPORTMULTIPLEMODULES=Support Multiple Modules per project
-SOURCEFOLDER=Source Folder:
-HOVER_HELP_FOR_DISABLED_LIBS=This library has been added to the project by using the project tree or\nthe file system. If you want to move/remove it, use the same approach.
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 f8ff5fa15..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/jca_ui.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 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
-###############################################################################
-_0=Failed to find the image "{0}".
-_1=New Connector Project
-_2=J2C version:
-_3=Connector Project
-_4=Create a standalone Connector module 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.
-_11=Configure Connector module settings.
-connector_export_action_label_ui_=Export RAR File...
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 806d5f873..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties
+++ /dev/null
@@ -1,47 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2007 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-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 (does not include contributions from classpath entries):
-JAR_Module_UI_=JAR/Module
-Packed_In_Lib_UI_=In Lib Dir
-Project_UI_=Project
-EAR_Modules=EAR Modules:
-EAR_Modules_Desc=This property page lets you setup the module dependencies in an Enterprise Application.
-J2EE_Modules=J2EE Modules
-J2EE_Modules_Desc=This property page lets you add Manifest classpath dependencies to other Java EE modules or JARs contained within the same Enterprise Application. It also supports the selection of class folders whose contents will be added to the root of this module.
-Web_Libraries=Web Libraries
-Web_Libraries_Desc=This property page lets you add a Web Library dependency to utility projects, JAR files or classpath entries. Archive dependencies will be resolved into the WEB-INF/lib folder of the web module at deployment time. Class folder dependencies will be resolved into the WEB-INF/classes folder.
-Web_Ref_Desc=This property page lets you specify module dependencies on classpath entries. Entries that reference archives will be bundled, along with the project, into the WEB-INF/lib folder of referencing web modules. The contents of class folder entries will be added to the root of this module.
-EAR_Module_Dep_Error=J2EE Modules is not valid for EAR modules.
-Unreferenced_Module_Error=Selected module is not referenced by any EAR or Dynamic Web modules.
-Jar_Dep_One_Module_Error=Java Jar Dependencies is valid only for one module per flexible project.
-Web_Lib_Error=Web library settings are only valid for Web modules.
-REDIRECT_TEXT_EDITOR_UI_=REDIRECT_TEXT_EDITOR_UI_
-Error_Checking_Project_Facets=Error checking project facets.
-WEB_LIB_LIST_DESCRIPTION=Select the utility project, JAR or classpath entry to add as a Web Library dependency
-Dynamic_Web_Error=This property page is not valid for dynamic web projects.
-No_Web_Reference_Error=Selected project must be referenced by at least one dynamic web project.
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/schema/JavaEEPreferencePageExtender.exsd b/plugins/org.eclipse.jst.j2ee.ui/schema/JavaEEPreferencePageExtender.exsd
deleted file mode 100644
index deb34870e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/schema/JavaEEPreferencePageExtender.exsd
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.j2ee.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.j2ee.ui" id="JavaEEPreferencePageExtender" name="JavaEEPreferencePageExtender"/>
- </appInfo>
- <documentation>
- Defines extension point for extending Java EE preference page.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="javaeepageextender"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- Optional name for the extension point
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="javaeepageextender">
- <complexType>
- <attribute name="className" type="string" use="required">
- <annotation>
- <documentation>
- The className is an implementation of interface IJavaEEPreferencePageExtender
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
-
-
-
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2009 IBM Corporation and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- IBM Corporation - initial API and implementation
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/schema/archiveExportParticipantPanels.exsd b/plugins/org.eclipse.jst.j2ee.ui/schema/archiveExportParticipantPanels.exsd
deleted file mode 100644
index 3ab16a18e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/schema/archiveExportParticipantPanels.exsd
+++ /dev/null
@@ -1,127 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.j2ee.ui">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.j2ee.ui" id="archiveExportParticipantPanels" name="Archive Export Participant Panels Extension Point"/>
- </appInfo>
- <documentation>
- Used for supplying UI for the archive export participants registered via the &lt;code&gt;org.eclipse.jst.j2ee.archiveExportParticipants&lt;/code&gt; extension point.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="panel-factory" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="panel-factory">
- <annotation>
- <documentation>
- Registers a single archive export participant.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="archiveExportParticipantId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the archive export participant that this panel factory should be registered with. Has to include plugin id.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The factory implementation class.
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.jst.j2ee.ui.archive.IArchiveExportParticipantPanelFactory"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- 3.0
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- &lt;pre&gt;
-&lt;extension point=&quot;org.eclipse.jst.j2ee.ui.archiveExportParticipantPanels&quot;&gt;
- &lt;panel-factory
- archiveExportParticipantId=&quot;com.somecorp.MyExportParticipant&quot;
- class=&quot;com.somecorp.MyPanelFactory&quot;/&gt;
-&lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
- Copyright (c) 2005, 2007 BEA Systems, Inc. and others.&lt;br&gt;
-All rights reserved. This program and the accompanying materials are made
-available under the terms of the Eclipse Public License v1.0 which accompanies
-this distribution, and is available at &lt;a
-href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/plugins/org.eclipse.jst.j2ee.ui/schema/newjavaeeactionfilter.exsd b/plugins/org.eclipse.jst.j2ee.ui/schema/newjavaeeactionfilter.exsd
deleted file mode 100644
index 09c9d1cad..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/schema/newjavaeeactionfilter.exsd
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.j2ee.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.j2ee.ui" id="newJavaEEActionFilter" name="newJavaEEActionFilter"/>
- </appInfo>
- <documentation>
- Used for filtering out actions from the Java EE perspective Action Bar in an adopter product.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element />
- </appInfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="newJavaEEWizardId" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="newJavaEEWizardId">
- <complexType>
- <attribute name="filterWizard" type="string" use="required">
- <annotation>
- <documentation>
- The id of the wizard to be filtered out of the perspective Action Bar
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiinfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema> \ No newline at end of file

Back to the top