Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.wst.wsdl.tests.performance/data/1000WSDLsXSDDepends/sample911.wsdl')
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/data/1000WSDLsXSDDepends/sample911.wsdl38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/data/1000WSDLsXSDDepends/sample911.wsdl b/tests/org.eclipse.wst.wsdl.tests.performance/data/1000WSDLsXSDDepends/sample911.wsdl
deleted file mode 100644
index e73a86353..000000000
--- a/tests/org.eclipse.wst.wsdl.tests.performance/data/1000WSDLsXSDDepends/sample911.wsdl
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wsdl:definitions name="sample" targetNamespace="http://www.example.org/sample911" xmlns:tns="http://www.example.org/sample911" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
-<wsdl:types>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/sample911">
-<xsd:element name="NewOperationResponse" type="xsd:string"/><xsd:element name="NewOperationRequest" type="xsd:string"/></xsd:schema>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sample.org/sample911"><xsd:import namespace="http://www.sample.org/51" schemaLocation="sample51.xsd"/>
-</xsd:schema>
-</wsdl:types>
-<wsdl:message name="NewOperationResponse">
-<wsdl:part name="NewOperationResponse" element="tns:NewOperationResponse"/>
-</wsdl:message>
-<wsdl:message name="NewOperationRequest">
-<wsdl:part name="NewOperationRequest" element="tns:NewOperationRequest"/>
-</wsdl:message>
-<wsdl:portType name="sample">
-<wsdl:operation name="NewOperation">
-<wsdl:input message="tns:NewOperationRequest"/>
-<wsdl:output message="tns:NewOperationResponse"/>
-</wsdl:operation>
-</wsdl:portType>
-<wsdl:binding name="sampleSOAP" type="tns:sample">
-<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
-<wsdl:operation name="NewOperation">
-<soap:operation soapAction="http://www.example.org/sample/NewOperation"/>
-<wsdl:input>
-<soap:body use="literal" parts=" NewOperationRequest"/>
-</wsdl:input>
-<wsdl:output>
-<soap:body use="literal" parts=" NewOperationResponse"/>
-</wsdl:output>
-</wsdl:operation>
-</wsdl:binding>
-<wsdl:service name="sample">
-<wsdl:port name="sampleSOAP" binding="tns:sampleSOAP">
-<soap:address location="http://www.example.org/"/>
-</wsdl:port>
-</wsdl:service>
-</wsdl:definitions> \ No newline at end of file

Back to the top

a>22
-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/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.java474
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java1357
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java297
-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.java647
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IJ2EEDependenciesControl.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.java643
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java237
-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.java1099
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java54
-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.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java274
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java103
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java50
-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.java69
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java147
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java61
-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.java66
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java419
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java164
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java147
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java391
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java95
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java303
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java414
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java122
-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.java109
-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.java187
-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.java98
-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.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java97
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java191
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java96
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java150
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseDeployableArtifactAdapterFactory.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java270
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java66
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java85
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java334
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java211
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java265
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java88
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java126
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeJavaSearchScope.java352
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypeSearchEngine.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java316
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java140
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java376
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java146
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/IValidateEditListener.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java330
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java130
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java240
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java120
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java192
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java40
-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.java243
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java343
-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.java53
-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.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java101
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java193
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java152
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java32
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java304
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java54
-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.java287
-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/DoubleCheckboxTableItem.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java176
-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.java124
-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.java119
-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.java337
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebContextParamGroupItemProvider.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.java100
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.java119
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java98
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java75
-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.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java81
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java85
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java81
-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.java163
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java162
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java177
-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.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java78
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java320
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java130
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java111
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java298
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java107
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java67
-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/ImportUtil.java216
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java172
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java227
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java118
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java91
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java556
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java282
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java118
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties1
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java102
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java410
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java375
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.java95
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java524
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java401
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java700
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/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.java543
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/TableObjects.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java135
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java1418
-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/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.java381
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties14
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java143
-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.java188
-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/UtilityFacetInstallPage.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityFacetInstallPage.properties12
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/javadoc.xml6
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.properties40
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/plugin.xml794
-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.properties357
-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.properties48
-rw-r--r--plugins/org.eclipse.jst.j2ee.ui/schema/archiveExportParticipantPanels.exsd127
-rw-r--r--plugins/org.eclipse.jst.j2ee/.classpath18
-rw-r--r--plugins/org.eclipse.jst.j2ee/.cvsignore7
-rw-r--r--plugins/org.eclipse.jst.j2ee/.project28
-rw-r--r--plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF86
-rw-r--r--plugins/org.eclipse.jst.j2ee/about.html34
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/AppClientArtifactEdit.java442
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/package.xml19
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientComponentImportDataModelProvider.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientCreationResourceHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientFacetProjectCreationDataModelProvider.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/IConfigurationConstants.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/modulecore/util/AppClientEditAdapterFactory.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java198
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetPostInstallDelegate.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/IAppClientFacetInstallDataModelProperties.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/common/CreateChildCommand.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProvider.java214
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapter.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java267
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationProvidersResourceHandler.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ConnectorModuleItemProvider.java126
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/EjbModuleItemProvider.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/JavaClientModuleItemProvider.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ModuleItemProvider.java179
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/WebModuleItemProvider.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ApplicationClientItemProvider.java275
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapter.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java180
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/EARProjectMapItemProvider.java166
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/FacetedProjectPropertyTester.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/J2EEItemProvider.java250
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModuleMappingItemProvider.java166
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapEditPlugin.java125
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapter.java137
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapterFactory.java215
-rw-r--r--plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/UtilityJARMappingItemProvider.java191
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/archive/IArchiveExportParticipant.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAddWebComponentToEnterpriseApplicationDataModelProperties.java19
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentExportDataModelProperties.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentImportDataModelProperties.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentExportDataModelProperties.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentImportDataModelProperties.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentCreationDataModelProperties.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentExportDataModelProperties.java94
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentImportDataModelProperties.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEModuleImportDataModelProperties.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEUtilityJarListImportDataModelProperties.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaComponentCreationDataModelProperties.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaUtilityJarImportDataModelProperties.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/package.xml19
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientArchiveTypeHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveLoadAdapter.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveSaveAdapter.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint$PluginUtil.properties4
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint.java436
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java599
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveLoadAdapter.java704
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveSaveAdapter.java285
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveLoadAdapter.java299
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveSaveAdapter.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveTypeHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentNestedJARArchiveLoadAdapter.java151
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveLoadAdapter.java154
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveSaveAdapter.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveTypeHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveLoadAdapter.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveSaveAdapter.java22
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveTypeHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveLoadAdapter.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveSaveAdapter.java175
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEJavaComponentArchiveSaveAdapter.java20
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveLoadAdapter.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveSaveAdapter.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java746
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFArchiveAdapterHelper.java298
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFZipFileLoadAdapterImpl.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveLoadAdapter.java152
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveSaveAdapter.java132
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveTypeHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java692
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java283
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java93
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java216
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java215
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java248
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBArchiveOpsResourceHandler.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EJBComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/IOverwriteHandler.java142
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ImportOption.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactExportOperation.java295
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEArtifactImportOperation.java158
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentLoadStrategyImpl.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEComponentSaveStrategyImpl.java153
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEImportConstants.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/J2EEJavaComponentSaveStrategyImpl.java20
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentLoadStrategyImpl.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/JavaComponentSaveStrategyImpl.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/OverwriteHandlerException.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee/build.properties37
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/classpathdep/ClasspathDependencyUtil.java606
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/classpathdep/IClasspathDependencyConstants.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/classpathdep/UpdateClasspathAttributeUtil.java218
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyExtensions.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyManifestUtil.java150
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyValidator.java339
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyValidatorHelper.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/ClasspathDependencyVirtualComponent.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/UpdateClasspathAttributesDataModelProperties.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/UpdateClasspathAttributesDataModelProvider.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee/classpathdep/org/eclipse/jst/j2ee/internal/classpathdep/UpdateClasspathAttributesOperation.java264
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CMPJavaChangeSynchronizationAdapter.java378
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/ClasspathModel.java661
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/ClasspathModelEvent.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/ClasspathModelListener.java14
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/CreationConstants.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/FacetedProjectPropertyTester.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/J2EECommonMessages.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/J2EEDependencyListener.java161
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/J2EEVersionUtil.java303
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/UpdateProjectClasspath.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/VirtualArchiveComponentAdapterFactory.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/J2EEComponentClasspathContainer.java508
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/J2EEComponentClasspathContainerUtils.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/J2EEComponentClasspathInitializer.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/classpath/J2EEComponentClasspathUpdater.java548
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/AddJavaEEArtifactOperation.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryConstructor.java135
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/BinaryMethod.java251
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/Constructor.java84
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/CreateJavaEEArtifactTemplateModel.java394
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/INewJavaClassDataModelProperties.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/ImportsCollection.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/J2EEModifierHelperCreator.java195
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/JARDependencyDataModelProperties.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/JARDependencyDataModelProvider.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/JARDependencyOperation.java179
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/JavaModelUtil.java897
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/Method.java117
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassDataModelProvider.java567
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaClassOperation.java887
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/NewJavaEEArtifactClassOperation.java305
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceConstructor.java119
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/SourceMethod.java240
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/operations/UpdateJavaBuildPathOperation.java272
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/DefaultWSDLServiceHelper.java147
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WSDLServiceExtManager.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WSDLServiceExtensionRegistry.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WSDLServiceHelper.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WebServiceClientGenerator.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WebServicesClientDataHelper.java78
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/webservices/WebServicesClientDataRegistry.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/IEARModelProvider.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/IModelProvider.java69
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/IModelProviderEvent.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/IModelProviderFactory.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/IModelProviderListener.java19
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/J2EEModelProviderRegistry.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/ModelProviderEvent.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/model/ModelProviderManager.java322
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapter.java116
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CommonItemProviderAdapterFactory.java562
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/CompatibilityDescriptionGroupItemProvider.java173
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/DescriptionGroupItemProvider.java159
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/DescriptionItemProvider.java147
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/DisplayNameItemProvider.java146
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/EJBLocalRefItemProvider.java143
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/EjbRefItemProvider.java296
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/EnvEntryItemProvider.java244
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/IconTypeItemProvider.java163
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/IdentityItemProvider.java176
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/JNDIEnvRefsGroupItemProvider.java190
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/ListenerItemProvider.java122
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/MessageDestinationItemProvider.java133
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/MessageDestinationRefItemProvider.java197
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/ParamValueItemProvider.java190
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/QNameItemProvider.java176
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/ResourceEnvRefItemProvider.java202
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/ResourceRefItemProvider.java281
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/RunAsSpecifiedIdentityItemProvider.java139
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/SecurityIdentityItemProvider.java160
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/SecurityRoleItemProvider.java203
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/SecurityRoleRefItemProvider.java201
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/common/internal/provider/UseCallerIdentityItemProvider.java100
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/internal/common/CommonEditResourceHandler.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/internal/common/IJ2EECommonConstants.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/internal/common/IStructuredTextEditingDomain.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee/commonedit/org/eclipse/jst/j2ee/internal/common/StructuredTextEditingDomain.java88
-rw-r--r--plugins/org.eclipse.jst.j2ee/component.xml1
-rw-r--r--plugins/org.eclipse.jst.j2ee/contenttype/org/eclipse/jst/j2ee/contenttype/J2EEContentDescriber.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee/contenttype/org/eclipse/jst/j2ee/contenttype/J2EESpecFinder.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/AddComponentToEnterpriseApplicationDataModelProvider.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/AddComponentToEnterpriseApplicationOp.java328
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/AddWebComponentToEARDataModelProvider.java103
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/AppClientComponentExportDataModelProvider.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/BinaryProjectHelper.java135
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/ClassPathSelection.java1257
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/ClasspathElement.java574
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/ComputeEARsForContextRootUpdateDataModelProvider.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/ComputeEARsForContextRootUpdateOp.java131
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/CopyArchiveIntoProjectOperation.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/CreateProjectWithExtractedJarOperation.java114
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/CreateProjectWithLinkedJarOperation.java104
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/DefaultJ2EEComponentCreationOperation.java134
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/EARComponentExportDataModelProvider.java71
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/EARComponentImportDataModelProvider.java726
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/IAddComponentToEnterpriseApplicationDataModelProperties.java19
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/IAnnotationsDataModel.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/IModuleExtensions.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/IUpdateModuleContextRootProperties.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEArtifactExportDataModelProvider.java444
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEArtifactImportDataModelProvider.java364
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentExportDataModelProvider.java18
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEComponentImportDataModelProvider.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEUtilityJarImportAssistantOperation.java197
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEUtilityJarImportDataModelProvider.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEUtilityJarImportOperationNew.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEUtilityJarListImportDataModelProvider.java348
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/J2EEUtilityJarListImportOperation.java147
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/LinkArchiveIntoProjectOperation.java80
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationDataModelProvider.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/RemoveComponentFromEnterpriseApplicationOperation.java96
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/UpdateManifestDataModelProperties.java46
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/UpdateManifestDataModelProvider.java96
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/UpdateManifestOperation.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/application/internal/operations/UpdateModuleContextRootInEAROp.java116
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/componentcore/util/EARArtifactEdit.java683
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/componentcore/util/EARVirtualComponent.java210
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/componentcore/util/EARVirtualRootFolder.java74
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/componentcore/util/package.xml19
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/earcreation/IEarFacetInstallDataModelProperties.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/DefaultJ2EEComponentCreationDataModelProvider.java457
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EARCreationResourceHandler.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/EarFacetInstallDataModelProvider.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IDefaultJ2EEComponentCreationDataModelProperties.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/IEarFacetInstallDataModelProperties.java21
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/ILooseConfigConstants.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMap.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/EARProjectMapImpl.java171
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMapping.java55
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModuleMappingImpl.java194
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapAdapterFactory.java130
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactory.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapFactoryImpl.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapInit.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackage.java181
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapPackageImpl.java238
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/ModulemapSwitch.java107
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMapping.java53
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/earcreation/modulemap/UtilityJARMappingImpl.java183
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/modulecore/util/EarEditAdapterFactory.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtension.java45
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionImpl.java48
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleExtensionRegistry.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EarModuleManager.java94
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/EjbModuleExtension.java52
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/JcaModuleExtension.java36
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/moduleextension/WebModuleExtension.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/project/facet/EARFacetProjectCreationDataModelProvider.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/internal/project/facet/UtilityFacetInstallDataModelProvider.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EARFacetProjectCreationDataModelProvider.java24
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EARFacetUtils.java26
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetInstallDelegate.java77
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetPostInstallDelegate.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetRuntimeHandler.java214
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetValidator.java138
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetValidator.properties11
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/EarFacetVersionChangeDelegate.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/IJavaProjectMigrationDataModelProperties.java26
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/IJavaUtilityProjectCreationDataModelProperties.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/IUtilityFacetInstallDataModelProperties.java19
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationDataModelProvider.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaProjectMigrationOperation.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaUtilityProjectCreationDataModelProvider.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/JavaUtilityProjectCreationOperation.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/UtilityFacetInstallDataModelProvider.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/UtilityFacetInstallDelegate.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/UtilityFacetPostInstallDelegate.java57
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/UtilityFacetUnInstallDelegate.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee/earproject/org/eclipse/jst/j2ee/project/facet/UtilityProjectCreationDataModelProvider.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/11_cmpbean_obj.gifbin625 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/11_ejb_obj.gifbin582 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/11_ejbjar_obj.gifbin1039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/12_ear_obj.gifbin1045 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/13_ear_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/20_cmpbean_obj.gifbin632 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/20_ejb_obj.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/20_ejbjar_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/AccessIntent.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ApplClientJar.gifbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/AssemblyDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/AssemblyDescriptorCreateMethodPermission.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/AuthenticationMechanism.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/BeanCache.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/BeanInstall.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/BeanInternationalization.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/BeanStructure.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CMPAttribute.gifbin213 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CMPAttributeCreateContainerManagedEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CMPAttributeold.gifbin364 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CMPKeyAttribute.gifbin603 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CPDep.gifbin338 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ConfigProperty.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/Connector.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ConnectorCreateLicense.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ConnectorCreateResourceAdapter.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerActivitySession.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerManagedEntity.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerManagedEntityCreateEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerManagedEntityExtension.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerManagedEntityExtensionCreateEjbRelationshipRole.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ContainerManagedEntityno.gifbin407 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/Copy of CreateChild.gifbin161 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/CreateChild.gifbin161 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EAR.gifbin600 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBJar.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBJarCreateContainerManagedEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBJarCreateEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBJarExtension.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBJarExtensionCreateEjbGeneralization.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EJBMethodCategory.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbGeneralization.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbKeyRelationshipRole.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbModelFile.gifbin178 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbModule.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbModuleExtension.gifbin1019 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbRelationship.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbRelationshipRole.gifbin552 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbextModelFile.gifbin178 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EjbqlFinderDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EnterpriseBean.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EnterpriseBeanCreateContainerManagedEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EnterpriseBeanCreateEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EnterpriseBeanExtension.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EnterpriseBeanExtensionCreateReadOnlyAttributes.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/Entity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EntityCreateContainerManagedEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EntityEJB.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EntityExtension.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/EntityExtensionCreateReadOnlyAttributes.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/FinderDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/FullSelectFinderDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/Identity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/JavaClientModule.gifbin601 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/JavaClientModuleExtension.gifbin601 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/License.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/LocalTran.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodElement.gifbin374 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodPermission.gifbin589 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodPermissionCreateMethodElement.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodSessionAttribute.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodTransaction.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/MethodTransactionCreateMethodElement.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/PersistenceSecurityIdentity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ReadOnlyAttributes.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ResourceAdapter.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ResourceAdapterCreateAuthenticationMechanism.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ResourceAdapterCreateConfigProperty.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ResourceAdapterCreateSecurityPermission.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/RunAsMode.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/RunAsSpecifiedIdentity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SecurityIdentity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SecurityPermission.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/Session.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SessionCreateContainerManagedEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SessionCreateEntity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SessionExtension.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/SessionExtensionCreateReadOnlyAttributes.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/UseCallerIdentity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/UseSystemIdentity.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/UserFinderDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/WAR.gifbin1014 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/WebModule.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/WebModuleExtension.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/WhereClauseFinderDescriptor.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/access_intent_obj.gifbin310 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/access_intent_read_obj.gifbin337 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/access_intent_update_obj.gifbin327 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/appClientExt_obj.gifbin381 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/assemblyDescriptor_obj.gifbin365 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/attributeKey_obj.gifbin376 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/attribute_obj.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/bmp.gifbin311 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/bmpEntity_obj.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/cmp.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/cmpEntity_obj.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/cmpField_obj.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/deaccsintent_ovr.gifbin80 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/earBinding_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/earExtension_obj.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/earFile_obj.gifbin592 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejb16.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejb16old.GIFbin169 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejbBinding_obj.gifbin1043 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejbExtension_obj.gifbin543 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejbJar_obj.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/ejbRef_obj.gifbin555 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/entitybean_obj.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/entitybean_wiz.gifbin614 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/error_co.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/field.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/finder_descriptor_obj.gifbin609 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/foreignKey_obj.gifbin192 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/frnkeyrelnshp_ovr.gifbin79 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/clcl16/Field_ejb.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/clcl16/ShowBaseTypes_ejb.gifbin200 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/clcl16/ShowGenTypes_ejb.gifbin328 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/clcl16/Types_ejb.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/CreateResourceRefBinding_defaultAuth_BasicAuthData.gifbin161 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/CreateRunAsSpecifiedIdentity_identity_Identity.gifbin161 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/appclient_export_wiz.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/appclient_import_wiz.gifbin358 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/createEJB_RDB.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/createRDB_EJB.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/ejb_rdbmapping_wiz.gifbin616 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/ejbclientjar_wiz.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/ejbcomposer_wiz.gifbin596 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/export_ear_wiz.gifbin607 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/export_ejbjar_wiz.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/export_rar_wiz.gifbin346 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/export_war_wiz.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/generate_ddl.gifbin610 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/generate_rmic.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/import_ear_wiz.gifbin595 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/import_ejbjar_wiz.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/import_rar_wiz.gifbin347 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/import_war_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/new_appclientproject_wiz.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newaccessbean_wiz.gifbin568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newappclient_wiz.gifbin364 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newconnectionprj_wiz.gifbin585 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newear_wiz.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newejb_wiz.gifbin533 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newejbex_wiz.gifbin591 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newejbjar_wiz.gifbin628 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newejbprj_wiz.gifbin587 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newservlet_wiz.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/newwar_wiz.gifbin1039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/re_execute.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ctool16/table_mapping_strategy_wiz.gifbin608 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/data_view.gifbin213 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/ear_ed_view.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/earext_ed_view.gifbin541 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/ejb_ed_view.gifbin311 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/ejb_rdbmapping_view.gifbin590 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/ejb_view.gifbin311 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/ejbext_ed_view.gifbin541 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/j2ee_perspective.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/j2ee_view.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/cview16/table_view.gifbin573 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dlcl16/Field_ejb.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dlcl16/ShowBaseTypes_ejb.gifbin97 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dlcl16/ShowGenTypes_ejb.gifbin140 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dlcl16/Types_ejb.gifbin359 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/appclient_export_wiz.gifbin224 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/appclient_import_wiz.gifbin222 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/createEJB_RDB.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/createRDB_EJB.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/ejb_rdbmapping_wiz.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/ejbclientjar_wiz.gifbin613 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/ejbcomposer_wiz.gifbin359 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/export_ear_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/export_ejbjar_wiz.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/export_rar_wiz.gifbin231 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/export_war_wiz.gifbin561 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/generate_ddl.gifbin366 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/generate_rmic.gifbin367 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/import_ear_wiz.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/import_ejbjar_wiz.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/import_rar_wiz.gifbin229 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/import_war_wiz.gifbin561 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/new_appclientproject_wiz.gifbin373 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newaccessbean_wiz.gifbin351 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newappclient_wiz.gifbin238 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newconnectionprj_wiz.gifbin367 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newear_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newejb_wiz.gifbin325 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newejbex_wiz.gifbin364 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newejbjar_wiz.gifbin601 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newejbprj_wiz.gifbin568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newservlet_wiz.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/newwar_wiz.gifbin612 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/re_execute.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/dtool16/table_mapping_strategy_wiz.gifbin376 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/elcl16/Field_ejb.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/elcl16/ShowBaseTypes_ejb.gifbin200 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/elcl16/ShowGenTypes_ejb.gifbin328 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/elcl16/Types_ejb.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/appclient_export_wiz.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/appclient_import_wiz.gifbin358 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/createEJB_RDB.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/createRDB_EJB.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/ejb_rdbmapping_wiz.gifbin616 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/ejbclientjar_wiz.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/ejbcomposer_wiz.gifbin596 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/export_ear_wiz.gifbin607 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/export_ejbjar_wiz.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/export_rar_wiz.gifbin346 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/export_war_wiz.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/generate_ddl.gifbin610 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/generate_rmic.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/import_ear_wiz.gifbin595 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/import_ejbjar_wiz.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/import_rar_wiz.gifbin347 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/import_war_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/new_appclientproject_wiz.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newaccessbean_wiz.gifbin568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newappclient_wiz.gifbin364 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newconnectionprj_wiz.gifbin585 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newear_wiz.gifbin605 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newejb_wiz.gifbin533 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newejbex_wiz.gifbin591 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newejbjar_wiz.gifbin628 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newejbprj_wiz.gifbin587 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newservlet_wiz.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/newwar_wiz.gifbin1039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/re_execute.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/etool16/table_mapping_strategy_wiz.gifbin608 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/data_view.gifbin213 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/ear_ed_view.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/earext_ed_view.gifbin541 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/ejb_ed_view.gifbin311 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/ejb_rdbmapping_view.gifbin590 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/ejb_view.gifbin311 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/ejbext_ed_view.gifbin541 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/j2ee_perspective.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/j2ee_view.gifbin345 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/eview16/table_view.gifbin573 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/EJBDataTransformer.gifbin592 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/ForwardFlattenedFKComposer.gifbin598 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/InheritedPrimaryTableStrategy.gifbin612 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/PrimaryTableStrategy.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/RDBMemberType.gifbin210 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/arraytype_obj.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/class.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/datatype_obj.gifbin625 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/error_co.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/folder.gifbin216 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/form_banner.gifbin5600 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/home_nav.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/interface.gifbin576 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/jcu_obj.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/showerr_tsk.gifbin167 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/showwarn_tsk.gifbin338 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/warn_tsk.gifbin597 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/extra/warning_co.gifbin173 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/11_cmpbean_obj.gifbin625 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/11_ejb_obj.gifbin582 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/11_ejbjar_obj.gifbin1039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/12_ear_deploy.gifbin633 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/12_ear_obj.gifbin1045 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/13_ear_deploy.gifbin632 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/13_ear_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/14_ear_obj.gifbin632 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/20_cmpbean_obj.gifbin632 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/20_ejb_obj.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/20_ejbjar_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/21_cmpbean_obj.gifbin628 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/21_ejb_obj.gifbin1041 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/21_ejbjar_wiz.gifbin631 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/AbstractAuthData.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ActivationConfig.gifbin369 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ActivationConfigProperty.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/BasicAuthData.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/CompatibilityDescriptionGroup.gifbin129 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/EJBLocalRef.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/EjbRef.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/EjbRefBinding.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/EnvEntry.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/Identity.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ResourceEnvRef.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ResourceEnvRefBinding.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ResourceRef.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ResourceRefBinding.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/RunAsSpecifiedIdentity.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/SOAPHeader.gifbin171 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/SecurityIdentity.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/SecurityRole.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/SecurityRoleRef.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/UseCallerIdentity.gifbin138 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/access_intent_obj.gifbin310 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/access_intent_read_obj.gifbin337 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/access_intent_update_obj.gifbin327 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/accessbean_obj.gifbin555 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/annotation_positioned_overlay.gifbin83 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appClientExt_obj.gifbin381 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_12.gifbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_12_deploy.gifbin628 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_13.gifbin603 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_13_deploy.gifbin627 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_14.gifbin590 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclient_14_deploy.gifbin615 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclientgroup_deploy.gifbin607 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/appclientgroup_obj.gifbin578 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/applclientJAR_obj.GIFbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/assemblyDescriptor_obj.gifbin365 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/attributeKey_obj.gifbin376 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/attribute_obj.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/auth_data_obj.gifbin608 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/auth_mechanism_obj.gifbin342 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/auth_table_obj.gifbin610 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/bmpEntity_obj.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/cmpEntity_obj.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/cmpField_dec.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/cmpField_obj.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/collaccess_obj.gifbin354 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/collincrement_obj.gifbin357 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/config_prop_obj.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/connection_obj.gifbin200 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/connector_module.gifbin562 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/connectorgroup_obj.gifbin355 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/copyhelper_ovr.gifbin276 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/create_child.gifbin560 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/dataclass_ovr.gifbin190 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/db_obj.gifbin213 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/dbgroup_obj.gifbin360 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/earBinding_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/earExtension_obj.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/earFile_obj.gifbin592 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/eargroup_deploy.gifbin1025 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/eargroup_obj.gifbin596 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbBinding_obj.gifbin1043 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbExtension_obj.gifbin543 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbJar_obj.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbRef_obj.gifbin555 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejb_container_obj.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejb_local_ref_obj.gifbin572 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejb_rdbmapping_obj.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejb_reference.gifbin555 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbclientjar_obj.gifbin1023 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbclientutil_obj.gifbin619 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbgroup_deploy.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbgroup_obj.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/ejbql_obj.gifbin1016 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/environment_entity.gifbin206 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/envvar_obj.gifbin206 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/extwebserviceitemprovider_obj.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/finder_descriptor_obj.gifbin609 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/foreignKey_obj.gifbin192 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/form_banner.gifbin5600 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/group_obj.gifbin598 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/homeInt_dec.gifbin204 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/home_interface_positioned_overlay.gifbin122 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/inhrelejb_obj.gifbin217 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_obj.gifbin318 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readcom_obj.gifbin211 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_readuncom_obj.gifbin324 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_repread_obj.gifbin332 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/isolation_level_serializ_obj.gifbin360 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/jarproject_deploy.gifbin622 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/javabean_obj.gifbin612 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/keyInt_dec.gifbin324 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/license_obj.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/listener.gifbin530 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/local_home_interface_positioned_overlay.gifbin125 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/local_interface_positioned_overlay.gifbin77 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/manyRight_dec.gifbin185 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/message_bean_obj.gifbin577 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/methElement_obj.gifbin374 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/methPermission_obj.gifbin589 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/methTransaction_obj.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/methods_obj.gifbin378 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/module_clientapp_obj.gifbin586 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/module_ejb_obj.gifbin585 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/module_group.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/module_web_obj.gifbin587 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/msgdrivendestination_obj.gifbin348 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/opt_read.gifbin360 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/opt_update.gifbin568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/parameter_obj.gifbin333 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/pess_read.gifbin363 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/pess_update.gifbin571 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/primaryKey_active_obj.gifbin343 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/primaryKey_inactive_obj.gifbin228 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/prjutiljar_missing_obj.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/prjutiljar_obj.gifbin603 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/qname.gifbin129 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/query_method_obj.gifbin373 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/readaheadhint_obj.gifbin336 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/relationship_role_obj.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/remInt_dec.gifbin204 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/remote_interface_positioned_overlay.gifbin91 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/res_env_ref_obj.gifbin346 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/resourceRef_obj.gifbin365 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/resource_adapter_obj.gifbin371 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/resource_reference.gifbin365 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/roleKey_obj.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/role_obj.gifbin310 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/run_binding_obj.gifbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/run_map_obj.gifbin317 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/secur_role_ref_obj.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/security_identity_obj.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/security_permission_obj.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/security_role.gifbin562 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/security_role_obj.gifbin562 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/security_role_reference.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/securityrole_obj.gifbin564 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/securityrolebinding_obj.gifbin644 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/serverPaused_obj.gifbin598 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/service_interface_positioned_overlay.gifbin77 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/sessionBean_obj.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/session_scope.gifbin340 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/showwarn_tsk.gifbin338 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/sql_query_obj.gifbin1021 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/timout_scope.gifbin568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/transaction_scope.gifbin196 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/undefinedRight_dec.gifbin169 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/user_obj.gifbin310 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/utiljar_obj.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/warBinding_obj.gifbin1048 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/warExtension_obj.gifbin576 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/warFile_obj.gifbin1013 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/webServiceItemProvider_obj.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/webServicesFolder_obj.gifbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/web_library_project_obj.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/webapp_deploy.gifbin364 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/webgroup_deploy.gifbin601 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/obj16/webgroup_obj.gifbin573 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_0_ovr.gifbin80 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_1_ovr.gifbin79 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_2_ovr.gifbin81 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_3_ovr.gifbin80 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_4_ovr.gifbin80 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/1_5_ovr.gifbin79 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/2_0_ovr.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/2_1_ovr.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/2_2_ovr.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/2_3_ovr.gifbin81 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/2_4_ovr.gifbin82 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/caller_ovr.gifbin86 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/client_app_ovr.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/connector_ovr.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/database_ovr.gifbin272 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/ejb_module_ovr.gifbin167 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/ejbql_ovr.gifbin174 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/enterprise_app_ovr.gifbin112 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/fullselect_ovr.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/home_interf_ov.gifbin64 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/key_interf_ov.gifbin81 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/local_home_ovr.gifbin108 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/local_ovr.gifbin64 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/optimistic_ovr.gifbin114 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/remote_interf_ov.gifbin77 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/securityrole_ovr.gifbin117 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/server_config_ovr.gifbin166 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/server_inst_ovr.gifbin113 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/server_ovr.gifbin162 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/service_interface_ovr.gifbin66 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/user_ovr.gifbin169 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/web_module_ovr.gifbin273 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/ovr16/whereclause_ovr.GIFbin112 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/1x_cmpbean_palette_obj.gifbin1251 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/2x_cmpbean_palette_obj.gifbin1239 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/bmpEntity_palette_obj.gifbin1184 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/ejb_rdbmapping_palette_obj.gifbin1219 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/ejb_reference_palette_obj.gifbin1105 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/inherelejb_palette_obj.gifbin422 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/message_bean_palette_obj.gifbin1186 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/relationship_role_palette_obj.gifbin1250 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/pal24/sessionBean_palette_obj.gifbin1262 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/11_cmpbean_wiz.gifbin3214 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/11_ejb_wiz.gifbin3496 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/11_ejbjar_wiz.gifbin3692 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/12_ear_wiz.gifbin3484 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/13_ear_wiz.gifbin3464 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/20_cmpbean_wiz.gifbin3210 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/20_ejb_wiz.gifbin3437 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/20_ejbjar_wiz.gifbin3554 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/Serviceref_wiz.gifbin3466 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/access_intent_wiz.gifbin3029 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/accessbean_wiz.gifbin3491 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/add_mess_dest_wiz_ban.gifbin2812 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/appclient_export_wiz.gifbin2962 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/appclient_import_wiz.gifbin3039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/appclient_wiz.gifbin2929 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/attribute_wiz.gifbin3291 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/beanselection_wiz.gifbin3583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/bmp_bean_wiz.gifbin3340 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/cmp_bean_wiz.gifbin3626 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/del_clientview_wiz.gifbin3292 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ear_wiz.gifbin3204 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/earimport_wiz.gifbin3343 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/earpub_wiz.gifbin3181 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejb_module_wiz.gifbin3496 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejb_ref_wiz.gifbin3216 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejb_utility_wiz.gifbin3150 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejb_wiz.gifbin3113 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbbinding_wiz.gifbin3156 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbclientjar_wizban.gifbin3415 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbcomposerbanner_wiz.gifbin3708 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbexample_wiz.gifbin3181 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbexport_wiz.gifbin3452 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbimport_wiz.gifbin3533 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbjar_wiz.gifbin3461 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbproject_wiz.gifbin3091 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbql_wiz.gifbin3662 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/ejbrdbmapping_wiz.gifbin3527 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/env_ref_wiz.gifbin3383 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/env_variable_wiz.gifbin3418 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/export_appclient_wiz.gifbin2937 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/export_ear_wiz.gifbin3142 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/export_ejbjar_obj.gifbin3502 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/export_rar_wiz.gifbin3374 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/export_war_wiz.gifbin3533 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_appclient_wiz.gifbin3011 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_class_file_wiz_ban.gifbin3303 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_ear_wiz.gifbin3357 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_ejbjar_wiz.gifbin3509 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_rar_wiz.gifbin3520 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/import_war_wiz.gifbin3598 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/inheritance_hierarchy_wiz.gifbin2627 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/isolationlevel_wiz.gifbin2995 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/javaprj_to_ear_wiz.gifbin3565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/javavisualeditor_wiz.gifbin3259 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/local_ejb_ref_wiz.gifbin3360 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/message_bean_wiz.gifbin3109 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/messdestref_wiz.gifbin2738 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/method_permission_wiz.gifbin3737 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/method_transaction_wiz.gifbin3294 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/new_appclientproject_wiz.gifbin2974 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/new_clientview_wiz.gifbin3163 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newaccessbean_wiz.gifbin3439 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newappclientprj_wiz.gifbin2993 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newconnectionprj_wiz.gifbin2982 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newear_wiz.gifbin3255 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newejb_wiz.gifbin3146 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newejbex_wiz.gifbin3478 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newejbjar_wiz.gifbin3476 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newejbprj_wiz.gifbin3144 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newfilter_wiz.gifbin3193 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newlistener_wiz.gifbin2992 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newservlet_wiz.gifbin3180 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newwar_wiz.gifbin3526 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newwebex_wiz.gifbin3380 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/newwprj_wiz.gifbin3151 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/preload_relationship_wiz.gifbin3307 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/regenabn_wiz.gifbin3647 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/relationship_role_wiz.gifbin3261 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/replace_role_wiz.gifbin3851 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/resource_ref_wiz.gifbin2890 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/secur_role_ref_wiz.gifbin3280 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/secur_role_wiz.gifbin3153 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/security_identity_wiz.gifbin3452 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/selectbean_wiz.gifbin3672 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/session_bean_wiz.gifbin3629 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/sql_query_wiz.gifbin3632 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/tablemappingstrategy_wiz.gifbin3003 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/user_wiz.gifbin2760 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/usergroup_wiz.gifbin3636 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/war_wiz.gifbin3449 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/warexport_wiz.gifbin3574 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/full/wizban/warimport_wiz.gifbin3644 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/getstart_a.GIFbin173 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/initializ_parameter.gifbin144 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/isolation_level_readcom_obj.gifbin211 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/isolation_level_readuncom_obj.gifbin324 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/isolation_level_repread_obj.gifbin332 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/isolation_level_serializ_obj.gifbin360 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/jar_nonexist_obj.gifbin335 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/jar_obj.gifbin579 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/java_prop.gifbin351 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/key.gifbin324 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/message_bean_obj.gifbin577 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/methElement_obj.gifbin374 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/methPermission_obj.gifbin589 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/methTransaction_obj.gifbin356 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/msgdrivenbean_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/newjprj_wiz.gifbin347 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/componentscopedref.gifbin576 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/handler.gifbin622 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/localencodingmapping_obj.gifbin565 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/messdestref_obj.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/portcomponent.gifbin221 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/qname.gifbin129 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/serviceref.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/serviceref_obj.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/obj16/webservicedesc.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/primaryKey_active_obj.gifbin343 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/primaryKey_inactive_obj.gifbin228 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/rdaheadhint_obj.gifbin336 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/resourceRef_obj.gifbin365 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/role.gifbin185 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/roleKey_obj.gifbin563 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/role_obj.gifbin310 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/roleid_obj.gifbin547 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/serverPaused_obj.gifbin598 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/sessionBean_obj.gifbin583 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/sessionbean_wiz.gifbin606 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/warBinding_obj.gifbin1048 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/warExtension_obj.gifbin576 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/warFile_obj.gifbin1014 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/warn_tsk.gifbin597 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/warning_co.gifbin173 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/web_application.gifbin996 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/ArrowDown.gifbin826 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/ArrowUp.gifbin826 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/add_column.gifbin193 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/connection.gifbin200 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/convertlinks_wiz.gifbin230 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/default.gifbin359 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/exportftp_wiz.gifbin108 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/exportwar_wiz.gifbin581 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/importftp_wiz.gifbin106 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/importhttp_wiz.gifbin570 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/importwar_wiz.gifbin580 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/method.gifbin577 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/methodreturn.gifbin350 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/newwebex_wiz.gifbin609 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/newwebprj_wiz.gifbin607 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/warFile_obj.gifbin1014 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/web_application.gifbin608 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/ctool16/web_ovr.gifbin276 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/linksview16/mailto_view.gifbin335 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/ascii.gifbin577 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/binary.gifbin616 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/environment_entity.gifbin206 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/java_properties.gifbin351 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/method_return.gifbin351 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/projlib_obj.gifbin608 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/obj16/servlet.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/sample16/folder.gifbin216 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/thumbnail16/defaultFile.gifbin577 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/thumbnail16/defaultFolder.gifbin216 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/view16/colourpal_view.gifbin252 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/view16/gallery_view.gifbin625 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/view16/links_view.gifbin218 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/view16/sample.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/view16/thumbnail_view.gifbin609 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/ftpimport_wiz.gifbin2568 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/ftppub_wiz.gifbin2535 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/httpimport_wiz.gifbin3160 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/newwebex_wiz.gifbin3380 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/newwprj_wiz.gifbin3151 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/warexport_wiz.gifbin3574 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webtoolsicons/full/wizban/warimport_wiz.gifbin3644 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/11_ejb_obj.gifbin582 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/11_ejbjar_obj.gifbin1039 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/20_ejb_obj.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/20_ejbjar_obj.gifbin1044 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/ServletCreateInitParam.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/WebAppCreateContextParam.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/WebResourceCollectionCreateURLPatternType.gifbin300 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/authority_constraint.gifbin587 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/create_child.gifbin560 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/error_page.gifbin624 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/errorcode_errorpage.gifbin624 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/exception_type_errorpage.gifbin205 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/filter.gifbin546 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/filter_mapping.gifbin215 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/form_login_config.gifbin613 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/full/wizban/newservlet_wiz.gifbin3180 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/http_type.gifbin180 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/initializ_parameter.gifbin337 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/initializ_parameter_context.gifbin337 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/jsp_library_reference.gifbin614 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/jsp_type.gifbin600 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/listener.gifbin530 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/mime_mapping.gifbin578 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/newservlet_wiz.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/security_constraint.gifbin251 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/security_role_nametype.gifbin599 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/servlet.gifbin588 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/servlet_mapping.gifbin582 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/servlet_type.gifbin587 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/session_config.gifbin369 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/url_type.gifbin180 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/user_data_constraint.gifbin572 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/web_application.gifbin996 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/web_resource_collection.gifbin615 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/web_type.gifbin996 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/webapp_12.gifbin604 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/webapp_13.gifbin603 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/welcome_file.gifbin569 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/webuiIcons/welcome_list.gifbin609 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/icons/xml_image.gifbin357 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/componentcore/EnterpriseArtifactEdit.java359
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualArchiveComponent.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/componentcore/J2EEModuleVirtualComponent.java389
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/AppClientBinaryComponentHelper.java129
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/ComponentArchiveOptions.java33
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/EJBBinaryComponentHelper.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/EnterpriseBinaryComponentHelper.java403
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/JCABinaryComponentHelper.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/JavaEEBinaryComponentHelper.java478
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/JavaEEBinaryComponentLoadAdapter.java227
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/UtilityBinaryComponentHelper.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/componentcore/WebBinaryComponentHelper.java128
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/delete/ClasspathDeleteInfo.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/delete/DeleteModuleOperation.java258
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/delete/DeleteOptions.java126
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/Assert.java110
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/AssertionFailedException.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/IJ2EEProjectTypes.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EECreationResourceHandler.java162
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEJavaProjectInfo.java481
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/J2EEProjectUtilities.java1179
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/ManifestFileCreationAction.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/ProjectSupportResourceHandler.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/WTPJETEmitter.java638
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/project/test.jpage0
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/rename/ClasspathRenameInfo.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/rename/RenameOptions.java165
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/IServerTargetConstants.java41
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/ITargetRuntimeExtensionHandler.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/J2EEProjectServerTargetDataModelProvider.java299
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/J2EEProjectServerTargetOp.java70
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/ServerTargetHelper.java476
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/internal/servertarget/TargetRuntimeExtension.java62
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/EJBUtilities.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/EarUtilities.java339
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/JavaEEProjectUtilities.java386
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/WebUtilities.java113
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/datamodel/properties/IJ2EEProjectServerTargetDataModelProperties.java50
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetConstants.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetInstallDataModelProperties.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEFacetProjectCreationDataModelProperties.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/IJ2EEModuleFacetInstallDataModelProperties.java20
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEFacetInstallDataModelProvider.java59
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEFacetInstallDelegate.java215
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEFacetProjectCreationDataModelProvider.java209
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEFacetRuntimeChangedDelegate.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eecreation/org/eclipse/jst/j2ee/project/facet/J2EEModuleFacetInstallDataModelProvider.java259
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/J2EEModulePostImportHandler.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/J2EEModulePostImportHelper.java158
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/ResourceTypeReaderHelper.java174
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/DeployerRegistry.java194
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/DeployerRegistryReader.java89
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/FatalDeployerException.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployHelper.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java271
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployer.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/EnterpriseApplicationDeployableAdapterUtil.java208
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/FlexibleProjectServerUtil.java38
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java203
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexProjDeployable.java1177
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/IJ2EEModuleConstants.java35
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/IJ2EEPreferences.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEGroupInitializer.java47
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPlugin.java702
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPluginResourceHandler.java76
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/J2EEPreferences.java438
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/plugin/LibCopyBuilder.java506
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/AWorkbenchMOFHelper.java92
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/ApplicationClientHelper.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/DependencyUtil.java242
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/EarHelper.java112
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/J2EEValidationHelper.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/ManifestLineValidator.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/ProjectValidationHelper.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/ResourceUtil.java61
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/UIApplicationClientHelper.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/UIApplicationClientMessageConstants.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/UIApplicationClientValidator.java82
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/UIEarHelper.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/validation/UIEarValidator.java804
-rw-r--r--plugins/org.eclipse.jst.j2ee/license/berkeley_license.html45
-rw-r--r--plugins/org.eclipse.jst.j2ee/plugin.properties35
-rw-r--r--plugins/org.eclipse.jst.j2ee/plugin.xml766
-rw-r--r--plugins/org.eclipse.jst.j2ee/preferences.ini1
-rw-r--r--plugins/org.eclipse.jst.j2ee/prepareAllPII.xml192
-rw-r--r--plugins/org.eclipse.jst.j2ee/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/appclientarchiveops.properties25
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/appclientcreation.properties14
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/applicationclientvalidation.properties65
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/applicationproviders.properties98
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/basecodegen.properties13
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/classpathdependencyvalidator.properties21
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/commonedit.properties403
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/eararchiveops.properties37
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/earcreation.properties84
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/ejbarchiveops.properties38
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/erefvalidation.properties78
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/j2ee_common.properties48
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/j2eecreation.properties143
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/j2eewtpplugin.properties56
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/javacodegen.properties26
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/projectsupport.properties47
-rw-r--r--plugins/org.eclipse.jst.j2ee/property_files/refactor.properties21
-rw-r--r--plugins/org.eclipse.jst.j2ee/pushforpii.xml267
-rw-r--r--plugins/org.eclipse.jst.j2ee/readme.html16
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/ProjectDependencyCache.java150
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/RefactorResourceHandler.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/listeners/J2EEElementChangedListener.java333
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/listeners/ProjectRefactoringListener.java245
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/AbstractOptionalRefactorHandler.java49
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/CreateOptionalReferenceOp.java44
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/CreateOptionalReferenceOpDataModelProvider.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/IOptionalRefactorHandler.java64
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/OptionalRefactorHandler.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectDeleteDataModelProvider.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectDeleteOperation.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRefactorMetadata.java364
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRefactorOperation.java199
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRefactoringDataModelProvider.java54
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRefactoringProperties.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRenameDataModelProvider.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/ProjectRenameOperation.java179
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/RemoveDeletedComponentFromEARDataModelProvider.java56
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/RemoveDeletedComponentFromEAROperation.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentEARonDeleteOp.java79
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentEARonDeleteProvider.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentEARonRenameOp.java98
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentEARonRenameProvider.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentModuleonDeleteOp.java159
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentModuleonDeleteProvider.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentModuleonRenameOp.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentModuleonRenameProvider.java23
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentProjectDataModelProvider.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentProjectOp.java108
-rw-r--r--plugins/org.eclipse.jst.j2ee/refactor/org/eclipse/jst/j2ee/refactor/operations/UpdateDependentProjectRenameDataModelProvider.java28
-rw-r--r--plugins/org.eclipse.jst.j2ee/rose/moduleMap.genmodel25
-rw-r--r--plugins/org.eclipse.jst.j2ee/rose/moduleMap.mdl7323
-rw-r--r--plugins/org.eclipse.jst.j2ee/rose/modulemap.ecore19
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/ClasspathDep.exsd110
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/DeployerExtension.exsd146
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/EARModuleExtension.exsd103
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/EJBCommandExtension.exsd118
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/J2EEModelProvider.exsd140
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/J2EEModulePostImport.exsd121
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/WSDLServiceHelper.exsd103
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/WebServiceClientGenerator.exsd118
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/archiveExportParticipants.exsd183
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/optionalRefactorHandler.exsd102
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/resourceEnvRefType.exsd136
-rw-r--r--plugins/org.eclipse.jst.j2ee/schema/resourceRefType.exsd136
-rw-r--r--plugins/org.eclipse.jst.j2ee/smoke/construction3.gifbin281 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/smoke/detour.gifbin386 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/smoke/ejbrdb_smoke.html787
-rw-r--r--plugins/org.eclipse.jst.j2ee/smoke/slippery.gifbin1493 -> 0 bytes-rw-r--r--plugins/org.eclipse.jst.j2ee/smoke/smoke.html202
1541 files changed, 0 insertions, 108103 deletions
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/.cvsignore b/features/org.eclipse.jst.enterprise_ui.feature.patch/.cvsignore
deleted file mode 100644
index dda1b8f60..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build.xml
-org.eclipse.jst.enterprise_ui.feature.patch_*.jar
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/.project b/features/org.eclipse.jst.enterprise_ui.feature.patch/.project
deleted file mode 100644
index 02a716add..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.enterprise_ui.feature.patch R3_0_1_patches</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/build.properties b/features/org.eclipse.jst.enterprise_ui.feature.patch/build.properties
deleted file mode 100644
index cb50260a9..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = feature.xml,\
- license.html,\
- feature.properties,\
- epl-v10.html,\
- eclipse_update_120.jpg
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html b/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html
deleted file mode 100644
index a085bae8d..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/buildnotes_org.eclipse.jst.enterprise_ui.feature.patch.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="Build" content="Build">
-<title>WTP 3.0.3 Patches</title>
-</head>
-
-<body>
-
-<h1>WTP 3.0.3 Patches</h1>
-
-<p>Bug <a
- href='https://bugs.eclipse.org/bugs/show_bug.cgi?id=255537'>255537</a>.
-ClassCastException from Java EE Module Dependencies Properties Page</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/eclipse_update_120.jpg b/features/org.eclipse.jst.enterprise_ui.feature.patch/eclipse_update_120.jpg
deleted file mode 100644
index bfdf708ad..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/eclipse_update_120.jpg
+++ /dev/null
Binary files differ
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/epl-v10.html b/features/org.eclipse.jst.enterprise_ui.feature.patch/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties
deleted file mode 100644
index e40684dec..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.properties
+++ /dev/null
@@ -1,149 +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
-###############################################################################
-# feature.properties
-# contains externalized strings for feature.xml
-# "%foo" in feature.xml corresponds to the key "foo" in this file
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file should be translated.
-
-# "featureName" property - name of the feature
-featureName=WTP Patches for org.eclipse.jst.enterprise_ui.feature
-
-# "providerName" property - name of the company that provides the feature
-providerName=Eclipse.org
-
-# "updateSiteName" property - label for the update site
-updateSiteName=The Eclipse Web Tools Platform (WTP) Project update site
-
-# "description" property - description of the feature
-description=\n\
-\n\
-The fixes are described in the following bugzilla entries:\n\
-\n\
-Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=255537 ClassCastException from Java EE Module Dependencies Properties Page\n\
-\n\
-
-# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008 IBM Corporation and others.\n\
-All rights reserved. This program and the accompanying materials\n\
-are made available under the terms of the Eclipse Public License v1.0\n\
-which accompanies this distribution, and is available at\n\
-http://www.eclipse.org/legal/epl-v10.html\n\
-\n\
-Contributors:\n\
- IBM Corporation - initial API and implementation\n
-################ end of copyright property ####################################
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=\
-ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
-August, 2008\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
-OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
-USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
-AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
-NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
-AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
-AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
-OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
-BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
-is provided to you under the terms and conditions of the Eclipse Public\n\
-License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
-Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
-For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code,\n\
-documentation and other files maintained in the Eclipse.org CVS\n\
-repository ("Repository") in CVS modules ("Modules") and made available\n\
-as downloadable archives ("Downloads").\n\
-\n\
- - Content may be structured and packaged into modules to facilitate delivering,\n\
- extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
- plug-in fragments ("Fragments"), and features ("Features").\n\
- - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
- in a directory named "plugins".\n\
- - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
- Each Feature may be packaged as a sub-directory in a directory named "features".\n\
- Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
- numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- - Features may also include other Features ("Included Features"). Within a Feature, files\n\
- named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-Features may also include other Features ("Included Features"). Files named\n\
-"feature.xml" may contain a list of the names and version numbers of\n\
-Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be\n\
-contained in files named "about.html" ("Abouts"). The terms and\n\
-conditions governing Features and Included Features should be contained\n\
-in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
-Licenses may be located in any directory of a Download or Module\n\
-including, but not limited to the following locations:\n\
-\n\
- - The top-level (root) directory\n\
- - Plug-in and Fragment directories\n\
- - Inside Plug-ins and Fragments packaged as JARs\n\
- - Sub-directories of the directory named "src" of certain Plug-ins\n\
- - Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
-Eclipse Update Manager, you must agree to a license ("Feature Update\n\
-License") during the installation process. If the Feature contains\n\
-Included Features, the Feature Update License should either provide you\n\
-with the terms and conditions governing the Included Features or inform\n\
-you where you can locate them. Feature Update Licenses may be found in\n\
-the "license" property of files named "feature.properties". Such Abouts,\n\
-Feature Licenses and Feature Update Licenses contain the terms and\n\
-conditions (or references to such terms and conditions) that govern your\n\
-use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
-SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
- - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
-is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
-govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are\n\
-currently may have restrictions on the import, possession, and use,\n\
-and/or re-export to another country, of encryption software. BEFORE\n\
-using any encryption software, please check the country's laws,\n\
-regulations and policies concerning the import, possession, or use,\n\
-and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-########### end of license property ##########################################
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.xml b/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.xml
deleted file mode 100644
index 87c8650b2..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/feature.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.jst.enterprise_ui.feature.patch"
- label="%featureName"
- version="3.0.3.qualifier"
- provider-name="%providerName">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <requires>
- <import feature="org.eclipse.jst.enterprise_ui.feature" version="3.0.3.v200810010400-7Y7BFSrEPOwQPnUuwhYV60NEQtTn" patch="true"/>
- </requires>
-
- <plugin
- id="org.eclipse.jst.j2ee.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/features/org.eclipse.jst.enterprise_ui.feature.patch/license.html b/features/org.eclipse.jst.enterprise_ui.feature.patch/license.html
deleted file mode 100644
index 2347060ef..000000000
--- a/features/org.eclipse.jst.enterprise_ui.feature.patch/license.html
+++ /dev/null
@@ -1,93 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
-<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
-<HTML><HEAD><TITLE>Eclipse.org Software User Agreement</TITLE>
-<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD>
-<BODY lang=EN-US vLink=purple link=blue>
-<H2>Eclipse Foundation Software User Agreement</H2>
-<P>January 28, 2005</P>
-<H3>Usage Of Content</H3>
-<P>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION
-AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF
-THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED
-BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE
-TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY
-APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU
-MAY NOT USE THE CONTENT.</P>
-<H3>Applicable Licenses</H3>
-<P>Unless otherwise indicated, all Content made available by the Eclipse
-Foundation is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this
-Content and is also available at <A
-href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-<P>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse.org CVS repository
-("Repository") in CVS modules ("Modules") and made available as downloadable
-archives ("Downloads").</P>
-<P>Content may be apportioned into plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features"). A Feature is a bundle of one or more
-Plug-ins and/or Fragments and associated material. Files named "feature.xml" may
-contain a list of the names and version numbers of the Plug-ins and/or Fragments
-associated with a Feature. Plug-ins and Fragments are located in directories
-named "plugins" and Features are located in directories named "features".</P>
-<P>Features may also include other Features ("Included Features"). Files named
-"feature.xml" may contain a list of the names and version numbers of Included
-Features.</P>
-<P>The terms and conditions governing Plug-ins and Fragments should be contained
-in files named "about.html" ("Abouts"). The terms and conditions governing
-Features and Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
-directory of a Download or Module including, but not limited to the following
-locations:</P>
-<UL>
- <LI>The top-level (root) directory
- <LI>Plug-in and Fragment directories
- <LI>Subdirectories of the directory named "src" of certain Plug-ins
- <LI>Feature directories </LI></UL>
-<P>Note: if a Feature made available by the Eclipse Foundation is installed
-using the Eclipse Update Manager, you must agree to a license ("Feature Update
-License") during the installation process. If the Feature contains Included
-Features, the Feature Update License should either provide you with the terms
-and conditions governing the Included Features or inform you where you can
-locate them. Feature Update Licenses may be found in the "license" property of
-files named "feature.properties". Such Abouts, Feature Licenses and Feature
-Update Licenses contain the terms and conditions (or references to such terms
-and conditions) that govern your use of the associated Content in that
-directory.</P>
-<P>THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL
-OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</P>
-<UL>
- <LI>Common Public License Version 1.0 (available at <A
- href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</A>)
-
- <LI>Apache Software License 1.1 (available at <A
- href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</A>)
-
- <LI>Apache Software License 2.0 (available at <A
- href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</A>)
-
- <LI>IBM Public License 1.0 (available at <A
- href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</A>)
-
- <LI>Metro Link Public License 1.00 (available at <A
- href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</A>)
-
- <LI>Mozilla Public License Version 1.1 (available at <A
- href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</A>)
- </LI></UL>
-<P>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR
-TO USE OF THE CONTENT. If no About, Feature License or Feature Update License is
-provided, please contact the Eclipse Foundation to determine what terms and
-conditions govern that particular Content.</P>
-<H3>Cryptography</H3>
-<P>Content may contain encryption software. The country in which you are
-currently may have restrictions on the import, possession, and use, and/or
-re-export to another country, of encryption software. BEFORE using any
-encryption software, please check the country's laws, regulations and policies
-concerning the import, possession, or use, and re-export of encryption software,
-to see if this is permitted.</P></BODY></HTML>
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 e2a8bcb0c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Thu May 10 18:35:45 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
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 d5ff63129..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,76 +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.206.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.ear.actions;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
-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.1.0,1.2.0)",
- org.eclipse.jst.j2ee;bundle-version="[1.1.0,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,1.2.0)",
- org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.0,1.2.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.1.0,1.2.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.1.0,1.2.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.1.0,1.2.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.4.4,4.0.0)",
- 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)"
-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 55ac8282a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/build.properties
+++ /dev/null
@@ -1,22 +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/
-src.includes = plugin.properties,\
- plugin.xml
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif
deleted file mode 100644
index 023fe8d4d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/20_cmpbean_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif
deleted file mode 100644
index 91e708f7c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/adown.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif
deleted file mode 100644
index 276842824..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/appclientgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif
deleted file mode 100644
index 3c455c9ff..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/arrow_down.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif
deleted file mode 100644
index a9063201b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/arrowp.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif
deleted file mode 100644
index 788e76d4a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif
deleted file mode 100644
index 3e31054b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_left2.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif
deleted file mode 100644
index 573b60f0c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cascade_right.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif
deleted file mode 100644
index 20ed1f9a4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/cmp.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif
deleted file mode 100644
index ad3af3c65..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/connectorgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif b/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif
deleted file mode 100644
index 5df61935f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/icons/deadend.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.ui/icons/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/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 686b14e15..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/common/jdt/internal/integration/ui/WTPUIWorkingCopyManager.java
+++ /dev/null
@@ -1,474 +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.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;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-
-/**
- * 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);
- }
- }
-
- 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 {
- while (element != null) {
- switch (element.getElementType()) {
- case IJavaElement.COMPILATION_UNIT : {
- ICompilationUnit cu = (ICompilationUnit) element;
- 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) element);
- }
- element = element.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
- */
- 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
- */
- 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;
- }
-
- protected void primDispose() {
- super.primDispose();
- discardExistingCompilationUnits();
- editorInputs = null;
- javaWorkingCopyManager = null;
- }
-
- 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
- */
- 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.
- */
- 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) {
- WTPCommonPlugin.getDefault().getLogger().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;
- }
-
-
- 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()
- */
- 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 448a9f71e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AddModulestoEARPropertiesPage.java
+++ /dev/null
@@ -1,1357 +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 - bugs 207826, 222651
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.ArrayList;
-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 org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-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.jem.util.logger.proxy.Logger;
-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.TableLayout;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-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.commonarchivecore.internal.helpers.ArchiveManifest;
-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.project.J2EEProjectUtilities;
-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.builder.DependencyGraphManager;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.internal.operation.RemoveReferenceComponentsDataModelProvider;
-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;
-
-
-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);
- if(facetVersion.equals(EarUtilities.ENTERPRISE_APPLICATION_50)){
- hasEE5Facet = true;
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().log(e);
- }
-
- 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)
- return;
- }
- 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) {
- Logger.getLogger().log(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) {
- Logger.getLogger().log(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) {
- Logger.getLogger().log(e);
- }
- }
- EarFacetRuntimeHandler.updateModuleProjectRuntime(earComponent.getProject(), moduleProjects, new NullProgressMonitor());
- } // end
-
- }
-
- private IStatus addModulesToEAR(IProgressMonitor monitor) {
- IStatus stat = OK_STATUS;
- 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) {
- Logger.getLogger().log(e);
- }
-
- //[Bug 238264] clear out the cache because they should all either be added as references now
- // or no longer checked and therefor not wanted by the user
- this.addedJARComponents.clear();
-
- return OK_STATUS;
- }
-
- private void remComps(List list, String path) {
- if( !list.isEmpty()){
- try {
- // retrieve all dependencies on these components within the scope of the EAR
- Map dependentComps = getEARModuleDependencies(earComponent, list);
- // 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());
- removeEARComponentDependencies(dependentComps);
- } catch (ExecutionException e) {
- Logger.getLogger().log(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;
- }
-
- 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);
- final IProject[] dependentProjects = DependencyGraphManager.getInstance().getDependencyGraph().getReferencingComponents(comp.getProject());
- for (int j = 0; j < dependentProjects.length; j++) {
- final IProject project = dependentProjects[j];
- // if this is an EAR, can skip
- if (J2EEProjectUtilities.isEARProject(project)) {
- continue;
- }
- final IVirtualComponent dependentComp = ComponentCore.createComponent(project);
- // ensure that the project's share an EAR
- final IProject[] refEARs = J2EEProjectUtilities.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 (J2EEProjectUtilities.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();
- String targetProjName;
- if (target instanceof J2EEModuleVirtualArchiveComponent) {
- targetProjName = ((J2EEModuleVirtualArchiveComponent)target).getName();
- String[] pathSegments = targetProjName.split(PATH_SEPARATOR);
- targetProjName = pathSegments[pathSegments.length - 1];
- } else {
- 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.endsWith(".jar")) ?
- targetProjName :
- targetProjName + ".jar";//$NON-NLS-1$
- 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 );
- }
-
- 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 && list != 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 && list != 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);
- }
- }
-
- private void handleDeselectAllButtonPressed() {
- availableComponentsViewer.setAllChecked(false);
- if (isVersion5) {
- ((DoubleCheckboxTableViewer)availableComponentsViewer).setAllSecondChecked(false);
- libsToUncheck.clear();
- }
- j2eeComponentList = new ArrayList();
- javaProjectsList = new ArrayList();
- if (isVersion5) {
- j2eeLibElementList = new ArrayList();
- javaLibProjectsList = new ArrayList();
- }
- }
-
- /**
- * [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) {
- 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));//$NON-NLS-1$
- externalJarButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.EXTERNAL_JAR));//$NON-NLS-1$
- addVariableButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.ADDVARIABLE));//$NON-NLS-1$
- if (isVersion5) changeLibPathButton = createPushButton(J2EEUIMessages.getResourceString(J2EEUIMessages.CHANGE_LIB_DIR));//$NON-NLS-1$
- }
-
- 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);
- AvailableJ2EEComponentsForEARContentProvider provider = new AvailableJ2EEComponentsForEARContentProvider(earComponent, j2eeVersion);
- 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");
- 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);
- 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));
- Object o = event.getSource();
- 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) {
- IPath p = null;
- try {
- p = 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() {
-
- 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 {
- IVirtualComponent cmp = ComponentCore.createComponent(earProject);
- IProject[] earRefProjects = earProject.getReferencedProjects();
- for (int i = 0; i < earRefProjects.length; i++) {
- if (!J2EEProjectUtilities.isEARProject(earRefProjects[i]) &&
- !earRefProjects[i].equals(libProj)) {
- IVirtualComponent cmp1 = ComponentCore.createComponent(earRefProjects[i]);
- 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) {
- Logger.getLogger().log(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;
- String refedCompName;
- int lastDotIndex;
- String increment;
- IVirtualReference [] existingRefs = earComponent.getReferences();
- for(int i=0;i<existingRefs.length;i++){
- refedCompName = 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 3eed372c7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/AvailableJ2EEComponentsForEARContentProvider.java
+++ /dev/null
@@ -1,297 +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
- * Stefan Dimov, stefan.dimov@sap.com - bug 207826
- *******************************************************************************/
-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.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.ILabelProviderListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.j2ee.application.internal.operations.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.javaee.application.Application;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class AvailableJ2EEComponentsForEARContentProvider 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;
-
-
- public AvailableJ2EEComponentsForEARContentProvider(IVirtualComponent aEarComponent, int j2eeVersion) {
- super();
- this.j2eeVersion = j2eeVersion;
- earComponent = aEarComponent;
- }
-
- /*
- * (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 (J2EEProjectUtilities.isApplicationClientProject(project) ||
- J2EEProjectUtilities.isEJBProject(project) ||
- J2EEProjectUtilities.isDynamicWebProject(project) ||
- J2EEProjectUtilities.isJCAProject(project) ||
- J2EEProjectUtilities.isUtilityProject(project) ){
- int compJ2EEVersion = J2EEVersionUtil.convertVersionStringToInt(component);
- if( compJ2EEVersion <= j2eeVersion){
- validCompList.add(component);
- } else if(isEE5){
- validCompList.add(component);
- }
- }else if(null != earComponent && J2EEProjectUtilities.isEARProject(project)){
- //find the ArchiveComponent
- if(component.equals( earComponent )){
- if (isEE5) {
- 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 instanceof VirtualArchiveComponent))
- return true;
-
- VirtualArchiveComponent comp = (VirtualArchiveComponent)component;
- IPath p = null;
- try {
- p = comp.getProjectRelativePath();
- } catch (IllegalArgumentException e) {
- return true;
- }
- 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(String dir) {
- if (dir.startsWith(PATH_SEPARATOR))
- dir = dir.substring(1);
- if (dir.endsWith(PATH_SEPARATOR))
- dir = dir.substring(0, dir.length() - 1);
- return dir;
- }
-
- 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++) {
- String unresolvedURI = null;
- // 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 instanceof VirtualArchiveComponent) {
- final VirtualArchiveComponent oldComp = (VirtualArchiveComponent) comp;
- componentList.remove(comp);
- final VirtualArchiveComponent newComponent = ClassPathSelection.updateDisplayVirtualArchiveComponent(oldComp, cpRefs[j]);
- pathToComp.put(path, newComponent);
- componentList.add(newComponent);
- }
- continue;
- } else {
- 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) {
- return null;
- }
-
- /*
- * (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();
- } else {
- return ""; //$NON-NLS-1$
- }
- }
- return null;
- }
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- }
-}
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 9edc01159..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ClasspathTableManager.java
+++ /dev/null
@@ -1,647 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.Arrays;
-import 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.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.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;
-import org.eclipse.jst.j2ee.internal.common.ClasspathModelEvent;
-import org.eclipse.jst.j2ee.internal.dialogs.DependencyConflictResolveDialog;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ClasspathTableManager implements Listener, ICommonManifestUIConstants {
-
- protected Button useClientJARsBtn;
- protected Button useServerJARsBtn;
- protected Button useAnyJARsBtn;
- protected Button upButton;
- protected Button downButton;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- protected IClasspathTableOwner owner;
- protected Composite buttonColumn;
- protected ClasspathModel model;
- protected CheckboxTableViewer availableJARsViewer;
- protected IValidateEditListener validateEditListener;
- /**
- * @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 (J2EEProjectUtilities.isApplicationClientComponent(component)) return false;
- if (J2EEProjectUtilities.isEARProject(component.getProject()) && component.isBinary()) return true;
- if (J2EEProjectUtilities.isEJBComponent(component)) return false;
- if (J2EEProjectUtilities.isDynamicWebComponent(component)) return false;
- if (J2EEProjectUtilities.isJCAComponent(component)) return false;
- if (J2EEProjectUtilities.isStaticWebProject(component.getProject())) return false;
- if (J2EEProjectUtilities.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() == dlg.BTN_ID_CANCEL) {
- v.setChecked(el, false);
- return;
- }
-
- }
- compsToUncheck.add(comp);
- } else if (!event.getChecked()) {
- compsToUncheck.remove(comp);
- }
- if (!J2EEProjectUtilities.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 = J2EEProjectUtilities.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.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 && !(J2EEProjectUtilities.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() && (!J2EEProjectUtilities.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 94f64b383..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IClasspathTableOwner.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 Jan 17, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface IClasspathTableOwner {
- Button primCreatePushButton(String label, Composite buttonColumn);
- Button primCreateRadioButton(String label, Composite parent);
- CheckboxTableViewer createAvailableJARsViewer(Composite parent);
- Composite createButtonColumnComposite(Composite parent);
- //Button createHideEJBClientJARsButton(Composite parent); 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 a6c4542a0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ICommonManifestUIConstants.java
+++ /dev/null
@@ -1,46 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.common.CommonEditResourceHandler;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public interface ICommonManifestUIConstants {
- String UP_BUTTON = ManifestUIResourceHandler.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 6005131bb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/IJ2EEDependenciesControl.java
+++ /dev/null
@@ -1,58 +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.
- */
-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 fdf5cb31d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEComponentProjectMigrator.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
- *******************************************************************************/
-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;
-
-public class J2EEComponentProjectMigrator implements IComponentProjectMigrator {
-
- private static final String WEB_LIB_CONTAINER = "org.eclipse.jst.j2ee.internal.web.container";
- private static final String WEB_LIB_PATH = "/WEB-INF/lib";
- private static final String OLD_DEPLOYABLES_PATH = ".deployables";
- 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();
- // TODO Auto-generated constructor stub
- }
-
- 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) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- if (comp!=null && 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) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- 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) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- //IJavaProject javaP = JemProjectUtilities.getJavaProject(aProject);
- List oldBuilders = new ArrayList();
- oldBuilders.add("org.eclipse.wst.common.modulecore.ComponentStructuralBuilder");
- oldBuilders.add("org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver");
- oldBuilders.add("org.eclipse.wst.common.modulecore.DependencyGraphBuilder");
- try {
- J2EEProjectUtilities.removeBuilders(aProject,oldBuilders);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- 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";
- 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";
- }
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, jVersion); //$NON-NLS-1$
- if (!existing)
- dm.setStringProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME, srcFolder); //$NON-NLS-1$
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
- }
-
- 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");
-
- 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"));
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
-
- }
-
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
-
- }
-
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
-
- }
-
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
-
- }
-
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- }
-
- }
- 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();
- if (st != null)
- System.out.println(st);
- realException.printStackTrace();
- }
- } catch (Exception ex) {
- if (ex != null && ex instanceof CoreException) {
- IStatus st = ((CoreException)ex).getStatus();
- if (st != null)
- System.out.println(st);
- ex.printStackTrace();
- }
- }
-
-
- }
- 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) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
-
-
- }
-
- 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) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- protected IRuntime getRuntimeByID(String id) {
- IRuntime[] targets = ServerUtil.getRuntimes("", "");
- 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 31d0c7997..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/J2EEDependenciesPage.java
+++ /dev/null
@@ -1,237 +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.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)
- */
- 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 = J2EEProjectUtilities.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);
- } else {
- // 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 = J2EEProjectUtilities.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()
- */
- 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()
- */
- 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()
- */
- 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)
- */
- 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()
- */
- 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 bdcab2f56..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/JARDependencyPropertiesPage.java
+++ /dev/null
@@ -1,1099 +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.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.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.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.IEARModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-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.DependencyGraphManager;
-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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-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(null, 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 (J2EEProjectUtilities.isEARProject(project)) {
- propPage.setErrorMessage(ManifestUIResourceHandler.EAR_Module_Dep_Error);
- return false;
- } else if (J2EEProjectUtilities.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 == null ? "" : sel.toString()); //$NON-NLS-1$
- }
-
- /**
- * @see ClasspathModelListener#modelChanged(ClasspathModelEvent)
- */
- public void modelChanged(ClasspathModelEvent evt) {
- if (evt.getEventType() == ClasspathModelEvent.CLASS_PATH_CHANGED) {
- isDirty = true;
- refreshText();
- } else if (evt.getEventType() == ClasspathModelEvent.EAR_PROJECT_CHANGED) {
- tableManager.refresh();
- }
- }
-
- 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(".jar");
- 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(".jar");
- 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 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);
- 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 = J2EEProjectUtilities.getReferencingEARProjects(project);
- for (int i = 0; i < ears.length; i++) {
- IEARModelProvider earModel = (IEARModelProvider)ModelProviderManager.getModelProvider(ears[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) {
- IStatus stat = IDataModelProvider.OK_STATUS;
- 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);
- final IProject[] dependentProjects = DependencyGraphManager.getInstance().getDependencyGraph().getReferencingComponents(comp.getProject());
- for (int j = 0; j < dependentProjects.length; j++) {
- final IProject project = dependentProjects[j];
- // if this is an EAR, can skip
- if (J2EEProjectUtilities.isEARProject(project)) {
- continue;
- }
- final IVirtualComponent dependentComp = ComponentCore.createComponent(project);
- // ensure that the project's share an EAR
- final IProject[] refEARs = J2EEProjectUtilities.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 (J2EEProjectUtilities.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 + ".jar";//$NON-NLS-1$
- 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 e70c7e7b1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestErrorPrompter.java
+++ /dev/null
@@ -1,54 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ManifestErrorPrompter implements ICommonManifestUIConstants {
-
- /**
- * Constructor for ManifestErrorPrompter.
- */
- private ManifestErrorPrompter() {
- super();
- }
-
- public static boolean showManifestException(Shell shell, String baseMessage, boolean includeCancel, Throwable caught) {
- StringBuffer msg = new StringBuffer(baseMessage);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_1);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_2);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_3);
- msg.append("\n"); //$NON-NLS-1$
- msg.append(MANIFEST_PROBLEM_4);
- return ErrorDialog.openError(shell,
- ERROR_READING_MANIFEST_DIALOG_TITLE,
- msg.toString(),
- caught,
- 0, includeCancel);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ManifestUIResourceHandler.java
deleted file mode 100644
index 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 df0df7ec2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/SecondCheckBoxStateChangedEvent.java
+++ /dev/null
@@ -1,34 +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 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 cdf1c19ae..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/UpdateManifestOperation.java
+++ /dev/null
@@ -1,83 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifestImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException;
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class UpdateManifestOperation implements org.eclipse.jface.operation.IRunnableWithProgress {
- protected String projectName;
- protected String classPathValue;
- protected boolean replace;
-/**
- * UpdateManifestOperation constructor comment.
- */
-public UpdateManifestOperation(String aProjectName, String aSpaceDelimitedPath, boolean replaceInsteadOfMerge) {
- super();
- projectName = aProjectName;
- classPathValue = aSpaceDelimitedPath;
- replace = replaceInsteadOfMerge;
-}
-protected IProject getProject() {
- return J2EEPlugin.getWorkspace().getRoot().getProject(projectName);
-}
-/**
- * Runs this operation. Progress should be reported to the given progress monitor.
- * This method is usually invoked by an <code>IRunnableContext</code>'s <code>run</code> method,
- * which supplies the progress monitor.
- * A request to cancel the operation should be honored and acknowledged
- * by throwing <code>InterruptedException</code>.
- *
- * @param monitor the progress monitor to use to display progress and receive
- * requests for cancelation
- * @exception InvocationTargetException if the run method must propagate a checked exception,
- * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
- * wrapped in an <code>InvocationTargetException</code> by the calling context
- * @exception InterruptedException if the operation detects a request to cancel,
- * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
- * <code>InterruptedException</code>
- *
- * @see IRunnableContext#run
- */
-public void run(org.eclipse.core.runtime.IProgressMonitor monitor) throws java.lang.reflect.InvocationTargetException, InterruptedException {
- IProject p = getProject();
- try {
- ArchiveManifest mf = J2EEProjectUtilities.readManifest(p);
- if (mf == null)
- mf = new ArchiveManifestImpl();
- mf.addVersionIfNecessary();
- if (replace)
- mf.setClassPath(classPathValue);
- else
- mf.mergeClassPath(ArchiveUtil.getTokens(classPathValue));
- J2EEProjectUtilities.writeManifest(p, mf);
- } catch (java.io.IOException ex) {
- throw new WFTWrappedException(ex);
- }
-}
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java
deleted file mode 100644
index d5045bc02..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebLibDependencyPropertiesPage.java
+++ /dev/null
@@ -1,274 +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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-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.common.ClasspathModelListener;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-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.Listener;
-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.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.frameworks.internal.ui.WorkspaceModifyComposedOperation;
-
-public class WebLibDependencyPropertiesPage extends JARDependencyPropertiesPage implements IClasspathTableOwner, Listener, ClasspathModelListener {
-
- public WebLibDependencyPropertiesPage(final IProject project, final J2EEDependenciesPage page) {
- super(project, page);
- }
-
- protected ClasspathModel createClasspathModel() {
- return new ClasspathModel(null, true);
- }
-
- 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;
- }
-
- 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());
- }
-
- 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);
- }
-
- 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 (!J2EEProjectUtilities.isDynamicWebProject(project)) {
- propPage.setErrorMessage(ManifestUIResourceHandler.Web_Lib_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);
- }
- }
-
- private void handleWLPSupport() {
- availableDependentJars.setText(ManifestUIResourceHandler.WEB_LIB_LIST_DESCRIPTION);
- tableManager.refresh();
- }
-
- @Override
- protected void handleClasspathChange() {
- model.resetClassPathSelectionForWLPs();
- super.handleClasspathChange();
- setEnablement();
- }
-
- public boolean performOk() {
- if (model.getComponent() == null || !isValidWebModule()) {
- return true;
- }
- if (!isDirty) {
- return true;
- }
- try {
- boolean createdFlexProjects = runWLPOp(createFlexProjectOperations());
- boolean createdComponentDependency = false;
- if (createdFlexProjects) {
- 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 boolean runWLPOp(WorkspaceModifyComposedOperation composed) {
- try {
- if (composed != null)
- new ProgressMonitorDialog(propPage.getShell()).run(true, true, composed);
- } catch (InvocationTargetException ex) {
- ex.printStackTrace();
- if (ex.getCause() != null) {
- ex.getCause().printStackTrace();
- }
- 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;
- }
- return true;
- }
-
- 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 (J2EEProjectUtilities.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 (J2EEProjectUtilities.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 (J2EEProjectUtilities.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 3827e1abb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WebRefDependencyPropertiesPage.java
+++ /dev/null
@@ -1,103 +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.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.
- */
-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 (J2EEProjectUtilities.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 0b51edca2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/WorkspaceModifyComposedOperation.java
+++ /dev/null
@@ -1,50 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal;
-
-import java.util.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 1dbce3ddc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractActionWithDelegate.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IActionDelegate;
-
-
-public abstract class AbstractActionWithDelegate extends org.eclipse.ui.actions.SelectionListenerAction {
- protected IActionDelegate delegate;
-
- /**
- * EditModuleDependencyAction constructor comment.
- *
- * @param text
- * java.lang.String
- */
- public AbstractActionWithDelegate() {
- super("");//$NON-NLS-1$
- initLabel();
- initDelegate();
- }
-
- protected abstract IActionDelegate createDelegate();
-
- protected abstract String getLabel();
-
- protected void initDelegate() {
- delegate = createDelegate();
- }
-
- protected void initLabel() {
- setText(getLabel());
- }
-
- /**
- * Implementation of method defined on <code>IAction</code>.
- */
- public void run() {
- delegate.run(this);
- }
-
- /**
- * Updates this action in response to the given selection.
- * <p>
- * The <code>SelectionListenerAction</code> implementation of this method returns
- * <code>true</code>. Subclasses may extend to react to selection changes; however, if the
- * super method returns <code>false</code>, the overriding method must also return
- * <code>false</code>.
- * </p>
- *
- * @param selection
- * the new selection
- * @return <code>true</code> if the action should be enabled for this selection, and
- * <code>false</code> otherwise
- */
- protected boolean updateSelection(IStructuredSelection selection) {
- delegate.selectionChanged(this, selection);
- return this.isEnabled();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenAction.java
deleted file mode 100644
index fbd602ea1..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
- */
- public boolean updateSelection(IStructuredSelection s) {
- srcObject = null;
- if (!super.updateSelection(s))
- return false;
-
- if (s.size() != 1)
- return false;
-
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- //Dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- //init
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
- * org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- runWithEvent(event);
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- // TODO Auto-generated method stub
- run();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- // TODO HACK!
- updateSelection((IStructuredSelection) selection);
- }
-
-}
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 d652982bd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardAction.java
+++ /dev/null
@@ -1,147 +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.
- */
- 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 5c7093697..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/AbstractOpenWizardWorkbenchAction.java
+++ /dev/null
@@ -1,61 +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.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 7cc713191..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.jem.util.logger.proxy.Logger;
-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;
- }
-
- 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) {
- Logger.getLogger().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 0122ba5e5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ForceClasspathUpdateAction.java
+++ /dev/null
@@ -1,66 +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();
-
- 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 e25fc0c3a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/IJ2EEUIContextIds.java
+++ /dev/null
@@ -1,62 +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$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java
deleted file mode 100644
index abff48694..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/ImportClassesAction.java
+++ /dev/null
@@ -1,63 +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 31, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.ClassesImportWizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportClassesAction extends WTPBaseAction {
-
- public static String LABEL = J2EEUIMessages.getResourceString("Import_Classes"); //$NON-NLS-1$
-
- public ImportClassesAction() {
- super();
- setText(LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.common.actions.BaseAction#primRun(org.eclipse.swt.widgets.Shell)
- */
- protected void primRun(Shell shell) {
- IProject project = ProjectUtilities.getProject(getSelection().getFirstElement());
- ClassesImportWizard wizard = new ClassesImportWizard(project);
-
-
- wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY);
- wizard.setDialogSettings(J2EEUIPlugin.getDefault().getDialogSettings());
-
- WizardDialog dialog = new WizardDialog(shell, wizard);
-
- dialog.create();
- dialog.getShell().setSize(550, 550);
- dialog.open();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java
deleted file mode 100644
index 4a833892f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteAction.java
+++ /dev/null
@@ -1,419 +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.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
-import org.eclipse.jst.j2ee.ejb.componentcore.util.EJBArtifactEdit;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.jst.j2ee.internal.dialogs.DeleteEARDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.DeleteModuleDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EEDeleteDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EEDeleteUIConstants;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.actions.DeleteResourceAction;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class J2EEDeleteAction extends SelectionDispatchAction implements J2EEDeleteUIConstants {
-
- protected Shell shell;
- //Used for EAR delete
- protected Set referencedProjects;
- protected List projects;
- protected DeleteOptions options;
- // added for IRefactoringAction behavior
- protected ISelectionProvider provider = null;
-
-
-
- /**
- * Constructor for DeleteModuleAction.
- *
- * @param text
- */
- public J2EEDeleteAction(IWorkbenchSite site, Shell parent) {
- super(site);
- setText(DELETE);
- shell = parent;
- }
-
- public J2EEDeleteAction(IWorkbenchSite site, ISelectionProvider newProvider) {
- super(site);
- setText(DELETE);
- shell = J2EEUIPlugin.getActiveWorkbenchWindow().getShell();
- provider = newProvider;
- }
-
- protected void reset() {
- referencedProjects = null;
- projects = null;
- options = null;
- }
-
- protected boolean getEnableStateBasedOnSelection(IStructuredSelection selection) {
- if (selection.isEmpty())
- return false;
- return isSelectionApplicable() && isSelectionSomeJ2EE();
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(IStructuredSelection)
- */
- protected void updateSelection(IStructuredSelection selection) {
- update(selection);
- }
-
- protected boolean isSelectionApplicable() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isJ2EEModule(o) && !isApplication(o) && !isProjectOrJavaProject(o))
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionSomeJ2EE() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (isJ2EEModule(o) || isApplication(o))
- return true;
- }
- return false;
- }
-
-
- protected boolean isSelectionAllDDRoots() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isJ2EEModule(o))
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionAllApplications() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!isApplication(o))
- return false;
- }
- return true;
- }
-
- protected boolean isJ2EEModule(Object o) {
- //TODO switch to virtual comp
-// if (o instanceof WorkbenchComponent) {
-// WorkbenchComponent module = (WorkbenchComponent) o;
-// String moduleType = module.getComponentType().getComponentTypeId();
-// //TODO need to add connector, app client, ear, ejb client
-// return moduleType.equals(IModuleConstants.JST_WEB_MODULE) || moduleType.equals(IModuleConstants.JST_EJB_MODULE);
-// }
- return CommonUtil.isDeploymentDescriptorRoot(o, false);
- }
-
- protected boolean isApplication(Object o) {
- return (o instanceof Application) || isJ2EEApplicationProject(o);
- }
-
- protected boolean isProjectOrJavaProject(Object o) {
- return (o instanceof IProject) || (o instanceof IJavaProject);
- }
-
- protected List getProjects() {
- if (projects == null) {
- projects = new ArrayList();
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator iterator = sel.iterator();
- IProject project = null;
- Object o = null;
- while (iterator.hasNext()) {
- o = iterator.next();
- if (o instanceof IJavaProject)
- o = ((IJavaProject) o).getProject();
- if (o instanceof IProject) {
- projects.add(o);
- addEJBClientProjectIfNecessary((IProject) o, projects);
- } else if (o instanceof EObject) {
- EObject obj = (EObject) o;
- project = ProjectUtilities.getProject(obj);
- if (project == null)
- throw new RuntimeException(J2EEUIMessages.getResourceString("Project_should_not_be_null_1_EXC_")); //$NON-NLS-1$
- projects.add(project);
- addEJBClientProjectIfNecessary(project, projects);
- } else {
- throw new RuntimeException(J2EEUIMessages.getResourceString("Non-project_in_selection_2_EXC_")); //$NON-NLS-1$
- }
- }
- }
- return projects;
- }
-
- /**
- * @param project
- * @param localProjects
- */
- private void addEJBClientProjectIfNecessary(IProject project, List localProjects) {
- IVirtualComponent comp = ComponentCore.createComponent(project);
- EJBArtifactEdit edit = EJBArtifactEdit.getEJBArtifactEditForRead(comp);
- if (edit != null && edit.hasEJBClientJARProject())
- localProjects.add(edit.getEJBClientJarModule().getProject());
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- try {
- J2EEDeleteDialog dlg = null;
- if (isSelectionAllApplications())
- dlg = new DeleteEARDialog(shell, getReferencedProjects());
- else if (isSelectionAllDDRoots())
- dlg = new DeleteModuleDialog(shell);
- else {
- if (confirmStandardDelete())
- runResourceDeleteAction();
- return;
- }
-
- dlg.open();
- if (dlg.getReturnCode() == Window.CANCEL)
- return;
- options = dlg.getDeleteOptions();
- if (options != null)
- options.setSelectedProjects(getProjects());
- else
- return;
- if (!(ensureEditorsSaved() && validateState()))
- return;
- deleteProjectsIfNecessary();
- deleteMetadataIfNecessary();
- presentStatusIfNeccessary();
- } finally {
- reset();
- }
- }
-
- private boolean ensureEditorsSaved() {
- return CommonEditorUtility.promptToSaveAllDirtyEditors();
- }
-
- protected boolean confirmStandardDelete() {
- return MessageDialog.openConfirm(shell, DELETE_PROJECTS, CUSTOM_DELETE_MIX_MATCH);
- }
-
- protected Set getReferencedProjects() {
- if (referencedProjects == null)
- computeReferencedProjects();
- return referencedProjects;
- }
-
- protected void computeReferencedProjects() {
- //TODO fix up to use components
-// getProjects();
-// referencedProjects = new HashSet();
-// for (int i = 0; i < projects.size(); i++) {
-// IProject project = (IProject) projects.get(i);
-// EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
-// if (runtime == null)
-// continue;
-// EAREditModel editModel = runtime.getEarEditModelForRead(this);
-// try {
-// referencedProjects.addAll(editModel.getModuleMappedProjects());
-// } finally {
-// editModel.releaseAccess(this);
-// }
-// }
- }
-
-// protected DeleteModuleOperation getDeleteModuleOperation() {
-// if (deleteModuleOperation == null)
-// deleteModuleOperation = new DeleteModuleOperation(options);
-// return deleteModuleOperation;
-// }
-
- protected void deleteMetadataIfNecessary() {
- if (!shouldDeleteMetaData())
- return;
-
-// IRunnableWithProgress runnable = WTPUIPlugin.getRunnableWithProgress(getDeleteModuleOperation());
-// ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(shell);
-//
-// try {
-// monitorDialog.run(false, false, runnable);
-// } catch (InvocationTargetException e) {
-// handleException(e);
-// } catch (InterruptedException e) {
-// //Ignore
-// }
- }
-
- protected boolean shouldDeleteMetaData() {
- if (deleteProjectsFailedOrCancelled())
- return false;
- return primShouldDeleteMetaData();
- }
-
- protected boolean primShouldDeleteMetaData() {
- return options != null && (options.shouldDeleteModules() || options.shouldDeleteModuleDependencies());
- }
-
- protected boolean deleteProjectsFailedOrCancelled() {
- if (options == null || !options.shouldDeleteProjects())
- return false;
- return deletedProjectsExist();
- }
-
- protected boolean deletedProjectsExist() {
- List deletedProjects = options.getAllProjectsToDelete();
- for (int i = 0; i < deletedProjects.size(); i++) {
- IProject project = (IProject) deletedProjects.get(i);
- if (project.exists())
- return true;
- }
- return false;
- }
-
- protected void deleteProjectsIfNecessary() {
- if (options.shouldDeleteProjects())
- runResourceDeleteAction();
- }
-
- protected void runResourceDeleteAction() {
- DeleteResourceAction action = new DeleteResourceAction(shell);
- List localProjects = null;
- if (options == null)
- localProjects = getProjects();
- else
- localProjects = options.getAllProjectsToDelete();
- Iterator it = localProjects.iterator();
- while (it.hasNext()) {
- IProject p = (IProject) it.next();
- if (!p.exists())
- it.remove();
- }
- IStructuredSelection sel = new StructuredSelection(localProjects);
- action.selectionChanged(sel);
- action.run();
- }
-
- public void handleException(InvocationTargetException e) {
- Logger.getLogger().logError(e);
- IStatus status = J2EEPlugin.newErrorStatus(IStatus.ERROR, DELETE_ERROR, e);
- ErrorDialog.openError(shell, DELETE_ERROR, DELETE_NOT_COMPLETED, status);
- }
-
- /**
- * Update the action's enable state according to the current selection of the used selection
- * provider.
- */
- public void update() {
- IStructuredSelection selection = null;
-
- if (provider != null) {
- selection = (IStructuredSelection) provider.getSelection();
- selectionChanged((ISelection) selection);
- } else {
- selection = (IStructuredSelection) getSelection();
-
- if (selection == null) {
- setEnabled(false);
- } else {
- updateSelection(selection);
- }
- }
- }
-
- protected boolean isJ2EEApplicationProject(Object o) {
- if (o instanceof IProject) {
- IProject project = (IProject) o;
- if (J2EEProjectUtilities.isEARProject(project))
- return true;
- }
- return false;
- }
-
- protected void setEnabledFromSelection(IStructuredSelection selection) {
- if (selection == null) {
- setEnabled(false);
- } else {
- setEnabled(getEnableStateBasedOnSelection(selection));
- }
- }
-
- /**
- * @see SelectionDispatchAction#selectionChanged(ISelection)
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection)
- setEnabledFromSelection((IStructuredSelection) selection);
- else
- super.selectionChanged(selection);
- }
-
- protected boolean validateState() {
- // TODO Fix validateState
- // if (!primShouldDeleteMetaData())
- // return true;
- //
- // IValidateEditListener listener = new ValidateEditListener(null,
- // getDeleteModuleOperation().getDeleteEditModel());
- // listener.setShell(shell);
- // return listener.validateState().isOK();
- return true;
- }
-
- protected void presentStatusIfNeccessary() {
- IStatus status = null;
-// if (deleteModuleOperation != null)
-// status = deleteModuleOperation.getStatus();
-
- if (status == null || status.isOK())
- return;
-
- ErrorDialog.openError(shell, null, null, status, IStatus.ERROR);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java
deleted file mode 100644
index 97d00f3d1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeleteModuleActionPopulator.java
+++ /dev/null
@@ -1,47 +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 16, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @author mdelder
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEDeleteModuleActionPopulator {//implements WTPOperationDataModelUICreator {
-
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.operation.extension.ui.WTPOperationDataModelUICreator#createDataModel(java.lang.String,
- * java.lang.String, org.eclipse.jface.viewers.IStructuredSelection,
- * org.eclipse.ui.IWorkbenchSite)
- */
- public IDataModel createDataModel(String extendedOperationId, String operationClass, IStructuredSelection selection, IWorkbenchSite site) {
- //TODO fix up
-// J2EEDeleteAction deleteAction = new J2EEDeleteAction(site, (ISelectionProvider) null);
-// WTPOperationDataModel dataModel = IActionWTPOperationDataModel.createDataModel(deleteAction, selection, site.getSelectionProvider(), site.getShell());
-// return dataModel;
- return null;
- }
-}
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 47b6593e9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEDeployAction.java
+++ /dev/null
@@ -1,164 +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.RuntimeSelectionDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-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)
- */
- protected void primRun(Shell shell) {
-
- if (checkEnabled(shell)) {
- final IStructuredSelection deploySelection = selection;
- Job deployJob = new Job("Deploy") {
- 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();
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection aSelection) {
- 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);
- return false;
- }
-
- IRuntime runtime = J2EEProjectUtilities.getServerRuntime(proj);
- if (runtime == null) {
- String message = MessageFormat.format(J2EEUIMessages.getResourceString("DEPLOY_RUNTIME_NOT_FOUND"), new String []{proj.getName()});
- RuntimeSelectionDialog selectionDialog = new RuntimeSelectionDialog(shell,
- J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE"),
- 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 String []{proj.getName()}), shell);
- return false;
- }
-
- }
-
- return true;
- } catch (CoreException e) {
- System.out.println("Deploy Action recovering from problem verifying enablement."); //$NON-NLS-1$
- e.printStackTrace();
- }
- return false;
- }
-
- private void displayMessageDialog(String message, Shell shell) {
- String title = J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE");
- 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/J2EEModuleRenameChange.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java
deleted file mode 100644
index e4f227f29..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEModuleRenameChange.java
+++ /dev/null
@@ -1,147 +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 Sep 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-
-/**
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEModuleRenameChange extends Change {
-
-// private String newName;
- private IProject target;
-// private boolean renameDependencies;
-
- public J2EEModuleRenameChange(IProject target, String newName, boolean renameDependencies) {
- this.target = target;
-// this.newName = newName;
-// this.renameDependencies = renameDependencies;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#getName()
- */
- public String getName() {
- return J2EERenameUIConstants.RENAME_MODULES;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeValidationData(IProgressMonitor pm) {
- //Do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#isValid(org.eclipse.core.runtime.IProgressMonitor)
- */
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- if (target != null)
- return RefactoringStatus.create(Status.OK_STATUS);
- return RefactoringStatus.create(new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, "", null)); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change perform(IProgressMonitor pm) throws CoreException {
-// try {
-
-// RenameModuleOperation renameOp = new RenameModuleOperation(getRenameOptions());
-// renameOp.run(pm);
-
- //String contextRoot = getServerContextRoot();
- // TODO fix up rename and context root operations
- //if (webNature != null) {
- //new UpdateWebContextRootMetadataOperation(newTarget, webNature.getContextRoot()).run(pm);
-// if(contextRoot.equals("") == false){ //$NON-NLS-1$
-// new UpdateWebContextRootMetadataOperation(target, contextRoot).run(pm);
-// } else if (J2EENature.getRegisteredRuntime(target) == null)
-// new RenameUtilityJarMetadataOperation(target, newTarget).run(pm);
-// } catch (InvocationTargetException e) {
-// //Ignore
-// } catch (InterruptedException e) {
-// //Ignore
-// }
- return null;
- }
-
- protected String getServerContextRoot() {
- WebArtifactEdit webEdit = null;
- try{
- webEdit = WebArtifactEdit.getWebArtifactEditForRead(target);
- if (webEdit != null)
- return webEdit.getServerContextRoot();
- } finally {
- if (webEdit != null )
- webEdit.dispose();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @return
- */
- /**@deprecated
- * If this method is not used it should be removed at a later time, marking as deprecated
- * Warning cleanup 12/07/2005
- */
-// private RenameOptions getRenameOptions() {
-// RenameOptions options = new RenameOptions();
-// options.setNewName(this.newName);
-// options.setSelectedProjects(Collections.singletonList(this.target));
-// // TODO check module type for EAR type
-// //options.setIsEARRename(EARNatureRuntime.getRuntime(this.target) != null);
-// options.setRenameModuleDependencies(this.renameDependencies);
-// options.setRenameModules(true);
-// options.setRenameProjects(false);
-// return options;
-// }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.Change#getModifiedElement()
- */
- public Object getModifiedElement() {
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java
deleted file mode 100644
index 3890197bd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameAction.java
+++ /dev/null
@@ -1,391 +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.actions;
-
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.ui.actions.SelectionDispatchAction;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.common.internal.util.CommonUtil;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameDialog;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.jst.j2ee.internal.dialogs.RenameModuleDialog;
-import org.eclipse.jst.j2ee.internal.plugin.CommonEditorUtility;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.RenameResourceAction;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
-
-public class J2EERenameAction extends SelectionDispatchAction implements J2EERenameUIConstants {
-
- protected Shell shell;
- //Used for EAR rename
- protected Set referencedProjects;
- protected List modules;
- protected RenameOptions options;
- // added for IRefactoringAction behavior
- protected ISelectionProvider provider = null;
-// protected RenameModuleOperation renameModuleOperation = null;
-
- /**
- * Constructor for RenameModuleAction.
- *
- * @param text
- */
- public J2EERenameAction(IWorkbenchSite site, Shell parent) {
- super(site);
- setText(RENAME);
- shell = parent;
- }
-
- public J2EERenameAction(IWorkbenchSite site, ISelectionProvider newProvider) {
- super(site);
- setText(RENAME);
- shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- provider = newProvider;
- }
-
- protected void reset() {
-// if (renameModuleOperation != null) {
-// renameModuleOperation.release();
-// renameModuleOperation = null;
-// }
- referencedProjects = null;
- modules = null;
- options = null;
- }
-
- /**
- * @see org.eclipse.ui.actions.SelectionListenerAction#updateSelection(IStructuredSelection)
- */
- protected void updateSelection(IStructuredSelection selection) {
- super.update(selection);
- }
-
- /**
- * @see SelectionDispatchAction#selectionChanged(ISelection)
- */
- public void selectionChanged(ISelection selection) {
- if (selection instanceof IStructuredSelection)
- setEnabledFromSelection((IStructuredSelection) selection);
- else
- super.selectionChanged(selection);
- }
-
- protected void setEnabledFromSelection(IStructuredSelection selection) {
- if (selection == null) {
- setEnabled(false);
- } else {
- if (selection.toList().size() != 1) {
- setEnabled(false);
- } else {
- setEnabled(getEnableStateBasedOnSelection(selection));
- }
- }
- }
-
- protected boolean getEnableStateBasedOnSelection(IStructuredSelection selection) {
- if (selection.isEmpty())
- return false;
- return isSelectionAllDDRoots() || isSelectionAllApplications();
- }
-
- protected boolean isSelectionAllDDRoots() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- //TODO check for j2ee workbench module selection
- if (!CommonUtil.isDeploymentDescriptorRoot(o, false) /*&& !isJ2EEProject(o)*/)
- return false;
- }
- return true;
- }
-
- protected boolean isSelectionAllApplications() {
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator it = sel.iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (!(o instanceof Application) && !isJ2EEApplicationProject(o))
- return false;
- }
- return true;
- }
-
-
- protected List getModules() {
- if (modules == null) {
- modules = new ArrayList();
- IStructuredSelection sel = (StructuredSelection) getSelection();
- Iterator iterator = sel.iterator();
- WorkbenchComponent module = null;
- Object o = null;
- while (iterator.hasNext()) {
- o = iterator.next();
- if (o instanceof WorkbenchComponent) {
- modules.add(o);
- } else if (o instanceof EObject) {
- EObject obj = (EObject) o;
- IProject project = ProjectUtilities.getProject(obj);
- StructureEdit moduleCore = null;
- try {
- moduleCore = StructureEdit.getStructureEditForRead(project);
- URI uri = obj.eResource().getURI();
- ComponentResource[] resources = moduleCore.findResourcesBySourcePath(uri);
- for (int i=0; i<resources.length; i++) {
- module = resources[i].getComponent();
- if (module !=null)
- break;
- }
- if (module == null)
- throw new RuntimeException(J2EEUIMessages.getResourceString("Project_should_not_be_null_1_ERROR_")); //$NON-NLS-1$
- modules.add(module);
- } catch (UnresolveableURIException e) {
- //Ignore
- } finally {
- if (moduleCore !=null)
- moduleCore.dispose();
- }
- } else {
- throw new RuntimeException(J2EEUIMessages.getResourceString("Non-project_in_selection_2_ERROR_")); //$NON-NLS-1$
- }
- }
- }
- return modules;
- }
-
- /**
- * @see org.eclipse.jface.action.IAction#run()
- */
- public void run() {
- try {
- List localModules = getModules();
- if (localModules.size() != 1)
- return;
- WorkbenchComponent module = (WorkbenchComponent) localModules.get(0);
- J2EERenameDialog dlg = null;
-
- // if all we are doing is renaming an EAR, let the base platform do it
- if (isSelectionAllApplications()) {
- RenameResourceAction action = new RenameResourceAction(shell);
- action.selectionChanged(new StructuredSelection(module));
- action.run();
- } else {
- String contextRoot = ""; //$NON-NLS-1$
- //TODO add context root to the module model
- //contextRoot = module.getServerContextRoot();
- dlg = new RenameModuleDialog(shell, module.getName(), contextRoot);
- dlg.open();
- if (dlg.getReturnCode() == Window.CANCEL)
- return;
-
- options = dlg.getRenameOptions();
- if (options != null)
- options.setSelectedProjects(localModules);
-
- if (!(ensureEditorsSaved() && validateState()))
- return;
- renameProjectsIfNecessary();
- renameMetadataIfNecessary();
- presentStatusIfNeccessary();
- }
- } finally {
- reset();
- }
- }
-
-
- private boolean ensureEditorsSaved() {
- return CommonEditorUtility.promptToSaveAllDirtyEditors();
- }
-
- protected Set getReferencedProjects() {
- if (referencedProjects == null)
- computeReferencedProjects();
- return referencedProjects;
- }
-
- protected void computeReferencedProjects() {
- getModules();
- referencedProjects = new HashSet();
- for (int i = 0; i < modules.size(); i++) {
- //WorkbenchComponent module = (WorkbenchComponent) modules.get(i);
- //TODO fix up code here for modules instead of projects
-// EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
-// if (runtime == null)
-// continue;
-// EAREditModel editModel = runtime.getEarEditModelForRead(this);
-// try {
-// referencedProjects.addAll(editModel.getModuleMappedProjects());
-// } finally {
-// editModel.releaseAccess(this);
-// }
- }
- }
-
- protected void renameMetadataIfNecessary() {
- if (!shouldRenameMetaData())
- return;
-// RenameModuleOperation op = getRenameModuleOperation();
-// IRunnableWithProgress runnable = WTPUIPlugin.getRunnableWithProgress(op);
-// ProgressMonitorDialog monitorDialog = new ProgressMonitorDialog(shell);
-//
-// try {
-// monitorDialog.run(false, false, runnable);
-// } catch (InvocationTargetException e) {
-// handleException(e);
-// } catch (InterruptedException e) {
-// //Ignore
-// }
- }
-
- protected boolean shouldRenameMetaData() {
- if (renameProjectsFailedOrCancelled())
- return false;
-
- return primShouldRenameMetaData();
- }
-
- protected boolean renameProjectsFailedOrCancelled() {
- if (options == null || !options.shouldRenameProjects())
- return false;
- return renamedProjectsExist();
- }
-
- protected boolean renamedProjectsExist() {
- List renamedProjects = options.getAllProjectsToRename();
- for (int i = 0; i < renamedProjects.size(); i++) {
- IProject project = (IProject) renamedProjects.get(i);
- if (project.exists())
- return true;
- }
- return false;
- }
-
- protected void renameProjectsIfNecessary() {
- if (options == null || !options.shouldRenameProjects())
- return;
- J2EERenameResourceAction action = new J2EERenameResourceAction(shell);
- action.setNewName(options.getNewName());
- IStructuredSelection sel = new StructuredSelection(options.getAllProjectsToRename());
- action.selectionChanged(sel);
- action.run();
-
- // only web projects should have a context root
- String newContextRoot = options.getNewContextRoot();
- if (newContextRoot != null && options.shouldRenameProjects()) {
- //WorkbenchComponent module = (WorkbenchComponent) getModules().get(0);
- try {
- // TODO add server context root to the module model
- //module.setServerContextRoot(newContextRoot);
- } catch (Throwable t) {
- //Ignore
- }
- }
- }
-
- public void handleException(InvocationTargetException e) {
- Logger.getLogger().logError(e);
- IStatus status = J2EEPlugin.newErrorStatus(IStatus.ERROR, RENAME_ERROR, e);
- ErrorDialog.openError(shell, RENAME_ERROR, RENAME_NOT_COMPLETED, status);
- }
-
- /**
- * Update the action's enable state according to the current selection of the used selection
- * provider.
- */
- public void update() {
- IStructuredSelection selection = null;
-
- if (provider != null) {
- selection = (IStructuredSelection) provider.getSelection();
- super.update(selection);
- } else {
- selection = (IStructuredSelection) getSelection();
-
- if (selection == null) {
- setEnabled(false);
- } else {
- updateSelection(selection);
- }
- }
- }
-
- protected boolean isJ2EEApplicationProject(Object o) {
- if (o instanceof IProject) {
- IProject project = (IProject) o;
- if (J2EEProjectUtilities.isEARProject(project))
- return true;
- }
- return false;
- }
-
- protected boolean validateState() {
- if (!primShouldRenameMetaData())
- return true;
-
-// IValidateEditListener listener = new ValidateEditListener(null, getRenameModuleOperation().getRenameEditModel());
-// listener.setShell(shell);
-// return listener.validateState().isOK();
- return false;
- }
-
- protected boolean primShouldRenameMetaData() {
- return options != null && (options.shouldRenameModules() || options.shouldRenameModuleDependencies());
- }
-
-// protected RenameModuleOperation getRenameModuleOperation() {
-// if (renameModuleOperation == null) {
-// renameModuleOperation = new RenameModuleOperation(options);
-// }
-// return renameModuleOperation;
-// }
-
- protected void presentStatusIfNeccessary() {
- IStatus status = null;
-
-// if (renameModuleOperation != null) {
-// status = renameModuleOperation.getStatus();
-// }
-
- if (status == null || status.isOK())
- return;
-
- ErrorDialog.openError(shell, null, null, status, IStatus.ERROR);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java
deleted file mode 100644
index e52b7c605..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameParticipant.java
+++ /dev/null
@@ -1,95 +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 Sep 26, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.j2ee.internal.dialogs.J2EERenameUIConstants;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.wst.common.frameworks.internal.AdaptabilityUtility;
-
-
-/**
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EERenameParticipant extends RenameParticipant {
-
- private static final Class IPROJECT_CLASS = IProject.class;
-
- public J2EERenameParticipant() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- if (element == null)
- return false;
-
- IProject project = (IProject) AdaptabilityUtility.getAdapter(element, IPROJECT_CLASS);
- if (project.isAccessible()) {
- return true;
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
- Object[] targetElements = getProcessor().getElements();
- if (targetElements == null || targetElements.length != 1)
- return null;
- IProject project = (IProject) AdaptabilityUtility.getAdapter(targetElements[0], IPROJECT_CLASS);
-
- if (project != null)
- return new J2EEModuleRenameChange(project, getArguments().getNewName(), getArguments().getUpdateReferences());
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- return J2EERenameUIConstants.RENAME;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor,
- * org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
- */
- public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) throws OperationCanceledException {
- return RefactoringStatus.create(Status.OK_STATUS);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java
deleted file mode 100644
index f927e1cac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EERenameResourceAction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.actions.RenameResourceAction;
-
-public class J2EERenameResourceAction extends RenameResourceAction {
- String newName = null;
-
- /**
- * Creates a new action. Using this constructor directly will rename using a dialog (if
- * necessary) rather than the inline editor of a ResourceNavigator. Note that a rename happens
- * on one and only one resource at a time.
- *
- * @param shell
- * the shell for any dialogs
- */
- public J2EERenameResourceAction(Shell shell) {
- super(shell);
- }
-
- /**
- * Return the new name to be given to the target resource.
- *
- * @return java.lang.String
- */
- protected String queryNewResourceName(final IResource resource) {
- String retVal = null;
-
- if (newName == null || newName.length() < 1) {
- retVal = super.queryNewResourceName(resource);
- } else {
- retVal = newName;
- }
-
- return retVal;
- }
-
- /**
- * Gets the newName.
- *
- * @return Returns a String
- */
- public String getNewName() {
- return newName;
- }
-
- /**
- * Sets the newName.
- *
- * @param newName
- * The newName to set
- */
- public void setNewName(String newName) {
- this.newName = newName;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.java
deleted file mode 100644
index 2d0657e3b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/J2EEResourceOpenListener.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 Feb 2, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-
-/**
- * @author Admin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class J2EEResourceOpenListener implements IOpenListener{
-
- private OpenJ2EEResourceAction action;
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IOpenListener#open(org.eclipse.jface.viewers.OpenEvent)
- */
-
- public void open(OpenEvent anEvent) {
- ISelection selection = anEvent.getSelection();
- if (selection instanceof IStructuredSelection) {
-
- if (getAction().updateSelection((IStructuredSelection)selection))
- action.run();
- }
-
- }
-
- /**
- * @return
- */
- private OpenJ2EEResourceAction getAction() {
- if (action == null)
- action = new OpenJ2EEResourceAction();
- return action;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java
deleted file mode 100644
index b8a2f7e0e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewAppClientComponentAction.java
+++ /dev/null
@@ -1,48 +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.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.ui.project.facet.appclient.AppClientProjectWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-public class NewAppClientComponentAction extends AbstractOpenWizardWorkbenchAction {
-
- // TODO MDE 02-28 Find correct label
- public static String LABEL = J2EEUIMessages.getResourceString("NewApplClientModuleAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "new_appclientproject_wiz"; //$NON-NLS-1$
-
- public NewAppClientComponentAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public NewAppClientComponentAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected Wizard createWizard() {
- return new AppClientProjectWizard();
- }
-
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }
-
- protected String getDialogText() {
- return null;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java
deleted file mode 100644
index 3c96cb23b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewEARComponentAction.java
+++ /dev/null
@@ -1,48 +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.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.ui.project.facet.EarProjectWizard;
-import org.eclipse.ui.IWorkbench;
-
-
-public class NewEARComponentAction extends AbstractOpenWizardWorkbenchAction {
- // TODO MDE 02-28 Find correct label
- public static String LABEL = J2EEUIMessages.getResourceString("NewEARModuleAction_UI_0"); //$NON-NLS-1$
- private static final String ICON = "newear_wiz"; //$NON-NLS-1$
-
- public NewEARComponentAction() {
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public NewEARComponentAction(IWorkbench workbench, String label, Class[] acceptedTypes) {
- super(workbench, label, acceptedTypes, false);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected Wizard createWizard() {
- return new EarProjectWizard();
- }
-
- protected boolean shouldAcceptElement(Object obj) {
- return true; /* NewGroup.isOnBuildPath(obj) && !NewGroup.isInArchive(obj); */
- }
-
- protected String getDialogText() {
- return null;
- }
-}
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 f92be5c99..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEArtifactDropDownAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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 org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
-
-
-/**
- * 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 implements IMenuCreator, IWorkbenchWindowPulldownDelegate2 {
-
- 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 67d9f3e38..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEDropDownAction.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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.jdt.internal.ui.util.PixelConverter;
-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.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()
- */
- 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;
- }
-
- 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)) {
- containers.add(new NewJavaEEWizardAction(element));
- }
- }
- }
-
- NewJavaEEWizardAction[] actions = (NewJavaEEWizardAction[]) containers.toArray(new NewJavaEEWizardAction[containers.size()]);
- Arrays.sort(actions);
- return actions;
- }
-
- 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 490cdaf1b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/NewJavaEEProjectDropDownAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 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 org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.ui.IWorkbenchWindowPulldownDelegate2;
-
-
-/**
- * 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 implements IMenuCreator, IWorkbenchWindowPulldownDelegate2 {
-
- 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 fff4abef4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/OpenJ2EEResourceAction.java
+++ /dev/null
@@ -1,414 +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.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.resources.VirtualArchiveComponent;
-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("Open"); //$NON-NLS-1$
- }
-
- /**
- * Returns the action ID.
- */
- public String getID() {
- return ID;
- }
-
- public static IEditorDescriptor getJavaEditorDescriptor() {
- if (javaEditorDescriptor == null)
- javaEditorDescriptor = findEditorDescriptor(JAVA_EDITOR_ID);
- return javaEditorDescriptor;
- }
-
- public static IEditorDescriptor getBaseJavaEditorDescriptor() {
- if (baseJavaEditorDescriptor == null)
- baseJavaEditorDescriptor = findEditorDescriptor(BASE_JAVA_EDITOR_ID);
- return baseJavaEditorDescriptor;
- }
-
- 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 instanceof VirtualArchiveComponent) {
- 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.getType() == JavaEEQuickPeek.CONNECTOR_TYPE) {
- String path = ((EObject)srcObject).eResource().getURI().toString();
- editorInput = BinaryEditorUtilities.getBinaryEditorInput((VirtualArchiveComponent)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(page.getWorkbenchWindow().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();
- editor = page.openEditor(new FileEditorInput((IFile) r), currentDescriptor.getId());
- if (editor instanceof ISetSelectionTarget)
- ((ISetSelectionTarget) editor).selectReveal(getStructuredSelection());
- } catch (Exception e) {
- MessageDialog.openError(page.getWorkbenchWindow().getShell(), J2EEUIMessages.getResourceString("Problems_Opening_Editor_ERROR_"), e.getMessage()); //$NON-NLS-1$ = "Problems Opening Editor"
- }
- }
-
- /**
- * The user has invoked this action
- */
- public void run() {
- if (!isEnabled())
- return;
-
- if (srcObject instanceof J2EEJavaClassProviderHelper) {
- ((J2EEJavaClassProviderHelper) srcObject).openInEditor();
- return;
- }
-
- 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();
- }
-
- IResource resource = WorkbenchResourceHelper.getFile((EObject)srcObject);
- if(resource != null) {
- 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) {
- ICompilationUnit cu = type.getCompilationUnit();
- EditorUtility.openInEditor(cu);
- } else{
- openAppropriateEditor(resource);
- }
- } catch (JavaModelException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- } catch (PartInitException e) {
- J2EEUIPlugin.logError(-1, e.getMessage(), e);
- }
-
- }
- }
- 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
- */
- 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
- } 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;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java
deleted file mode 100644
index 5433410e9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/actions/WTPBaseAction.java
+++ /dev/null
@@ -1,122 +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 Jul 7, 2004
- *
- * TODO To change the template for this generated file go to Window - Preferences - Java - Code
- * Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.actions;
-
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.j2ee.internal.plugin.ErrorDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IWorkbenchWindow;
-
-
-
-public abstract class WTPBaseAction extends Action implements IActionDelegate2 {
- private final static String ERROR_OCCURRED_TITLE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_TITLE"); //$NON-NLS-1$
- private final static String ERROR_OCCURRED_MESSAGE = J2EEUIMessages.getResourceString("ERROR_OCCURRED_MESSAGE"); //$NON-NLS-1$
-
- protected IStructuredSelection selection = null;
-
- protected IWorkbenchWindow getWorkbenchWindow() {
- return J2EEUIPlugin.getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- public void setSelection(IStructuredSelection selection) {
- this.selection = selection;
- }
-
- public void run() {
- Shell shell = getWorkbenchWindow().getShell();
- if (null == selection) {
- ISelection autoselection = getWorkbenchWindow().getSelectionService().getSelection();
- if (autoselection instanceof IStructuredSelection)
- this.selection = (IStructuredSelection) autoselection;
- }
-
- try {
- primRun(shell);
- this.selection = null;
- } catch (Throwable t) {
- ErrorDialog.openError(shell, ERROR_OCCURRED_TITLE, ERROR_OCCURRED_MESSAGE, t, 0, false);
- }
-
- }
-
- protected abstract void primRun(Shell shell);
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#dispose()
- */
- public void dispose() {
- //dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#init(org.eclipse.jface.action.IAction)
- */
- public void init(IAction action) {
- //init
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction,
- * org.eclipse.jface.viewers.ISelection)
- */
- public void selectionChanged(IAction action, ISelection aSelection) {
- setSelection((IStructuredSelection) aSelection);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate2#runWithEvent(org.eclipse.jface.action.IAction,
- * org.eclipse.swt.widgets.Event)
- */
- public void runWithEvent(IAction action, Event event) {
- run();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
- */
- public void run(IAction action) {
- run();
- }
-
- /**
- * @return Returns the selection.
- */
- protected IStructuredSelection getSelection() {
- return selection;
- }
-}
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 3daf2e300..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyAttributeConfiguration.java
+++ /dev/null
@@ -1,109 +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)
- */
- public boolean canEdit(ClasspathAttributeAccess attribute) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- public boolean canRemove(ClasspathAttributeAccess attribute) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getImageDescriptor(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- 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)
- */
- 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)
- */
- 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)
- */
- public IClasspathAttribute performEdit(Shell shell,
- ClasspathAttributeAccess attribute) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- 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 3d0a77886..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathDependencyValidatorMarkerResolutions.java
+++ /dev/null
@@ -1,187 +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.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.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)) {
- // quick fix adds the dependency
- return new IMarkerResolution[] { new UpdateClasspathDependencyAttributeResolution(cpEntryPath, true),
- 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 463feca59..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/classpathdep/ui/ClasspathNonDependencyAttributeConfiguration.java
+++ /dev/null
@@ -1,98 +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)
- */
- public boolean canEdit(ClasspathAttributeAccess attribute) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#canRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- public boolean canRemove(ClasspathAttributeAccess attribute) {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#getImageDescriptor(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- 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)
- */
- 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)
- */
- 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)
- */
- public IClasspathAttribute performEdit(Shell shell,
- ClasspathAttributeAccess attribute) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration#performRemove(org.eclipse.jdt.ui.wizards.ClasspathAttributeConfiguration.ClasspathAttributeAccess)
- */
- 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 296fd5543..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ExportApplicationClientAction.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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));
- }
-
- 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 eec615500..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/client/actions/ImportApplicationClientAction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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));
- }
-
- 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 42564f6ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/AbstractOverrideCommand.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.edit.command.AbstractOverrideableCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-/**
- * Insert the type's description here. Creation date: (06/07/01 10:56:08 AM)
- *
- * @author: Administrator
- */
-public abstract class AbstractOverrideCommand extends AbstractCommand {
- private AbstractOverrideableCommand overridable;
- private J2EEClipboard j2eeClipboard;
-
- /**
- * AbstractOverrideCommand constructor comment.
- */
- protected AbstractOverrideCommand() {
- super();
- }
-
- public AbstractOverrideCommand(AbstractOverrideableCommand command) {
- super(command.getLabel(), command.getDescription());
- setOverridable(command);
- }
-
- public boolean canExecute() {
- return super.canExecute() && overridable.doCanExecute();
- }
-
- public boolean canUndo() {
- return overridable.doCanUndo();
- }
-
- public Collection getAffectedObjects() {
- return overridable.doGetAffectedObjects();
- }
-
- public EditingDomain getDomain() {
- return getOverridable().getDomain();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 11:19:27 AM)
- *
- * @return org.eclipse.jst.j2ee.internal.internal.internal.command.J2EEClipboard
- */
- public J2EEClipboard getJ2eeClipboard() {
- return j2eeClipboard;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 10:58:33 AM)
- *
- * @return AbstractOverrideableCommand
- */
- public AbstractOverrideableCommand getOverridable() {
- return overridable;
- }
-
- public Collection getResult() {
- return getJ2eeClipboard();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 11:19:27 AM)
- *
- * @param newJ2eeClipboard
- * org.eclipse.jst.j2ee.internal.internal.internal.command.J2EEClipboard
- */
- protected void setJ2eeClipboard(J2EEClipboard newJ2eeClipboard) {
- j2eeClipboard = newJ2eeClipboard;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 10:58:33 AM)
- *
- * @param AbstractOverrideableCommand
- */
- protected void setOverridable(AbstractOverrideableCommand newOverridable) {
- overridable = newOverridable;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.java
deleted file mode 100644
index 4e4ab253f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEClipboard.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
- *******************************************************************************/
-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);
- }
-
- 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 bf103abeb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECompoundCommand.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-
-/**
- * Insert the type's description here. Creation date: (06/13/01 10:27:16 AM)
- *
- * @author: Administrator
- */
-public class J2EECompoundCommand extends CompoundCommand {
- /**
- * J2EECompoundCommand constructor comment.
- */
- public J2EECompoundCommand() {
- super();
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- */
- public J2EECompoundCommand(int resultIndex) {
- super(resultIndex);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- */
- public J2EECompoundCommand(int resultIndex, String label) {
- super(resultIndex, label);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EECompoundCommand(int resultIndex, String label, String description) {
- super(resultIndex, label, description);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, String label, String description, java.util.List commandList) {
- super(resultIndex, label, description, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, String label, java.util.List commandList) {
- super(resultIndex, label, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param resultIndex
- * int
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(int resultIndex, java.util.List commandList) {
- super(resultIndex, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- */
- public J2EECompoundCommand(String label) {
- super(label);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EECompoundCommand(String label, String description) {
- super(label, description);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(String label, String description, java.util.List commandList) {
- super(label, description, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(String label, java.util.List commandList) {
- super(label, commandList);
- }
-
- /**
- * J2EECompoundCommand constructor comment.
- *
- * @param commandList
- * java.util.List
- */
- public J2EECompoundCommand(java.util.List commandList) {
- super(commandList);
- }
-
- protected Collection getMergedAffectedObjectsCollection() {
- J2EEClipboard result = new J2EEClipboard(new ArrayList());
-
- for (Iterator commands = commandList.iterator(); commands.hasNext();) {
- Command command = (Command) commands.next();
- result.addAll(command.getAffectedObjects());
- }
-
- return result;
- }
-
- protected Collection getMergedResultCollection() {
- J2EEClipboard result = new J2EEClipboard(new ArrayList());
-
- for (Iterator commands = commandList.iterator(); commands.hasNext();) {
- Command command = (Command) commands.next();
- result.addAll(command.getResult());
- }
-
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.java
deleted file mode 100644
index 51dc0bdc3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyCommand.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.command;
-
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.common.command.AbstractCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emf.utilities.CopyGroup;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility;
-
-
-public class J2EECopyCommand extends AbstractCommand {
- protected EObject objectToCopy;
- protected EObject bindingToCopy;
- protected EObject extensionToCopy;
- protected J2EEClipboard result;
- protected EtoolsCopyUtility copyUtil;
-
- public J2EECopyCommand(EObject object, EObject binding, EObject extension, EtoolsCopyUtility copyUtility) {
- objectToCopy = object;
- bindingToCopy = binding;
- extensionToCopy = extension;
- copyUtil = copyUtility;
- }
-
- /**
- * This will perform the command activity required for the effect. The effect of calling execute
- * when canExecute returns false, or when canExecute hasn't been called, is undefined.
- */
- public void execute() {
- CopyGroup group = new CopyGroup();
-
- group.add(objectToCopy);
-
- if (bindingToCopy != null)
- group.add(bindingToCopy);
- if (extensionToCopy != null)
- group.add(extensionToCopy);
- copyUtil.copy(group);
- EObject copy = copyUtil.getCopy(objectToCopy);
- result = new J2EEClipboard(Collections.singleton(copy));
-
- if (bindingToCopy != null)
- result.addBinding(copy, copyUtil.getCopy(bindingToCopy));
- if (extensionToCopy != null)
- result.addExtension(copy, copyUtil.getCopy(extensionToCopy));
- }
-
- public Collection getAffectedObjects() {
- return result;
- }
-
- public Collection getResult() {
- return result;
- }
-
- protected boolean prepare() {
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- //redo
- }
-}
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 5581decf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyFromClipboardCommand.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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;
- }
-
- public Collection getAffectedObjects() {
- return result;
- }
-
- public Collection getResult() {
- return result;
- }
-
- protected boolean prepare() {
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- execute();
- }
-
- public void undo() {
- result = null;
- }
-}
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 eb42b83f8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EECopyToClipboardOverrideCommand.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.Iterator;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.wst.common.internal.emf.utilities.EtoolsCopyUtility;
-
-
-public class J2EECopyToClipboardOverrideCommand extends CopyToClipboardCommand {
- //The collection of source objects, with bindings and extensions, if any exist
- protected J2EEClipboard extendedSourceObjects;
- protected boolean onlyRefObjects = true;
-
- public J2EECopyToClipboardOverrideCommand(CopyToClipboardCommand cmd) {
- super(cmd.getDomain(), cmd.getSourceObjects());
- }
-
- protected Command createCopyCommand() {
- CompoundCommand cmd = new J2EECompoundCommand(CompoundCommand.MERGE_COMMAND_ALL);
- Iterator it = extendedSourceObjects.iterator();
- EtoolsCopyUtility copyUtil = new EtoolsCopyUtility();
- while (it.hasNext()) {
- Object o = it.next();
- if (!(o instanceof EObject)) {
- cmd.append(UnexecutableCommand.INSTANCE);
- } else {
- EObject r = (EObject) o;
- cmd.append(new J2EECopyCommand(r, extendedSourceObjects.getBinding(r), extendedSourceObjects.getExtension(r), copyUtil));
- }
- }
- return cmd.unwrap();
- }
-
- protected boolean prepare() {
- prepareSourceObjects();
- if (!onlyRefObjects) {
- copyCommand = UnexecutableCommand.INSTANCE;
- return copyCommand.canExecute();
- }
-
- if (!extendedSourceObjects.hasBindings() && !extendedSourceObjects.hasExtensions())
- return super.prepare();
-
- copyCommand = createCopyCommand();
- return copyCommand.canExecute();
- }
-
- protected void prepareSourceObjects() {
- extendedSourceObjects = new J2EEClipboard(getSourceObjects());
- Iterator it = getSourceObjects().iterator();
- while (it.hasNext()) {
- Object o = it.next();
- if (o instanceof EObject) {
- // EObject r = (EObject) o;
- // TODO switch to adaptable commands
- // EObject bnd = BindingAndExtensionHelper.getBinding(r);
- // EObject ext = BindingAndExtensionHelper.getExtension(r);
- // if (bnd != null)
- // extendedSourceObjects.addBinding(r, bnd);
- // if (ext != null)
- // extendedSourceObjects.addExtension(r, ext);
- } else {
- //Right now we can only handle ref objects in the tree
- onlyRefObjects = false;
- return;
- }
- }
- }
-}
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 d51a6d5d0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEPasteFromClipboardOverrideCommand.java
+++ /dev/null
@@ -1,150 +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);
- }
-
- public void doExecute() {
- super.doExecute();
- executeAddBindings();
- executeAddExtensions();
- J2EEClipboard result = (J2EEClipboard) doGetResult();
- for (int i = 0; i < result.size(); i++) {
- EObject o = (EObject) result.get(i);
- if (result.getBinding(o) != null || result.getExtension(o) != null)
- IDUtility.setDefaultID(o, true);
- }
- }
-
- public Collection doGetAffectedObjects() {
- return copyCommand.getAffectedObjects();
- }
-
- public Collection doGetResult() {
- return copyCommand.getResult();
- }
-
- public void doRedo() {
- super.doRedo();
- if (addBindingsCommand != null)
- addBindingsCommand.redo();
- if (addExtensionsCommand != null)
- addExtensionsCommand.redo();
- }
-
- public void doUndo() {
- super.doUndo();
- if (addBindingsCommand != null)
- addBindingsCommand.undo();
- if (addExtensionsCommand != null)
- addExtensionsCommand.undo();
- }
-
- protected void executeAddBindings() {
- if (addBindingsCommand != null && addBindingsCommand.canExecute())
- addBindingsCommand.execute();
- }
-
- protected void executeAddExtensions() {
- if (addExtensionsCommand != null && addExtensionsCommand.canExecute())
- addExtensionsCommand.execute();
- }
-
- public J2EEClipboard getCopiedClipoard() {
- return (J2EEClipboard) copyCommand.getResult();
- }
-
- protected J2EEClipboard getJ2EEClipboard() {
- return (J2EEClipboard) domain.getClipboard();
- }
-
- protected boolean prepare() {
- if (getJ2EEClipboard() == null)
- return false;
- command = new StrictCompoundCommand();
-
- copyCommand = new J2EECopyFromClipboardCommand((J2EEUIEditingDomain) domain);
- command.append(copyCommand);
-
- command.append(new CommandWrapper() {
- protected Command createCommand() {
- Command addCommand = AddCommand.create(getDomain(), getOwner(), getFeature(), copyCommand.getResult(), getIndex());
- return addCommand;
- }
- });
- prepareBindingCommand(copyCommand);
- prepareExtensionCommand(copyCommand);
-
- boolean result;
- if (optimize) {
- // This will determine canExecute as efficiently as possible.
- //
- result = optimizedCanExecute();
- } else {
- // This will actually execute the copy command in order to check if the add can execute.
- //
- result = command.canExecute();
- }
-
- return result;
- }
-
- protected void prepareBindingCommand(final J2EECopyFromClipboardCommand cmd) {
- if (!getJ2EEClipboard().hasBindings())
- return;
- //TODO make adaptable command
- // addBindingsCommand = new CommandWrapper() {
- // protected Command createCommand() {
- // Object bindingOwner = BindingAndExtensionHelper.getBindingAddOwner((EObject)getOwner());
- // Collection bindingsCopies = getCopiedClipoard().getBindings().values();
- // Command addCommand = AddCommand.create(getDomain(), bindingOwner, null, bindingsCopies,
- // CommandParameter.NO_INDEX);
- // return addCommand;
- // }
- // };
- }
-
- protected void prepareExtensionCommand(final J2EECopyFromClipboardCommand cmd) {
- if (!getJ2EEClipboard().hasExtensions())
- return;
- // TODO make adaptable command
- // addExtensionsCommand = new CommandWrapper() {
- // protected Command createCommand() {
- // Object extensionOwner =
- // BindingAndExtensionHelper.getExtensionAddOwner((EObject)getOwner());
- // Collection extensionsCopies = getCopiedClipoard().getExtensions().values();
- // Command addCommand = AddCommand.create(getDomain(), extensionOwner, null,
- // extensionsCopies, CommandParameter.NO_INDEX);
- // return addCommand;
- // }
- // };
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java
deleted file mode 100644
index ab6103904..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EERemoveOverrideCommand.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.command;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.command.RemoveCommand;
-
-/**
- * Insert the type's description here. Creation date: (06/07/01 10:44:02 AM)
- *
- * @author: Administrator
- */
-public class J2EERemoveOverrideCommand extends AbstractOverrideCommand {
- private RemoveCommand bindingsRemoveCommand;
- private RemoveCommand extensionsRemoveCommand;
- private ResourceSet resourceSet;
-
- /**
- * J2EERemoveOverrideCommand constructor comment.
- */
- protected J2EERemoveOverrideCommand() {
- super();
- }
-
- public J2EERemoveOverrideCommand(RemoveCommand command) {
- super(command);
- }
-
- protected RemoveCommand createRemoveCommand(Collection elements) {
- return (RemoveCommand) RemoveCommand.create(getDomain(), elements);
- }
-
- /**
- * This will perform the command activity required for the effect. The effect of calling execute
- * when canExecute returns false, or when canExecute hasn't been called, is undefined.
- */
- public void execute() {
- /*
- * For each object being removed, check if it has a binding, and an extension Make
- * collections of these, make a command parameter for each collection, an instantiate a
- * remove command
- */
-
- Collection objects = getRemoveCommand().getCollection();
- List bindings = new ArrayList(objects.size());
- List extensions = new ArrayList(objects.size());
- Iterator it = objects.iterator();
- while (it.hasNext()) {
- EObject o = (EObject) it.next();
- if (resourceSet == null)
- resourceSet = o.eResource().getResourceSet();
- // TODO make command adaptable
- // EObject binding = BindingAndExtensionHelper.getBinding(o);
- // if (binding != null) {
- // bindings.add(binding);
- // getJ2eeClipboard().addBinding(o, binding);
- // }
- // EObject extension = BindingAndExtensionHelper.getExtension(o);
- // if (extension != null) {
- // extensions.add(extension);
- // getJ2eeClipboard().addExtension(o, extension);
- // }
- }
- if (!bindings.isEmpty())
- setBindingsRemoveCommand(createRemoveCommand(bindings));
-
- if (!extensions.isEmpty())
- setExtensionsRemoveCommand(createRemoveCommand(extensions));
-
- executeAllChildren();
- }
-
- protected void executeAllChildren() {
- executeNested(bindingsRemoveCommand);
- executeNested(extensionsRemoveCommand);
- getOverridable().doExecute();
- }
-
- protected void executeNested(RemoveCommand cmd) {
- if (cmd != null && cmd.doCanExecute()) {
- cmd.doExecute();
- // Collection result = cmd.getResult();
- //TODO
- // BindingAndExtensionHelper.resolveAllProxies(result, resourceSet);
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @return RemoveCommand
- */
- protected RemoveCommand getBindingsRemoveCommand() {
- return bindingsRemoveCommand;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @return RemoveCommand
- */
- protected RemoveCommand getExtensionsRemoveCommand() {
- return extensionsRemoveCommand;
- }
-
- public RemoveCommand getRemoveCommand() {
- return (RemoveCommand) getOverridable();
- }
-
- protected boolean prepare() {
- setJ2eeClipboard(new J2EEClipboard(getRemoveCommand().getCollection()));
- return true;
- }
-
- /**
- * This will again perform the command activity required to redo the effect after undoing the
- * effect. The effect, if any, of calling redo before undo is called is undefined. Note that if
- * you implement redo to call execute then any derived class will be restricted to by that
- * decision also.
- */
- public void redo() {
- executeAllChildren();
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @param newBindingsRemoveCommand
- * RemoveCommand
- */
- protected void setBindingsRemoveCommand(RemoveCommand newBindingsRemoveCommand) {
- bindingsRemoveCommand = newBindingsRemoveCommand;
- }
-
- /**
- * Insert the method's description here. Creation date: (06/07/01 1:32:44 PM)
- *
- * @param newExtensionsRemoveCommand
- * RemoveCommand
- */
- protected void setExtensionsRemoveCommand(RemoveCommand newExtensionsRemoveCommand) {
- extensionsRemoveCommand = newExtensionsRemoveCommand;
- }
-
- public void undo() {
- getRemoveCommand().doUndo();
- undoNested(bindingsRemoveCommand);
- undoNested(extensionsRemoveCommand);
- }
-
- protected void undoNested(RemoveCommand cmd) {
- if (cmd != null && cmd.doCanUndo())
- cmd.doUndo();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java
deleted file mode 100644
index e0df82ab7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/command/J2EEStrictCompoundCommand.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.command;
-
-import org.eclipse.emf.common.command.StrictCompoundCommand;
-
-
-
-/**
- * Overridden to provide an accessor to the pessimistic field. This is needed for the case of
- * undo/redo paste. We need the nested copy commmand in the paste command to redo itself when the
- * paste command is copied, otherwise we run into sed exception.
- */
-public class J2EEStrictCompoundCommand extends StrictCompoundCommand {
- /**
- * J2EEStrictCompoundCommand constructor comment.
- */
- public J2EEStrictCompoundCommand() {
- super();
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- */
- public J2EEStrictCompoundCommand(String label) {
- super(label);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- */
- public J2EEStrictCompoundCommand(String label, String description) {
- super(label, description);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param description
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(String label, String description, java.util.List commandList) {
- super(label, description, commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param label
- * java.lang.String
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(String label, java.util.List commandList) {
- super(label, commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- *
- * @param commandList
- * java.util.List
- */
- public J2EEStrictCompoundCommand(java.util.List commandList) {
- super(commandList);
- }
-
- /**
- * J2EEStrictCompoundCommand constructor comment.
- */
- public J2EEStrictCompoundCommand(boolean pessimistic) {
- super();
- setIsPessismistic(pessimistic);
- }
-
- public void setIsPessismistic(boolean aBool) {
- isPessimistic = aBool;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/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 ea7adc712..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseDeployableArtifactAdapterFactory.java
+++ /dev/null
@@ -1,38 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-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 };
- }
-
- 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 b3cb39e4e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/EnterpriseModuleArtifact.java
+++ /dev/null
@@ -1,43 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-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
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class EnterpriseModuleArtifact implements IModuleArtifact {
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.server.core.IModuleArtifact#getModule()
- */
- public IModule getModule() {
- // TODO Auto-generated method stub
- 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 212774545..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableAdapterFactory.java
+++ /dev/null
@@ -1,50 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-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 0326fa4da..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ChangeLibDirDialog.java
+++ /dev/null
@@ -1,60 +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;
-
-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;
- }
-
- 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 {
- if (res.startsWith("" + IPath.SEPARATOR)); //$NON-NLS-1$
- 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/DeleteEARComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java
deleted file mode 100644
index fa025152a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARComposite.java
+++ /dev/null
@@ -1,270 +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.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-public class DeleteEARComposite extends Composite implements J2EEDeleteUIConstants, Listener, ICheckStateListener {
-
- protected DeleteEARDialog dialog;
- protected Button deleteAppProjectsBtn;
- protected Button deleteRefProjectsBtn;
- protected Composite radioComposite;
- protected Button detailsBtn;
- protected DeleteModuleReferencesComposite moduleRefsComposite;
- protected CheckboxTableViewer projectsList;
- protected boolean listCreated = false;
- protected Map referencedProjects;
- protected WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- /**
- * Constructor for DeleteEARComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteEARComposite(Composite parent, DeleteEARDialog dialog, int style, Set referencedProjects) {
- super(parent, style);
- this.dialog = dialog;
- initReferencedProjects(referencedProjects);
- addChildren();
- }
-
- /**
- * Answer the referenced projects which the user has chosen to also delete
- */
- public java.util.List getSelectedReferencedProjects() {
- if (deleteAppProjectsBtn.getSelection())
- return Collections.EMPTY_LIST;
- java.util.List result = new ArrayList();
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry element = (Map.Entry) iter.next();
- boolean isSelected = ((Boolean) element.getValue()).booleanValue();
- if (isSelected)
- result.add(element.getKey());
- }
- return result;
- }
-
- /**
- * @see J2EEDeleteDialog#createDeleteOptions()
- */
- public DeleteOptions createDeleteOptions() {
- DeleteOptions opts = new DeleteOptions();
- opts.setIsEARDelete(true);
- opts.setDeleteProjects(true);
- opts.setDeleteModuleDependencies(moduleRefsComposite.shouldDeleteModuleDependencies());
- opts.setDeleteModules(moduleRefsComposite.shouldDeleteModules());
- opts.setSelectedReferencedProjects(getSelectedReferencedProjects());
- return opts;
- }
-
-
-
- protected void initReferencedProjects(Set projects) {
- referencedProjects = new HashMap();
- for (Iterator iter = projects.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- referencedProjects.put(project, Boolean.TRUE);
- }
- }
-
- protected void addChildren() {
- setLayout();
- addRadioComposite();
- moduleRefsComposite = new DeleteModuleReferencesComposite(this, SWT.NONE, true);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- //setup defaults
- deleteAppProjectsBtn.setSelection(true);
- deleteAppProjectsBtnSelected();
- }
-
- protected void setLayout() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
- }
-
- protected void addRadioComposite() {
- radioComposite = new Composite(this, SWT.NONE);
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- deleteAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteAppProjectsBtn.setText(DELETE_EAR_PROJECTS);
- deleteAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- deleteAppProjectsBtn.setLayoutData(data);
-
- deleteRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteRefProjectsBtn.setText(DELETE_REFERENCED_PROJECTS);
- deleteRefProjectsBtn.addListener(SWT.Selection, this);
- deleteRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- detailsBtn = new Button(radioComposite, SWT.PUSH);
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- detailsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- detailsBtn.addListener(SWT.Selection, this);
- detailsBtn.setEnabled(false);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteAppProjectsBtn)
- deleteAppProjectsBtnSelected();
- else if (event.widget == deleteRefProjectsBtn)
- deleteRefProjectsBtnSelected();
- else if (event.widget == detailsBtn)
- detailsBtnSelected();
- }
-
- protected void deleteAppProjectsBtnSelected() {
- if (deleteAppProjectsBtn.getSelection()) {
- if (listCreated)
- toggleDetailsArea();
- detailsBtn.setEnabled(false);
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void deleteRefProjectsBtnSelected() {
- if (deleteRefProjectsBtn.getSelection()) {
- detailsBtn.setEnabled(true);
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- protected void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = dialog.getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (listCreated) {
- projectsList.getControl().dispose();
- listCreated = false;
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownList();
- detailsBtn.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
-
- Point newSize = dialog.getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- protected void createDropDownList() {
- // create the list
- projectsList = CheckboxTableViewer.newCheckList(radioComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- projectsList.setLabelProvider(createLabelProvider());
- projectsList.setSorter(new ViewerSorter() {/*viewersorter*/});
- projectsList.addCheckStateListener(this);
- // fill the list
- populateList();
-
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.heightHint = projectsList.getTable().getItemHeight() * referencedProjects.size();
- data.horizontalSpan = 2;
- data.horizontalIndent = 10;
- projectsList.getTable().setLayoutData(data);
-
- listCreated = true;
- }
-
- protected void populateList() {
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- projectsList.add(entry.getKey());
- boolean checked = ((Boolean) entry.getValue()).booleanValue();
- projectsList.setChecked(entry.getKey(), checked);
- }
- }
-
- protected void detailsBtnSelected() {
- toggleDetailsArea();
- }
-
- /**
- * @see ICheckStateListener#checkStateChanged(CheckStateChangedEvent)
- */
- public void checkStateChanged(CheckStateChangedEvent event) {
- referencedProjects.put(event.getElement(), new Boolean(event.getChecked()));
- }
-
- protected ITableLabelProvider createLabelProvider() {
- return new ITableLabelProvider() {
- public void dispose() {
- //dispose
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return workbenchLabelProvider.getImage(element);
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return workbenchLabelProvider.getText(element);
- }
-
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
- };
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java
deleted file mode 100644
index 48f41f5e1..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteEARDialog.java
+++ /dev/null
@@ -1,66 +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.dialogs;
-
-
-import java.util.Set;
-
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-public class DeleteEARDialog extends J2EEDeleteDialog {
- protected DeleteEARComposite deleteComposite;
- protected Set referencedProjects;
-
- /**
- * Constructor for DeleteEARDialog.
- *
- * @param parentShell
- * @param dialogTitle
- */
- public DeleteEARDialog(Shell parentShell, Set referencedProjects) {
- super(parentShell, DELETE_EAR_OPTIONS);
- this.referencedProjects = referencedProjects;
- }
-
-
- /**
- * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(Composite)
- */
- protected Control createCustomArea(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.DELEATE_EAR_DIALOG_1); //$NON-NLS-1$
- deleteComposite = new DeleteEARComposite(parent, this, SWT.NONE, referencedProjects);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- deleteComposite.setLayoutData(data);
- return deleteComposite;
- }
-
- /**
- * @see J2EEDeleteDialog#createDeleteOptions()
- */
- public void createDeleteOptions() {
- deleteOptions = deleteComposite.createDeleteOptions();
- }
-
- /**
- * @see org.eclipse.jface.window.Window#getContents()
- */
- public Control getContents() {
- return super.getContents();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java
deleted file mode 100644
index ceda40a34..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleComposite.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-
-public class DeleteModuleComposite extends Composite implements J2EEDeleteUIConstants, Listener {
-
- // protected Button deleteProjectsCheckBox;
- protected Button deleteAppProjectsBtn;
- protected Button deleteRefProjectsBtn;
- protected Composite radioComposite;
- protected DeleteModuleReferencesComposite moduleRefsComposite;
-
-
- /**
- * Constructor for DeleteModuleComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteModuleComposite(Composite parent, int style) {
- super(parent, style);
- addChildren();
-
- }
-
- protected void addChildren() {
- addDeleteProjectsGroup();
- addDeleteModuleRefsComposite();
- //set default values
- deleteAppProjectsBtn.setSelection(true);
- deleteAppProjectsBtnSelected();
- }
-
- protected void addDeleteProjectsGroup() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- radioComposite = new Composite(this, SWT.NONE);
- lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- deleteAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteAppProjectsBtn.setText(DELETE_PROJECTS_ONLY);
- deleteAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- deleteAppProjectsBtn.setLayoutData(data);
-
- deleteRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- deleteRefProjectsBtn.setText(DELETE_PROJECT_REFERENCES);
- deleteRefProjectsBtn.addListener(SWT.Selection, this);
- deleteRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- }
-
- protected void addDeleteModuleRefsComposite() {
- moduleRefsComposite = new DeleteModuleReferencesComposite(this, SWT.NONE, false);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- }
-
-
- protected void addSeparator() {
- Label sep = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- sep.setLayoutData(data);
- }
-
- public boolean shouldDeleteProjects() {
- // return deleteProjectsCheckBox.getSelection();
- // the project should be deleted, since delete was the selected action
- return true;
- }
-
-
- public boolean shouldDeleteModuleDependencies() {
- return moduleRefsComposite.shouldDeleteModuleDependencies();
- }
-
- public boolean shouldDeleteModules() {
- return moduleRefsComposite.shouldDeleteModules();
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteAppProjectsBtn)
- deleteAppProjectsBtnSelected();
- else if (event.widget == deleteRefProjectsBtn)
- deleteRefProjectsBtnSelected();
- }
-
- protected void deleteAppProjectsBtnSelected() {
- if (deleteAppProjectsBtn.getSelection()) {
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void deleteRefProjectsBtnSelected() {
- if (deleteRefProjectsBtn.getSelection()) {
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java
deleted file mode 100644
index cfb80fe79..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleDialog.java
+++ /dev/null
@@ -1,50 +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.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-
-public class DeleteModuleDialog extends J2EEDeleteDialog implements J2EEDeleteUIConstants {
-
- protected DeleteModuleComposite deleteComposite;
-
- public DeleteModuleDialog(Shell parentShell) {
- super(parentShell, DELETE_MODULE_OPTIONS);
- }
-
- protected Control createCustomArea(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.DELEATE_MODULE_DIALOG_1); //$NON-NLS-1$
- deleteComposite = new DeleteModuleComposite(parent, SWT.NONE);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- deleteComposite.setLayoutData(data);
- return deleteComposite;
- }
-
- public void createDeleteOptions() {
- deleteOptions = new DeleteOptions();
- deleteOptions.setDeleteProjects(deleteComposite.shouldDeleteProjects());
- deleteOptions.setDeleteModules(deleteComposite.shouldDeleteModules());
- deleteOptions.setDeleteModuleDependencies(deleteComposite.shouldDeleteModuleDependencies());
- }
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java
deleted file mode 100644
index 393189d18..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DeleteModuleReferencesComposite.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class DeleteModuleReferencesComposite extends Composite implements J2EEDeleteUIConstants, Listener {
-
- protected Button deleteModulesCheckbox;
- protected Button deleteModuleDependenciesCheckbox;
- protected boolean isEARDelete;
-
- /**
- * Constructor for DeleteModuleReferencesComposite.
- *
- * @param parent
- * @param style
- */
- public DeleteModuleReferencesComposite(Composite parent, int style, boolean isEARDelete) {
- super(parent, style);
- this.isEARDelete = isEARDelete;
- addChildren();
- }
-
- protected void addChildren() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- addDeleteModulesCheckbox();
- addDeleteModuleDependenciesCheckbox();
- }
-
- protected void addDeleteModuleDependenciesCheckbox() {
- deleteModuleDependenciesCheckbox = new Button(this, SWT.CHECK);
- deleteModuleDependenciesCheckbox.setText(DELETE_MODULE_DEPENDENCIES);
-
- }
-
- protected void addDeleteModulesCheckbox() {
- deleteModulesCheckbox = new Button(this, SWT.CHECK);
- String label = isEARDelete ? DELETE_MODULES_OTHER : DELETE_MODULES;
- deleteModulesCheckbox.setText(label);
- deleteModulesCheckbox.addListener(SWT.Selection, this);
- }
-
- public boolean shouldDeleteModuleDependencies() {
- return deleteModuleDependenciesCheckbox.getSelection();
- }
-
- public boolean shouldDeleteModules() {
- return deleteModulesCheckbox.getSelection();
- }
-
- public void setButtonsEnabled(boolean enabled) {
- deleteModuleDependenciesCheckbox.setSelection(enabled);
- deleteModulesCheckbox.setSelection(enabled);
- deleteModuleDependenciesCheckbox.setEnabled(enabled);
- deleteModulesCheckbox.setEnabled(enabled);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == deleteModulesCheckbox && deleteModulesCheckbox.getSelection() && !deleteModuleDependenciesCheckbox.getSelection())
- deleteModuleDependenciesCheckbox.setSelection(true);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java
deleted file mode 100644
index 985c2aebb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/DependencyConflictResolveDialog.java
+++ /dev/null
@@ -1,64 +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.*;
-
-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);
- }
-
- public int open() {
- if (getPrefStore().getBoolean(DONT_SHOW_AGAIN))
- return BTN_ID_OK;
- setToggleState(getPrefStore().getBoolean(DONT_SHOW_AGAIN));
- return super.open();
- }
-
- public boolean close() {
- getPrefStore().setValue(DONT_SHOW_AGAIN, getToggleState());
- return super.close();
- }
-
- 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 5442f2c17..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/FilteredFileSelectionDialog.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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$
- if (message == null)
- message = J2EEUIMessages.getResourceString("Select_a_file__UI_"); //$NON-NLS-1$
- setMessage(message);
- setAllowMultiple(true);
- setExtensions(extensions);
- addFilter(new TypedFileViewerFilter(extensions));
- setValidator(new TypedElementSelectionValidator(new Class[]{IFile.class}, allowMultiple));
-
- }
- public String[] getExtensions() {
- return fExtensions;
- }
- public void setExtensions(String[] extensions) {
- fExtensions = extensions;
- }
-
- public void setHelp(String helpCode) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this.getParentShell(), helpCode); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java
deleted file mode 100644
index be97f20db..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteDialog.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.delete.DeleteOptions;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class J2EEDeleteDialog extends MessageDialog implements J2EEDeleteUIConstants {
-
- protected DeleteOptions deleteOptions;
-
- /**
- * Constructor for J2EEDeleteDialog.
- *
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
- public J2EEDeleteDialog(Shell parentShell, String dialogTitle) {
- super(parentShell, dialogTitle, null, DELETE_DIALOG_MESSAGE, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
- }
-
- public DeleteOptions getDeleteOptions() {
- return deleteOptions;
- }
-
-
- public abstract void createDeleteOptions();
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == 0)
- createDeleteOptions();
- super.buttonPressed(buttonId);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java
deleted file mode 100644
index 2ae744b61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeleteUIConstants.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EEDeleteUIConstants {
- String DELETE = J2EEUIMessages.getResourceString("Delete_1"); //$NON-NLS-1$
- String DELETE_PROJECTS = J2EEUIMessages.getResourceString("Delete_selected_project(s)_2"); //$NON-NLS-1$
- String DELETE_MODULES = J2EEUIMessages.getResourceString("Remove_module(s)_from_all_Enterprise_Applications_3"); //$NON-NLS-1$
- String DELETE_MODULES_OTHER = J2EEUIMessages.getResourceString("Remove_module(s)_from_all_other_Enterprise_Applications_4"); //$NON-NLS-1$
- String DELETE_MODULE_DEPENDENCIES = J2EEUIMessages.getResourceString("Remove_module_dependencies_referencing_selected_project(s)_5"); //$NON-NLS-1$
- String DELETE_MODULE_OPTIONS = J2EEUIMessages.getResourceString("Delete_Module_Options_6"); //$NON-NLS-1$
- String DELETE_EAR_OPTIONS = J2EEUIMessages.getResourceString("Delete_Enterprise_Application_Options_7"); //$NON-NLS-1$
- String DELETE_NOT_COMPLETED = J2EEUIMessages.getResourceString("Delete_could_not_be_completed_8"); //$NON-NLS-1$
- String DELETE_ERROR = J2EEUIMessages.getResourceString("Delete_error_9"); //$NON-NLS-1$
- String DELETE_DIALOG_MESSAGE = J2EEUIMessages.getResourceString("What_would_you_like_to_delete__10"); //$NON-NLS-1$
- String DELETE_EAR_PROJECTS = J2EEUIMessages.getResourceString("Delete_selected_Enterprise_Application_project(s)_only_11"); //$NON-NLS-1$
- String DELETE_REFERENCED_PROJECTS = J2EEUIMessages.getResourceString("Also_delete_module_and_utility_Java_projects_12"); //$NON-NLS-1$
- String DELETE_PROJECTS_ONLY = J2EEUIMessages.getResourceString("Delete_selected_project(s)_only_13"); //$NON-NLS-1$
- String DELETE_PROJECT_REFERENCES = J2EEUIMessages.getResourceString("Also_delete_references_to_selected_project(s)_14"); //$NON-NLS-1$
- String CUSTOM_DELETE_MIX_MATCH = J2EEUIMessages.getResourceString("CUSTOM_DELETE_MIX_MATCH_UI_"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java
deleted file mode 100644
index 9e29ba990..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployStatusDialog.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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 May 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author sagarwal
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class J2EEDeployStatusDialog extends ProgressMonitorDialog implements J2EEDeployUIConstants {
-
- /**
- * Reserve room for this many list items.
- */
- private static final int LIST_ITEM_COUNT = 7;
- private int severity = IStatus.OK;
- public Color DESC_COLOR = new Color(null, 255, 255, 255);
- /**
- * The Details button.
- */
- private Button detailsButton;
-
- /**
- * The SWT list control that displays the error details.
- */
- private Text text;
-
- /**
- * Indicates whether the error details viewer is currently created.
- */
- private boolean textCreated = false;
-
- /**
- * List of the main error object's detailed errors (element type:
- * <code>J2EEMigrationStatus</code>).
- */
- private java.util.List statusList;
-
- /**
- * @param parent
- */
- public J2EEDeployStatusDialog(Shell parent, List status) {
- super(parent);
- setShellStyle(SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL | SWT.RESIZE); // no
- statusList = status;
- }
-
- /**
- * Called just after the operation is run. Default behaviour is to decrement the nesting depth,
- * and close the dialog.
- *
- * @plannedfor 3.0
- */
- protected void finishedRun() {
- decrementNestingDepth();
- clearCursors();
- cancel.setEnabled(true);
- detailsButton.setEnabled(true);
- computeSeverity();
- setDeploymentStatus();
- }
-
- /**
- *
- */
- private void setDeploymentStatus() {
- setMessageOrDefault();
- imageLabel.setImage(getImage());
- }
-
- protected void setMessageOrDefault() {
- switch (getSeverity()) {
- case IStatus.ERROR :
- message = DEPLOY_ERRORS_REPORT;
- break;
- case IStatus.WARNING :
- message = DEPLOY_WARNINGS_REPORT;
- break;
- default :
- message = DEPLOY_SUCCESS_REPORT;
- break;
- }
- setMessage(message);
- }
-
-
- protected void createCancelButton(Composite parent) {
- super.createCancelButton(parent);
- cancel.setText(IDialogConstants.OK_LABEL);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- // cancel button
- createCancelButton(parent);
- detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
- detailsButton.setEnabled(false);
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog. Handles the pressing of the Ok or Details button in
- * this dialog. If the Ok button was pressed then close this dialog. If the Details button was
- * pressed then toggle the displaying of the error details area. Note that the Details button
- * will only be visible if the error being displayed specifies child details.
- */
- protected void buttonPressed(int id) {
- if (id == IDialogConstants.DETAILS_ID) { // was the details button pressed?
- toggleDetailsArea();
- } else {
- logStatus();
- super.buttonPressed(id);
-
- }
- }
-
- /*
- * @see org.eclipse.jface.dialogs.IconAndMessageDialog#getImage()
- */
-
-
- protected Image getImage() {
- switch (getSeverity()) {
- case IStatus.ERROR :
- return this.getErrorImage();
- case IStatus.WARNING :
- return this.getWarningImage();
- default :
- return this.getInfoImage();
- }
- }
-
- protected Text createDropDownText(Composite parent) {
- // create the list
- text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);
- // fill the list
- populateText(text);
-
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.horizontalSpan = 2;
- data.heightHint = text.getLineHeight() * LIST_ITEM_COUNT;
- text.setLayoutData(data);
- textCreated = true;
- return text;
- }
-
- private void logStatus() {
- Iterator aenum = statusList.iterator();
- StringBuffer sb = new StringBuffer();
- sb.append(message);
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- populateText(sb, childStatus, 0);
- }
- Logger.getLogger().logInfo(sb.toString());
-
- }
-
- /**
- * Populates the list using this error dialog's status object. This walks the child stati of the
- * status object and displays them in a list. The format for each entry is status_path :
- * status_message If the status's path was null then it (and the colon) are omitted.
- */
- private void populateText(Text someText) {
- Iterator aenum = statusList.iterator();
- StringBuffer sb = new StringBuffer();
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- //sb.append("Deployment results for " + childStatus.);
- populateText(sb, childStatus, 0);
- }
- someText.setText(sb.toString());
-
- }
-
- private void populateText(StringBuffer sb, IStatus status, int nesting) {
- for (int i = 0; i < nesting; i++) {
- sb.append(" "); //$NON-NLS-1$
- }
- sb.append(getMessageForDisplay(status));
- sb.append('\n');
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- populateText(sb, children[i], nesting + 1);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (textCreated) {
- text.dispose();
- textCreated = false;
- detailsButton.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- text = createDropDownText((Composite) getContents());
- detailsButton.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- text.setEditable(false);
- text.setBackground(DESC_COLOR);
- }
-
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- public String getMessageForDisplay(IStatus status) {
- String messageString = status.getMessage();
- return messageString;
-
- }
-
- protected String getSeverityText(IStatus status) {
- switch (status.getSeverity()) {
- case IStatus.ERROR :
- return ERROR_TEXT;
- case IStatus.WARNING :
- return WARNING_TEXT;
- case IStatus.INFO :
- return INFO_TEXT;
- case IStatus.OK :
- return OK_TEXT;
- default :
- return ""; //$NON-NLS-1$
- }
- }
-
- private void setSeverity(int sev) {
- if (severity == IStatus.ERROR)
- return;
- if (sev == IStatus.ERROR)
- severity = IStatus.ERROR;
- else if (sev == IStatus.WARNING) {
- severity = IStatus.WARNING;
- }
- }
-
- private int getSeverity() {
- return severity;
- }
-
- private int computeSeverity() {
- Iterator aenum = statusList.iterator();
- while (aenum.hasNext()) {
- IStatus childStatus = (IStatus) aenum.next();
- setSeverity(childStatus.getSeverity());
- if (getSeverity() == IStatus.ERROR)
- return getSeverity();
- computeSeverity(childStatus);
- if (getSeverity() == IStatus.ERROR)
- getSeverity();
- }
- return getSeverity();
- }
-
- private void computeSeverity(IStatus status) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- computeSeverity(children[i]);
- if (getSeverity() == IStatus.ERROR)
- return;
- }
- }
-
- /*
- * (non-Javadoc) Method declared in Window.
- */
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(DEPLOY_DIALOG_TITLE);
- //shell.setSize(600,200); don't set the size this breaks the dialog for linux.
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected Control createDialogArea(Composite parent) {
- Control control = super.createDialogArea(parent);
- setMessage(DEPLOYMENT_IN_PROGRESS);
- return control;
- }
-
- /**
- * Set the message in the message label.
- */
- private void setMessage(String messageString) {
- //must not set null text in a label
- message = messageString == null ? "" : messageString; //$NON-NLS-1$
- if (messageLabel == null || messageLabel.isDisposed())
- return;
- messageLabel.setText(message);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java
deleted file mode 100644
index dfe358952..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EEDeployUIConstants.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EEDeployUIConstants {
- public static final String ERROR_TEXT = J2EEUIMessages.getResourceString("DEPLOY_ERROR_TEXT"); //$NON-NLS-1$
- public static final String WARNING_TEXT = J2EEUIMessages.getResourceString("DEPLOY_WARNING_TEXT"); //$NON-NLS-1$
- public static final String INFO_TEXT = J2EEUIMessages.getResourceString("DEPLOY_INFO_TEXT"); //$NON-NLS-1$
- public static final String OK_TEXT = J2EEUIMessages.getResourceString("DEPLOY_OK_TEXT"); //$NON-NLS-1$
- public static final String DEPLOYMENT_IN_PROGRESS = J2EEUIMessages.getResourceString("DEPLOYMENT_IN_PROGRESS"); //$NON-NLS-1$
- public static final String DEPLOY_SUCCESS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_SUCCESS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_WARNINGS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_WARNINGS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_ERRORS_REPORT = J2EEUIMessages.getResourceString("DEPLOY_ERRORS_REPORT"); //$NON-NLS-1$
- public static final String DEPLOY_DIALOG_TITLE = J2EEUIMessages.getResourceString("DEPLOY_DIALOG_TITLE"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java
deleted file mode 100644
index 6dcbf118d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameDialog.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.widgets.Shell;
-
-
-public abstract class J2EERenameDialog extends MessageDialog implements J2EERenameUIConstants {
-
- protected RenameOptions renameOptions;
- protected String currentName = null;
-
- /**
- * Constructor for J2EERenameDialog.
- *
- * @param parentShell
- * @param dialogTitle
- * @param dialogTitleImage
- * @param dialogMessage
- * @param dialogImageType
- * @param dialogButtonLabels
- * @param defaultIndex
- */
- public J2EERenameDialog(Shell parentShell, String dialogTitle, String name) {
- super(parentShell, dialogTitle, null, RENAME_DIALOG_MESSAGE, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0);
- currentName = name;
- }
-
- public RenameOptions getRenameOptions() {
- return renameOptions;
- }
-
-
- public abstract void createRenameOptions();
-
- protected void buttonPressed(int buttonId) {
- if (buttonId == 0)
- createRenameOptions();
- super.buttonPressed(buttonId);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java
deleted file mode 100644
index baa574d2a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/J2EERenameUIConstants.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public interface J2EERenameUIConstants {
- String RENAME = J2EEUIMessages.getResourceString("Rename_1"); //$NON-NLS-1$
- String RENAME_PROJECTS = J2EEUIMessages.getResourceString("Rename_selected_project_2"); //$NON-NLS-1$
- String RENAME_MODULES = J2EEUIMessages.getResourceString("Rename_module_in_all_Enterprise_Applications_3"); //$NON-NLS-1$
- String RENAME_MODULES_OTHER = J2EEUIMessages.getResourceString("Rename_module_in_all_other_Enterprise_Applications_4"); //$NON-NLS-1$
- String RENAME_MODULE_DEPENDENCIES = J2EEUIMessages.getResourceString("Rename_module_dependencies_referencing_selected_project_5"); //$NON-NLS-1$
- String RENAME_MODULE_OPTIONS = J2EEUIMessages.getResourceString("Rename_Module_Options_6"); //$NON-NLS-1$
- String RENAME_EAR_OPTIONS = J2EEUIMessages.getResourceString("Rename_Enterprise_Application_Options_7"); //$NON-NLS-1$
- String RENAME_NOT_COMPLETED = J2EEUIMessages.getResourceString("Rename_could_not_be_completed_8"); //$NON-NLS-1$
- String RENAME_ERROR = J2EEUIMessages.getResourceString("Rename_error_9"); //$NON-NLS-1$
- String RENAME_DIALOG_MESSAGE = J2EEUIMessages.getResourceString("What_would_you_like_to_rename_this_to__10"); //$NON-NLS-1$
- String RENAME_CONTEXT_ROOT = J2EEUIMessages.getResourceString("Context_Root__11"); //$NON-NLS-1$
- String RENAME_EAR_PROJECTS = J2EEUIMessages.getResourceString("Rename_selected_Enterprise_Application_project_only_12"); //$NON-NLS-1$
- String RENAME_REFERENCED_PROJECTS = J2EEUIMessages.getResourceString("Also_rename_module_and_utility_Java_projects_13"); //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java
deleted file mode 100644
index 8808b1db2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/ListMessageDialog.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.List;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * Insert the type's description here. Creation date: (9/7/2001 11:28:24 AM)
- *
- * @author: Administrator
- */
-public class ListMessageDialog extends org.eclipse.jface.dialogs.MessageDialog {
- protected String[] listItems;
- protected List list;
-
- /**
- * EJBSelectiveImportDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public ListMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- }
-
- /**
- * ListMessageDialog constructor comment.
- *
- * @param parentShell
- * org.eclipse.swt.widgets.Shell
- * @param dialogTitle
- * java.lang.String
- * @param dialogTitleImage
- * org.eclipse.swt.graphics.Image
- * @param dialogMessage
- * java.lang.String
- * @param dialogImageType
- * int
- * @param dialogButtonLabels
- * java.lang.String[]
- * @param defaultIndex
- * int
- */
- public ListMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, String dialogMessage, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex, String[] names) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- listItems = names;
- }
-
- /**
- * Creates and returns the contents of an area of the dialog which appears below the message and
- * above the button bar.
- * <p>
- * The default implementation of this framework method returns <code>null</code>. Subclasses
- * may override.
- * </p>
- *
- * @param the
- * parent composite to contain the custom area
- * @return the custom area control, or <code>null</code>
- */
- protected Control createCustomArea(Composite parent) {
-
- Composite composite = new Composite(parent, 0);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (listItems != null) {
- list = new List(composite, SWT.BORDER);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- list.setLayoutData(data);
- list.setItems(listItems);
- }
-
- return composite;
-
- }
-
- /**
- * Convenience method to open a simple confirm (OK/Cancel) dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openConfirm(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, QUESTION, new String[]{IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 0, items); // OK
- // is
- // the
- // default
- return dialog.open() == 0;
- }
-
- /**
- * Convenience method to open a standard error dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openError(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, ERROR, new String[]{IDialogConstants.OK_LABEL}, 0, items); // ok is the
- // default
- dialog.open();
- return;
- }
-
- /**
- * Convenience method to open a standard information dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openInformation(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, INFORMATION, new String[]{IDialogConstants.OK_LABEL}, 0, items);
- // ok is the default
- dialog.open();
- return;
- }
-
- /**
- * Convenience method to open a simple Yes/No question dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- * @return <code>true</code> if the user presses the OK button, <code>false</code> otherwise
- */
- public static boolean openQuestion(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, QUESTION, new String[]{IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL}, 0, items); // yes
- // is
- // the
- // default
- return dialog.open() == 0;
- }
-
- /**
- * Convenience method to open a standard warning dialog.
- *
- * @param parent
- * the parent shell of the dialog, or <code>null</code> if none
- * @param title
- * the dialog's title, or <code>null</code> if none
- * @param message
- * the message
- */
- public static void openWarning(Shell parent, String title, String message, String[] items) {
- ListMessageDialog dialog = new ListMessageDialog(parent, title, null, // accept the default
- // window icon
- message, WARNING, new String[]{IDialogConstants.OK_LABEL}, 0, items); // ok is
- // the
- // default
- dialog.open();
- return;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java
deleted file mode 100644
index c74e3b81d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARComposite.java
+++ /dev/null
@@ -1,265 +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.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-
-public class RenameEARComposite extends Composite implements J2EERenameUIConstants, Listener, ICheckStateListener {
-
- protected Button renameAppProjectsBtn;
- protected Button renameRefProjectsBtn;
- protected Composite radioComposite;
- protected Button detailsBtn;
- protected RenameModuleReferencesComposite moduleRefsComposite;
- protected CheckboxTableViewer projectsList;
- protected boolean listCreated = false;
- protected Map referencedProjects;
- protected WorkbenchLabelProvider workbenchLabelProvider = new WorkbenchLabelProvider();
-
- /**
- * Constructor for RenameEARComposite.
- *
- * @param parent
- * @param style
- */
- public RenameEARComposite(Composite parent, int style, Set referencedProjects) {
- super(parent, style);
- initReferencedProjects(referencedProjects);
- addChildren();
- }
-
- /**
- * Answer the referenced projects which the user has chosen to also rename
- */
- public java.util.List getSelectedReferencedProjects() {
- if (renameAppProjectsBtn.getSelection())
- return Collections.EMPTY_LIST;
- java.util.List result = new ArrayList();
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry element = (Map.Entry) iter.next();
- boolean isSelected = ((Boolean) element.getValue()).booleanValue();
- if (isSelected)
- result.add(element.getKey());
- }
- return result;
- }
-
- /**
- * @see J2EERenameDialog#createRenameOptions()
- */
- public RenameOptions createRenameOptions() {
- RenameOptions opts = new RenameOptions();
- opts.setIsEARRename(true);
- opts.setRenameProjects(true);
- opts.setRenameModuleDependencies(moduleRefsComposite.shouldRenameModuleDependencies());
- opts.setRenameModules(moduleRefsComposite.shouldRenameModules());
- opts.setSelectedReferencedProjects(getSelectedReferencedProjects());
- return opts;
- }
-
-
-
- protected void initReferencedProjects(Set projects) {
- referencedProjects = new HashMap();
- for (Iterator iter = projects.iterator(); iter.hasNext();) {
- IProject project = (IProject) iter.next();
- referencedProjects.put(project, Boolean.TRUE);
- }
- }
-
- protected void addChildren() {
- setLayout();
- addRadioComposite();
- moduleRefsComposite = new RenameModuleReferencesComposite(this, SWT.NONE, true);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
- data.horizontalIndent = 10;
- moduleRefsComposite.setLayoutData(data);
- }
-
- protected void setLayout() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
- }
-
- protected void addRadioComposite() {
- radioComposite = new Composite(this, SWT.NONE);
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- radioComposite.setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- radioComposite.setLayoutData(data);
- renameAppProjectsBtn = new Button(radioComposite, SWT.RADIO);
- renameAppProjectsBtn.setText(RENAME_EAR_PROJECTS);
- renameAppProjectsBtn.addListener(SWT.Selection, this);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- renameAppProjectsBtn.setLayoutData(data);
-
- renameRefProjectsBtn = new Button(radioComposite, SWT.RADIO);
- renameRefProjectsBtn.setText(RENAME_REFERENCED_PROJECTS);
- renameRefProjectsBtn.addListener(SWT.Selection, this);
- renameRefProjectsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- detailsBtn = new Button(radioComposite, SWT.PUSH);
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- detailsBtn.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
- detailsBtn.addListener(SWT.Selection, this);
- detailsBtn.setEnabled(false);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == renameAppProjectsBtn)
- renameAppProjectsBtnSelected();
- else if (event.widget == renameRefProjectsBtn)
- renameRefProjectsBtnSelected();
- else if (event.widget == detailsBtn)
- detailsBtnSelected();
- }
-
- protected void renameAppProjectsBtnSelected() {
- if (renameAppProjectsBtn.getSelection()) {
- if (listCreated)
- toggleDetailsArea();
- detailsBtn.setEnabled(false);
- moduleRefsComposite.setButtonsEnabled(false);
- }
- }
-
- protected void renameRefProjectsBtnSelected() {
- if (renameRefProjectsBtn.getSelection()) {
- detailsBtn.setEnabled(true);
- moduleRefsComposite.setButtonsEnabled(true);
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- protected void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- if (listCreated) {
- projectsList.getControl().dispose();
- listCreated = false;
- detailsBtn.setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownList();
- detailsBtn.setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
-
- Point newSize = getParent().computeSize(SWT.DEFAULT, SWT.DEFAULT);
-
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- protected void createDropDownList() {
- // create the list
- projectsList = CheckboxTableViewer.newCheckList(radioComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- projectsList.setLabelProvider(createLabelProvider());
- projectsList.setSorter(new ViewerSorter() {/*viewersorter*/});
- projectsList.addCheckStateListener(this);
- // fill the list
- populateList();
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = projectsList.getTable().getItemHeight() * referencedProjects.size();
- data.horizontalSpan = 2;
- data.horizontalIndent = 10;
- projectsList.getTable().setLayoutData(data);
-
- listCreated = true;
- }
-
- protected void populateList() {
- for (Iterator iter = referencedProjects.entrySet().iterator(); iter.hasNext();) {
- Map.Entry entry = (Map.Entry) iter.next();
- projectsList.add(entry.getKey());
- boolean checked = ((Boolean) entry.getValue()).booleanValue();
- projectsList.setChecked(entry.getKey(), checked);
- }
- }
-
- protected void detailsBtnSelected() {
- toggleDetailsArea();
- }
-
- /**
- * @see ICheckStateListener#checkStateChanged(CheckStateChangedEvent)
- */
- public void checkStateChanged(CheckStateChangedEvent event) {
- referencedProjects.put(event.getElement(), new Boolean(event.getChecked()));
- }
-
- protected ITableLabelProvider createLabelProvider() {
- return new ITableLabelProvider() {
- public void dispose() {
- //dispose
- }
-
- public Image getColumnImage(Object element, int columnIndex) {
- return workbenchLabelProvider.getImage(element);
- }
-
- /**
- * @see ITableLabelProvider#getColumnText(Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- return workbenchLabelProvider.getText(element);
- }
-
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
- };
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java
deleted file mode 100644
index 770e058c6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameEARDialog.java
+++ /dev/null
@@ -1,60 +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.dialogs;
-
-
-import java.util.Set;
-
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-public class RenameEARDialog extends J2EERenameDialog {
- protected RenameEARComposite renameComposite;
- protected Set referencedProjects;
-
- /**
- * Constructor for RenameEARDialog.
- *
- * @param parentShell
- * @param dialogTitle
- */
- public RenameEARDialog(Shell parentShell, Set referencedProjects, String name) {
- super(parentShell, RENAME_EAR_OPTIONS, name);
- this.referencedProjects = referencedProjects;
- }
-
-
- /**
- * @see org.eclipse.jface.dialogs.MessageDialog#createCustomArea(Composite)
- */
- protected Control createCustomArea(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.RENAME_EAR_DIALOG_1); //$NON-NLS-1$
- renameComposite = new RenameEARComposite(parent, SWT.NONE, referencedProjects);
- // renameComposite.setNewName(currentName);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- renameComposite.setLayoutData(data);
- return renameComposite;
- }
-
- /**
- * @see J2EERenameDialog#createRenameOptions()
- */
- public void createRenameOptions() {
- renameOptions = renameComposite.createRenameOptions();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java
deleted file mode 100644
index 0923fced8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleComposite.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-
-
-public class RenameModuleComposite extends Composite implements J2EERenameUIConstants, Listener {
-
- // protected Button renameProjectsCheckBox;
- protected RenameModuleReferencesComposite moduleRefsComposite;
- protected Text newNameText = null;
- protected Text newContextRootText = null;
- protected Label newContextRootLabel = null;
- protected String oldName = null;
- protected Button OKButton = null;
- protected Label statusMessageLabel = null;
-
- /**
- * Constructor for RenameModuleComposite.
- *
- * @param parent
- * @param style
- */
- public RenameModuleComposite(Composite parent, int style) {
- super(parent, style);
- addChildren();
- }
-
- protected void addChildren() {
- addRenameProjectsGroup();
- addSeparator();
- addRenameModuleRefsComposite();
- //Add in a label for status messages if required
- statusMessageLabel = new Label(this, SWT.NONE);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- statusMessageLabel.setLayoutData(data);
- statusMessageLabel.setFont(this.getFont());
- }
-
- protected void addRenameProjectsGroup() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 2;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- setLayoutData(data);
-
- newNameText = new Text(this, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- newNameText.setLayoutData(data);
-
- newContextRootLabel = new Label(this, SWT.NONE);
- newContextRootLabel.setText(RENAME_CONTEXT_ROOT);
- data = new GridData(GridData.FILL_HORIZONTAL);
- newContextRootLabel.setLayoutData(data);
-
- newContextRootText = new Text(this, SWT.BORDER);
- data = new GridData(GridData.FILL_HORIZONTAL);
- newContextRootText.setLayoutData(data);
-
- /*
- * renameProjectsCheckBox = new Button(this, SWT.CHECK);
- * renameProjectsCheckBox.setText(RENAME_PROJECTS);
- * renameProjectsCheckBox.setSelection(true);
- * renameProjectsCheckBox.addListener(SWT.Selection, this); data = new
- * GridData(GridData.FILL_HORIZONTAL); data.horizontalSpan = 2;
- * renameProjectsCheckBox.setLayoutData(data);
- */
- }
-
- protected void addRenameModuleRefsComposite() {
- moduleRefsComposite = new RenameModuleReferencesComposite(this, SWT.NONE, false);
- }
-
- protected void addSeparator() {
- Label sep = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- sep.setLayoutData(data);
- }
-
- public boolean shouldRenameProjects() {
- // return renameProjectsCheckBox.getSelection();
- // always rename the project
- return true;
- }
-
- public boolean shouldRenameModuleDependencies() {
- return moduleRefsComposite.shouldRenameModuleDependencies();
- }
-
- public boolean shouldRenameModules() {
- return moduleRefsComposite.shouldRenameModules();
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == newNameText && OKButton != null) {
- String newName = newNameText.getText();
- if (newName.trim().length() == 0) {
- statusMessageLabel.setText("");//$NON-NLS-1$
- OKButton.setEnabled(false);
- return;
- }
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IProject newProject = root.getProject(newName);
- if (newProject.exists()) {
- statusMessageLabel.setForeground(JFaceColors.getErrorText(statusMessageLabel.getDisplay()));
- String[] names = {newName};
- statusMessageLabel.setText(MessageFormat.format(J2EEUIMessages.getResourceString("Project_already_exists."), names)); //$NON-NLS-1$
- OKButton.setEnabled(false);
- } else {
- statusMessageLabel.setText("");//$NON-NLS-1$
- OKButton.setEnabled(true);
- }
- }
- }
-
- public String getNewName()
-
- {
- return newNameText.getText();
- }
-
- public void setNewName(String newName) {
- oldName = newName;
- newNameText.setText(newName);
- newNameText.selectAll();
- newNameText.addListener(SWT.Modify, this);
- }
-
- public String getNewContextRoot() {
- return newContextRootText.getText();
- }
-
- public void setNewContextRoot(String newContextRoot) {
- if (newContextRoot != null && newContextRoot.length() > 1) {
- newContextRootText.setText(newContextRoot);
- } else {
- newContextRootLabel.setVisible(false);
- newContextRootText.setVisible(false);
- }
- }
-
- /**
- * Sets the OKButton.
- *
- * @param OKButton
- * The OKButton to set
- */
- public void setOKButton(Button oKButton) {
- OKButton = oKButton;
- OKButton.setEnabled(false);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.java
deleted file mode 100644
index a5ea814b8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleDialog.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 org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.rename.RenameOptions;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-
-
-public class RenameModuleDialog extends J2EERenameDialog implements J2EERenameUIConstants {
-
- protected RenameModuleComposite renameComposite;
- protected String contextRoot = null;
-
- public RenameModuleDialog(Shell parentShell, String name, String oldContextRoot) {
- super(parentShell, RENAME_MODULE_OPTIONS, name);
- contextRoot = oldContextRoot;
- }
-
- protected Control createCustomArea(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.RENAME_MODULE_DIALOG_1); //$NON-NLS-1$
- renameComposite = new RenameModuleComposite(parent, SWT.NONE);
- renameComposite.setNewName(currentName);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalIndent = 10;
- renameComposite.setLayoutData(data);
- renameComposite.setNewContextRoot(contextRoot);
- return renameComposite;
- }
-
- public void createRenameOptions() {
- renameOptions = new RenameOptions();
- renameOptions.setRenameProjects(renameComposite.shouldRenameProjects());
- renameOptions.setRenameModules(renameComposite.shouldRenameModules());
- renameOptions.setRenameModuleDependencies(renameComposite.shouldRenameModuleDependencies());
- renameOptions.setNewName(renameComposite.getNewName());
- renameOptions.setNewContextRoot(renameComposite.getNewContextRoot());
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void createButtonsForButtonBar(Composite parent) {
- Button OKButton = null;
- super.createButtonsForButtonBar(parent);
- OKButton = getButton(0);
- renameComposite.setOKButton(OKButton);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java
deleted file mode 100644
index 7614aabb0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RenameModuleReferencesComposite.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.dialogs;
-
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class RenameModuleReferencesComposite extends Composite implements J2EERenameUIConstants, Listener {
-
- protected Button renameModulesCheckbox;
- protected Button renameModuleDependenciesCheckbox;
- protected boolean isEARRename;
-
- /**
- * Constructor for RenameModuleReferencesComposite.
- *
- * @param parent
- * @param style
- */
- public RenameModuleReferencesComposite(Composite parent, int style, boolean isEARRename) {
- super(parent, style);
- this.isEARRename = isEARRename;
- addChildren();
- }
-
- protected void addChildren() {
- GridLayout lay = new GridLayout();
- lay.numColumns = 1;
- setLayout(lay);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- setLayoutData(data);
-
- addRenameModulesCheckbox();
- addRenameModuleDependenciesCheckbox();
- }
-
- protected void addRenameModuleDependenciesCheckbox() {
- renameModuleDependenciesCheckbox = new Button(this, SWT.CHECK);
- renameModuleDependenciesCheckbox.setSelection(true);
- renameModuleDependenciesCheckbox.setText(RENAME_MODULE_DEPENDENCIES);
-
- }
-
- protected void addRenameModulesCheckbox() {
- renameModulesCheckbox = new Button(this, SWT.CHECK);
- renameModulesCheckbox.setSelection(true);
- String label = isEARRename ? RENAME_MODULES_OTHER : RENAME_MODULES;
- renameModulesCheckbox.setText(label);
- renameModulesCheckbox.addListener(SWT.Selection, this);
- }
-
- public boolean shouldRenameModuleDependencies() {
- return renameModuleDependenciesCheckbox.getSelection();
- }
-
- public boolean shouldRenameModules() {
- return renameModulesCheckbox.getSelection();
- }
-
- public void setButtonsEnabled(boolean enabled) {
- renameModuleDependenciesCheckbox.setSelection(enabled);
- renameModulesCheckbox.setSelection(enabled);
- renameModuleDependenciesCheckbox.setEnabled(enabled);
- renameModulesCheckbox.setEnabled(enabled);
- }
-
- /**
- * @see Listener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
- if (event.widget == renameModulesCheckbox && renameModulesCheckbox.getSelection() && !renameModuleDependenciesCheckbox.getSelection())
- renameModuleDependenciesCheckbox.setSelection(true);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java
deleted file mode 100644
index a49b9220a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/RuntimeSelectionDialog.java
+++ /dev/null
@@ -1,128 +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.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;
-
-
-/**
- * @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 String []{project.getName()});
- }
-
- 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("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";
- }
- });
-
- }
-
- 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) {
- e.printStackTrace();
- }
- 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 62d6907f2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TwoArrayQuickSorter.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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 original_left = left;
- int original_right = right;
-
- Object mid = keys[(left + right) / 2];
- do {
- while (fComparator.compare(keys[left], mid) < 0)
- left++;
-
- while (fComparator.compare(mid, keys[right]) < 0)
- right--;
-
- if (left <= right) {
- swap(keys, left, right);
- swap(values, left, right);
- left++;
- right--;
- }
- } while (left <= right);
-
- if (original_left < right)
- internalSort(keys, values, original_left, right);
-
- if (left < original_right)
- internalSort(keys, values, left, original_right);
- }
-
- /*
- * Swaps x[a] with x[b].
- */
- private static final void swap(Object x[], int a, int b) {
- Object t = x[a];
- x[a] = x[b];
- x[b] = t;
- }
-
-}
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 7b4253487..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/dialogs/TypedFileViewerFilter.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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;
- }
- 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/ear/actions/ArchiveEARUIResourceHandler.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
deleted file mode 100644
index 1682ee1a2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ArchiveEARUIResourceHandler.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.ear.actions;
-
-
-
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class ArchiveEARUIResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("archiveearui");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String, String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
deleted file mode 100644
index 31c247184..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/EARImportListContentProvider.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ear.actions;
-
-
-import org.eclipse.jst.j2ee.internal.wizard.TableObjects;
-
-/**
- * Insert the type's description here. Creation date: (5/7/2001 11:39:11 AM)
- *
- * @author: Administrator
- */
-public class EARImportListContentProvider implements org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * EARImportListContentProvider constructor comment.
- */
- public EARImportListContentProvider() {
- super();
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- //dispose
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(Object inputElement) {
- if (inputElement instanceof TableObjects)
- return ((TableObjects) inputElement).getTableObjects().toArray();
- return new Object[0]; //should throw exception instead
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
deleted file mode 100644
index a7078ae50..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ExportEARAction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ear.actions;
-
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EARComponentExportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ExportEARAction extends BaseAction {
-
- public static String LABEL = J2EEUIPlugin.getDefault().getDescriptor().getResourceString("%ear.export.action.description_ui_");//$NON-NLS-1$
- private static final String ICON = "export_ear_wiz"; //$NON-NLS-1$
-
- public ExportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- public void primRun(Shell shell) {
- EARComponentExportWizard wizard = new EARComponentExportWizard();
- 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/ear/actions/ImportEARAction.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
deleted file mode 100644
index 305c3ec95..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ImportEARAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ear.actions;
-
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.actions.BaseAction;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.jst.j2ee.internal.wizard.EARComponentImportWizard;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class ImportEARAction extends BaseAction {
- public static String LABEL = ArchiveEARUIResourceHandler.getString("Import_EAR"); //$NON-NLS-1$
- private static final String ICON = "import_ear_wiz"; //$NON-NLS-1$
-
- public ImportEARAction() {
- super();
- setText(LABEL);
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(ICON));
- }
-
- protected void primRun(Shell shell) {
-
- EARComponentImportWizard wizard = new EARComponentImportWizard();
-
- 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/ear/actions/ModulesProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
deleted file mode 100644
index 4914e7f12..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ear/actions/ModulesProvider.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.ear.actions;
-
-
-import org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection;
-
-/**
- * Insert the type's description here. Creation date: (8/22/2001 2:27:24 PM)
- *
- * @author: Administrator
- */
-public class ModulesProvider implements org.eclipse.jface.viewers.ILabelProvider, org.eclipse.jface.viewers.IStructuredContentProvider {
- /**
- * ModulesProvider constructor comment.
- */
- public ModulesProvider() {
- super();
- }
-
- /**
- * Adds a listener to this label provider. Has no effect if an identical listener is already
- * registered.
- * <p>
- * Label provider listeners are informed about state changes that affect the rendering of the
- * viewer that uses this label provider.
- * </p>
- *
- * @param listener
- * a label provider listener
- */
- public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-
- /**
- * Disposes of this content provider. This is called by the viewer when it is disposed.
- */
- public void dispose() {
- //dispose
- }
-
- /**
- * Returns the elements to display in the viewer when its input is set to the given element.
- * These elements can be presented as rows in a table, items in a list, etc. The result is not
- * modified by the viewer.
- *
- * @param inputElement
- * the input element
- * @return the array of elements to display in the viewer
- */
- public java.lang.Object[] getElements(java.lang.Object inputElement) {
- return ((java.util.List) inputElement).toArray();
- }
-
- /**
- * Returns the image for the label of the given element. The image is owned by the label
- * provider and must not be disposed directly. Instead, dispose the label provider when no
- * longer needed.
- *
- * @param element
- * the element for which to provide the label image
- * @return the image used to label the element, or <code>null</code> if these is no image for
- * the given object
- */
- public org.eclipse.swt.graphics.Image getImage(Object element) {
- return null;
- }
-
- /**
- * Returns the text for the label of the given element.
- *
- * @param element
- * the element for which to provide the label text
- * @return the text string used to label the element, or <code>null</code> if these is no text
- * label for the given object
- */
- public String getText(Object element) {
- return ((ClassPathSelection) element).getText();
- }
-
- /**
- * Notifies this content provider that the given viewer's input has been switched to a different
- * element.
- * <p>
- * A typical use for this method is registering the content provider as a listener to changes on
- * the new input (using model-specific means), and deregistering the viewer from the old input.
- * In response to these change notifications, the content provider propagates the changes to the
- * viewer.
- * </p>
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input element, or <code>null</code> if the viewer did not previously
- * have an input
- * @param newInput
- * the new input element, or <code>null</code> if the viewer does not have an input
- */
- public void inputChanged(org.eclipse.jface.viewers.Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /**
- * Returns whether the label would be affected by a change to the given property of the given
- * element. This can be used to optimize a non-structural viewer update. If the property
- * mentioned in the update does not affect the label, then the viewer need not update the label.
- *
- * @param element
- * the element
- * @param property
- * the property
- * @return <code>true</code> if the label would be affected, and <code>false</code> if it
- * would be unaffected
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /**
- * Removes a listener to this label provider. Has no affect if an identical listener is not
- * registered.
- *
- * @param listener
- * a label provider listener
- */
- public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) {
- //do nothing
- }
-}
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 1eccf4525..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/AbstractMethodsContentProvider.java
+++ /dev/null
@@ -1,316 +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)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return getMethodElements((AbstractMethodsContentProvider.EJBMethodItem) parentElement);
- return new Object[0];
- }
-
- protected Object[] getMethodElements(AbstractMethodsContentProvider.EJBMethodItem ejbItem) {
- EObject refObject = ejbItem.refObject;
- if (refObject == null)
- return new Object[0];
- List elements = getMethodElements(refObject, ejbItem.ejb);
- Object[] result = elements.toArray();
- if (result.length == 1)
- return result;
- Arrays.sort(result, getMethodElementComparator());
- return result;
- }
-
- protected abstract List getMethodElements(EObject aRefObject, EnterpriseBean anEJB);
-
- protected Object[] getEnterpriseBeans(EObject parentElement, List someMethodElements) {
- if (someMethodElements.isEmpty())
- return new Object[0];
- Set ejbs = new HashSet();
- EnterpriseBean ejb = null;
- MethodElement me = null;
- for (int i = 0; i < someMethodElements.size(); i++) {
- me = (MethodElement) someMethodElements.get(i);
- ejb = me.getEnterpriseBean();
- if (ejb != null)
- ejbs.add(ejb);
- }
- Object[] result = ejbs.toArray();
- if (result.length != 1)
- Arrays.sort(result, getEnterpriseBeanComparator());
- ejb = null;
- for (int i = 0; i < result.length; i++) {
- ejb = (EnterpriseBean) result[i];
- result[i] = new EJBMethodItem(parentElement, ejb);
- }
- return result;
- }
-
- protected AssemblyDescriptor getAssemblyDescriptor(EnterpriseBean ejb) {
- if (ejb == null)
- return null;
- return ejb.getEjbJar().getAssemblyDescriptor();
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof AbstractMethodsContentProvider.EJBMethodItem)
- return true;
- return false;
- }
-
- protected TreeViewer getTreeViewer() {
- return (TreeViewer) viewer;
- }
-
- protected void refreshTreeViewer(Object obj) {
- if (viewer != null)
- DisplayUtility.asyncExec(createRefreshTreeRunnable(obj));
- }
-
- protected void refreshTreeViewer() {
- if (viewer != null)
- DisplayUtility.asyncExec(createRefreshTreeRunnable(null));
- }
-
- protected void refreshTreeViewer(MethodElement me) {
- refreshTreeViewer(me.eContainer());
- }
-
- protected void refreshTreeViewer(List aList) {
- if (aList.isEmpty())
- return;
- refreshTreeViewer((MethodElement) aList.get(0));
- }
-
- protected void addToTreeViewer(final MethodElement me) {
- if (viewer == null)
- return;
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- // findMethodItem() should be run in a Display thread
- EJBMethodItem item = findMethodItem(me);
- if (item != null)
- DisplayUtility.asyncExec(createAddItemTreeRunnable(item, me));
- else
- refreshTreeViewer(me.eContainer());
-
- }
- });
- }
-
- protected void removeFromTreeViewer(final EObject parent, final MethodElement me) {
- if (viewer == null)
- return;
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- EnterpriseBean ejb = me.getEnterpriseBean();
- EJBMethodItem item = findMethodItem(ejb, parent);
- if (item != null)
- refreshTreeViewer(item);
- else
- refreshTreeViewer((Object) null);
- }
- });
- }
-
- protected EJBMethodItem findMethodItem(MethodElement me) {
- return findMethodItem(me.getEnterpriseBean(), me.eContainer());
- }
-
- protected EJBMethodItem findMethodItem(EnterpriseBean ejb, EObject parentMethod) {
- TreeItem[] items = getTreeViewer().getTree().getItems();
- return findMethodItem(ejb, parentMethod, items);
- }
-
- protected EJBMethodItem findMethodItem(EnterpriseBean ejb, EObject parentMethod, TreeItem[] items) {
- TreeItem item = null;
- Object data = null;
- EJBMethodItem methodItem = null, found = null;
- for (int i = 0; i < items.length; i++) {
- item = items[i];
- data = item.getData();
- if (data instanceof EJBMethodItem) {
- methodItem = (EJBMethodItem) data;
- if (methodItem.ejb == ejb && methodItem.refObject == parentMethod)
- return methodItem;
- }
- found = findMethodItem(ejb, parentMethod, item.getItems());
- if (found != null)
- return found;
- }
- return null;
- }
-
- /*
- * @see INotifyChangedListener#notifyChanged(new ENotificationImpl((InternalEObject)Object,
- * int,(EStructuralFeature) Object, Object, Object, int))
- */
- public void notifyChanged(Notification notifier) {
- if (notifier.getEventType() == Notification.RESOLVE)
- return;
- else if (notifier.getOldValue() instanceof CMPAttribute && notifier.getNewValue() == null)
- return;
- else if (notifier.getFeature() == ME_EJB_SF) {
- refreshTreeViewer((MethodElement) notifier.getNotifier());
- return;
- } else if (notifier.getFeature() == ECORE_BEAN_NAME) {
- refreshTreeViewer();
- return;
- } else if (getMethodElementsReference() == notifier.getFeature()) {
- if (notifier.getEventType() == Notification.ADD)
- addToTreeViewer((MethodElement) notifier.getNewValue());
- else if (notifier.getEventType() == Notification.REMOVE)
- removeFromTreeViewer((EObject) notifier.getNotifier(), (MethodElement) notifier.getOldValue());
- return;
- } else if (notifier.getFeature() == JAR_ASSEMBLY_SF && isRoot) {
- updateTreeInput(notifier.getNewValue());
- } else if (notifier.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notifier);
- }
-
- /**
- * @param notifier
- */
- protected void updateTreeInput(final Object target) {
- DisplayUtility.asyncExec(new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
-
- getTreeViewer().setInput(target); //reset the input
- getTreeViewer().refresh(target);
-
- }
- });
- }
-
- private Runnable createAddItemTreeRunnable(final Object parent, final MethodElement me) {
- return new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- getTreeViewer().add(parent, me);
- }
- };
- }
-
- private Runnable createRefreshTreeRunnable(final Object target) {
- return new Runnable() {
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Runnable#run()
- */
- public void run() {
- if (target != null)
- getTreeViewer().refresh(target);
- else
- getTreeViewer().refresh();
- }
- };
- }
-
- protected abstract EStructuralFeature getMethodElementsReference();
-
- protected abstract EStructuralFeature getMethodElementsContainerReference();
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java
deleted file mode 100644
index 38a42ebce..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/BeanClassProviderHelper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:29:49 AM)
- *
- * @author: Administrator
- */
-public class BeanClassProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * BeanClassProviderHelper constructor comment.
- */
- public BeanClassProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:09 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getEjbClass();
- }
-
- protected String getOverlayKey() {
- return "ejb_module_ovr";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("EJB_Class_UI_", new Object[]{className}); //$NON-NLS-1$ = "EJB Class"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/EJBUIMessages.java
deleted file mode 100644
index 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 12c91ca8d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ExcludeListContentProvider.java
+++ /dev/null
@@ -1,140 +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)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof ExcludeList))
- return Collections.EMPTY_LIST;
- ExcludeList parentList = (ExcludeList) aRefObject;
- if (parentList == null)
- return Collections.EMPTY_LIST;
- return parentList.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- ExcludeList list = null;
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- list = jar.getAssemblyDescriptor().getExcludeList();
- if (list != null)
- return getEnterpriseBeans(list);
- }
- if (inputElement instanceof AssemblyDescriptor) {
- list = ((AssemblyDescriptor) inputElement).getExcludeList();
- if (list != null)
- return getEnterpriseBeans(list);
- }
- return new Object[0];
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof ExcludeList)
- return getEnterpriseBeans((ExcludeList) parentElement);
- return super.getChildren(parentElement);
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof ExcludeList)
- return !((ExcludeList) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- public void notifyChanged(Notification notifier) {
- if ((notifier.getFeature() == EXCLUDE_ME_SF && notifier.getNotifier() instanceof ExcludeList) || notifier.getFeature() == ECORE_BEAN_NAME) {
- if (notifier.getEventType() == Notification.RESOLVE)
- return;
- if (isRoot)
- refreshTreeViewer();
- else
- refreshTreeViewer(notifier.getNotifier());
- }
- if (notifier.getOldValue() instanceof CMPAttribute && notifier.getNewValue() == null)
- return;
- if (notifier.getFeature() == getMethodElementsReference() || notifier.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notifier);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return EXCLUDE_ME_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_EL_SF;
- }
-
-}
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 6645c6f34..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBItemProvider.java
+++ /dev/null
@@ -1,46 +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);
- }
-
- 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;
- }
-
- 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 5efe5cb94..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEJBJarItemProvider.java
+++ /dev/null
@@ -1,376 +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;
- }
-
- 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);
- }
-
- public Object getImage(String type) {
- if (type.equals(SESSION))
- return J2EEPlugin.getPlugin().getImage("sessionBean_obj"); //$NON-NLS-1$
- else if (type.equals(MESSAGE))
- return J2EEPlugin.getPlugin().getImage("message_bean_obj"); //$NON-NLS-1$
- else if (type.equals(ENTITY))
- return J2EEPlugin.getPlugin().getImage("entitybean_obj"); //$NON-NLS-1$
- else
- return null;
- }
-
- private boolean is20Jar(EJBJar ejbJar) {
- switch (ejbJar.getVersionID()) {
- case J2EEVersionConstants.EJB_1_0_ID :
- case J2EEVersionConstants.EJB_1_1_ID :
- return false;
- case J2EEVersionConstants.EJB_2_0_ID :
- case J2EEVersionConstants.EJB_2_1_ID :
- default :
- return true;
- }
- }
-
- public void notifyChanged(Notification notification) {
- if (notification.getEventType() == Notification.REMOVING_ADAPTER && notification.getOldValue() == this && !isDisposing) {
- removeTarget(notification);
- return;
- }
- if (notification.getFeature() == EjbPackage.eINSTANCE.getEJBJar_EnterpriseBeans()) {
- J2EEItemProvider provider = beansChanged((EJBJar) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
-
- //EJB's group has not been added yet, need to add group to tree before EJB can be added
- if (provider == null) {
- Notification msg = new NotificationImpl(Notification.ADD, null, getEJBItemProvider((EnterpriseBean) notification.getNewValue()), 1);
- NotificationWrapper notificationWrapper = new NotificationWrapper(notification.getNotifier(), msg);
- fireNotifyChanged(notificationWrapper);
- provider = beansChanged((EJBJar) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
- }
-
- //Fire notification for EJB add or remove
- NotificationWrapper notificationWrapper = new NotificationWrapper(provider, notification);
- fireNotifyChanged(notificationWrapper);
-
- //ENABLE FOR: NOT TO SHOW EMPTY GROUPS
- //If Group is empty remove the group
- /*
- * if (provider != null && provider.getChildren().size() == 0) { Notification msg = new
- * NotificationImpl(Notification.REMOVE, provider, null, 1); notificationWrapper = new
- * NotificationWrapper(notification.getNotifier(), msg);
- * fireNotifyChanged(notificationWrapper);
- *
- * //Group is removed so flush out table entry if (provider instanceof
- * GroupedSessionItemProvider) { sessionTable.remove(notification.getNotifier());
- * provider = null; } else if (provider instanceof GroupedEntityItemProvider) {
- * entityTable.remove(notification.getNotifier()); provider = null; } else if (provider
- * instanceof GroupedMessageItemProvider) {
- * messageTable.remove(notification.getNotifier()); provider = null; }
- *
- * //If all groups are removed remove the extended children List allChildren = new
- * ArrayList(this.getChildren((EJBJar) notification.getNotifier()));
- * if(sessionTable.get(notification.getNotifier()) == null &&
- * entityTable.get(notification.getNotifier()) == null &&
- * messageTable.get(notification.getNotifier()) == null) { for(int i = 0; i <
- * allChildren.size(); i++) { Notification message = new
- * NotificationImpl(Notification.REMOVE, allChildren.get(i), null, 1);
- * notificationWrapper = new NotificationWrapper(notification.getNotifier(), message);
- * fireNotifyChanged(notificationWrapper); } this.getChildren((EJBJar)
- * notification.getNotifier()).clear(); } }
- */
- } else {
- super.notifyChanged(notification);
- }
- }
-
- protected J2EEItemProvider beansChanged(EJBJar ejbJar, int eventType, Object oldValue, Object newValue, int pos) {
- J2EEItemProvider provider = getItemProvider(ejbJar, oldValue, newValue);
-
- if (provider != null) {
- Collection grandChildren = provider.getChildren();
-
- switch (eventType) {
- case Notification.ADD : {
- if (!grandChildren.contains(newValue))
- grandChildren.add(newValue);
-
- break;
- }
- case Notification.ADD_MANY : {
- grandChildren.addAll((Collection) newValue);
- break;
- }
- case Notification.REMOVE : {
- grandChildren.remove(oldValue);
- break;
- }
- case Notification.REMOVE_MANY : {
- grandChildren.removeAll((Collection) oldValue);
- break;
- }
- }
- } else {
- //GroupedProvider for new bean does not exist, create one.
- List allRootBeans = getAllRootBeans(ejbJar);
-
- List entityBeans = new ArrayList();
- List sessionBeans = new ArrayList();
- List messageBeans = new ArrayList();
-
- catagorizeBeans(allRootBeans, entityBeans, sessionBeans, messageBeans);
-
- if (newValue instanceof Session) {
- sessionProvider = new GroupedSessionItemProvider(adapterFactory, null, getImage(SESSION), ejbJar, sessionBeans);
- sessionTable.put(ejbJar, sessionProvider);
- } else if (newValue instanceof Entity) {
- entityProvider = new GroupedEntityItemProvider(adapterFactory, null, getImage(ENTITY), ejbJar, entityBeans);
- entityTable.put(ejbJar, entityProvider);
- } else if (newValue instanceof MessageDriven) {
- messageProvider = new GroupedMessageItemProvider(adapterFactory, null, getImage(MESSAGE), ejbJar, messageBeans);
- messageTable.put(ejbJar, messageProvider);
- }
- }
- return provider;
- }
-
- static public J2EEItemProvider getEJBJarItemProvider(EJBJar ejbJar, Object bean) {
- J2EEItemProvider provider = null;
- if (ejbJar != null && bean != null) {
- if (bean instanceof Session) {
- provider = getSessionNode(ejbJar);
- } else if (bean instanceof Entity) {
- provider = getEntityNode(ejbJar);
- } else if (bean instanceof MessageDriven) {
- provider = getMessageNode(ejbJar);
- }
- }
- return provider;
- }
-
- static public J2EEItemProvider getEJBItemProvider(EnterpriseBean bean) {
- if (bean != null) {
- EJBJar ejbJar = bean.getEjbJar();
- return getEJBJarItemProvider(ejbJar, bean);
- }
- return null;
- }
-
- protected J2EEItemProvider getItemProvider(EJBJar ejbJar, Object oldValue, Object newValue) {
- if (newValue != null)
- return getEJBJarItemProvider(ejbJar, newValue);
- else if (oldValue != null)
- return getEJBJarItemProvider(ejbJar, oldValue);
- else
- return null;
- }
-
- public static boolean isRootBean(EnterpriseBean bean) {
- List allRootBeans = getAllRootBeans(bean.getEjbJar());
- if (allRootBeans != null && allRootBeans.contains(bean)) {
- return true;
- }
- return false;
- }
-
- // Utility method for garbage collection - if EJBJar removed, remove
- // all entires in table for EJBJar
- static public void flushOutTableEntriesForEJBJar(EJBJar ejbJar) {
- sessionTable.remove(ejbJar);
- entityTable.remove(ejbJar);
- messageTable.remove(ejbJar);
- }
-
- public boolean hasChildren(Object parent) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.provider.EJBJarItemProvider#removeTarget(org.eclipse.emf.common.notify.Notification)
- */
- protected void removeTarget(Notification not) {
- if (not.getNotifier() instanceof EJBJar)
- flushOutTableEntriesForEJBJar((EJBJar) not.getNotifier());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#dispose()
- */
- public void dispose() {
- try {
- isDisposing = true;
- super.dispose();
- } finally {
- isDisposing = false;
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java
deleted file mode 100644
index 0dbb40b2d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedEntityItemProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedEntityItemProvider extends GroupedEJBItemProvider {
-
- public static final String ENTITY = J2EEUIMessages.getResourceString("Entity_UI_"); //$NON-NLS-1$
-
- public GroupedEntityItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return ENTITY;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java
deleted file mode 100644
index 6c977b2d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedMessageItemProvider.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedMessageItemProvider extends GroupedEJBItemProvider {
-
- public static final String MESSAGE_BEANS = J2EEUIMessages.getResourceString("Message_Driven_Beans_UI_"); //$NON-NLS-1$
-
- public GroupedMessageItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return MESSAGE_BEANS;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java
deleted file mode 100644
index 15c28172c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/GroupedSessionItemProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-
-/**
- * @author Sachin Patel
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class GroupedSessionItemProvider extends GroupedEJBItemProvider {
-
- public static final String SESSION_BEANS = J2EEUIMessages.getResourceString("Session_Beans_UI_"); //$NON-NLS-1$
-
- public GroupedSessionItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- public String getText(Object object) {
- return SESSION_BEANS;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java
deleted file mode 100644
index 6c37abe75..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/HomeInterfaceProviderHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:23:30 PM)
- *
- * @author: Administrator
- */
-public class HomeInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * HomeInterfaceProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public HomeInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:49 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getHomeInterface();
- }
-
- protected String getOverlayKey() {
- return "home_interface_overlay_obj";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Home_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Home Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java
deleted file mode 100644
index ec5f13c6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEContainerManagedEntityItemProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.ContainerManagedEntity;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 6:58:51 PM)
- *
- * @author: Administrator
- */
-public class J2EEContainerManagedEntityItemProvider extends ContainerManagedEntityItemProvider {
- /**
- * J2EEContainerManagedEntityItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEContainerManagedEntityItemProvider(EjbItemProviderAdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildren(object));
- J2EEJavaClassProviderHelper.addChildren((ContainerManagedEntity) object, result);
- result.addAll(((ContainerManagedEntity) object).getEnvironmentProperties());
- result.addAll(J2EEReferenceProviderHelper.getReferences((EnterpriseBean) object));
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java
deleted file mode 100644
index f888d86cc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEjbItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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}.
- */
- public Adapter createContainerManagedEntityAdapter() {
- if (containerManagedEntityItemProvider == null) {
- containerManagedEntityItemProvider = new J2EEContainerManagedEntityItemProvider(this);
- }
-
- return containerManagedEntityItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.EJBJar}.
- */
- public Adapter createEJBJarAdapter() {
- if (eJBJarItemProvider == null) {
- eJBJarItemProvider = new GroupedEJBJarItemProvider(this, true);
- }
-
- return eJBJarItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.Entity}.
- */
- public Adapter createEntityAdapter() {
- if (entityItemProvider == null) {
- entityItemProvider = new J2EEEntityItemProvider(this);
- }
-
- return entityItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.ejb.Session}.
- */
- public Adapter createSessionAdapter() {
- if (sessionItemProvider == null) {
- sessionItemProvider = new J2EESessionItemProvider(this);
- }
-
- return sessionItemProvider;
- }
-
- public Adapter createMessageDrivenAdapter() {
- if (messageDrivenItemProvider == null) {
- messageDrivenItemProvider = new J2EEMessageDrivenItemProvider(this);
- }
- return messageDrivenItemProvider;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java
deleted file mode 100644
index 037d4d67e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEEntityItemProvider.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.Entity;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:10:06 PM)
- *
- * @author: Administrator
- */
-public class J2EEEntityItemProvider extends EntityItemProvider {
- /**
- * J2EEEntityItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEEntityItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- J2EEJavaClassProviderHelper.addChildren((Entity) object, result);
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEJavaClassProviderHelper.java
deleted file mode 100644
index 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 a01558641..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEMessageDrivenItemProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.MessageDriven;
-
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class J2EEMessageDrivenItemProvider extends MessageDrivenItemProvider {
-
- public J2EEMessageDrivenItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- J2EEJavaClassProviderHelper.addChildren((MessageDriven) object, result);
- return result;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java
deleted file mode 100644
index b8b894876..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EEReferenceProviderHelper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 6, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-
-
-/**
- * @author jsholl
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class J2EEReferenceProviderHelper {
-
- public static Collection getReferences(EnterpriseBean bean) {
- List result = new ArrayList();
- if (!bean.getEjbRefs().isEmpty())
- result.addAll(bean.getEjbRefs());
- if (!bean.getEjbLocalRefs().isEmpty())
- result.addAll(bean.getEjbLocalRefs());
- if (!bean.getResourceRefs().isEmpty())
- result.addAll(bean.getResourceRefs());
- if (!bean.getSecurityRoleRefs().isEmpty())
- result.addAll(bean.getSecurityRoleRefs());
- if (!bean.getResourceEnvRefs().isEmpty())
- result.addAll(bean.getResourceEnvRefs());
- return result;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java
deleted file mode 100644
index d64d2751b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/J2EESessionItemProvider.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-
-
-/**
- * Insert the type's description here. Creation date: (6/20/2001 11:10:48 PM)
- *
- * @author: Administrator
- */
-public class J2EESessionItemProvider extends org.eclipse.jst.j2ee.internal.ejb.provider.SessionItemProvider {
- /**
- * J2EESessionItemProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EESessionItemProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- result.addAll(super.getChildrenSuper(object));
- addServiceEndpointInterface((Session) object, result);
- J2EEJavaClassProviderHelper.addChildren((Session) object, result);
- return result;
- }
-
- /**
- * @param session
- * @param result
- */
- private void addServiceEndpointInterface(Session session, Collection children) {
- if (session.getVersionID() >= J2EEVersionConstants.EJB_2_1_ID && session.getServiceEndpoint() != null)
- children.add(new ServiceEndpointInterfaceProviderHelper(session));
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java
deleted file mode 100644
index cfea51ac7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalHomeInterfaceProviderHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-public class LocalHomeInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
-
- private static Image image;
-
- /**
- * Constructor for LocalHomeInterfaceProviderHelper.
- *
- * @param anEJB
- */
- public LocalHomeInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getJavaClass()
- */
- public JavaClass getJavaClass() {
- return getEjb().getLocalHomeInterface();
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- protected String getOverlayKey() {
- return "local_home_interface_overlay_obj"; //$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Local_Home_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Local Home Interface";
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java
deleted file mode 100644
index 9a9af2dcb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/LocalInterfaceProviderHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-public class LocalInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
-
- private static Image image;
-
- /**
- * Constructor for LocalInterfaceProviderHelper.
- *
- * @param anEJB
- */
- public LocalInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getJavaClass()
- */
- public JavaClass getJavaClass() {
- return getEjb().getLocalInterface();
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getOverlayKey()
- */
- protected String getOverlayKey() {
- return "local_interface_overlay_obj";//$NON-NLS-1$
- }
-
- /**
- * @see J2EEJavaClassProviderHelper#getTypeString(String)
- */
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Local_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Local Interface"
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java
deleted file mode 100644
index e2109e970..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodPermissionsContentProvider.java
+++ /dev/null
@@ -1,129 +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)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof MethodPermission)
- return getEnterpriseBeans((MethodPermission) parentElement);
- return super.getChildren(parentElement);
- }
-
- protected Object[] getEnterpriseBeans(MethodPermission mp) {
- List mes = mp.getMethodElements();
- return getEnterpriseBeans(mp, mes);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElements(EObject, EnterpriseBean)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof MethodPermission))
- return Collections.EMPTY_LIST;
- MethodPermission parentMP = (MethodPermission) aRefObject;
- if (parentMP == null)
- return Collections.EMPTY_LIST;
- return parentMP.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- return jar.getAssemblyDescriptor().getMethodPermissions().toArray();
- }
- if (inputElement instanceof AssemblyDescriptor)
- return ((AssemblyDescriptor) inputElement).getMethodPermissions().toArray();
- return new Object[0];
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof MethodPermission)
- return !((MethodPermission) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return PERMISSION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MP_SF;
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.INotifyChangedListener#notifyChanged(Notification)
- */
- public void notifyChanged(Notification notification) {
- if (notification.getFeature() == PERMISSION_MES_SF || notification.getFeature() == AD_MP_SF)
- refreshTreeViewer();
- else if (notification.getOldValue() instanceof CMPAttribute && notification.getNewValue() == null)
- return;
- if (notification.getFeature() == PERMISSION_MES_UNCHECKED_SF || notification.getFeature() == PERMISSION_MES_ROLES_SF || notification.getFeature() == getMethodElementsReference() || notification.getFeature() == getMethodElementsContainerReference())
- super.notifyChanged(notification);
- }
-}
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 fe0e1b797..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/MethodTransactionContentProvider.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
- *******************************************************************************/
-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)
- */
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof MethodTransaction)
- return getEnterpriseBeans((MethodTransaction) parentElement);
- return super.getChildren(parentElement);
- }
-
- protected Object[] getEnterpriseBeans(MethodTransaction mt) {
- List mes = mt.getMethodElements();
- return getEnterpriseBeans(mt, mes);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElements(EObject, EnterpriseBean)
- */
- protected List getMethodElements(EObject aRefObject, EnterpriseBean anEJB) {
- if (!(aRefObject instanceof MethodTransaction))
- return Collections.EMPTY_LIST;
- MethodTransaction parentMT = (MethodTransaction) aRefObject;
- if (parentMT == null)
- return Collections.EMPTY_LIST;
- return parentMT.getMethodElements(anEJB);
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- super.getElements(inputElement);
- if (inputElement instanceof EJBJar) {
- EJBJar jar = (EJBJar) inputElement;
- if (jar.getAssemblyDescriptor() != null)
- return jar.getAssemblyDescriptor().getMethodTransactions().toArray();
- }
- if (inputElement instanceof AssemblyDescriptor)
- return ((AssemblyDescriptor) inputElement).getMethodTransactions().toArray();
- return new Object[0];
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (element instanceof MethodTransaction)
- return !((MethodTransaction) element).getMethodElements().isEmpty();
- return super.hasChildren(element);
- }
-
- /*
- * @see AbstractMethodsContentProvider#getMethodElementsReference()
- */
- protected EStructuralFeature getMethodElementsReference() {
- return TRANSACTION_MES_SF;
- }
-
- /**
- * @see org.eclipse.jst.j2ee.internal.internal.ejb.ui.providers.AbstractMethodsContentProvider#getMethodElementsContainerReference()
- */
- protected EStructuralFeature getMethodElementsContainerReference() {
- return AD_MT_SF;
- }
-
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java
deleted file mode 100644
index a2893b519..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/PrimaryKeyClassProviderHelper.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Entity;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:28:55 AM)
- *
- * @author: Administrator
- */
-public class PrimaryKeyClassProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * PrimaryKeyClassProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public PrimaryKeyClassProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:54:22 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return ((Entity) getEjb()).getPrimaryKey();
- }
-
- protected String getOverlayKey() {
- return "key_interf_ov";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Primary_Key_Class_UI_", new Object[]{className}); //$NON-NLS-1$ = "Primary Key Class"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java
deleted file mode 100644
index 3fcb79009..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/RemoteInterfaceProviderHelper.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * Insert the type's description here. Creation date: (6/21/2001 12:28:12 AM)
- *
- * @author: Administrator
- */
-public class RemoteInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * RemoteInterfaceProviderHelper constructor comment.
- *
- * @param cls
- * org.eclipse.jem.internal.java.JavaClass
- */
- public RemoteInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:55:48 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return getEjb().getRemoteInterface();
- }
-
- protected String getOverlayKey() {
- return "remote_interface_overlay_obj";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Remote_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Remote Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java
deleted file mode 100644
index 5ad2b0c2e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ejb/provider/ServiceEndpointInterfaceProviderHelper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 19, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.ejb.provider;
-
-import org.eclipse.jem.java.JavaClass;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.ejb.Session;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.swt.graphics.Image;
-
-
-/**
- * @author dfholttp
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class ServiceEndpointInterfaceProviderHelper extends J2EEJavaClassProviderHelper {
- private static Image image;
-
- /**
- * @param anEJB
- */
- public ServiceEndpointInterfaceProviderHelper(EnterpriseBean anEJB) {
- super(anEJB);
- }
-
- public Image getImage() {
- if (image == null)
- image = createImage();
- return image;
- }
-
- /**
- * Insert the method's description here. Creation date: (7/11/2001 1:53:49 PM)
- *
- * @return org.eclipse.jem.internal.java.JavaClass
- */
- public JavaClass getJavaClass() {
- return ((Session) getEjb()).getServiceEndpoint();
- }
-
- protected String getOverlayKey() {
- //TODO: DFH we need an icon
- return "";//$NON-NLS-1$
- }
-
- public String getTypeString(String className) {
- return J2EEUIMessages.getResourceString("Service_Endpoint_Interface_UI_", new Object[]{className}); //$NON-NLS-1$ = "Home Interface"
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/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 d8c8a9636..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/listeners/ValidateEditListener.java
+++ /dev/null
@@ -1,330 +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.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) {
- e.printStackTrace();
- }
- }
- /**
- * 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)
- */
- 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 34fee6673..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/perspective/J2EEPerspective.java
+++ /dev/null
@@ -1,130 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.perspective;
-
-import org.eclipse.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;
-
-/**
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class J2EEPerspective implements org.eclipse.ui.IPerspectiveFactory {
-
- protected static String ID_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
- protected static String ID_J2EE_HIERARCHY_VIEW = "org.eclipse.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 J2EEPerspective() {
- super();
- //If preference exists for alternate view, replace.
- String viewerID = J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.ID_PERSPECTIVE_HIERARCHY_VIEW);
- if (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_PROBLEM_VIEW);
- layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
- layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
- layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
- layout.addShowViewShortcut(ID_WST_SNIPPETS_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(IPageLayout.ID_PROBLEM_VIEW);
- bottomRight.addView(IPageLayout.ID_TASK_LIST);
- bottomRight.addView(IPageLayout.ID_PROP_SHEET);
- bottomRight.addView(ID_SERVERS_VIEW);
- addDBViewIfPresent(layout,bottomRight);
- bottomRight.addView(ID_WST_SNIPPETS_VIEW);
-
- 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);
- }
- private void addDBViewIfPresent(IPageLayout page,IFolderLayout bottomRight) {
- // TODO Auto-generated method stub
- IViewDescriptor dbView = PlatformUI.getWorkbench().getViewRegistry().find(ID_DATA_VIEW);
- if (dbView != null)
- bottomRight.addView(ID_DATA_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 143a99a46..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/BinaryEditorUtilities.java
+++ /dev/null
@@ -1,240 +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.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;
-
-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);
- }
- 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()
- */
- 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;
- }
-
- /*
- */
- 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#getFullPath()
- */
- public String getFullPath() {
- return fJarEntryFile.getFullPath().toString();
- }
-
- /*
- * @see IEditorInput#getContentType()
- */
- public String getContentType() {
- return fJarEntryFile.getFullPath().getFileExtension();
- }
-
- /*
- * @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;
- }
- }
-
- public static IEditorInput getBinaryEditorInput(
- VirtualArchiveComponent component, String archiveRelativePath) {
-
- IEditorInput input = null;
- IPath archivePath = component.getWorkspaceRelativePath();
-
- //[Bug 238616] if there is no workspace relative path then the archive is outside
- // the workspace so get the OS path directly from the file
- if(archivePath != null) {
- input = getBinaryEditorInput(archivePath, archiveRelativePath);
- } else {
- String archiveOSPath = component.getUnderlyingDiskFile().getPath();
- input = getBinaryEditorInput(archiveOSPath, archiveRelativePath);
- }
-
- return input;
- }
-
- 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 6bad64ff4..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java
+++ /dev/null
@@ -1,120 +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;
-import org.eclipse.ui.internal.EditorManager;
-
-
-
-/**
- * @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() {
- return promptToSaveDirtyEditors(Arrays.asList(getDirtyEditors()));
- }
-
- public static boolean promptToSaveDirtyEditors(List dirtyEditors) {
- if (dirtyEditors.isEmpty())
- return true;
- return EditorManager.saveAll(dirtyEditors, true, true,false, J2EEUIPlugin.getActiveWorkbenchWindow());
- }
-
- /**
- * 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 60f11eef6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/ErrorDialog.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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 message;
- //Workaround. SWT does not seem to set the default button if
- //there is not control with focus. Bug: 14668
- private int defaultButtonIndex = 0;
- /**
- * Size of the text in lines.
- */
- private static final int TEXT_LINE_COUNT = 15;
-
- public ErrorDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, Throwable detail, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) {
- super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
- defaultButtonIndex = defaultIndex;
- this.detail = detail;
- message = dialogMessage;
- setShellStyle(getShellStyle() | SWT.APPLICATION_MODAL | SWT.RESIZE);
- }
-
- //Workaround. SWT does not seem to set rigth the default button if
- //there is not control with focus. Bug: 14668
- public int open() {
- create();
- Button b = getButton(defaultButtonIndex);
- b.setFocus();
- b.getShell().setDefaultButton(b);
- return super.open();
- }
-
- /**
- * Set the detail button;
- */
- public void setDetailButton(int index) {
- detailButtonID = index;
- }
-
- /*
- * (non-Javadoc) Method declared on Dialog.
- */
- protected void buttonPressed(int buttonId) {
- if (buttonId == detailButtonID) {
- toggleDetailsArea();
- } else {
- setReturnCode(buttonId);
- close();
- }
- }
-
- /**
- * Toggles the unfolding of the details area. This is triggered by the user pressing the details
- * button.
- */
- private void toggleDetailsArea() {
- Point windowSize = getShell().getSize();
- Point oldSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- if (text != null) {
- text.dispose();
- text = null;
- getButton(detailButtonID).setText(IDialogConstants.SHOW_DETAILS_LABEL);
- } else {
- createDropDownText((Composite) getContents());
- getButton(detailButtonID).setText(IDialogConstants.HIDE_DETAILS_LABEL);
- }
- Point newSize = getContents().computeSize(SWT.DEFAULT, SWT.DEFAULT);
- getShell().setSize(new Point(windowSize.x, windowSize.y + (newSize.y - oldSize.y)));
- }
-
- /**
- * Create this dialog's drop-down list component.
- *
- * @param parent
- * the parent composite
- * @return the drop-down list component
- */
- protected void createDropDownText(Composite parent) {
- // create the list
- text = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- // print the stacktrace in the text field
- try {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(baos);
- detail.printStackTrace(ps);
- if ((detail instanceof SWTError) && (((SWTError) detail).throwable != null)) {
- ps.println("\n*** Stack trace of contained exception ***"); //$NON-NLS-1$
- ((SWTError) detail).throwable.printStackTrace(ps);
- } else if ((detail instanceof SWTException) && (((SWTException) detail).throwable != null)) {
- ps.println("\n*** Stack trace of contained exception ***"); //$NON-NLS-1$
- ((SWTException) detail).throwable.printStackTrace(ps);
- }
- ps.flush();
- baos.flush();
- text.setText(baos.toString());
- } catch (IOException e) {
- //Ignore
- }
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL | GridData.GRAB_VERTICAL);
- data.heightHint = text.getLineHeight() * TEXT_LINE_COUNT;
- text.setLayoutData(data);
- }
-
- public static boolean openError(Shell parent, String title, String message, Throwable detail, int defaultIndex, boolean showCancel) {
- String[] labels;
- if (detail == null)
- labels = showCancel ? LABELS_OK_CANCEL : LABELS_OK;
- else
- labels = showCancel ? LABELS_OK_CANCEL_DETAILS : LABELS_OK_DETAILS;
- ErrorDialog dialog = new ErrorDialog(parent, title, null, // accept
- // the
- // default
- // window
- // icon
- message, detail, ERROR, labels, defaultIndex);
- if (detail != null)
- dialog.setDetailButton(labels.length - 1);
- return dialog.open() == 0;
- }
-
- protected Control createDialogArea(Composite parent) {
- // create a composite with standard margins and spacing
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- composite.setFont(parent.getFont());
- ((GridLayout) composite.getLayout()).numColumns = 2;
- // create image
- Image image = composite.getDisplay().getSystemImage(SWT.ICON_ERROR);
- if (image != null) {
- Label label = new Label(composite, 0);
- image.setBackground(label.getBackground());
- label.setImage(image);
- label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_BEGINNING));
- }
- // create message
- if (message != null) {
- Label label = new Label(composite, SWT.WRAP);
- label.setText(message);
- GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_CENTER);
- data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);
- label.setLayoutData(data);
- label.setFont(parent.getFont());
- }
- return composite;
- }
-}
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 844f4de72..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectActionFilter.java
+++ /dev/null
@@ -1,108 +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;
- }
- else
- {
- final IProjectFacetVersion fv = fproj.getInstalledVersion( f );
-
- try
- {
- if( f.getVersions( vexprstr ).contains( fv ) )
- {
- return true;
- }
- }
- catch( CoreException e )
- {
- //EJBUIPlugin.getDefault().log
- }
- }
-
- return false;
- }
- else
- {
- 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 4ee36d0aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/FacetedProjectAdapterFactory.java
+++ /dev/null
@@ -1,40 +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();
- }
- else
- {
- 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 28b07a8ef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIMessages.java
+++ /dev/null
@@ -1,243 +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 APPCLIENT_COMPONENT_WIZ_TITLE = "AppClientComponentCreationWizard.title"; //$NON-NLS-1$
- public static final String APPCLIENT_COMPONENT_MAIN_PG_TITLE = "AppClientComponentCreationWizard.mainPage.title"; //$NON-NLS-1$
- public static final String APPCLIENT_COMPONENT_MAIN_PG_DESC = "AppClientComponentCreationWizard.mainPage.desc"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_WIZ_TITLE = "DefaultJ2EEComponentCreationWizard.title"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_TITLE = "DefaultJ2EEComponentCreationWizard.page.title"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_DESC = "DefaultJ2EEComponentCreationWizard.page.desc"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_EJB_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.ejb"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_WEB_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.web"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_JCA_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.jca"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_APPCLIENT_MODULE_LBL = "DefaultJ2EEComponentCreationWizard.page.label.appclient"; //$NON-NLS-1$
- public static final String DEFAULT_COMPONENT_PAGE_NEW_MOD_SEL_PG_DEF_BTN = "DefaultJ2EEComponentCreationWizard.page.button.select"; //$NON-NLS-1$
-
- public final static String EMPTY_STRING = ""; //$NON-NLS-1$
- public final static String FOLDER_LABEL = getResourceString("FOLDER_LABEL"); //$NON-NLS-1$
- public final static String BROWSE_BUTTON_LABEL = getResourceString("BROWSE_BUTTON_LABEL"); //$NON-NLS-1$
- public final static String JAVA_PACKAGE_LABEL = getResourceString("JAVA_PACKAGE_LABEL"); //$NON-NLS-1$
- public final static String CLASS_NAME_LABEL = getResourceString("CLASS_NAME_LABEL"); //$NON-NLS-1$
- public final static String SUPERCLASS_LABEL = getResourceString("SUPERCLASS_LABEL"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_TITLE = getResourceString("CONTAINER_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_DESC = getResourceString("CONTAINER_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG = getResourceString("CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_TITLE = getResourceString("PACKAGE_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_DESC = getResourceString("PACKAGE_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String PACKAGE_SELECTION_DIALOG_MSG_NONE = getResourceString("PACKAGE_SELECTION_DIALOG_MSG_NONE"); //$NON-NLS-1$
- public final static String SUPERCLASS_SELECTION_DIALOG_TITLE = getResourceString("SUPERCLASS_SELECTION_DIALOG_TITLE"); //$NON-NLS-1$
- public final static String SUPERCLASS_SELECTION_DIALOG_DESC = getResourceString("SUPERCLASS_SELECTION_DIALOG_DESC"); //$NON-NLS-1$
- public final static String JAVA_CLASS_MODIFIERS_LABEL = getResourceString("JAVA_CLASS_MODIFIERS_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_INTERFACES_LABEL = getResourceString("JAVA_CLASS_INTERFACES_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_METHOD_STUBS_LABEL = getResourceString("JAVA_CLASS_METHOD_STUBS_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_PUBLIC_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_PUBLIC_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_FINAL_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_FINAL_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_MAIN_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_MAIN_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String JAVA_CLASS_INHERIT_CHECKBOX_LABEL = getResourceString("JAVA_CLASS_INHERIT_CHECKBOX_LABEL"); //$NON-NLS-1$
- public final static String ADD_BUTTON_LABEL = getResourceString("ADD_BUTTON_LABEL"); //$NON-NLS-1$
- public static final String REMOVE_BUTTON = getResourceString("REMOVE_BUTTON"); //$NON-NLS-1$
- public 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$
-
- /**
- * Returns the string from the resource bundle, or 'key' if not found.
- */
- public static String getResourceString(String key) {
- return INSTANCE.doGetResourceString(key);
- }
-
- public static String getResourceString(String key, Object[] args) {
- return INSTANCE.doGetResourceString(key, args);
- }
-
- private J2EEUIMessages() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.Messages#initializeBundle()
- */
- protected void initializeBundle() {
- try {
- resourceBundle = ResourceBundle.getBundle("j2ee_ui"); //$NON-NLS-1$
- } catch (MissingResourceException x) {
- //Ignore
- }
- }
-
-}
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 153124942..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEUIPlugin.java
+++ /dev/null
@@ -1,343 +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 java.util.HashSet;
-
-import org.eclipse.core.internal.boot.PlatformURLConnection;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-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.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.internal.wizard.ImportUtil;
-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;
-
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class J2EEUIPlugin extends AbstractUIPlugin {
-
- public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.ui"; //$NON-NLS-1$
-
- //The shared instance.
- private static J2EEUIPlugin plugin;
- private static IPath location;
-
- /**
- * The constructor.
- */
- public J2EEUIPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- */
- public static J2EEUIPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the workspace instance.
- */
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- public static IPath getInstallLocation() {
- if (location == null) {
- URL url = getInstallURL();
- try {
- String installLocation = ((PlatformURLConnection) url.openConnection()).getURLAsLocal().getFile();
- location = new Path(installLocation);
- } catch (IOException e) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logWarning(J2EEPluginResourceHandler.getString("Install_Location_Error_", new Object[]{url}) + e); //$NON-NLS-1$
- }
- }
- return location;
- }
-
- public static URL getInstallURL() {
- return getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- public static String getArchiveDefaultProjectName(Archive anArchive) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultProjectName(anArchive.getURI(), type);
- }
-
- public static String getArchiveDefaultUtilProjectName(Archive anArchive) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultUtilProjectName(anArchive.getName(), type);
- }
-
- public static String getArchiveDefaultProjectName(Archive anArchive, HashSet moduleNames) {
- if (anArchive == null)
- return null;
- int type = getArchiveType(anArchive);
- return getTypeDefaultProjectName(anArchive.getURI(), type, moduleNames);
- }
-
- public static int getArchiveType(Archive anArchive) {
- int type = ImportUtil.UNKNOWN;
- try {
- try {
- if (anArchive.isEJBJarFile())
- type = ImportUtil.EJBJARFILE;
- else if (anArchive.isWARFile())
- type = ImportUtil.WARFILE;
- else if (anArchive.isApplicationClientFile())
- type = ImportUtil.CLIENTJARFILE;
- else if (anArchive.isRARFile())
- type = ImportUtil.RARFILE;
- else if (anArchive.isEARFile())
- type = ImportUtil.EARFILE;
- } catch (Exception e) {
- //Ignore
- }
- } finally {
- if (anArchive != null)
- anArchive.close();
- }
- return type;
- }
-
- public static String getTypeDefaultProjectName(String text, int type) {
- IPath path = new Path(text);
- text = path.makeRelative().removeFileExtension().lastSegment();
-
- boolean exists = false;
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(text);
- if (project != null && project.exists())
- exists = true;
- if (exists && text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1)
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int j = 1; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 1) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (int i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- private static String getTypeDefaultProjectName(String text, int type, HashSet moduleNames) {
- IPath path = new Path(text);
- text = path.makeRelative().removeFileExtension().lastSegment();
-
- boolean isValidName = moduleNames.add(text);
- boolean exists = false;
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(text);
- if (project != null && project.exists())
- exists = true;
- if (!isValidName || (exists && text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1))
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int j = 1; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 1) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (int i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- // the following two methods are used by web editor
-
- private static String getTypeDefaultUtilProjectName(String text, int type) {
- text = text.substring(text.lastIndexOf(java.io.File.separator) + 1);
- int i = text.lastIndexOf('.');
- if (i > 0)
- text = text.substring(0, i);
- if (text.toLowerCase().indexOf(ImportUtil.SUFFIXES[type].toLowerCase()) == -1)
- text = text + ImportUtil.SUFFIXES[type];
- IProject[] projects = getWorkspace().getRoot().getProjects();
- for (int j = 0; j < 10; j++) {
- boolean found = false;
- String iteratedProjectName = text + ((j == 0) ? "" : Integer.toString(j)); //$NON-NLS-1$
- for (i = 0; !found && (i < projects.length); i++) {
- if ((projects[i]).getName().equalsIgnoreCase(iteratedProjectName)) {
- found = true;
- }
- }
- if (!found)
- return iteratedProjectName;
- }
- return text;
- }
-
- /**
- * Get a .gif from the image registry.
- */
- public Image getImage(String key) {
- ImageRegistry imageRegistry = getImageRegistry();
- Image image = imageRegistry.get(key);
- if (image == null || image.isDisposed()) {
- ImageDescriptor descriptor = getImageDescriptor(key);
- if (descriptor != null) {
- image = descriptor.createImage();
- imageRegistry.put(key, image);
- }
- }
- return image;
- }
-
- /**
- * This gets a .gif from the icons folder.
- */
- public ImageDescriptor getImageDescriptor(String key) {
- ImageDescriptor imageDescriptor = null;
- URL gifImageURL = getImageURL(key);
- if (gifImageURL != null)
- imageDescriptor = ImageDescriptor.createFromURL(gifImageURL);
- return imageDescriptor;
- }
-
- /**
- * @param key
- * @return
- */
- private URL getImageURL(String key) {
- return J2EEPlugin.getImageURL(key, getBundle());
- }
-
- public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return getPluginWorkbench().getActiveWorkbenchWindow();
- }
-
- /**
- * Return the workbench
- *
- * This method is internal to the j2ee plugin and must not be called by any other plugins.
- */
-
- public static IWorkbench getPluginWorkbench() {
- return getDefault().getWorkbench();
- }
-
- public static 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);
- }
-
-
-}
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 27dcf804b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/plugin/J2EEViewerSorter.java
+++ /dev/null
@@ -1,53 +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)
- */
- 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 f71fc3026..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryContentProvider.java
+++ /dev/null
@@ -1,131 +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.Viewer;
-import org.eclipse.jst.j2ee.ejb.EnterpriseBean;
-import org.eclipse.jst.j2ee.internal.ejb.provider.GroupedEJBJarItemProvider;
-
-
-public class J2EEAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
- protected MethodsProviderDelegate methodsProviderDelegate;
- protected static final Class ITreeItemContentProviderClass = ITreeItemContentProvider.class;
- protected List roots = new ArrayList();
-
- /**
- * J2EEAdapterFactoryContentProvider constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- */
- public J2EEAdapterFactoryContentProvider(org.eclipse.emf.common.notify.AdapterFactory adapterFactory) {
- super(adapterFactory);
- methodsProviderDelegate = new MethodsProviderDelegate(adapterFactory);
- }
-
- public Object getParent(Object object) {
-
- if (MethodsProviderDelegate.providesContentFor(object))
- return methodsProviderDelegate.getParent(object);
-
- //Added so internalExpand() in AbstractTreeViewer knows that EJB's parent is now instance
- // of J2EEItemProvider
- //rather than EJBJar only if bean is root bean
- if (object instanceof EnterpriseBean && GroupedEJBJarItemProvider.isRootBean((EnterpriseBean) object)) {
- J2EEItemProvider provider = GroupedEJBJarItemProvider.getEJBItemProvider((EnterpriseBean) object);
- if (provider != null) {
- return provider;
- }
- }
-
- Object parent = super.getParent(object);
-
- // if (parent == null) {
- // if (object instanceof EObject)
- // return J2EERoot.instance().groupFor((EObject) object);
- // }
- return parent;
- }
-
- protected boolean isEMFEditObject(Object object) {
- ITreeItemContentProvider treeItemContentProvider = (ITreeItemContentProvider) adapterFactory.adapt(object, ITreeItemContentProviderClass);
- return treeItemContentProvider != null;
- }
-
- /*
- * @see ITreeContentProvider#getChildren(Object)
- */
- public Object[] getChildren(Object parentElement) {
-
- if (MethodsProviderDelegate.providesContentFor(parentElement))
- return methodsProviderDelegate.getChildren(parentElement);
- else if (isEMFEditObject(parentElement))
- return super.getChildren(parentElement);
- else
- return null;
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object inputElement) {
- return getRoots(inputElement);
- // else if (MethodsProviderDelegate.providesContentFor(inputElement))
- // return methodsProviderDelegate.getChildren(inputElement);
- // return super.getElements(inputElement);
- }
-
- public Object[] getRoots(Object parent) {
- if (roots.isEmpty()) {
- Object[] j2eeGroups = super.getChildren(parent);
- roots.addAll(Arrays.asList(j2eeGroups));
- }
- return roots.toArray();
- }
-
- /*
- * @see ITreeContentProvider#hasChildren(Object)
- */
- public boolean hasChildren(Object element) {
- if (MethodsProviderDelegate.providesContentFor(element))
- return methodsProviderDelegate.hasChildren(element);
- else if (isEMFEditObject(element))
- return super.hasChildren(element);
- else
- return false;
- }
-
- /**
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- if (methodsProviderDelegate != null)
- methodsProviderDelegate.dispose();
- }
-
- /**
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
- super.inputChanged(aViewer, oldInput, newInput);
- methodsProviderDelegate.inputChanged(aViewer, oldInput, newInput);
- }
-
-}
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 026758bc3..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEAdapterFactoryLabelProvider.java
+++ /dev/null
@@ -1,101 +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();
- }
-
- 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);
- }
-
- 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))
- */
- 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 d37e20823..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProvider.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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)
- */
- 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
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Application.class)) {
- case ApplicationPackage.APPLICATION__MODULES :
- break;
- default :
- super.notifyChanged(notification);
- }
- if (notification.getEventType() == Notification.REMOVING_ADAPTER && notification.getOldValue() == this)
- children.remove(notification.getNotifier());
- else if (notification.getFeature() == ApplicationFactoryImpl.getPackage().getApplication_Modules())
- modulesChanged((Application) notification.getNotifier(), notification.getEventType(), notification.getOldValue(), notification.getNewValue(), notification.getPosition());
- }
-
- protected void modulesChanged(Application app, int eventType, Object oldValue, Object newValue, int pos) {
- ModulesItemProvider provider = getModulesNode(app);
- Collection grandChildren = provider.getChildren();
- switch (eventType) {
- case Notification.ADD : {
- grandChildren.add(newValue);
- break;
- }
- case Notification.ADD_MANY : {
- grandChildren.addAll((Collection) newValue);
- break;
- }
- case Notification.REMOVE : {
- grandChildren.remove(oldValue);
- break;
- }
- case Notification.REMOVE_MANY : {
- grandChildren.removeAll((Collection) oldValue);
- break;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#dispose()
- */
- public void dispose() {
- super.dispose();
- List adapters = getResourceAdapters();
- ResourceAdapter adapter = null;
- for (int i = 0; i < adapters.size(); i++) {
- adapter = (ResourceAdapter) adapters.get(i);
- adapter.getTarget().eAdapters().remove(adapter);
- }
- }
-
- protected class ResourceAdapter extends AdapterImpl {
-
- private Application app = null;
-
- public ResourceAdapter(Application app) {
- this.app = app;
- }
-
- public void notifyChanged(Notification notification) {
-
- Resource res = (Resource) notification.getNotifier();
- if (notification.getEventType() == Notification.SET && notification.getFeatureID(null) == Resource.RESOURCE__IS_LOADED && !res.isLoaded()) {
- J2EEApplicationItemProvider.this.children.remove(app);
- res.eAdapters().remove(ResourceAdapter.this);
- fireNotifyChanged(new J2EENotificationImpl(app, Notification.MOVE, (Object) null, (Object) null, 0));
-
- }
- }
- }
-
- protected ResourceAdapter getNewAdapter(Application key) {
- ResourceAdapter adapter = new ResourceAdapter(key);
- getResourceAdapters().add(adapter);
- return adapter;
- }
-
- /**
- * @return Returns the resourceAdapters.
- */
- protected List getResourceAdapters() {
- if (resourceAdapters == null)
- resourceAdapters = new ArrayList();
- return resourceAdapters;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- return null;
- }
-
-}
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 0434b30f5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEApplicationItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,34 +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()
- */
- 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 bf14b2df7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEBinaryModulesItemProvider.java
+++ /dev/null
@@ -1,34 +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);
- }
-
- public String getText(Object obj) {
- return J2EEUIMessages.BINARY;
- }
-
- 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 ab07bd12f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEEditingDomain.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.emf.edit.command.CreateCopyCommand;
-import org.eclipse.emf.edit.command.DragAndDropCommand;
-import org.eclipse.emf.edit.command.InitializeCopyCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.OverrideableCommand;
-import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.ReplaceCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-
-/**
- * Custom editing domain which provides hooks for creating override commands; should not be used
- * directly but can be subclassed to override commands as necessary. All the override methods by
- * default return null, so a subclass may override only a subset of the commands.
- */
-public class J2EEEditingDomain extends AdapterFactoryEditingDomain {
- /**
- * J2EEEditingDomain constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- * @param commandStack
- * CommandStack
- */
- public J2EEEditingDomain(org.eclipse.emf.common.notify.AdapterFactory adapterFactory, CommandStack commandStack) {
- super(adapterFactory, commandStack);
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createAddOverrideCommand(AddCommand addCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createCopyToClipboardOverrideCommand(CopyToClipboardCommand copyToClipboardCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createCreateCopyOverrideCommand(CreateCopyCommand createCopyCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createDragAndDropOverrideCommand(DragAndDropCommand dragAndDropCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createInitializeCopyOverrideCommand(InitializeCopyCommand initializeCopyCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createMoveOverrideCommand(MoveCommand moveCommand) {
- return null;
- }
-
- public Command createOverrideCommand(OverrideableCommand command) {
- if (command instanceof AddCommand) {
- AddCommand addCommand = (AddCommand) command;
- return createAddOverrideCommand(addCommand);
- } else if (command instanceof RemoveCommand) {
- RemoveCommand removeCommand = (RemoveCommand) command;
- return createRemoveOverrideCommand(removeCommand);
- } else if (command instanceof SetCommand) {
- SetCommand setCommand = (SetCommand) command;
- return createSetOverrideCommand(setCommand);
- } else if (command instanceof ReplaceCommand) {
- ReplaceCommand replaceCommand = (ReplaceCommand) command;
- return createReplaceOverrideCommand(replaceCommand);
- } else if (command instanceof MoveCommand) {
- MoveCommand moveCommand = (MoveCommand) command;
- return createMoveOverrideCommand(moveCommand);
- } else if (command instanceof CreateCopyCommand) {
- CreateCopyCommand createCopyCommand = (CreateCopyCommand) command;
- return createCreateCopyOverrideCommand(createCopyCommand);
- } else if (command instanceof InitializeCopyCommand) {
- InitializeCopyCommand initializeCopyCommand = (InitializeCopyCommand) command;
- return createInitializeCopyOverrideCommand(initializeCopyCommand);
- } else if (command instanceof CopyToClipboardCommand) {
- CopyToClipboardCommand copyToClipboardCommand = (CopyToClipboardCommand) command;
- return createCopyToClipboardOverrideCommand(copyToClipboardCommand);
- } else if (command instanceof PasteFromClipboardCommand) {
- PasteFromClipboardCommand pasteFromClipboardCommand = (PasteFromClipboardCommand) command;
- return createPasteFromClipboardOverrideCommand(pasteFromClipboardCommand);
- } else if (command instanceof DragAndDropCommand) {
- DragAndDropCommand dragAndDropCommand = (DragAndDropCommand) command;
- return createDragAndDropOverrideCommand(dragAndDropCommand);
- } else {
- return null;
- }
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createRemoveOverrideCommand(RemoveCommand removeCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createReplaceOverrideCommand(ReplaceCommand replaceCommand) {
- return null;
- }
-
- /**
- * The default is not to override this command; subclasses can override if necessary
- */
- protected Command createSetOverrideCommand(SetCommand setCommand) {
- return null;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java
deleted file mode 100644
index 4d620b019..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEModulemapItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,32 +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;
-
-public class J2EEModulemapItemProviderAdapterFactory extends ModulemapItemProviderAdapterFactory {
-
- /**
- * Constructor for J2EEModulemapItemProviderAdapterFactory.
- */
- public J2EEModulemapItemProviderAdapterFactory() {
- super();
- }
-
- /**
- * @see ModulemapAdapterFactory#createEARProjectMapAdapter()
- */
- public Adapter createEARProjectMapAdapter() {
- return new J2EEUtilityJavaProjectsItemProvider(this, false);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java
deleted file mode 100644
index 3839ba39c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEProviderUtility.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-public class J2EEProviderUtility {
-
- private J2EEProviderUtility() {
- super();
- }
-
- public static String prependProjectName(EObject object, String label) {
- String projectName = null;
- if (object.eResource() != null) {
- IProject proj = WorkbenchResourceHelper.getProject(object.eResource());
- if (proj != null)
- projectName = proj.getName();
- }
-
- if (projectName == null || projectName.equals(label))
- return label;
- else if (label == null || label.length() == 0)
- return projectName;
- else
- return projectName + ": " + label; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java
deleted file mode 100644
index 4ce6309ac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUIEditingDomain.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.CopyToClipboardCommand;
-import org.eclipse.emf.edit.command.PasteFromClipboardCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EEClipboard;
-import org.eclipse.jst.j2ee.internal.command.J2EECopyToClipboardOverrideCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EEPasteFromClipboardOverrideCommand;
-import org.eclipse.jst.j2ee.internal.command.J2EERemoveOverrideCommand;
-
-
-public class J2EEUIEditingDomain extends J2EEEditingDomain {
- /**
- * J2EEUIEditingDomain constructor comment.
- *
- * @param adapterFactory
- * org.eclipse.emf.common.notify.AdapterFactory
- * @param commandStack
- * CommandStack
- */
- public J2EEUIEditingDomain(org.eclipse.emf.common.notify.AdapterFactory adapterFactory, CommandStack commandStack) {
- super(adapterFactory, commandStack);
- turnTraceOnIfDebugging();
- }
-
- protected Command createCopyToClipboardOverrideCommand(CopyToClipboardCommand copyToClipboardCommand) {
-
- if (copyToClipboardCommand instanceof J2EECopyToClipboardOverrideCommand)
- return null;
- return new J2EECopyToClipboardOverrideCommand(copyToClipboardCommand);
- }
-
- protected Command createPasteFromClipboardOverrideCommand(PasteFromClipboardCommand pasteFromClipboardCommand) {
- if (pasteFromClipboardCommand instanceof J2EEPasteFromClipboardOverrideCommand)
- return null;
- if (!(getClipboard() instanceof J2EEClipboard))
- return null;
- return new J2EEPasteFromClipboardOverrideCommand(pasteFromClipboardCommand);
- }
-
- protected Command createRemoveOverrideCommand(RemoveCommand removeCommand) {
- return new J2EERemoveOverrideCommand(removeCommand);
- }
-
- public J2EEClipboard getJ2EEClipboard() {
- return (J2EEClipboard) getClipboard();
- }
-
- public Object getParent(Object object) {
- Object parent = super.getParent(object);
- if (parent != null)
- return parent;
- if (object instanceof EObject)
- return ((EObject) object).eContainer();
- return null;
- }
-
- protected void turnTraceOnIfDebugging() {
- //AbstractCommand.Trace.enable();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java
deleted file mode 100644
index 5e8e8797d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJarItemProvider.java
+++ /dev/null
@@ -1,304 +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.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-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);
- }
-
- public boolean hasChildren(Object object) {
- getChildren(object);
- return !children.isEmpty();
- }
-
- public Collection getChildren(final Object object) {
- if (!childrenLoaded) {
- try {
- disableNotification();
- org.eclipse.swt.custom.BusyIndicator.showWhile(null, new Runnable() {
- public void run() {
- computeChildren();
- }
- });
- } finally {
- enableNotification();
- }
- }
- return children;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#dispose()
- */
- public void dispose() {
- super.dispose();
- UtilityJarResourceChangeListener.INSTANCE.removeUtilityJarItemProvider(ProjectUtilities.getProject(application), this);
-
- }
-
- /**
- * @see 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()) {
- VirtualArchiveComponent virtualArchiveComponent = (VirtualArchiveComponent) module;
- java.io.File diskFile = virtualArchiveComponent.getUnderlyingDiskFile();
- if (diskFile.exists())
- children.add(diskFile);
- else {
- // we will assume the component name is in synch with the module uri
- IFile utilityJar = virtualArchiveComponent.getUnderlyingWorkbenchFile();
- if (utilityJar != null)
- children.add(utilityJar);
- }
- } else {
-
- }
- if (module.getProject() == null || !module.getProject().isAccessible())
- continue;
- // return only jars for utility components
- if (J2EEProjectUtilities.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() + ".jar"); //$NON-NLS-1$
- 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(".jar"); //$NON-NLS-1$
- }
-
- 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)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getText(Object)
- */
- public String getText(Object object) {
- return UTILITY_JARS;
- }
-
- // assume this resource is a jar resource
- public void utilityJarChanged(IResource resource, IResourceDelta delta) {
- if (childrenLoaded) {
- if (delta.getKind() == IResourceDelta.ADDED && !children.contains(resource)) {
- children.add(resource);
- } else if (delta.getKind() == IResourceDelta.REMOVED && children.contains(resource)) {
- children.remove(resource);
- }
- }
- }
-
- protected static class UtilityJarResourceChangeListener implements IResourceChangeListener, IResourceDeltaVisitor {
-
- protected static final UtilityJarResourceChangeListener INSTANCE = new UtilityJarResourceChangeListener();
-
- private boolean listening = false;
- private Map earProjectsToUtilityJarProviderMap;
-
- public void addUtilityJarItemProvider(IProject project, J2EEUtilityJarItemProvider utilityJarItemProvider) {
- List providers = getProviders(project);
- if (providers != null)
- providers.add(utilityJarItemProvider);
- if (!listening) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
- listening = true;
- }
- }
-
- /**
- * @param project
- * @return
- */
- private List getProviders(IProject project) {
- List result = (List) getEarProjectsToUtilityJarProviderMap().get(project);
- if (result == null && project != null)
- getEarProjectsToUtilityJarProviderMap().put(project, (result = new ArrayList()));
- return result;
- }
-
- /**
- * @return
- */
- private Map getEarProjectsToUtilityJarProviderMap() {
- if (earProjectsToUtilityJarProviderMap == null)
- earProjectsToUtilityJarProviderMap = new HashMap();
- return earProjectsToUtilityJarProviderMap;
- }
-
- public void removeUtilityJarItemProvider(IProject project, J2EEUtilityJarItemProvider utilityJarItemProvider) {
- List providers = getProviders(project);
- providers.remove(utilityJarItemProvider);
- if (providers.isEmpty())
- getEarProjectsToUtilityJarProviderMap().remove(project);
-
- if (getEarProjectsToUtilityJarProviderMap().isEmpty()) {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
- listening = false;
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- event.getDelta().accept(this);
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IResourceDeltaVisitor#visit(org.eclipse.core.resources.IResourceDelta)
- */
- public boolean visit(IResourceDelta delta) {
- switch (delta.getResource().getType()) {
- case IResource.ROOT :
- case IResource.FOLDER :
- return true;
-
- case IResource.PROJECT :
- return getEarProjectsToUtilityJarProviderMap().containsKey(delta.getResource());
- case IResource.FILE : {
- IResource resource = delta.getResource();
- if (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;
- }
- }
-
- 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/J2EEUtilityJavaProjectsItemProvider.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.java
deleted file mode 100644
index 7a2fe62c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/J2EEUtilityJavaProjectsItemProvider.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.provider;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-
-public class J2EEUtilityJavaProjectsItemProvider extends EARProjectMapItemProvider {
-
- public final static String UTILITY_JAVA_PROJECTS = J2EEUIMessages.getResourceString("Utility_Java_Projects_UI_"); //$NON-NLS-1$
-
- /**
- * Constructor for UtilityJARsItemProvider.
- *
- * @param adapterFactory
- */
- public J2EEUtilityJavaProjectsItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * Constructor for UtilityJARsItemProvider.
- *
- * @param adapterFactory
- * @param includeModules
- */
- public J2EEUtilityJavaProjectsItemProvider(AdapterFactory adapterFactory, boolean includeModules) {
- super(adapterFactory, includeModules);
- }
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getText(Object)
- */
- public String getText(Object object) {
- return UTILITY_JAVA_PROJECTS;
- }
-
-}
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 038cf30b7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/provider/ModulesItemProvider.java
+++ /dev/null
@@ -1,287 +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.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)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("folder"); //$NON-NLS-1$
- }
-
- public Application getParentApplication() {
- return (Application) getParent();
- }
-
- 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)
- */
- public String getText(Object object) {
- return MODULES;
- }
-
- public boolean hasChildren(Object object) {
- getChildren(object);
- return !localChildren.isEmpty();
- }
-
- private List localChildren = null;
-
- 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;
- for (int j = 0; j < refs.length && !foundBinary; j++) {
- IVirtualComponent component = refs[j].getReferencedComponent();
- if (component.isBinary()) {
- if (refs[j].getArchiveName().equals(moduleURI)) {
- 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 d3c650e7c..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;
- // TODO Auto-generated constructor stub
- }
-
- /**
- * @see ItemProviderAdapter#getImage(Object)
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("icons/full/obj16/prjutiljar_obj"); //$NON-NLS-1$
- }
-
- /**
- * @see ItemProviderAdapter#getText(Object)
- */
- public String getText(Object object) {
-
- return utilProject.getName();
- }
-
- @Override
- public Collection<?> getChildren(Object object) {
- // TODO Auto-generated method stub
- return super.getChildren(object);
- }
-
-}
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 7ffb5a95d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableItem.java
+++ /dev/null
@@ -1,113 +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;
- }
-
- 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;
- }
-
- 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 f837b9213..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/DoubleCheckboxTableViewer.java
+++ /dev/null
@@ -1,181 +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;
- }
-
- public void addCheckStateListener(ICheckStateListener listener) {
- super.addCheckStateListener(listener);
- lstnr = listener;
- }
-
- 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);
- }
- }
-
- 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/J2EEPropertiesPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java
deleted file mode 100644
index fff1160ac..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/J2EEPropertiesPage.java
+++ /dev/null
@@ -1,176 +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)
- */
- 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();
- }
-
- 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/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 d42229eef..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/refactoring/RenameContextRootChange.java
+++ /dev/null
@@ -1,124 +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 org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-import com.ibm.icu.util.StringTokenizer;
-
-public class RenameContextRootChange extends Change {
-
- private final IProject project;
- private final String newContextRoot;
- private final String oldContextRoot;
- private IDataModel model;
-
- 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]));
-
- }
-
- if (!(name.indexOf(' ') > -1)) {
- StringTokenizer stok = new StringTokenizer(name, "."); //$NON-NLS-1$
- while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- for (int i = 0; i < token.length(); i++) {
- if (!(token.charAt(i) == '_') && !(token.charAt(i) == '-')
- && !(token.charAt(i) == '/')
- && Character.isLetterOrDigit(token.charAt(i)) == false) {
- if (Character.isWhitespace(token.charAt(i)) == false) {
- status = new Status(
- IStatus.ERROR,
- J2EEUIPlugin.PLUGIN_ID,
- ProjectSupportResourceHandler
- .getString(
- ProjectSupportResourceHandler.The_character_is_invalid_in_a_context_root,
- new Object[] {
- (new Character(token.charAt(i))).toString()
- }));
-
- }
- }
- }
- }
- } // 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();
- else
- 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 5722db06e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/ui/util/AnnotationIconDecorator.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
- *******************************************************************************/
-/*
- * Created on Aug 18, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.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.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 2fc3dbb36..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebAppItemProvider.java
+++ /dev/null
@@ -1,337 +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.*;
-
-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.emf.common.util.EList;
-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.webapplication.WelcomeFileList;
-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 {
- private WeakReference weakWebApp;
- WebServicesClient client;
-
- public J2EEWebServiceClientDDManager(WeakReference weakWebApp) {
- this.weakWebApp = 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)
- */
- 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() {
- 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(webFiltersGroup = new WebFiltersGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webFilterMappingGroup = new WebFilterMappingGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webRefsGroup = new WebReferencesGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webSecurityGroup = new WebSecurityGroupItemProvider(adapterFactory, weakWebApp));
- children.add(webListenerGroup = new WebListenerGroupItemProvider(adapterFactory, weakWebApp));
- } finally {
- isInitializing = false;
- }
- }
-
- protected WeakReference weakWebApp = null;
-
- 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();
- }
-// if (isInitializing) return children;
-// isInitializing = true;
-// updateContextParams(webApp);
-// updateWelcomePages(webApp);
-// isInitializing = false;
- return children;
- }
- return Collections.EMPTY_LIST;
- }
-
- private void updateContextParams(WebApp webApp) {
- EList contextParams = webApp.getContextParams();
- if (contextParams == null || contextParams.isEmpty()) {
- if (webContextParamGroup != null) {
- children.remove(webContextParamGroup);
- webContextParamGroup.dispose();
- webContextParamGroup = null;
- }
- } else if (webContextParamGroup == null) {
- children.add(webContextParamGroup = new WebContextParamGroupItemProvider(adapterFactory, weakWebApp));
- }
- }
-
- private void updateWelcomePages(WebApp webApp) {
- WelcomeFileList fileList = webApp.getFileList();
- if (fileList == null || fileList.getFile().isEmpty()) {
- if (webWelcomeFileGroup != null) {
- children.remove(webWelcomeFileGroup);
- webWelcomeFileGroup.dispose();
- webWelcomeFileGroup = null;
- }
- } else if (webWelcomeFileGroup == null) {
- children.add(webWelcomeFileGroup = new WebWelcomeFileGroupItemProvider(adapterFactory, weakWebApp));
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common.notify.Notification)
- */
- public void notifyChanged(Notification notification) {
- // We only care about adds and removes for the different item provider
- // groups
- if (notification.getEventType() == Notification.ADD || notification.getEventType() == Notification.ADD_MANY || notification.getEventType() == Notification.REMOVE || notification.getEventType() == Notification.REMOVE_MANY) {
- Object notifier = null;
- switch (notification.getFeatureID(WebApp.class)) {
- case WebapplicationPackage.WEB_APP__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()
- */
- 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 1b67ce5cd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/J2EEWebItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Mar 29, 2004
- *
- * To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.jst.j2ee.internal.web.providers.WebapplicationItemProviderAdapterFactory;
-
-
-/**
- * @author jlanuti
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class J2EEWebItemProviderAdapterFactory extends WebapplicationItemProviderAdapterFactory {
-
- /**
- * Default constructor
- */
- public J2EEWebItemProviderAdapterFactory() {
- super();
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.webapplication.util.WebapplicationAdapterFactory#createWebAppAdapter()
- */
- public Adapter createWebAppAdapter() {
- if (webAppItemProvider == null)
- webAppItemProvider = new J2EEWebAppItemProvider(this);
- return webAppItemProvider;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/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 9b1a4a688..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebContextParamGroupItemProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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 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)
- */
- 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()
- */
- 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()
- */
- 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)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 8b76b9e7c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebErrorPageGroupItemProvider.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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 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)
- */
- 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()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("error_page"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- 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)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 beae5d9bc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFilterMappingGroupItemProvider.java
+++ /dev/null
@@ -1,80 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebFilterMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebFilterMappingGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory,weakWebApp);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- 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()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter_mapping"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Filter_Mappings_1"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 d3809b12f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebFiltersGroupItemProvider.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
- *******************************************************************************/
-/*
- * 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.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- 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)
- */
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Filters_1"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-}
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 1a29568df..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebGroupItemProvider.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 Aug 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public abstract class WebGroupItemProvider extends J2EEItemProvider {
-
- class WebGroupComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- if (o1 instanceof Servlet) {
- Servlet s1 = (Servlet)o1;
- Servlet s2 = (Servlet)o2;
- if (s1.getServletName() != null && s2.getServletName() != null)
- return s1.getServletName().compareTo(s2.getServletName());
- return -1;
- }
- else if (o1 instanceof Filter) {
- Filter f1 = (Filter) o1;
- Filter f2 = (Filter) o2;
- if (f1.getName() != null && f2.getName() != null)
- return f1.getName().compareTo(f2.getName());
- return -1;
- }
- else if (o1 instanceof Listener) {
- Listener l1 = (Listener) o1;
- Listener l2 = (Listener) o2;
- if (l1.getListenerClassName() != null && l2.getListenerClassName() !=null)
- return l1.getListenerClassName().compareTo(l2.getListenerClassName());
- return -1;
- }
- else return -1;
- }
- }
-
- protected 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;
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
- super.dispose();
- weakWebApp = null;
- }
-
-
- 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 d58e81fd5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebListenerGroupItemProvider.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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebListenerGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebListenerGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /**
- * This returns Filter.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getDefault().getImage("listener"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- 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)
- */
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.IItemLabelProvider#getText(java.lang.Object)
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("LISTENER"); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-}
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 a5fcbbcbe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebReferencesGroupItemProvider.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
- *******************************************************************************/
-/*
- * 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)
- */
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- 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)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getImage()
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getDefault().getImage("resourceRef_obj"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("References_1"); //$NON-NLS-1$
- }
-
-}
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 9da0aad4a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebSecurityGroupItemProvider.java
+++ /dev/null
@@ -1,98 +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)
- */
- public Object getParent(Object object) {
- return weakWebApp.get();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Security_1"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- List result = new ArrayList();
- 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()
- */
- 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 471866e5c..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletGroupItemProvider.java
+++ /dev/null
@@ -1,81 +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)
- */
- 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()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Servlets_1"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 536b0ac28..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebServletMappingGroupItemProvider.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
- *******************************************************************************/
-/*
- * Created on Jun 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.war.ui.util;
-
-import java.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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class WebServletMappingGroupItemProvider extends WebGroupItemProvider {
-
- /**
- * @param adapterFactory
- */
- public WebServletMappingGroupItemProvider(AdapterFactory adapterFactory, WeakReference weakWebApp) {
- super(adapterFactory, weakWebApp);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getChildren(java.lang.Object)
- */
- 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()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet_mapping"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Servlet_Mappings_2"); //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#hasChildren(java.lang.Object)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 204cca3c2..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/war/ui/util/WebWelcomeFileGroupItemProvider.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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;
-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)
- */
- 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()
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("welcome_list"); //$NON-NLS-1$
- }
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ItemProvider#getText()
- */
- 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)
- */
- public boolean hasChildren(Object object) {
- return !getChildren(object).isEmpty();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.emf.edit.provider.ITreeItemContentProvider#getParent(java.lang.Object)
- */
- public Object getParent(Object object) {
- return 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 9fe83e20f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentExportWizard.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.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);
- }
- 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>
- */
- public void doAddPages() {
- addPage(new AppClientExportPage(getDataModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_EXPORT_WIZARD_BANNER));
- }
-}
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 e0c12c951..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportPage.java
+++ /dev/null
@@ -1,81 +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()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_FILE_LABEL);
- }
-
- protected String getFileNamesStoreID() {
- return "APP_CLIENT"; //$NON-NLS-1$;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.jar"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getProjectImportLabel()
- */
- protected String getProjectImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_PROJECT_LABEL);
- }
-
- // protected J2EEComponentCreationDataModel getNewProjectCreationDataModel() {
- // return getAppClientDataModel().getJ2eeArtifactCreationDataModel();
- // }
- //
- // private AppClientModuleImportDataModel getAppClientDataModel() {
- // return (AppClientModuleImportDataModel) model;
- // }
-
- protected Composite createTopLevelComposite(Composite parent) {
- setInfopopID(IJ2EEUIContextIds.IMPORT_APPCLIENT_WIZARD_P1);
- return super.createTopLevelComposite(parent);
- }
-
- 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 8ef52ce2b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientComponentImportWizard.java
+++ /dev/null
@@ -1,85 +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>
- */
- public void doAddPages() {
- addPage(new AppClientComponentImportPage(getDataModel(), MAIN_PG));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the dialog window title and default wizard page image.
- * </p>
- */
- public final void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.APP_CLIENT_IMPORT_WIZARD_BANNER));
- }
-
- protected String[] getModuleValidatorStrings() {
- return new String[]{"org.eclipse.jst.j2ee.internal.validation.UIApplicationClientValidator"}; //$NON-NLS-1$
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new AppClientComponentImportDataModelProvider();
- }
-
- 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 bfc6a0ead..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AppClientExportPage.java
+++ /dev/null
@@ -1,81 +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()
- */
- protected String getComponentLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.APP_CLIENT_IMPORT_PROJECT_LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.jar"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
- */
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof ApplicationClient;
- }
-
- protected String getInfopopID() {
- return IJ2EEUIContextIds.EXPORT_APPCLIENT_WIZARD_P1;
- }
-
- protected String getCompnentID() {
- 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 3bad7b063..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$
- }
-
- protected static Image getEjbImage() {
- if (ejbImage == null)
- ejbImage = getImageDescriptor("EJBJar").createImage();//$NON-NLS-1$
- return ejbImage;
- }
-
- protected static Image getEjbClientImage() {
- if (ejbClientImage == null)
- ejbClientImage = getImageDescriptor("ejbclientjar_obj").createImage();//$NON-NLS-1$
- return ejbClientImage;
- }
-
- protected 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;
- }
-
- protected static Image getInvalidImage() {
- if (invalidImage == null) {
- ImageDescriptor base = getImageDescriptor("jar_nonexist_obj");//$NON-NLS-1$
- ImageDescriptor overlay = getImageDescriptor("warning_co");//$NON-NLS-1$
- invalidImage = new OverlayIcon(base, new ImageDescriptor[][]{{overlay}}).createImage();
- }
- return invalidImage;
- }
-
- 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 e01a7d799..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilJarsAndWebLibProvider.java
+++ /dev/null
@@ -1,163 +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.ArrayList;
-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();
- List filteredProjects = new ArrayList();
- 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;
- }
- else
- return new Object[0];
- }
- 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 4629cc77b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/AvailableUtilityJarsProvider.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.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(".jar"))collectedJars.add(availableFiles[i]); //$NON-NLS-1$
- }
- }
- return collectedJars.toArray();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return AvailableJarsProvider.getUtilImage();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
- */
- public String getColumnText(Object element, int columnIndex) {
- /*
- * FileImpl file = (FileImpl) element; if
- * (file.getURI().startsWith(ArchiveConstants.WEBAPP_LIB_URI)) { String parentWarFileName =
- * ((WARFile) file.eContainer()).getName(); return parentWarFileName + "#" + file.getURI();
- * //$NON-NLS-1$ } else return file.getName();
- */
- return element.toString();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- //dispose
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer,
- * java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- //do nothing
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object,
- * java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- //do nothing
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java
deleted file mode 100644
index ac07f233f..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ClassesImportWizard.java
+++ /dev/null
@@ -1,177 +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.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.internal.ui.util.CoreUtility;
-import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-public class ClassesImportWizard extends Wizard implements IImportWizard {
-
- public WizardClassesImportMainPage mainPage = null;
-
- public WizardClassesImportPage1 page1 = null;
-
- private IWorkbench workbench;
-
- private IStructuredSelection selection;
-
- private IPath importedClassesPath;
-
- private IJavaProject javaProject = null;
-
- private IProject project = null;
-
- protected ArrayList fileNames = null;
-
- public ClassesImportWizard() {
- super();
- }
-
- public ClassesImportWizard(IProject project) {
- super();
- this.project = project;
-
- }
-
- public ClassesImportWizard(IProject project, String fileName, List otherFileNames) {
- this(project);
- this.fileNames = new ArrayList();
- this.fileNames.add(fileName);
- int i = fileName.lastIndexOf(java.io.File.separatorChar);
- String parentDir = fileName.substring(0, i);
- if (otherFileNames != null)
- for (int j = otherFileNames.size() - 1; j >= 0; j--) {
- if (otherFileNames.get(j) != null) {
- int k = ((String) otherFileNames.get(j)).lastIndexOf(java.io.File.separatorChar);
- if (k == i && parentDir.equals(((String) otherFileNames.get(j)).substring(0, k))) {
- fileNames.add(otherFileNames.remove(j));
- }
- }
- }
-
- }
-
- public void setFolderPath(IPath path) {
- importedClassesPath = path;
- }
-
- /**
- * @see org.eclipse.jface.wizard.IWizard#performFinish()
- */
- public boolean performFinish() {
- return page1.finish();
- }
-
- public void createImportedClassesFolder(IProject aProject) {
- //Create imported_classes folder selected project
- IContainer container = aProject;
- IFolder folder = container.getFolder(new Path("imported_classes")); //$NON-NLS-1$
- javaProject = getIJavaProject(aProject);
-
- IPath importedFoldersClass = folder.getFullPath();
-
- CPListElement entry = newCPLibraryElement(folder);
- IClasspathEntry newEntry = entry.getClasspathEntry();
-
- IResource res = entry.getResource();
- if ((res instanceof IFolder) && !res.exists()) {
- try {
- CoreUtility.createFolder((IFolder) res, true, true, null);
-
- } catch (CoreException e) {
- //Ignore
- }
- }
-
- try {
- IClasspathEntry[] classpathEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newClasspath = new IClasspathEntry[classpathEntries.length + 1];
-
- for (int i = 0; i < classpathEntries.length; i++) {
- newClasspath[i] = classpathEntries[i];
- }
- newClasspath[classpathEntries.length] = newEntry;
-
- javaProject.setRawClasspath(newClasspath, null);
-
- } catch (JavaModelException e) {
- //Ignore
- }
-
- setFolderPath(importedFoldersClass);
- }
-
- private IJavaProject getIJavaProject(IProject projectHandle) {
- IJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
- return javaModel.getJavaProject(projectHandle.getName());
- }
-
- private CPListElement newCPLibraryElement(IResource res) {
-
- return new CPListElement(javaProject, IClasspathEntry.CPE_LIBRARY, res.getFullPath(), res);
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
- */
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- setWindowTitle(J2EEUIMessages.getResourceString("Import_Class_Files_UI")); //$NON-NLS-1$
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
-
- workbench = aWorkbench;
- selection = aSelection;
- if (!aSelection.isEmpty() && aSelection.getFirstElement() instanceof IProject)
- project = (IProject) aSelection.getFirstElement();
-
- if (project != null)
- createImportedClassesFolder(project);
- }
-
- public void addPages() {
- try {
- super.addPages();
- mainPage = new WizardClassesImportMainPage("id", fileNames); //$NON-NLS-1$
- mainPage.setWizard(this);
- if (fileNames == null || fileNames.size() == 0)
- addPage(mainPage);
- page1 = new WizardClassesImportPage1(workbench, selection, importedClassesPath, fileNames);
- page1.setWizard(this);
- addPage(page1);
- } catch (Throwable ex) {
- ex.printStackTrace();
- }
-
-
- }
-
-}
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 1a31d8aea..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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.j2ee.internal.earcreation.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()
- */
- public void doAddPages() {
- addPage(new NewJ2EEComponentSelectionPage(getDataModel(), SELECTION_PG));
- }
-
- public boolean canFinish() {
- if (!super.canFinish()) {
- return false;
- }
- return getDataModel().getBooleanProperty(IDefaultJ2EEComponentCreationDataModelProperties.ENABLED);
- }
-
- 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 e6e2e7fa8..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportPage.java
+++ /dev/null
@@ -1,93 +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()
- */
- 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()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- /**
- * @return
- */
- protected boolean shouldShowProjectFilesCheckbox() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEExportPage#isMetaTypeSupported(java.lang.Object)
- */
- protected boolean isMetaTypeSupported(Object o) {
- return o instanceof Application;
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEComponentExportDataModelProperties.PROJECT_NAME, IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION, IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING};
- }
-
- protected String getInfopopID() {
- return IJ2EEUIContextIds.EXPORT_EAR_WIZARD_P1;
- }
-
- protected String getCompnentID() {
- 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 a9b261117..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentExportWizard.java
+++ /dev/null
@@ -1,78 +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);
- }
-
- 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>
- */
- public void doAddPages() {
- addPage(new EARComponentExportPage(getDataModel(), MAIN_PG, getSelection()));
- }
-
- /**
- * {@inheritDoc}
- *
- * <p>
- * Sets up the default wizard page image.
- * </p>
- */
- protected void doInit() {
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_EXPORT_WIZARD_BANNER));
- }
-
-}
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 57311d230..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportOptionsPage.java
+++ /dev/null
@@ -1,320 +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)
- */
- 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 = 140;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON));
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
- gd.widthHint = 140;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- 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() {
- 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);
- }
-
- 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;
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{};
- }
-
- protected void restoreWidgetValues() {
- // This page doesn't implement...
- }
-
- 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 a13d1b157..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportPage.java
+++ /dev/null
@@ -1,130 +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)
- */
- 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;
- }
-
- 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()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_FILE_LABEL);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFilterExpression()
- */
- protected String[] getFilterExpression() {
- return new String[]{"*.ear"}; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEModuleImportPage#createAnnotationsStandaloneGroup(org.eclipse.swt.widgets.Composite)
- */
- protected void createAnnotationsStandaloneGroup(Composite composite) {
- // new AnnotationsStandaloneGroup(composite, model, false);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#getValidationPropertyNames()
- */
-
- protected String[] getValidationPropertyNames() {
- return new String[]{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()
- */
- 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 ee5c89671..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentImportWizard.java
+++ /dev/null
@@ -1,111 +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.core.runtime.IExecutableExtension;
-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.ui.IImportWizard;
-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 implements IExecutableExtension, IImportWizard {
-
- /**
- * <p>
- * Constant used to identify the key of the Projects page of the Wizard.
- * </p>
- */
- protected static final String PROJECT_PG = "projects"; //$NON-NLS-1$
-
- /**
- * <p>
- * Constant used to identify the key of the Options page of the Wizard.
- * </p>
- */
- protected static final String OPTIONS_PG = "options"; //$NON-NLS-1$
-
- /**
- * <p>
- * The default constructor. Creates a wizard with no selection, no model instance, and no
- * operation instance. The model and operation will be created as needed.
- * </p>
- */
- public 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>
- */
- 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>
- */
- protected void doInit() {
- setWindowTitle(J2EEUIMessages.getResourceString(J2EEUIMessages.IMPORT_WIZ_TITLE));
- setDefaultPageImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor(J2EEUIPluginIcons.EAR_IMPORT_WIZARD_BANNER));
-
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new EARComponentImportDataModelProvider();
- }
-
- 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 880a0bd04..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARComponentProjectsPage.java
+++ /dev/null
@@ -1,298 +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));
- }
-
- 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() {
- 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() {
- 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() {
- public void widgetSelected(SelectionEvent e) {
- List newList = new ArrayList();
- model.setProperty(IEARComponentImportDataModelProperties.SELECTED_MODELS_LIST, newList);
- }
- });
- }
-
- 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()
- */
- 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) {
- IDataModel matchingModel = null;// getEARImportDataModel().getMatchingEJBJarOrClient(aModel);
- if (null != matchingModel) {
- earFileListViewer.setChecked(matchingModel, event.getChecked());
- }
- 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...
- }
-
- public void storeDefaultSettings() {
- // This page doesn't implement...
- }
-
- 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 ae65f5c61..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARImportListContentProvider.java
+++ /dev/null
@@ -1,107 +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
- }
-
- 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 f45daeb20..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/EARLibrariesContainerPage.java
+++ /dev/null
@@ -1,67 +0,0 @@
-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/ImportUtil.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java
deleted file mode 100644
index afa712e5e..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/ImportUtil.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 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.io.File;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.client.ApplicationClient;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ApplicationClientFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.CommonarchiveFactoryImpl;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.wst.common.frameworks.internal.WTPPlugin;
-
-
-
-/**
- * @author Sachin
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class ImportUtil {
-
- public static final int UNKNOWN = 0;
- public static final int EARFILE = 1;
- public static final int EJBJARFILE = 2;
- public static final int WARFILE = 3;
- public static final int CLIENTJARFILE = 4;
- public static final int RARFILE = 5;
- public static final int IMPORTCLASSTYPE = 6;
- public static final int J2EE14 = 256;
- public static final int J2EE13 = 128;
- public static final int J2EE12 = 64;
- public static final int J2EESpec = J2EE12 + J2EE13 + J2EE14;
- public static final String EAR = "EAR"; //$NON-NLS-1$
- public static final String EJB = "EJB"; //$NON-NLS-1$
- public static final String WAR = "WEB"; //$NON-NLS-1$
- public static final String JAR = "CLIENT"; //$NON-NLS-1$
- public static final String RAR = "RAR"; //$NON-NLS-1$
- public static final String[] SUFFIXES = {"", EAR, EJB, WAR, JAR, RAR, ""}; //$NON-NLS-1$ //$NON-NLS-2$
-
- public static int getFileType(String fileName) {
- Archive anArchive = null;
- try {
- try {
- anArchive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName);
- int archiveType = getArchiveType(anArchive);
- if (archiveType == UNKNOWN && isImportClassType(fileName))
- return IMPORTCLASSTYPE;
- return archiveType;
- } catch (Exception e) {
- if (isImportClassType(fileName))
- return IMPORTCLASSTYPE;
- return UNKNOWN;
- }
- } finally {
- if (anArchive != null && anArchive.isOpen())
- anArchive.close();
- }
- }
-
- //TODO: use new getJ2EEVerions switch statements
- public static int getVersionedFileType(String fileName) {
- Archive anArchive = null;
- try {
- int archiveType = UNKNOWN;
- try {
- anArchive = CommonarchiveFactoryImpl.getActiveFactory().openArchive(fileName);
- try {
- if (anArchive.isEJBJarFile()) {
- archiveType = EJBJARFILE;
- EJBJar ejbJar = ((EJBJarFile) anArchive).getDeploymentDescriptor();
- if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_1_1_ID)
- archiveType |= J2EE12;
- else if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_2_0_ID)
- archiveType |= J2EE13;
- else if (ejbJar.getVersionID() == J2EEVersionConstants.EJB_2_1_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isWARFile()) {
- archiveType = WARFILE;
- WebApp war = ((WARFile) anArchive).getDeploymentDescriptor();
- if (war.getVersionID() == J2EEVersionConstants.WEB_2_2_ID)
- archiveType |= J2EE12;
- else if (war.getVersionID() == J2EEVersionConstants.WEB_2_3_ID)
- archiveType |= J2EE13;
- else if (war.getVersionID() == J2EEVersionConstants.WEB_2_4_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isApplicationClientFile()) {
- archiveType = CLIENTJARFILE;
- ApplicationClient appClient = ((ApplicationClientFile) anArchive).getDeploymentDescriptor();
- if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID)
- archiveType |= J2EE12;
- else if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID)
- archiveType |= J2EE13;
- else if (appClient.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID)
- archiveType |= J2EE14;
- } else if (anArchive.isRARFile()) {
- archiveType = RARFILE | J2EE13;
- } else if (anArchive.isEARFile()) {
- archiveType = EARFILE;
- Application app = ((EARFile) anArchive).getDeploymentDescriptor();
- if (app.getVersionID() == J2EEVersionConstants.J2EE_1_2_ID)
- archiveType |= J2EE12;
- else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_3_ID)
- archiveType |= J2EE13;
- else if (app.getVersionID() == J2EEVersionConstants.J2EE_1_4_ID)
- archiveType |= J2EE14;
- }
- } catch (Exception e) {
- //Ignore
- }
-
- } catch (Exception e) {
- //Ignore
- }
- if (archiveType == UNKNOWN && isImportClassType(fileName))
- archiveType = IMPORTCLASSTYPE;
- return archiveType;
- } finally {
- if (anArchive != null && anArchive.isOpen())
- anArchive.close();
- }
- }
-
- public static int getArchiveType(Archive anArchive) {
- int type = UNKNOWN;
- try {
- if (anArchive.isEJBJarFile())
- type = EJBJARFILE;
- else if (anArchive.isWARFile())
- type = WARFILE;
- else if (anArchive.isApplicationClientFile())
- type = CLIENTJARFILE;
- else if (anArchive.isRARFile())
- type = RARFILE;
- else if (anArchive.isEARFile())
- type = EARFILE;
- } catch (Exception e) {
- //Ignore
- }
- return type;
- }
-
- public static boolean isImportClassType(String fileName) {
- File file = new File(fileName);
- String fileExtension = getExtension(file);
- if (file.isFile()) {
- if (fileExtension.equalsIgnoreCase("jar") || //$NON-NLS-1$
- fileExtension.equalsIgnoreCase("zip") || //$NON-NLS-1$
- fileExtension.equalsIgnoreCase("class")) //$NON-NLS-1$
- return true;
- } else if (file.isDirectory()) { //disable/enable drag/drop directories
- return false;
- }
- return false;
- }
-
- public static String getExtension(File f) {
- String ext = null;
- String s = f.getName();
- int i = s.lastIndexOf('.');
-
- if (i > 0 && i < s.length() - 1) {
- ext = s.substring(i + 1).toLowerCase();
- }
- return ext;
- }
-
-
- public static String findMatchingProjectName(String projectName) {
- if (projectName.trim().length() > 0) {
- IWorkspaceRoot root = J2EEPlugin.getWorkspace().getRoot();
- IProject[] projects = root.getProjects();
- String lowerCaseName = projectName.toLowerCase();
- // iterate through all projects a compare lowercase names
- if (projectName == null || projectName.length() == 0) {
- if (projects.length == 1)
- return projects[0].getName();
- return null;
- }
- for (int i = 0; i < projects.length; i++) {
- if (projects[i].exists()) {
- if (WTPPlugin.isPlatformCaseSensitive()) {
- if (projects[i].getName().equals(projectName))
- return projects[i].getName();
- } else {
- if (projects[i].getName().toLowerCase().equals(lowerCaseName))
- return projects[i].getName();
- }
- }
- }
- }
- return projectName;
- }
-
-
-
-}
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 f1190ead5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactExportWizard.java
+++ /dev/null
@@ -1,172 +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()
- */
- public final void dispose() {
- super.dispose();
- doDispose();
- this.currentSelection = null;
- }
-
- protected final boolean prePerformFinish() {
- if (!CommonEditorUtility.promptToSaveAllDirtyEditors()) {
- return false;
- }
- if (CommonEditorUtility.getDirtyEditors().length != 0) { // all checkboxes were not selected
- return false;
- }
- return super.prePerformFinish();
- }
-
- /**
- * @return Returns the currentSelection.
- */
- protected final IStructuredSelection getSelection() {
- return currentSelection;
- }
-
- /**
- * @return
- */
- 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 6812078b5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEArtifactImportWizard.java
+++ /dev/null
@@ -1,227 +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()
- */
- 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
- */
- 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()
- */
- protected final void postPerformFinish() throws InvocationTargetException {
- super.postPerformFinish();
- if (getFinalPerspectiveID() != null && getFinalPerspectiveID().length() > 0) {
- final IConfigurationElement element = new DelegateConfigurationElement(configurationElement) {
- 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 ad33bd9df..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentFacetCreationWizardPage.java
+++ /dev/null
@@ -1,118 +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 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.jface.dialogs.IDialogSettings;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-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.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.web.ui.internal.wizards.DataModelFacetCreationWizardPage;
-
-public abstract class J2EEComponentFacetCreationWizardPage extends DataModelFacetCreationWizardPage implements IFacetProjectCreationDataModelProperties {
-
- private static final String STORE_LABEL = "LASTEARNAME_"; //$NON-NLS-1$
-
- protected EarSelectionPanel earPanel;
-
- public J2EEComponentFacetCreationWizardPage(IDataModel dataModel, String pageName) {
- super(dataModel, pageName);
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- final Composite top = super.createTopLevelComposite( parent );
- createEarComposite(top);
- 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();
-
- protected String getModuleTypeID() {
- return getModuleFacetID();
- }
-
- public void dispose() {
- super.dispose();
- if (earPanel != null)
- earPanel.dispose();
- }
-
- 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);
- }
- }
- }
-
- public void restoreDefaultSettings() {
- super.restoreDefaultSettings();
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String lastEARName = settings.get(STORE_LABEL);
- if (lastEARName != null){
- FacetDataModelMap map = (FacetDataModelMap)model.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- String facetID = getModuleFacetID();
- IDataModel j2eeModel = map.getFacetDataModel(facetID);
- j2eeModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.LAST_EAR_NAME, lastEARName);
- }
- }
- }
-
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- 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 );
- return (String[])arrayList.toArray( new String[0] );
- }
-}
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 acd195984..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentImportWizard.java
+++ /dev/null
@@ -1,76 +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.core.runtime.IExecutableExtension;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.ui.IImportWizard;
-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 implements IImportWizard, IExecutableExtension {
-
- /**
- * <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 1bb172e0a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEComponentLabelProvider.java
+++ /dev/null
@@ -1,91 +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 21, 2005
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-
-
-/**
- * @author jialin
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class J2EEComponentLabelProvider implements ILabelProvider {
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if(element instanceof IVirtualComponent){
- IVirtualComponent comp = (IVirtualComponent)element;
- return comp.getProject().getName();
- }
-
- if (element instanceof IProject) {
- IProject handle = (IProject)element;
- return handle.getName();
- }
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- // TODO Auto-generated method stub
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java
deleted file mode 100644
index b58f006b9..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEExportPage.java
+++ /dev/null
@@ -1,556 +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.internal.project.J2EEProjectUtilities;
-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 = J2EEProjectUtilities.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()
- */
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
-
- Composite composite = new Composite(parent, SWT.NULL);
- //WorkbenchHelp.setHelp(composite, getInfopopID());
- GridLayout layout = new GridLayout(1, false);
- composite.setLayout(layout);
-
- createSourceAndDestinationGroup(composite);
- 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);
- 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); //$NON-NLS-1$
- destinationBrowseButton.setLayoutData((new GridData(GridData.FILL_HORIZONTAL)));
- destinationBrowseButton.addSelectionListener(new SelectionAdapter() {
- 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( "Optimize for a specific server runtime" );
- 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 );
- }
- 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 );
- }
-
- private void refreshExtensionsComposite( final Composite extComposite )
- {
- 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 );
- }
- }
- }
- }
- }
-
- 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)); //$NON-NLS-1$ = "Overwrite existing files without warning"
- 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)); //$NON-NLS-1$
- 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);
- }
- }
-
- 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 getCompnentID();
- }
- protected abstract String getCompnentID();
-
- /**
- * @return
- */
- protected String[] getFilterExpression() {
- return new String[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#enter()
- */
- protected void enter() {
- super.enter();
- restoreWidgetValues();
- }
-
- /**
- * @return
- */
- //protected abstract String getNatureID();
-
- protected abstract boolean isMetaTypeSupported(Object o);
-
- /**
- * Populates the resource name field based upon the currently-selected resources.
- */
- protected boolean setupBasedOnRefObjectSelection() {
-
- if (currentResourceSelection.size() != 1)
- return false;
-
- Object o = currentResourceSelection.getFirstElement();
- if (!isMetaTypeSupported(o))
- return false;
-
- EObject ref = (EObject) o;
- IResource resource = ProjectUtilities.getProject(ref);
- if (resource != null) {
- resourceNameCombo.setText(resource.getName().toString());
- }
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#getDialogSettings()
- */
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- 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 d41368eeb..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEImportPage.java
+++ /dev/null
@@ -1,282 +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()
- */
- protected String[] getValidationPropertyNames() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.WTPWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(3, false);
- composite.setLayout(layout);
- createFileNameComposite(composite);
- createProjectNameComposite(composite);
- 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() {
- 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);
- }
-
- 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.FILL_HORIZONTAL)));
- browseButton.addSelectionListener(new SelectionAdapter() {
- 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);
- }
- }
-
- 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);
- }
- }
-
- 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()
- */
- 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 && model != null) {
- 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 fa95ee718..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleExportPage.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
- *******************************************************************************/
-/*
- * 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);
- }
-
- 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 f21db8f50..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.java
+++ /dev/null
@@ -1,118 +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);
- }
-
- protected EarSelectionPanel earPanel;
-
- public void dispose() {
- if (null != earPanel) {
- earPanel.dispose();
- }
- this.model.removeListener( this.facetVersionListener );
- super.dispose();
- }
-
- 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( final Composite parent )
- {
- this.addDD = new Button(parent, SWT.CHECK);
- this.addDD.setText(Resources.generateDeploymentDescriptor);
- //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;
-
-
- static {
- initializeMessages(J2EEModuleFacetInstallPage.class.getName(), Resources.class);
- }
- }
-
- 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 a30b8e8a0..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleFacetInstallPage.properties
+++ /dev/null
@@ -1 +0,0 @@
-generateDeploymentDescriptor = Generate 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 87f44302b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEModuleImportPage.java
+++ /dev/null
@@ -1,102 +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);
- }
-
- 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);
- }
-
-
- 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};
- }
-
- 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 5090464ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportPageNew.java
+++ /dev/null
@@ -1,410 +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)
- */
- 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() {
-
- 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(getDataModel().isPropertyEnabled(IJ2EEUtilityJarListImportDataModelProperties.CREATE_LINKED_PATH_VARIABLE));
-
- 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)); //$NON-NLS-1$ = "Select All"
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 1;
- gd.heightHint = 22;
- gd.widthHint = 120;
- selectAllButton.setLayoutData(gd);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleSelectAllButtonPressed();
- }
- });
-
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.EAR_IMPORT_DESELECT_ALL_UTIL_BUTTON)); //$NON-NLS-1$ = "Deselect All"
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- gd.heightHint = 22;
- gd.widthHint = 120;
- deselectAllButton.setLayoutData(gd);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- handleDeselectAllButtonPressed();
- }
- });
- }
-
- 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);
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{IJ2EEUtilityJarListImportDataModelProperties.UTILITY_JAR_LIST, IJ2EEUtilityJarListImportDataModelProperties.OVERWRITE_IF_NECESSARY, IJ2EEUtilityJarListImportDataModelProperties.LINKED_PATH_VARIABLE};
- }
-
- protected void restoreWidgetValues() {
-
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null)
- return; // ie.- no settings stored
- for (int i = 0; i < sourceNames.length; i++) {
- if (sourceNames[i] == null)
- sourceNames[i] = ""; //$NON-NLS-1$
- }
- availableJarsCombo.setItems(sourceNames);
- }
- }
-
- public void storeDefaultSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_LABEL + getFileNamesStoreID());
- if (sourceNames == null) {
- sourceNames = new String[0];
- }
-
- String newName = availableJarsCombo.getText();
-
- // rip out any empty filenames and trim length to 5
- ArrayList newNames = new ArrayList();
- for (int i = 0; i < sourceNames.length && i < 5; i++) {
- if (sourceNames[i].trim().length() > 0 && !newName.equals(sourceNames[i])) {
- newNames.add(sourceNames[i]);
- }
- }
- newNames.add(0, availableJarsCombo.getText());
- sourceNames = new String[newNames.size()];
- newNames.toArray(sourceNames);
-
- settings.put(STORE_LABEL + getFileNamesStoreID(), sourceNames);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileNamesStoreID()
- */
- protected String getFileNamesStoreID() {
- return "UTIL";//$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.internal.ui.wizard.J2EEImportPage#getFileImportLabel()
- */
- protected String getFileImportLabel() {
- return J2EEUIMessages.getResourceString("J2EEUtilityJarImportPage_UI_7"); //$NON-NLS-1$
- }
-
-
- 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 59d1045fa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportTypePageNew.java
+++ /dev/null
@@ -1,375 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Generation - Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.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.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
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Generation - Code and Comments
- */
-public class J2EEUtilityJarImportTypePageNew extends DataModelWizardPage {
-
- protected static final String defBrowseButtonLabel = J2EEUIMessages.getResourceString(J2EEUIMessages.BROWSE_LABEL); //$NON-NLS-1$
-
- private static final int SIZING_TEXT_FIELD_WIDTH = 305;
-
- protected IStructuredSelection currentResourceSelection;
-
- private Combo resourceNameCombo;
-
- private Button copyJarIntoEAR;
-
- private Button linkJarIntoEAR;
-
- private Button createLinkedProjects;
-
- private Button createProjects;
-
- protected Button browseButton;
-
- private Button 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()
- */
- 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)
- */
- 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() {
-
- 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 ) {
- 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()
- */
- 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 d16a57a94..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/J2EEUtilityJarImportWizardNew.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
- *******************************************************************************/
-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.ui.IImportWizard;
-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 implements IImportWizard {
-
- /**
- * <p>
- * Constant used to identify the key of the page of the Wizard which allows users to define the
- * type of import they would like to carry out.
- * </p>
- */
- private static final String IMPORT_TYPE = "IMPORT_TYPE"; //$NON-NLS-1$
-
- /**
- * <p>
- * Constant used to identify the key of the page of the Wizard that allows users to select jar
- * files for import
- * </p>
- */
- private static final String SELECT_JARS = "SELECT_JARS"; //$NON-NLS-1$
-
-
- /**
- * <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>
- */
- public void doAddPages() {
- this.addPage(new J2EEUtilityJarImportTypePageNew(getDataModel(), IMPORT_TYPE, getSelection()));
- this.addPage(new J2EEUtilityJarImportPageNew(getDataModel(), SELECT_JARS));
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new J2EEUtilityJarListImportDataModelProvider();
- }
-
- 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/MinimizedFileSystemElement.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java
deleted file mode 100644
index eb878c0bf..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/MinimizedFileSystemElement.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.ui.dialogs.FileSystemElement;
-import org.eclipse.ui.model.AdaptableList;
-import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
-
-/**
- * The <code>MinimizedFileSystemElement</code> is a <code>FileSystemElement</code> that knows if
- * it has been populated or not.
- */
-class MinimizedFileSystemElement extends FileSystemElement {
- private boolean populated = false;
- private String packageBaseDirName = null;
-
-
- /**
- * Create a <code>MinimizedFileSystemElement</code> with the supplied name and parent.
- *
- * @param name
- * the name of the file element this represents
- * @param parent
- * the containing parent
- * @param isDirectory
- * indicated if this could have children or not
- */
- MinimizedFileSystemElement(String name, org.eclipse.ui.dialogs.FileSystemElement parent, boolean isDirectory) {
- super(name, parent, isDirectory);
- }
-
- public void setPackageBaseDirName(String s) {
- packageBaseDirName = s;
- }
-
- public void addChild(FileSystemElement child) {
- if (child.isDirectory()) {
- super.addChild(child);
- } else {
- if (child.getFileNameExtension().equals("class")) { //$NON-NLS-1$
- super.addChild(child);
- }
- }
- }
-
- /**
- * Returns a list of the files that are immediate children. Use the supplied provider if it
- * needs to be populated. of this folder.
- */
- public AdaptableList getFiles(IImportStructureProvider provider) {
- if (!populated)
- populate(provider);
-
- return super.getFiles();
-
- }
-
- /**
- * Returns a list of the folders that are immediate children. Use the supplied provider if it
- * needs to be populated. of this folder.
- */
- public AdaptableList getFolders(IImportStructureProvider provider) {
- if (!populated)
- populate(provider);
-
- return super.getFolders();
-
- }
-
- /**
- * Return whether or not population has happened for the receiver.
- */
- boolean isPopulated() {
- return this.populated;
- }
-
- /**
- * Return whether or not population has not happened for the receiver.
- */
- boolean notPopulated() {
- return !this.populated;
- }
-
- /**
- * Populate the files and folders of the receiver using the suppliec structure provider.
- *
- * @param provider
- * org.eclipse.ui.wizards.datatransfer.IImportStructureProvider
- */
- private void populate(IImportStructureProvider provider) {
-
- Object fileSystemObject = getFileSystemObject();
-
- List children = provider.getChildren(fileSystemObject);
- if (children == null)
- children = new ArrayList(1);
- Iterator childrenEnum = children.iterator();
- while (childrenEnum.hasNext()) {
- Object child = childrenEnum.next();
-
- String elementLabel = provider.getLabel(child);
- if (elementLabel.equals(packageBaseDirName) || packageBaseDirName == null) {
- //Create one level below
-
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, this, provider.isFolder(child));
- result.setFileSystemObject(child);
- }
- }
- setPopulated();
-
- }
-
- /**
- * Set whether or not population has happened for the receiver to true.
- */
- void setPopulated() {
- this.populated = true;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java
deleted file mode 100644
index 9c32549b5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJ2EEComponentSelectionPage.java
+++ /dev/null
@@ -1,524 +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
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.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.common.project.facet.core.IFacetedProjectWorkingCopy;
-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()
- */
- protected String[] getValidationPropertyNames() {
- return new String[] { CREATE_APPCLIENT, APPCLIENT_COMPONENT_NAME, CREATE_CONNECTOR, CONNECTOR_COMPONENT_NAME, CREATE_EJB, EJB_COMPONENT_NAME, CREATE_WEB, WEB_COMPONENT_NAME, MODULE_NAME_COLLISIONS_VALIDATION, ENABLED };
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.ui.wizard.J2EEWizardPage#createTopLevelComposite(org.eclipse.swt.widgets.Composite)
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- setInfopopID(IJ2EEUIContextIds.EAR_NEW_MODULE_PROJECTS_PAGE);
- createDefaultCheckBox(composite);
- Composite forStackComposite = new Composite(composite, SWT.NULL);
- layout = new GridLayout();
- forStackComposite.setLayout(layout);
- forStackComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
- Composite stackComposite = createStackLayoutComposite(forStackComposite);
- createDefaultModulesComposite(stackComposite);
- createModuleSelectionComposite(stackComposite);
- stackLayout.topControl = defaultModulesComposite;
- setButtonEnablement();
- 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)
- */
- 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()
- */
- 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()
- */
- 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()
- */
- 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()
- */
- 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();
- childWizModel.setProperty(prop, parentWizModel.getProperty(prop));
- }
- //[Bug 243226] after updating the model the FactedProjectWorkingCopy needs to be updated.
- wizard.setFacetedProjectWorkingCopy((IFacetedProjectWorkingCopy)childWizModel.getProperty(IFacetProjectCreationDataModelProperties.FACETED_PROJECT_WORKING_COPY));
- } 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()
- */
- public boolean canFlipToNextPage() {
- if (!defaultModulesButton.getSelection())
- return selectedNode != null;
- return false;
- }
-
- /**
- * The <code>WizardSelectionPage</code> implementation of this
- * <code>IWizardPage</code> method returns the first page of the currently
- * selected wizard if there is one.
- */
- public IWizardPage getNextPage() {
- if (selectedNode == null)
- return null;
- IPluginContribution pluginContribution = new IPluginContribution() {
- public String getLocalId() {
- String id = null;
- if (selectedNode == appClientNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.appclientProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == ejbNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.ejb.ui.util.ejbProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == connectorNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.jcaProjectWizard"; //$NON-NLS-1$
- } else if (selectedNode == webNode) {
- id = "org.eclipse.jst.j2ee.internal.internal.internal.webProjectWizard"; //$NON-NLS-1$
- }
- return id;
- }
-
- public String getPluginId() {
- return "org.eclipse.jst.j2ee.internal.internal.internal.ui"; //$NON-NLS-1$
- }
- };
-
- if (!WorkbenchActivityHelper.allowUseOf(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()
- */
- 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 35ef53c49..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassOptionsWizardPage.java
+++ /dev/null
@@ -1,401 +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()
- */
- 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)
- */
- 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);
- }
-
- 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 e190ac750..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/NewJavaClassWizardPage.java
+++ /dev/null
@@ -1,700 +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.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.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.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;
- }
-
- /**
- *
- */
- protected String[] getValidationPropertyNames() {
- return new String[]{IArtifactEditOperationDataModelProperties.PROJECT_NAME,
- IArtifactEditOperationDataModelProperties.COMPONENT_NAME,
- INewJavaClassDataModelProperties.SOURCE_FOLDER,
- INewJavaClassDataModelProperties.JAVA_PACKAGE,
- INewJavaClassDataModelProperties.CLASS_NAME,
- INewJavaClassDataModelProperties.SUPERCLASS};
- }
-
- /**
- *
- */
- protected Composite createTopLevelComposite(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- composite.setLayout(layout);
- GridData data = new GridData();
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- data.widthHint = 300;
- composite.setLayoutData(data);
-
- addProjectNameGroup(composite);
- addFolderGroup(composite);
- addSeperator(composite, 3);
- addPackageGroup(composite);
- addClassnameGroup(composite);
- addSuperclassGroup(composite);
-
- 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)); //$NON-NLS-1$
- GridData data = new GridData();
- projectNameLabel.setLayoutData(data);
- // set up project name entry field
- projectNameCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = 300;
- data.horizontalSpan = 1;
- projectNameCombo.setLayoutData(data);
- projectNameCombo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- 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) &&
- J2EEProjectUtilities.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);
- 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);
- 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);
- 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() {
- 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;
- IStructuredSelection stucturedSelection = (IStructuredSelection) selection;
- if (stucturedSelection.getFirstElement() instanceof EObject)
- return ProjectUtilities.getProject(stucturedSelection.getFirstElement());
- IJavaElement element = getInitialJavaElement(selection);
- if (element != null && element.getJavaProject() != null)
- return element.getJavaProject().getProject();
- return getExtendedSelectedProject(stucturedSelection.getFirstElement());
- }
-
- 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();
- if (selectedElement instanceof IAdaptable) {
- IAdaptable adaptable = (IAdaptable) selectedElement;
-
- jelem = (IJavaElement) adaptable.getAdapter(IJavaElement.class);
- if (jelem == null) {
- IResource resource = (IResource) adaptable.getAdapter(IResource.class);
- if (resource != null && resource.getType() != IResource.ROOT) {
- while (jelem == null && resource.getType() != IResource.PROJECT) {
- resource = resource.getParent();
- jelem = (IJavaElement) resource.getAdapter(IJavaElement.class);
- }
- if (jelem == null) {
- jelem = JavaCore.create(resource); // java project
- }
- }
- }
- }
- }
- if (jelem == null) {
- 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
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java
deleted file mode 100644
index 46ec179fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/PackageNameResolver.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-/**
- * @author Sachin
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class PackageNameResolver extends ClassLoader {
-
- public PackageNameResolver() {
- super();
- }
-
- public String getClassName(final String classFile) {
- File file = new File(classFile);
- byte[] classbuf = new byte[(int) file.length()];
- try {
- FileInputStream instream = new FileInputStream(file);
- instream.read(classbuf);
- instream.close();
- } catch (Throwable e) {
- return null;
- }
- boolean badclassname = true;
- String classname = classFile.replace(java.io.File.separatorChar, '.');
- int endi;
- if (classname.endsWith(".class")) //$NON-NLS-1$
- endi = classname.lastIndexOf('.');
- else
- endi = classname.length();
- int i = classname.indexOf('.');
- while (i < endi && badclassname == true) {
- badclassname = false;
- try {
- defineClass(classname.substring(i + 1, endi), classbuf, 0, classbuf.length);
- } catch (java.lang.NoClassDefFoundError e) {
- String msg = e.getMessage();
- if (msg == null || msg.indexOf(' ') > 0) {
- badclassname = true;
- }
- } catch (Throwable e) {
- badclassname = true;
- }
- if (badclassname) {
- i = classname.indexOf('.', i + 1);
- if (i == -1)
- i = endi;
- }
- }
- if (badclassname)
- return null;
- return classname.substring(i + 1, endi);
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/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 6e9882621..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/StringArrayTableWizardSection.java
+++ /dev/null
@@ -1,543 +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];
- } else {
- 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.
- */
- 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;
- }
-
- 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;
- }
-
- 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.
- */
- 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() {
- 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) {
- if (i < columns.length - 1) {
- columns[i].setWidth(width / columns.length);
- consumeWidth += columns[i].getWidth();
- } else {
- columns[i].setWidth(width - consumeWidth);
- }
- return consumeWidth;
- }
- });
- }
-
- 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/WizardClassesImportMainPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java
deleted file mode 100644
index 235f0130b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportMainPage.java
+++ /dev/null
@@ -1,135 +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 May 1, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.j2ee.internal.wizard;
-
-import java.util.List;
-
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIPlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.PlatformUI;
-
-
-/**
- * @author Sachin
- *
- * To change the template for this generated type comment go to Window>Preferences>Java>Code
- * Generation>Code and Comments
- */
-public class WizardClassesImportMainPage extends WizardPage {
- Composite composite;
-
- protected Button importFromDir;
- protected Button importFromZip;
-
- private List dragAndDropFileNames = null;
-
- /**
- * @param pageName
- */
- public WizardClassesImportMainPage(String pageName) {
- super(pageName);
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- }
-
- public WizardClassesImportMainPage(String pageName, List fileNames) {
- super(pageName);
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- dragAndDropFileNames = fileNames;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
- public void createControl(Composite parent) {
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.IMPORT_CLASS_WIZARD_P1);
- initializeDialogUnits(parent);
- Composite aComposite = new Composite(parent, SWT.NULL);
- aComposite.setLayout(new GridLayout());
- aComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
- aComposite.setSize(aComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- aComposite.setFont(parent.getFont());
- createImportTypeGroup(aComposite);
- setControl(aComposite);
- }
-
- protected void createImportTypeGroup(Composite parent) {
- Composite importTypeGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- importTypeGroup.setLayout(layout);
- importTypeGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
- //importTypeGroup.setText(WorkbenchMessages.getString("WizardExportPage.options"));
- // //$NON-NLS-1$
-
- SelectionListener selectionListener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IWizard wiz = getWizard();
- if (((ClassesImportWizard) wiz).page1 != null) {
- ((ClassesImportWizard) wiz).page1.blankPage();
- }
- }
- };
- importFromDir = new Button(importTypeGroup, SWT.RADIO);
- importFromDir.setText(J2EEUIMessages.getResourceString("ClassesImport.fromDir")); //$NON-NLS-1$
- importFromDir.addSelectionListener(selectionListener);
-
- importFromZip = new Button(importTypeGroup, SWT.RADIO);
- importFromZip.setText(J2EEUIMessages.getResourceString("ClassesImport.fromZip")); //$NON-NLS-1$
- importFromZip.addSelectionListener(selectionListener);
-
- IWizard wiz = getWizard();
- String fileName = null;
- if (((ClassesImportWizard) wiz).fileNames != null)
- fileName = ((ClassesImportWizard) wiz).fileNames.get(0).toString();
- if (fileName != null && (fileName.endsWith(".zip") || fileName.endsWith(".jar"))) { //$NON-NLS-1$ //$NON-NLS-2$
- importFromDir.setSelection(false);
- importFromZip.setSelection(true);
- } else {
- importFromDir.setSelection(true);
- importFromZip.setSelection(false);
- }
- }
-
- protected boolean isSetImportFromDir() {
- if (importFromDir != null)
- return importFromDir.getSelection();
-
- String fileName = dragAndDropFileNames.get(0).toString();
- if (fileName != null && (fileName.endsWith(".zip") || fileName.endsWith(".jar"))) { //$NON-NLS-1$ //$NON-NLS-2$
- return false;
- }
- return true;
- }
-}
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java
deleted file mode 100644
index 5665db17d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/internal/wizard/WizardClassesImportPage1.java
+++ /dev/null
@@ -1,1418 +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.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-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.jee.archive.internal.ArchiveUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.FileSystemElement;
-import org.eclipse.ui.dialogs.WizardResourceImportPage;
-import org.eclipse.ui.internal.ide.dialogs.IElementFilter;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.wizards.datatransfer.FileSystemStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.IImportStructureProvider;
-import org.eclipse.ui.wizards.datatransfer.ImportOperation;
-import org.eclipse.ui.wizards.datatransfer.ZipFileStructureProvider;
-
-
-/**
- * Page 1 of the base resource import-from-file-system Wizard
- */
-/* package */
-class WizardClassesImportPage1 extends WizardResourceImportPage implements Listener {
-
- // widgets
- protected Combo sourceNameField;
- protected Button overwriteExistingResourcesCheckbox;
- protected Button createContainerStructureButton;
- protected Button createOnlySelectedButton;
- protected Button sourceBrowseButton;
- //protected Button selectTypesButton;
- protected Button selectAllButton;
- protected Button deselectAllButton;
- //A boolean to indicate if the user has typed anything
- private boolean entryChanged = false;
-
- // dialog store id constants
- private final static String STORE_SOURCE_NAMES_ID = "WizardFileSystemResourceImportPage1.STORE_SOURCE_NAMES_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
- //private final static String STORE_OVERWRITE_EXISTING_RESOURCES_ID =
- // "WizardFileSystemResourceImportPage1.STORE_OVERWRITE_EXISTING_RESOURCES_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
- //private final static String STORE_CREATE_CONTAINER_STRUCTURE_ID =
- // "WizardFileSystemResourceImportPage1.STORE_CREATE_CONTAINER_STRUCTURE_ID"; //$NON-NLS-1$
- //$NON-NLS-1$
-
- //private static final String SELECT_TYPES_TITLE = "DataTransfer.selectTypes"; //$NON-NLS-1$
- private static final String SELECT_ALL_TITLE = J2EEUIMessages.getResourceString("DataTransfer.selectAll"); //$NON-NLS-1$
- private static final String DESELECT_ALL_TITLE = J2EEUIMessages.getResourceString("DataTransfer.deselectAll"); //$NON-NLS-1$
- private static final String SELECT_SOURCE_MESSAGE = J2EEUIMessages.getResourceString("FileImport.selectSource"); //$NON-NLS-1$
- protected static final String SOURCE_EMPTY_MESSAGE = J2EEUIMessages.getResourceString("FileImport.sourceEmpty"); //$NON-NLS-1$
-
- private IPath importedClassesPath;
- //protected Button importFromDir;
- //protected Button importFromZip;
-
-
- private ZipFileStructureProvider providerCache;
- ZipFileStructureProvider currentProvider;
-
- private static final String FILE_IMPORT_MASK = "*.jar;*.zip"; //$NON-NLS-1$
-
- private List dragAndDropFileNames = null;
-
- boolean createFullStructure = false;
- private String packageBaseDirName = null;
-
- //private MinimizedFileSystemElement test = null;
-
- //private Composite dummyParent = null;
-
- //private final static int SIZING_SELECTION_WIDGET_WIDTH = 400;
- //private final static int SIZING_SELECTION_WIDGET_HEIGHT = 150;
-
- private String packageDirStruc = null;
-
- /**
- * Creates an instance of this class
- */
- protected WizardClassesImportPage1(String name, IWorkbench aWorkbench, IStructuredSelection selection) {
- super(name, selection);
- }
-
- /**
- * Creates an instance of this class
- *
- * @param aWorkbench
- * IWorkbench
- * @param selection
- * IStructuredSelection
- */
- public WizardClassesImportPage1(IWorkbench aWorkbench, IStructuredSelection selection, IPath importedClassesPath, List fileNames) {
- this("fileSystemImportPage1", aWorkbench, selection); //$NON-NLS-1$
- setTitle(J2EEUIMessages.getResourceString("DataTransfer.fileSystemTitle")); //$NON-NLS-1$
- setDescription(J2EEUIMessages.getResourceString("FileImport.importFileSystem")); //$NON-NLS-1$
- setImageDescriptor(J2EEUIPlugin.getDefault().getImageDescriptor("import_class_file_wiz_ban")); //$NON-NLS-1$
- this.importedClassesPath = importedClassesPath;
- if (fileNames != null && fileNames.size() != 0) {
- dragAndDropFileNames = fileNames;
- }
- }
-
- public void blankPage() {
- if (this.selectionGroup != null)
- this.selectionGroup.setRoot(null);
- if (sourceNameField != null)
- sourceNameField.setText(""); //$NON-NLS-1$
- }
-
-
- /**
- * Creates a new button with the given id.
- * <p>
- * The <code>Dialog</code> implementation of this framework method creates a standard push
- * button, registers for selection events including button presses and registers default buttons
- * with its shell. The button id is stored as the buttons client data. Note that the parent's
- * layout is assumed to be a GridLayout and the number of columns in this layout is incremented.
- * Subclasses may override.
- * </p>
- *
- * @param parent
- * the parent composite
- * @param id
- * the id of the button (see <code>IDialogConstants.*_ID</code> constants for
- * standard dialog button ids)
- * @param label
- * the label from the button
- * @param defaultButton
- * <code>true</code> if the button is to be the default button, and
- * <code>false</code> otherwise
- */
- protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
- // increment the number of columns in the button bar
- ((GridLayout) parent.getLayout()).numColumns++;
-
- Button button = new Button(parent, SWT.PUSH);
-
- GridData buttonData = new GridData(GridData.FILL_HORIZONTAL);
- button.setLayoutData(buttonData);
-
- button.setData(new Integer(id));
- button.setText(label);
-
- if (defaultButton) {
- Shell shell = parent.getShell();
- if (shell != null) {
- shell.setDefaultButton(button);
- }
- button.setFocus();
- }
- return button;
- }
-
- /**
- * Creates the buttons for selecting specific types or selecting all or none of the elements.
- *
- * @param parent
- * the parent control
- */
- protected final void createButtonsGroup(Composite parent) {
- // top level group
- Composite buttonComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
-
- layout.makeColumnsEqualWidth = true;
- buttonComposite.setLayout(layout);
- buttonComposite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
-
- // types edit button
- // selectTypesButton = createButton(buttonComposite, IDialogConstants.SELECT_TYPES_ID,
- // SELECT_TYPES_TITLE, false);
-
- SelectionListener listener = new SelectionAdapter() {
- // public void widgetSelected(SelectionEvent e) {
- // handleTypesEditButtonPressed();
- // }
- };
- // selectTypesButton.addSelectionListener(listener);
-
- selectAllButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, SELECT_ALL_TITLE, false);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(true);
- }
- };
- selectAllButton.addSelectionListener(listener);
-
- deselectAllButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, DESELECT_ALL_TITLE, false);
-
- listener = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- setAllSelections(false);
- }
- };
- deselectAllButton.addSelectionListener(listener);
-
- }
-
- /**
- * (non-Javadoc) Method declared on IDialogPage.
- */
- public void createControl(Composite parent) {
- //super.createControl(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJ2EEUIContextIds.IMPORT_CLASS_WIZARD_P2);
- initializeDialogUnits(parent);
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
- composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- composite.setFont(parent.getFont());
-
- //dummyParent = composite;
-
- createSourceGroup(composite);
-
- //createSpacer(composite);
-
- //createPlainLabel(composite,
- // WorkbenchMessages.getString("WizardImportPage.destinationLabel")); //$NON-NLS-1$
- //createDestinationGroup(composite);
-
- createOptionsGroup(composite);
-
- restoreWidgetValues();
- updateWidgetEnablements();
- setPageComplete(determinePageCompletion());
-
- setControl(composite);
-
- validateSourceGroup();
- //WorkbenchHelp.setHelp(getControl(),
- // IDataTransferHelpContextIds.FILE_SYSTEM_IMPORT_WIZARD_PAGE);
- }
-
- protected void createOptionsGroup(Composite parent) {
- Composite optionsGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- optionsGroup.setLayout(layout);
- optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
-
- createOptionsGroupButtons(optionsGroup);
-
- }
-
- /**
- * Create the import options specification widgets.
- */
- protected void createOptionsGroupButtons(Composite optionsGroup) {
-
- // overwrite... checkbox
- overwriteExistingResourcesCheckbox = new Button(optionsGroup, SWT.CHECK);
- overwriteExistingResourcesCheckbox.setText(J2EEUIMessages.getResourceString("FileImport.overwriteExisting")); //$NON-NLS-1$
- }
-
- protected boolean isSetImportFromDir() {
- ClassesImportWizard ciw = (ClassesImportWizard) getWizard();
- return ciw.mainPage.isSetImportFromDir();
- }
-
- public String getClassFileDirectory(String s) {
- int index = s.lastIndexOf(File.separatorChar);
- return s.substring(0, index + 1);
- }
-
- /**
- * Create the group for creating the root directory
- */
- protected void createRootDirectoryGroup(Composite parent) {
- Composite sourceContainerGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 3;
- sourceContainerGroup.setLayout(layout);
- sourceContainerGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL));
-
- new Label(sourceContainerGroup, SWT.NONE).setText(getSourceLabel());
-
- // source name entry field
- sourceNameField = new Combo(sourceContainerGroup, SWT.BORDER);
- GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
- data.widthHint = SIZING_TEXT_FIELD_WIDTH;
- sourceNameField.setLayoutData(data);
-
- setSourceNameFieldForDragAndDrop();
-
- sourceNameField.addListener(SWT.Modify, this);
-
- sourceNameField.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- updateFromSourceField();
-
- }
- });
-
- sourceNameField.addKeyListener(new KeyListener() {
- /*
- * @see KeyListener.keyPressed
- */
- public void keyPressed(KeyEvent e) {
- //If there has been a key pressed then mark as dirty
- entryChanged = true;
-
- }
-
- /*
- * @see KeyListener.keyReleased
- */
- public void keyReleased(KeyEvent e) {
- //do nothing
- }
- });
-
- sourceNameField.addFocusListener(new FocusListener() {
- /*
- * @see FocusListener.focusGained(FocusEvent)
- */
- public void focusGained(FocusEvent e) {
- //Do nothing when getting focus
- if (dragAndDropFileNames != null) {
- sourceNameField.setEnabled(false);
- }
-
- }
-
- /*
- * @see FocusListener.focusLost(FocusEvent)
- */
- public void focusLost(FocusEvent e) {
- //Clear the flag to prevent constant update
- if (entryChanged) {
-
- entryChanged = false;
- updateFromSourceField();
- }
-
- }
- });
-
- // source browse button
- sourceBrowseButton = new Button(sourceContainerGroup, SWT.PUSH);
- sourceBrowseButton.setText(J2EEUIMessages.getResourceString("DataTransfer.browse")); //$NON-NLS-1$
- sourceBrowseButton.addListener(SWT.Selection, this);
- sourceBrowseButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
-
- if (dragAndDropFileNames != null) {
- sourceBrowseButton.setEnabled(false);
- }
-
- }
-
- private void setSourceNameFieldForDragAndDrop() {
- if (dragAndDropFileNames != null) {
- String fileName = (String) (dragAndDropFileNames.get(0));
- sourceNameField.setText(fileName);
- File f = new File(fileName);
- if (f.isFile()) {
- if (ImportUtil.getExtension(f).equals("zip") || ImportUtil.getExtension(f).equals("jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- //importFromZip.setSelection(true);
- //importFromDir.setSelection(false);
- } else if (ImportUtil.getExtension(f).equals("class")) { //$NON-NLS-1$
- sourceNameField.setText(getClassFileDirectory(fileName));
-
- //get com.ibm.abc.ClassName
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(fileName);
- if (qualifiedClassName != null) {
-
- //get com
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- String textToSet = fileName.substring(0, 1 + fileName.lastIndexOf(File.separatorChar));
- sourceNameField.setText(textToSet);
- return;
- }
- String baseDir = qualifiedClassName.substring(0, index);
-
- //get com.ibm.abc
- index = qualifiedClassName.lastIndexOf('.');
- String packageName = qualifiedClassName.substring(0, index);
- //get com/ibm/abc
- packageDirStruc = packageName.replace('.', File.separatorChar);
-
- //get C:\com
- index = fileName.indexOf(baseDir);
- //if packageDirStuc exists then set the sourceDir to com, else
- //set the directory to the parent directory of the class
- if (fileName.indexOf(packageDirStruc) != -1) {
- int baseDirLength = baseDir.length();
- String textToSet = fileName.substring(0, index + baseDirLength);
- index = packageName.indexOf('.');
- if (index == -1)
- packageBaseDirName = packageName;
- else
- packageBaseDirName = packageName.substring(0, index);
-
- f = new File(textToSet);
- if (f.getParent() != null)
- f = new File(f.getParent());
- textToSet = f.getAbsolutePath(); //want to set the root directory to
- // com's parent
- sourceNameField.setText(textToSet);
- }
- }
-
- }
- }
- }
- }
-
- /**
- * Update the receiver from the source name field.
- */
-
- private void updateFromSourceField() {
-
- setSourceName(sourceNameField.getText());
- //Update enablements when this is selected
- updateWidgetEnablements();
- }
-
- /**
- * Creates and returns a <code>FileSystemElement</code> if the specified file system object
- * merits one. The criteria for this are: Also create the children.
- */
- protected MinimizedFileSystemElement createRootElement(Object fileSystemObject, IImportStructureProvider provider) {
- boolean isContainer = provider.isFolder(fileSystemObject);
- String elementLabel = provider.getLabel(fileSystemObject);
-
- // Use an empty label so that display of the element's full name
- // doesn't include a confusing label
- MinimizedFileSystemElement dummyParent = new MinimizedFileSystemElement("", null, true); //$NON-NLS-1$
- dummyParent.setPopulated();
- MinimizedFileSystemElement result = new MinimizedFileSystemElement(elementLabel, dummyParent, isContainer);
-
- result.setPackageBaseDirName(packageBaseDirName);
- result.setFileSystemObject(fileSystemObject);
-
- //Get the files for the element so as to build the first level
- result.getFiles(provider);
-
- return dummyParent;
- }
-
- /**
- * Create the import source specification widgets
- */
- protected void createSourceGroup(Composite parent) {
- //createImportTypeGroup(parent);
- createRootDirectoryGroup(parent);
- createFileSelectionGroup(parent);
-
- createButtonsGroup(parent);
- }
-
- /**
- * Enable or disable the button group.
- */
- protected void enableButtonGroup(boolean enable) {
- // selectTypesButton.setEnabled(enable);
- selectAllButton.setEnabled(enable);
- deselectAllButton.setEnabled(enable);
- }
-
- /**
- * Answer a boolean indicating whether the specified source currently exists and is valid
- */
- protected boolean ensureSourceIsValid() {
- if (isSetImportFromDir()) {
- if (getSourceDirectory() != null && new File(getSourceDirectoryName()).isDirectory())
- return true;
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- return false;
- }
- ZipFile specifiedFile = getSpecifiedSourceFile();
-
- if (specifiedFile == null) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- return false;
- }
- return closeZipFile(specifiedFile);
- }
-
- /**
- * Execute the passed import operation. Answer a boolean indicating success.
- */
- protected boolean executeImportOperation(ImportOperation op) {
- initializeOperation(op);
- if (createFullStructure) {
- op.setCreateContainerStructure(true);
- } else {
- op.setCreateContainerStructure(false);
- }
-
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- displayErrorDialog(e.getTargetException());
- return false;
- }
-
- IStatus status = op.getStatus();
- if (!status.isOK()) {
- ErrorDialog.openError(getContainer().getShell(), getString("FileImport.importProblems"), //$NON-NLS-1$
- null, // no special message
- status);
- return false;
- }
-
- return true;
- }
-
- // need the following private stuff just because the DataTransferMessages class is not public!
- //private static final String RESOURCE_BUNDLE = "org.eclipse.ui.wizards.datatransfer.messages";
- // //$NON-NLS-1$
- //private static ResourceBundle bundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
-
- private static String getString(String key) {
- try {
- return J2EEUIMessages.getResourceString(key);
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * The Finish button was pressed. Try to do the required work now and answer a boolean
- * indicating success. If false is returned then the wizard will not close.
- *
- * @return boolean
- */
- public boolean finish() {
- if (!ensureSourceIsValid())
- return false;
-
- clearProviderCache();
-
- saveWidgetValues();
-
- Iterator resourcesEnum = getSelectedResources().iterator();
- List fileSystemObjects = new ArrayList();
- while (resourcesEnum.hasNext()) {
- fileSystemObjects.add(((FileSystemElement) resourcesEnum.next()).getFileSystemObject());
- }
-
- if (fileSystemObjects.size() > 0) {
- if (getSourceDirectory() != null) {
- return importResources(fileSystemObjects);
- }
- return importResourcesFromZip(fileSystemObjects);
- }
-
- MessageDialog.openInformation(getContainer().getShell(), getString("DataTransfer.information"), //$NON-NLS-1$
- getString("FileImport.noneSelected")); //$NON-NLS-1$
-
- return false;
- }
-
- /**
- * Returns a content provider for <code>FileSystemElement</code> s that returns only files as
- * children.
- */
-
- protected ITreeContentProvider getFileProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (currentProvider != null) {
- return element.getFiles(currentProvider).getChildren(element);
- }
- return element.getFiles(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- return new Object[0];
- }
-
- public Object[] getElements(Object element) {
- Object[] superObjects = super.getElements(element);
- if (dragAndDropFileNames != null && getSourceDirectory() != null) {
- MinimizedFileSystemElement anElement = null;
- int newObjectsIndex = 0;
- for (int i = 0; i < superObjects.length; i++) {
- anElement = (MinimizedFileSystemElement) superObjects[i];
-
- File file = (File) anElement.getFileSystemObject();
-
- for (int k = 0; k < dragAndDropFileNames.size(); k++) {
- if (file.getAbsolutePath().equals(dragAndDropFileNames.get(k))) {
- newObjectsIndex++;
- }
- }
- }
- if (newObjectsIndex > 0) {
- Object[] newObjects = new Object[newObjectsIndex];
- newObjectsIndex = 0;
-
- for (int i = 0; i < superObjects.length; i++) {
- anElement = (MinimizedFileSystemElement) superObjects[i];
-
- File file = (File) anElement.getFileSystemObject();
-
- for (int k = 0; k < dragAndDropFileNames.size(); k++) {
- if (file.getAbsolutePath().equals(dragAndDropFileNames.get(k))) {
-
- newObjects[newObjectsIndex++] = anElement;
-
- }
- }
-
- }
- return newObjects;
- }
- }
- return superObjects;
- }
- };
- }
-
- /**
- * Answer the root FileSystemElement that represents the contents of the currently-specified
- * source. If this FileSystemElement is not currently defined then create and return it.
- */
- protected MinimizedFileSystemElement getFileSystemTree() {
- if (isSetImportFromDir()) {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory != null) {
- return selectFiles(sourceDirectory, FileSystemStructureProvider.INSTANCE);
- }
- if (sourceNameField.getText().length() > 0) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- }
- return null;
- }
- ZipFile sourceFile = getSpecifiedSourceFile();
- if (sourceFile == null) {
- //Clear out the provider as well
- this.currentProvider = null;
- if (sourceNameField.getText().length() > 0) {
- displayErrorDialog(getString("FileImport.invalidSource")); //$NON-NLS-1$
- sourceNameField.setFocus();
- }
- return null;
- }
-
- ZipFileStructureProvider provider = getStructureProvider(sourceFile);
- this.currentProvider = provider;
- return selectFiles(provider.getRoot(), provider);
- }
-
- /**
- * Returns a content provider for <code>FileSystemElement</code> s that returns only folders
- * as children.
- */
- protected ITreeContentProvider getFolderProvider() {
- return new WorkbenchContentProvider() {
- public Object[] getChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (currentProvider != null) {
- return element.getFolders(currentProvider).getChildren(element);
- }
- return element.getFolders(FileSystemStructureProvider.INSTANCE).getChildren(element);
- }
- return new Object[0];
- }
-
- public boolean hasChildren(Object o) {
- if (o instanceof MinimizedFileSystemElement) {
- MinimizedFileSystemElement element = (MinimizedFileSystemElement) o;
- if (element.isPopulated())
- return getChildren(element).length > 0;
- //If we have not populated then wait until asked
- return true;
- }
- return false;
- }
-
- };
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff it exists as a
- * valid directory, or <code>null</code> otherwise.
- */
- protected File getSourceDirectory() {
- return getSourceDirectory(this.sourceNameField.getText());
- }
-
- /**
- * Returns a File object representing the currently-named source directory iff it exists as a
- * valid directory, or <code>null</code> otherwise.
- *
- * @param path
- * a String not yet formatted for java.io.File compatability
- */
- private File getSourceDirectory(String path) {
- if (isSetImportFromDir()) {
- File sourceDirectory = new File(getSourceDirectoryName(path));
- if (!sourceDirectory.exists() || !sourceDirectory.isDirectory()) {
- return null;
- }
-
- return sourceDirectory;
- }
- return null;
- }
-
- /**
- * Answer the directory name specified as being the import source. Note that if it ends with a
- * separator then the separator is first removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName() {
- return getSourceDirectoryName(this.sourceNameField.getText());
- }
-
- /**
- * Answer the directory name specified as being the import source. Note that if it ends with a
- * separator then the separator is first removed so that java treats it as a proper directory
- */
- private String getSourceDirectoryName(String sourceName) {
- IPath result = new Path(sourceName.trim());
-
- if (result.getDevice() != null && result.segmentCount() == 0) // something like "c:"
- result = result.addTrailingSeparator();
- else
- result = result.removeTrailingSeparator();
-
- return result.toOSString();
- }
-
- /**
- * Answer the string to display as the label for the source specification field
- */
- protected String getSourceLabel() {
- return J2EEUIMessages.getResourceString("DataTransfer.directory"); //$NON-NLS-1$
- }
-
- /**
- * Handle all events and enablements for widgets in this dialog
- *
- * @param event
- * Event
- */
- public void handleEvent(Event event) {
- if (event.widget == sourceBrowseButton) {
- if (isSetImportFromDir()) {
- handleSourceBrowseButtonPressed();
- } else {
- handleSourceBrowseButtonPressedForZip();
- }
- }
-
- super.handleEvent(event);
-
- }
-
- /**
- * Open an appropriate source browser so that the user can specify a source to import from
- */
- protected void handleSourceBrowseButtonPressed() {
- String currentSource = this.sourceNameField.getText();
- DirectoryDialog dialog = new DirectoryDialog(sourceNameField.getShell(), SWT.SAVE);
- dialog.setMessage(SELECT_SOURCE_MESSAGE);
- dialog.setFilterPath(getSourceDirectoryName(currentSource));
-
- String selectedDirectory = dialog.open();
- if (selectedDirectory != null) {
- //Just quit if the directory is not valid
- if ((getSourceDirectory(selectedDirectory) == null) || selectedDirectory.equals(currentSource))
- return;
- //If it is valid then proceed to populate
- setErrorMessage(null);
- setSourceName(selectedDirectory);
- selectionGroup.setFocus();
- }
- }
-
- /**
- * Open a registered type selection dialog and note the selections in the receivers
- * types-to-export field., Added here so that inner classes can have access
- */
- protected void handleTypesEditButtonPressed() {
-
- super.handleTypesEditButtonPressed();
- }
-
- /**
- * Import the resources with extensions as specified by the user
- */
- protected boolean importResources(List fileSystemObjects) {
- Iterator i = fileSystemObjects.iterator();
- while (i.hasNext()) {
- File f = (File) i.next();
- List singleItemList = new ArrayList();
- singleItemList.add(f);
- String textToSet = getPackageName(f);
- if (textToSet != null) {
- File newSource = new File(textToSet);
- executeImportOperation(new ImportOperation(getContainerFullPath(), newSource, FileSystemStructureProvider.INSTANCE, this, singleItemList));
- } else {
- executeImportOperation(new ImportOperation(getContainerFullPath(), getSourceDirectory(), FileSystemStructureProvider.INSTANCE, this, singleItemList));
-
- }
- }
- return true;
-
- }
-
- protected String getPackageName(File f) {
- if (ImportUtil.getExtension(f).equals("class")) { //$NON-NLS-1$
- String fileName = f.getAbsolutePath();
- //get com.ibm.abc.ClassName
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(fileName);
- if (qualifiedClassName != null) {
-
- //get com
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- return fileName.substring(0, 1 + fileName.lastIndexOf(File.separatorChar));
- }
- String baseDir = qualifiedClassName.substring(0, index);
-
- //get com.ibm.abc
- index = qualifiedClassName.lastIndexOf('.');
- String packageName = qualifiedClassName.substring(0, index);
-
- //get com/ibm/abc
- packageDirStruc = packageName.replace('.', File.separatorChar);
-
- //get C:\com
- index = fileName.indexOf(baseDir);
- //if packageDirStuc exists then set the sourceDir to com, else
- //set the directory to the parent directory of the class
- if (fileName.indexOf(packageDirStruc) != -1) {
- int baseDirLength = baseDir.length();
- String textToSet = fileName.substring(0, index + baseDirLength);
- index = packageName.indexOf('.');
- if (index == -1)
- packageBaseDirName = packageName;
- else
- packageBaseDirName = packageName.substring(0, index);
-
- f = new File(textToSet);
- if (f.getParent() != null)
- f = new File(f.getParent());
- textToSet = f.getAbsolutePath(); //want to set the root directory to com's
- // parent
- //sourceNameField.setText(textToSet);
- return textToSet;
- }
- }
- }
- return null;
- }
-
- /**
- * Initializes the specified operation appropriately.
- */
- protected void initializeOperation(ImportOperation op) {
-
- /*
- * op.setCreateContainerStructure( createContainerStructureButton.getSelection());
- */
- op.setOverwriteResources(overwriteExistingResourcesCheckbox.getSelection());
- }
-
- /**
- * Returns whether the extension provided is an extension that has been specified for export by
- * the user.
- *
- * @param extension
- * the resource name
- * @return <code>true</code> if the resource name is suitable for export based upon its
- * extension
- */
- protected boolean isExportableExtension(String extension) {
- if (selectedTypes == null) // ie.- all extensions are acceptable
- return true;
-
- Iterator aenum = selectedTypes.iterator();
- while (aenum.hasNext()) {
- if (extension.equalsIgnoreCase((String) aenum.next()))
- return true;
- }
-
- return false;
- }
-
- /**
- * Repopulate the view based on the currently entered directory.
- */
- protected void resetSelection() {
-
- MinimizedFileSystemElement currentRoot = getFileSystemTree();
- this.selectionGroup.setRoot(currentRoot);
- if (dragAndDropFileNames != null) {
-
- if (dragAndDropFileNames.get(0).toString().endsWith(".zip") == false && dragAndDropFileNames.get(0).toString().endsWith(".jar") == false) { //$NON-NLS-1$ //$NON-NLS-2$
- this.selectionGroup.expandAll();
- }
-
- MinimizedFileSystemElement temp = (MinimizedFileSystemElement) currentRoot.getFolders().getChildren()[0];
-
- List dirList = pathToArray();
-
- for (int i = 0; i < dirList.size(); i++) {
- String s = (String) dirList.get(i);
- Object[] folders = temp.getFolders().getChildren();
- for (int k = 0; k < folders.length; k++) {
- if (((File) ((MinimizedFileSystemElement) folders[k]).getFileSystemObject()).getName().equals(s)) {
- temp = (MinimizedFileSystemElement) temp.getFolders().getChildren()[k];
- break;
- }
- }
-
- }
-
- if (dragAndDropFileNames.get(0).toString().endsWith(".zip") == false && dragAndDropFileNames.get(0).toString().endsWith(".jar") == false) { //$NON-NLS-1$ //$NON-NLS-2$
- this.selectionGroup.initialCheckTreeItem(temp);
- }
-
- //If can figure out how to pre-highlight dir, then use following code
- //to check dragged files only. Also need to show all files in tree.
- /*
- * String fileName = null; MinimizedFileSystemElement name = null; int numFiles =
- * temp.getFiles().getChildren().length; Object[] files = temp.getFiles().getChildren();
- * for(int i = 0; i < dragAndDropFileNames.size(); i++) { fileName = (new
- * File((String)dragAndDropFileNames.get(i))).getName(); for(int k = 0; k < numFiles;
- * k++) { if(fileName.equals(((File) ((MinimizedFileSystemElement)
- * files[0]).getFileSystemObject()).getName())) {
- * this.selectionGroup.initialCheckTreeItem(temp); break; } } }
- */
-
- //this.selectionGroup.setAllSelections(true);
- }
- }
-
- private List pathToArray() {
- String s = (String) dragAndDropFileNames.get(0);
-
- PackageNameResolver nameResolver = new PackageNameResolver();
- String qualifiedClassName = nameResolver.getClassName(s);
-
- int slashCounts = 0;
- if (qualifiedClassName != null) {
- int index = qualifiedClassName.indexOf('.');
- if (index == -1) {
- return Collections.EMPTY_LIST;
- }
- String baseDir = qualifiedClassName.substring(0, index);
- for (int i = s.indexOf(baseDir); i < s.lastIndexOf(File.separatorChar); i++) {
- if (s.charAt(i) == File.separatorChar)
- slashCounts++;
- }
- }
-
- List dirNamesArray = new ArrayList(slashCounts);
- if (s.endsWith(".zip") || s.endsWith(".jar")) { //$NON-NLS-1$ //$NON-NLS-2$
- return dirNamesArray;
- }
- int startIndex = 0;
- int endIndex;
- for (int i = 0; i <= slashCounts; i++) {
- endIndex = qualifiedClassName.indexOf('.', startIndex);
- dirNamesArray.add(qualifiedClassName.substring(startIndex, endIndex));
- startIndex = endIndex + 1;
- }
- return dirNamesArray;
- }
-
- /**
- * Use the dialog store to restore widget values to the values that they held last time this
- * wizard was used to completion
- */
- protected void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames == null)
- return; // ie.- no values stored, so stop
-
- // set filenames history
- for (int i = 0; i < sourceNames.length; i++)
- sourceNameField.add(sourceNames[i]);
- }
- }
-
- /**
- * Since Finish was pressed, write widget values to the dialog store so that they will persist
- * into the next invocation of this wizard page
- */
- protected void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] sourceNames = settings.getArray(STORE_SOURCE_NAMES_ID);
- if (sourceNames == null)
- sourceNames = new String[0];
-
- sourceNames = addToHistory(sourceNames, getSourceDirectoryName());
- settings.put(STORE_SOURCE_NAMES_ID, sourceNames);
-
- }
- }
-
- /**
- * Invokes a file selection operation using the specified file system and structure provider. If
- * the user specifies files to be imported then this selection is cached for later retrieval and
- * is returned.
- */
- protected MinimizedFileSystemElement selectFiles(final Object rootFileSystemObject, final IImportStructureProvider structureProvider) {
-
- final MinimizedFileSystemElement[] results = new MinimizedFileSystemElement[1];
-
- BusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {
- public void run() {
- //Create the root element from the supplied file system object
- results[0] = createRootElement(rootFileSystemObject, structureProvider);
- }
- });
-
- return results[0];
- }
-
- /**
- * Set all of the selections in the selection group to value. Implemented here to provide access
- * for inner classes.
- *
- * @param value
- * boolean
- */
- protected void setAllSelections(boolean value) {
- super.setAllSelections(value);
- }
-
- /**
- * Sets the source name of the import to be the supplied path. Adds the name of the path to the
- * list of items in the source combo and selects it.
- *
- * @param path
- * the path to be added
- */
- protected void setSourceName(String path) {
-
- if (path.length() > 0) {
-
- String[] currentItems = this.sourceNameField.getItems();
- int selectionIndex = -1;
- for (int i = 0; i < currentItems.length; i++) {
- if (currentItems[i].equals(path))
- selectionIndex = i;
- }
- if (selectionIndex < 0) {
- int oldLength = currentItems.length;
- String[] newItems = new String[oldLength + 1];
- System.arraycopy(currentItems, 0, newItems, 0, oldLength);
- newItems[oldLength] = path;
- this.sourceNameField.setItems(newItems);
- selectionIndex = oldLength;
- }
- this.sourceNameField.select(selectionIndex);
-
- resetSelection();
- }
- }
-
- /**
- * Update the tree to only select those elements that match the selected types
- */
- protected void setupSelectionsBasedOnSelectedTypes() {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(getContainer().getShell());
- final Map selectionMap = new Hashtable();
-
- final IElementFilter filter = new IElementFilter() {
-
- public void filterElements(Collection files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- Iterator filesList = files.iterator();
- while (filesList.hasNext()) {
- if (monitor.isCanceled())
- throw new InterruptedException();
- checkFile(filesList.next());
- }
- }
-
- public void filterElements(Object[] files, IProgressMonitor monitor) throws InterruptedException {
- if (files == null) {
- throw new InterruptedException();
- }
- for (int i = 0; i < files.length; i++) {
- if (monitor.isCanceled())
- throw new InterruptedException();
- checkFile(files[i]);
- }
- }
-
- private void checkFile(Object fileElement) {
- MinimizedFileSystemElement file = (MinimizedFileSystemElement) fileElement;
- if (isExportableExtension(file.getFileNameExtension())) {
- List elements = new ArrayList();
- FileSystemElement parent = file.getParent();
- if (selectionMap.containsKey(parent))
- elements = (List) selectionMap.get(parent);
- elements.add(file);
- selectionMap.put(parent, elements);
- }
- }
-
- };
-
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- public void run(final IProgressMonitor monitor) throws InterruptedException {
- monitor.beginTask("ImportPage.filterSelections", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- getSelectedResources(filter, monitor);
- }
- };
-
- try {
- dialog.run(true, true, runnable);
- } catch (InvocationTargetException exception) {
- //Couldn't start. Do nothing.
- return;
- } catch (InterruptedException exception) {
- //Got interrupted. Do nothing.
- return;
- }
- // make sure that all paint operations caused by closing the progress
- // dialog get flushed, otherwise extra pixels will remain on the screen until
- // updateSelections is completed
- getShell().update();
- // The updateSelections method accesses SWT widgets so cannot be executed
- // as part of the above progress dialog operation since the operation forks
- // a new process.
- if (selectionMap != null) {
- updateSelections(selectionMap);
- }
- }
-
- /*
- * (non-Javadoc) Method declared on IDialogPage. Set the selection up when it becomes visible.
- */
- public void setVisible(boolean visible) {
- super.setVisible(visible);
- resetSelection();
- if (visible)
- this.sourceNameField.setFocus();
- }
-
- /**
- * Update the selections with those in map . Implemented here to give inner class visibility
- *
- * @param map
- * Map - key tree elements, values Lists of list elements
- */
- protected void updateSelections(Map map) {
- super.updateSelections(map);
- }
-
- /**
- * Check if widgets are enabled or disabled by a change in the dialog. Provided here to give
- * access to inner classes.
- *
- * @param event
- * Event
- */
- protected void updateWidgetEnablements() {
-
- super.updateWidgetEnablements();
- }
-
- /**
- * Answer a boolean indicating whether self's source specification widgets currently all contain
- * valid values.
- */
- protected boolean validateSourceGroup() {
- if (getSourceDirectory() != null) {
- File sourceDirectory = getSourceDirectory();
- if (sourceDirectory == null) {
- setMessage(SOURCE_EMPTY_MESSAGE);
- enableButtonGroup(false);
- return false;
- }
-
- if (sourceConflictsWithDestination(new Path(sourceDirectory.getPath()))) {
- setErrorMessage(getSourceConflictMessage()); //$NON-NLS-1$
- enableButtonGroup(false);
- return false;
- }
-
- enableButtonGroup(true);
- return true;
- }
- //If there is nothing being provided to the input then there is a problem
- if (this.currentProvider == null) {
- setMessage(SOURCE_EMPTY_MESSAGE);
- enableButtonGroup(false);
- return false;
- }
- enableButtonGroup(true);
- return true;
- }
-
- /**
- * Returns whether the source location conflicts with the destination resource. This will occur
- * if the source is already under the destination.
- *
- * @param sourcePath
- * the path to check
- * @return <code>true</code> if there is a conflict, <code>false</code> if not
- */
- protected boolean sourceConflictsWithDestination(IPath sourcePath) {
-
- IContainer container = getSpecifiedContainer();
- if (container == null)
- return false;
- return getSpecifiedContainer().getLocation().isPrefixOf(sourcePath);
- }
-
- protected IPath getResourcePath() {
- return importedClassesPath;
- }
-
- //-------------------------------------------------------------------------------------
-
- //makesure to call mainpage.cancel()
- public boolean cancel() {
- clearProviderCache();
- return true;
- }
-
- /**
- * Clears the cached structure provider after first finalizing it properly.
- */
- protected void clearProviderCache() {
- if (providerCache != null) {
- closeZipFile(providerCache.getZipFile());
- providerCache = null;
- }
- }
-
- /**
- * Attempts to close the passed zip file, and answers a boolean indicating success.
- */
- protected boolean closeZipFile(ZipFile file) {
- try {
- file.close();
- } catch (IOException e) {
- //displayErrorDialog(DataTransferMessages.format("ZipImport.couldNotClose", new
- // Object[] { file.getName()})); //$NON-NLS-1$
- return false;
- }
-
- return true;
- }
-
- /**
- * Answer a handle to the zip file currently specified as being the source. Return null if this
- * file does not exist or is not of valid format.
- */
-
- protected ZipFile getSpecifiedSourceFile() {
- return getSpecifiedSourceFile(sourceNameField.getText());
- }
-
- /**
- * Answer a handle to the zip file currently specified as being the source. Return null if this
- * file does not exist or is not of valid format.
- */
-
- private ZipFile getSpecifiedSourceFile(String fileName) {
- if (fileName.length() == 0)
- return null;
-
- try {
- return ArchiveUtil.newZipFile(fileName);
- } catch (ZipException e) {
- //displayErrorDialog(DataTransferMessages.getString("ZipImport.badFormat"));
- // //$NON-NLS-1$
- } catch (IOException e) {
- //displayErrorDialog(DataTransferMessages.getString("ZipImport.couldNotRead"));
- // //$NON-NLS-1$
- }
-
- sourceNameField.setFocus();
- return null;
- }
-
- /**
- * Returns a structure provider for the specified zip file.
- */
- protected ZipFileStructureProvider getStructureProvider(ZipFile targetZip) {
- if (providerCache == null)
- providerCache = new ZipFileStructureProvider(targetZip);
- else if (!providerCache.getZipFile().getName().equals(targetZip.getName())) {
- clearProviderCache(); // ie.- new value, so finalize&remove old value
- providerCache = new ZipFileStructureProvider(targetZip);
- } else if (!providerCache.getZipFile().equals(targetZip))
- closeZipFile(targetZip); // ie.- duplicate handle to same .zip
-
- return providerCache;
- }
-
- /**
- * Open a FileDialog so that the user can specify the source file to import from
- */
- protected void handleSourceBrowseButtonPressedForZip() {
- String selectedFile = queryZipFileToImport();
- if (selectedFile != null) {
- if (!selectedFile.equals(sourceNameField.getText())) {
- //Be sure it is valid before we go setting any names
- ZipFile sourceFile = getSpecifiedSourceFile(selectedFile);
- if (sourceFile != null) {
- closeZipFile(sourceFile);
- setSourceName(selectedFile);
- selectionGroup.setFocus();
- }
- }
- }
- }
-
- /**
- * Import the resources with extensions as specified by the user
- */
- protected boolean importResourcesFromZip(List fileSystemObjects) {
-
- ZipFile zipFile = getSpecifiedSourceFile();
- ZipFileStructureProvider structureProvider = getStructureProvider(zipFile);
-
- boolean result = executeImportOperation(new ImportOperation(getContainerFullPath(), structureProvider.getRoot(), structureProvider, this, fileSystemObjects));
-
- closeZipFile(zipFile);
-
- return result;
- }
-
- /**
- * Opens a file selection dialog and returns a string representing the selected file, or
- * <code>null</code> if the dialog was canceled.
- */
- protected String queryZipFileToImport() {
- FileDialog dialog = new FileDialog(sourceNameField.getShell(), SWT.OPEN);
- dialog.setFilterExtensions(new String[]{FILE_IMPORT_MASK});
-
- String currentSourceString = sourceNameField.getText();
- int lastSeparatorIndex = currentSourceString.lastIndexOf(File.separator);
- if (lastSeparatorIndex != -1)
- dialog.setFilterPath(currentSourceString.substring(0, lastSeparatorIndex));
-
- return dialog.open();
- }
-
-}
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/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 d26ede2cd..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2006 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 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.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.AvailableJ2EEComponentsForEARContentProvider;
-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.earcreation.IEarFacetInstallDataModelProperties;
-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.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.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.TableItem;
-import org.eclipse.swt.widgets.Text;
-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;
-import org.eclipse.wst.web.ui.internal.wizards.DataModelFacetInstallPage;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public class EarFacetInstallPage extends DataModelFacetInstallPage 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));
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{CONTENT_DIR, J2EE_PROJECTS_LIST};
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- Composite modulesGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- modulesGroup.setLayout(layout);
- setInfopopID(IJ2EEUIContextIds.NEW_EAR_ADD_MODULES_PAGE);
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- modulesGroup.setLayoutData(gridData);
- createModuleProjectOptions(modulesGroup);
- createButtonsGroup(modulesGroup);
-
- final Composite composite = new Composite(modulesGroup, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
-
- this.contentDirLabel = new Label(composite, SWT.NONE);
- this.contentDirLabel.setText(Resources.contentDirLabel);
- this.contentDirLabel.setLayoutData(gdhfill());
-
- this.contentDir = new Text(composite, SWT.BORDER);
- this.contentDir.setLayoutData(gdhfill());
- synchHelper.synchText(contentDir, CONTENT_DIR, null);
- Dialog.applyDialogFont(parent);
- return modulesGroup;
- }
-
- protected int getJ2EEVersion() {
- IProjectFacetVersion version = (IProjectFacetVersion)getDataModel().getProperty(FACET_VERSION);
- return J2EEVersionUtil.convertVersionStringToInt(version.getVersionString());
- }
-
- /**
- * @param modulesGroup
- */
- private void createModuleProjectOptions(Composite modulesGroup) {
- moduleProjectsLabel = new Label(modulesGroup, SWT.NONE);
- moduleProjectsLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.J2EE_MODULE_DEPENDENCIES_LABEL));
- moduleProjectsLabel.setLayoutData(gdhfill());
-
- moduleProjectsViewer = CheckboxTableViewer.newCheckList(modulesGroup, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gData = new GridData(GridData.FILL_BOTH);
- gData.widthHint = 200;
- gData.heightHint = 80;
- moduleProjectsViewer.getControl().setLayoutData(gData);
- int j2eeVersion = getJ2EEVersion();
- AvailableJ2EEComponentsForEARContentProvider provider = new AvailableJ2EEComponentsForEARContentProvider(null, j2eeVersion);
- moduleProjectsViewer.setContentProvider(provider);
- moduleProjectsViewer.setLabelProvider(new J2EEComponentLabelProvider());
- 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);
- }
-
- /**
- *
- */
- 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(org.eclipse.swt.widgets.Composite parent) {
- Composite buttonGroup = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 4;
- buttonGroup.setLayout(layout);
- buttonGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- selectAllButton = new Button(buttonGroup, SWT.PUSH);
- selectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_SELECT));
- selectAllButton.addListener(SWT.Selection, this);
- GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.widthHint = SWT.DEFAULT;
- selectAllButton.setLayoutData(gd);
- deselectAllButton = new Button(buttonGroup, SWT.PUSH);
- deselectAllButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_DESELECT));
- deselectAllButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
- gd.widthHint = SWT.DEFAULT;
- deselectAllButton.setLayoutData(gd);
- newModuleButton = new Button(buttonGroup, SWT.PUSH);
- newModuleButton.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.APP_PROJECT_MODULES_PG_NEW));
- newModuleButton.addListener(SWT.Selection, this);
- gd = new GridData(GridData.GRAB_HORIZONTAL);
- gd.minimumWidth = SWT.DEFAULT;
- newModuleButton.setLayoutData(gd);
- }
-
- /**
- * @see org.eclipse.swt.widgets.Listener#handleEvent(Event)
- */
- public void handleEvent(Event evt) {
- if (evt.widget == selectAllButton)
- handleSelectAllButtonPressed();
- else if (evt.widget == deselectAllButton)
- handleDeselectAllButtonPressed();
- else if (evt.widget == newModuleButton)
- handleNewModuleButtonPressed();
- else
- super.handleEvent(evt);
- }
-
- /**
- *
- */
- private void handleNewModuleButtonPressed() {
- IDataModel aModel = createNewModuleModel();
- DefaultJ2EEComponentCreationWizard wizard = new DefaultJ2EEComponentCreationWizard(aModel);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- if (dialog.open() != IDialogConstants.CANCEL_ID) {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- 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()
- */
- protected void enter() {
- IWorkspaceRoot input = ResourcesPlugin.getWorkspace().getRoot();
- moduleProjectsViewer.setInput(input);
- super.enter();
- }
-
-
- private static final class Resources
-
- extends NLS
-
- {
- public static String pageTitle;
- public static String pageDescription;
- public static String contentDirLabel;
- public static String contentDirLabelInvalid;
-
- 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 4cd1fcefe..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarFacetInstallPage.properties
+++ /dev/null
@@ -1,14 +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 = EAR Module
-pageDescription = Configure EAR module settings.
-contentDirLabel = Content Directory:
-contentDirLabelInvalid = Content Directory (invalid):
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 db9f112c6..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectFirstPage.java
+++ /dev/null
@@ -1,39 +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.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);
- }
-
- protected IDialogSettings getDialogSettings() {
- return J2EEUIPlugin.getDefault().getDialogSettings();
- }
-
- protected String getModuleTypeID() {
- return IModuleConstants.JST_EAR_MODULE;
- }
-}
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 1d44e9a11..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarProjectWizard.java
+++ /dev/null
@@ -1,72 +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));
- }
-
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new EARFacetProjectCreationDataModelProvider());
- }
-
- public void setRuntimeInDataModel(IRuntime runtime){
- model.setProperty(FACET_RUNTIME, runtime);
- }
-
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle("org.eclipse.jst.j2ee.ui");
- final URL url = bundle.getEntry("icons/ear-wiz-banner.gif");
-
- return ImageDescriptor.createFromURL(url);
- }
-
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.ear");
- }
-
- protected IWizardPage createFirstPage() {
- return new EarProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- 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 f1ae976f5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/EarSelectionPanel.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005, 2006 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.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider;
-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 );
- this.addToEar.setLayoutData( gdhspan( new GridData(), 3 ) );
- 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 );
-
- this.newButton.addSelectionListener( new SelectionAdapter()
- {
- 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);
- String earName = model.getStringProperty( J2EEModuleFacetInstallDataModelProvider.EAR_PROJECT_NAME );
- wizard.setRuntimeInDataModel(runtime);
- wizard.setEARName( earName );
- if( dialog.open() != SWT.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 09d885f8f..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...
-earProjectLabel=EAR P&roject 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 cf3d2628d..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/RuntimeMismatchMarkerResolutions.java
+++ /dev/null
@@ -1,188 +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 );
- }
- else
- {
- 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/UtilityFacetInstallPage.java b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityFacetInstallPage.java
deleted file mode 100644
index 32fa6b806..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityFacetInstallPage.java
+++ /dev/null
@@ -1,51 +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 org.eclipse.jst.j2ee.internal.actions.IJ2EEUIContextIds;
-import org.eclipse.jst.j2ee.internal.wizard.J2EEModuleFacetInstallPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-public final class UtilityFacetInstallPage extends J2EEModuleFacetInstallPage {
- public UtilityFacetInstallPage() {
- super("utility.facet.install.page"); //$NON-NLS-1$
- setTitle(Resources.pageTitle);
- setDescription(Resources.pageDescription);
- }
-
- private static final class Resources extends NLS {
- public static String pageTitle;
- public static String pageDescription;
-
- static {
- initializeMessages(UtilityFacetInstallPage.class.getName(), Resources.class);
- }
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{EAR_PROJECT_NAME};
- }
-
- protected Composite createTopLevelComposite(Composite parent) {
- final Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(1, false));
- setInfopopID(IJ2EEUIContextIds.NEW_UTILITY_WIZARD_P3);
- //setupEarControl(composite);
- return composite;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityFacetInstallPage.properties b/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityFacetInstallPage.properties
deleted file mode 100644
index 0a6de07aa..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/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/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 52d0bff9a..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectFirstPage.java
+++ /dev/null
@@ -1,41 +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(UtilityFacetInstallPage.class.getName(), Resources.class);
- }
- }
-
- protected String getModuleFacetID() {
- return J2EEProjectUtilities.UTILITY;
- }
-
-}
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 5ab42cdf7..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/UtilityProjectWizard.java
+++ /dev/null
@@ -1,68 +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));
- }
-
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new UtilityProjectCreationDataModelProvider());
- }
-
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle("org.eclipse.jst.j2ee.ui");
- final URL url = bundle.getEntry("icons/util-wiz-banner.gif");
- return ImageDescriptor.createFromURL(url);
- }
-
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.utility");
- }
-
- protected IWizardPage createFirstPage() {
- return new UtilityProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- 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 3c3e4d23b..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientFacetInstallPage.java
+++ /dev/null
@@ -1,74 +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.actions.IJ2EEUIContextIds;
-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.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class AppClientFacetInstallPage extends J2EEModuleFacetInstallPage implements IAppClientFacetInstallDataModelProperties {
-
- private Label configFolderLabel;
- private Text configFolder;
- 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));
- }
-
- protected String[] getValidationPropertyNames() {
- return new String[]{EAR_PROJECT_NAME, CONFIG_FOLDER, CREATE_DEFAULT_MAIN_CLASS};
- }
-
- 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));
-
- configFolderLabel = new Label(composite, SWT.NONE);
- configFolderLabel.setText(J2EEUIMessages.getResourceString(J2EEUIMessages.SOURCEFOLDER));
- configFolderLabel.setLayoutData(gdhfill());
-
- configFolder = new Text(composite, SWT.BORDER);
- configFolder.setLayoutData(gdhfill());
- configFolder.setData("label", configFolderLabel); //$NON-NLS-1$
- synchHelper.synchText(configFolder, CONFIG_FOLDER, null);
-
- 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 );
- registerFacetVersionChangeListener();
-
- Dialog.applyDialogFont(parent);
- return composite;
- }
-
- protected void handleFacetVersionChangedEvent()
- {
- final IProjectFacetVersion fv = (IProjectFacetVersion) this.model.getProperty( FACET_VERSION );
- this.addDD.setVisible( fv == APPLICATION_CLIENT_50 );
- }
-
-}
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 5375bd996..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectFirstPage.java
+++ /dev/null
@@ -1,35 +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 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.wst.common.frameworks.datamodel.IDataModel;
-
-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);
- }
-
- protected String getModuleFacetID() {
- return J2EEProjectUtilities.APPLICATION_CLIENT;
- }
-
-}
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 cd2fa74cc..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/j2ee_ui/org/eclipse/jst/j2ee/ui/project/facet/appclient/AppClientProjectWizard.java
+++ /dev/null
@@ -1,64 +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));
- }
-
- protected IDataModel createDataModel() {
- return DataModelFactory.createDataModel(new AppClientFacetProjectCreationDataModelProvider());
- }
-
- 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);
- }
-
- protected IFacetedProjectTemplate getTemplate() {
- return ProjectFacetsManager.getTemplate("template.jst.appclient"); //$NON-NLS-1$
- }
-
- protected IWizardPage createFirstPage() {
- return new AppClientProjectFirstPage(model, "first.page"); //$NON-NLS-1$
- }
-
- 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 883882855..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.properties
+++ /dev/null
@@ -1,40 +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=J2EE 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.org
-javaee.ui.popupMenu=Java EE Tools
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 f33388688..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/plugin.xml
+++ /dev/null
@@ -1,794 +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"/>
-
-<!--================================-->
-<!-- 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>
- <adapterFactory
- className="org.eclipse.jst.j2ee.internal.provider.J2EEModulemapItemProviderAdapterFactory"
- packageURI="modulemap.xmi"
- id="org.eclipse.jst.j2ee.internal.provider.J2EEModulemapItemProviderAdapterFactory">
- <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">
- <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>
- </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 -->
-
- <extension point="org.eclipse.ui.propertyPages">
-
-
-<!-- =========== org.eclipse.jst.j2ee.internal.J2EEDependencyPage ============ -->
- <page
- adaptable="true"
- objectClass="org.eclipse.core.resources.IProject"
- name="%J2EEDependenciesPage.name"
- class="org.eclipse.jst.j2ee.internal.J2EEDependenciesPage"
- id="org.eclipse.jst.j2ee.internal.J2EEDependenciesPage">
- <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="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>
- </adapt>
- </and>
- </enabledWhen>
- </page>
-
- <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.wst.common.modulecore.ComponentProjectMigrator">
- <migratorExtension class="org.eclipse.jst.j2ee.internal.J2EEComponentProjectMigrator"/>
- </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>
-</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 21433fd17..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/j2ee_ui.properties
+++ /dev/null
@@ -1,357 +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 project:
-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 file:
-37=Application Client project:
-38=Import
-39=Import an Enterprise Application project based on selected resources.
-40=Enterprise Application Import
-41=EAR file:
-42=Overwrite existing resources without warning.
-43=Project import
-44=Optimized: make binary projects for EJB, client, and utility JARs
-45=Expanded: extract project contents for development
-46=Import for partial EAR development
-47=Select All
-48=Deselect All
-49=Utility JARs and web libraries
-50=Select the utility JARs from the list to be imported as utility projects. Unselected JARs will be imported as \nutility JARs in the EAR.
-51=Enter the new project name that will be created for the imported module file by selecting the second column of the table for edit.
-52=EAR Module and Utility JAR Projects
-53=Project locations
-54=This is the parent directory for all referenced projects. A subdirectory will be created for each project.
-55=Module Root Location:
-
-57=Select the location directory
-58=Modules in EAR
-59=New Project Name
-60=filenames
-61=projectnames
-62=Destination:
-63=Overwrite existing file
-64=Export source files
-65=Application Client Export
-66=Export Application Client project to the local file system.
-67=Export
-68=EAR Export
-69=Export Enterprise Application project to the local file system.
-70=Include project build paths and meta-data files
-71=If you select this option, the exported EAR maintains project names and external classpath dependencies, which are useful for later importing the EAR into binary projects. If you select this option and later import the EAR, only binary projects are created.
-72=Include
-74=Allow nested projects overwrites (module and utility projects)
-75=Delete project on overwrite
-76=EAR project:
-
-#migration strings
-77=Error
-78=An internal error occurred performing the selected action.
-79=Binary Project
-80=The action cannot be performed on the selection, which is part of a binary project.
-81=Information
-82=The chosen operation is not currently available.
-
-90=Create an EJB Client JAR module to hold the client interfaces and classes.
-91=Generate an annotated bean class
-92=Add support for annotated Java classes
-93=B&rowse...
-94=Na&me:
-95=Create a default Main class
-96=Create a default stateless session bean
-98=Generate 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 on the configured target runtime.
-
-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=Overwrite Existing Resources (projects and archives)
-J2EEUtilityJarImportPage_UI_7=Select Utility Jar:
-J2EEUtilityJarImportPage.0=Use Existing Linked Path Variable
-J2EEUtilityJarImportPage.1=Linked Path Variable:
-EARImportProjectsPage_UI_0=include
-EARImportProjectsPage_UI_1=file
-EARImportProjectsPage_UI_2=project
-EARImportProjectsPage_UI_3=Select New
-
-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=Copy Utility Jars into an existing EAR from an external location
-J2EEUtilityJarImportTypePage_UI_6=Create Linked Utility Jars in an existing EAR from an external location
-J2EEUtilityJarImportTypePage_UI_7=Project import options
-J2EEUtilityJarImportTypePage_UI_8=Select EAR Project
-J2EEUtilityJarImportTypePage_UI_9=EAR Project:
-J2EEUtilityJarImportTypePage_UI_10=Create Binary Projects
-J2EEUtilityJarImportTypePage_UI_11=Override Project Root (Specify location below)
-
-Deployment_Descriptor_UI_=Deployment Descriptor
-
-Rename_1=Rename
-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.
-Project_should_not_be_null_1_EXC_=IWAE0021E Project should not be null
-Non-project_in_selection_2_ERROR_=IWAE0024E Non-project in selection
-
-
-ERROR_OCCURRED_TITLE=Error
-ERROR_OCCURRED_MESSAGE=An internal error occurred performing the selected action.
-
-Import_Class_Files_UI=Import
-FileImport.selectSource=Select a directory to import from.
-Import_Classes=Import Class Files...
-ClassesImport.fromDir=Import from Directory
-ClassesImport.fromZip=Import from Zip or Jar
-DataTransfer.browse=Browse...
-DataTransfer.directory=Source:
-DataTransfer.fileSystemTitle=Import Class Files
-FileImport.importFileSystem=Import class files from the local file system.
-FileImport.sourceEmpty=Source must not be empty.
-FileImport.overwriteExisting=Overwrite existing resources without warning
-DataTransfer.selectAll=Select All
-DataTransfer.deselectAll=Deselect All
-Import_Class_Files_UI=Import
-FileImport.selectSource=Select a directory to import from.
-Inconsistent_Files_3=Inconsistent Files
-The_following_workspace_files_are_inconsistent_with_the_editor_4=The following workspace files are inconsistent with the editor: \n
-Update_the_editor_with_the_workspace_contents__5=Update the editor with the workspace contents?
-Error_checking_out_files_10=Error checking out files
-Inconsistent_files_detected_11=Inconsistent files detected
-Modules_UI_=Modules
-Utility_Java_Projects_UI_=Project Utility JARs
-The_following_files_are_inconsistent_with_the_file_system._Do_you_want_to_save_and_overwrite_these_files_on_the_file_system__12_WARN_=IWAE0020W The following files are inconsistent with the file system.\nDo you want to save and overwrite these files on the file system?
-J2EE_Level=J2EE Level:
-J2EE_12=1.2
-J2EE_13=1.3
-J2EE_14=1.4
-J2EE_12_DESCRIPTION=J2EE 1.2 includes Servlet Specification level 2.2, JSP Specification level 1.1, and EJB Specification level 1.1.
-J2EE_13_DESCRIPTION=J2EE 1.3 includes Connector Architecture Specification level 1.0, Servlet Specification level 2.3, JSP Specification level 1.2, and EJB Specification level 2.0.
-J2EE_14_DESCRIPTION=J2EE 1.4 includes Connector Architecture Specification level 1.5, Servlet Specification level 2.4, JSP Specification level 1.3, and EJB Specification level 2.1.
-EJB_LEVEL=EJB Level:
-EJB_11=1.1
-EJB_20=2.0
-EJB_21=2.1
-EJB_11_DESCRIPTION=EJB 1.1 includes Session Beans, BMP Beans and CMP 1.1 Beans. EJB 1.1 modules may be included in either 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:
-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 folder:
-BROWSE_BUTTON_LABEL=Browse...
-JAVA_PACKAGE_LABEL=Java package:
-CLASS_NAME_LABEL=Class name:
-SUPERCLASS_LABEL=Superclass:
-CONTAINER_SELECTION_DIALOG_TITLE=Container Selection
-CONTAINER_SELECTION_DIALOG_DESC=Choose a Container:
-CONTAINER_SELECTION_DIALOG_VALIDATOR_MESG=Choose a valid java source folder for the selected module.
-PACKAGE_SELECTION_DIALOG_TITLE=Package Selection
-PACKAGE_SELECTION_DIALOG_DESC=Choose a package:
-PACKAGE_SELECTION_DIALOG_MSG_NONE=No packages to choose from
-SUPERCLASS_SELECTION_DIALOG_TITLE=Superclass Selection
-SUPERCLASS_SELECTION_DIALOG_DESC=Choose a superclass:
-JAVA_CLASS_MODIFIERS_LABEL=Modifiers:
-JAVA_CLASS_PUBLIC_CHECKBOX_LABEL=Public
-JAVA_CLASS_ABSTRACT_CHECKBOX_LABEL=Abstract
-JAVA_CLASS_FINAL_CHECKBOX_LABEL=Final
-JAVA_CLASS_INTERFACES_LABEL=Interfaces:
-JAVA_CLASS_METHOD_STUBS_LABEL=Which method stubs would you like to create?
-JAVA_CLASS_MAIN_CHECKBOX_LABEL=public static void main(String[] args)
-JAVA_CLASS_CONSTRUCTOR_CHECKBOX_LABEL=Constructors from superclass
-JAVA_CLASS_INHERIT_CHECKBOX_LABEL=Inherited abstract methods
-ADD_BUTTON_LABEL=Add...
-REMOVE_BUTTON=Remove
-YES_BUTTON=Yes
-NO_BUTTON=No
-OK_BUTTON=OK
-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
-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 2735cb3d5..000000000
--- a/plugins/org.eclipse.jst.j2ee.ui/property_files/manifest_ui.properties
+++ /dev/null
@@ -1,48 +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.
-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/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/.classpath b/plugins/org.eclipse.jst.j2ee/.classpath
deleted file mode 100644
index 9c9e23fae..000000000
--- a/plugins/org.eclipse.jst.j2ee/.classpath
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="j2eeplugin"/>
- <classpathentry kind="src" path="contenttype"/>
- <classpathentry kind="src" path="common"/>
- <classpathentry kind="src" path="commonedit"/>
- <classpathentry kind="src" path="earproject"/>
- <classpathentry kind="src" path="j2eecreation"/>
- <classpathentry kind="src" path="archiveops"/>
- <classpathentry kind="src" path="applicationedit"/>
- <classpathentry kind="src" path="appclientcreation"/>
- <classpathentry kind="src" path="property_files"/>
- <classpathentry kind="src" path="refactor"/>
- <classpathentry kind="src" path="classpathdep"/>
- <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/.cvsignore b/plugins/org.eclipse.jst.j2ee/.cvsignore
deleted file mode 100644
index 590084fe0..000000000
--- a/plugins/org.eclipse.jst.j2ee/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-bin
-runtime
-temp.folder
-build.xml
-@dot
-src.zip
-javaCompiler...args
diff --git a/plugins/org.eclipse.jst.j2ee/.project b/plugins/org.eclipse.jst.j2ee/.project
deleted file mode 100644
index 8f2cf14e0..000000000
--- a/plugins/org.eclipse.jst.j2ee/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.j2ee</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 579a81769..000000000
--- a/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,62 +0,0 @@
-#Mon Feb 18 15:57:09 EST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=ignore
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nullReference=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.ui.prefs b/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index f6917e842..000000000
--- a/plugins/org.eclipse.jst.j2ee/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Mar 19 17:23:53 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.javadoc=false
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.logError(${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF
deleted file mode 100644
index a96b7cf71..000000000
--- a/plugins/org.eclipse.jst.j2ee/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,86 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.jst.j2ee; singleton:=true
-Bundle-Version: 1.1.206.qualifier
-Bundle-Activator: org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.j2ee.application.internal.operations;x-internal:=true,
- org.eclipse.jst.j2ee.applicationclient.componentcore.util,
- org.eclipse.jst.j2ee.applicationclient.internal.creation;x-internal:=true,
- org.eclipse.jst.j2ee.applicationclient.internal.modulecore.util;x-internal:=true,
- org.eclipse.jst.j2ee.archive,
- org.eclipse.jst.j2ee.classpathdep,
- org.eclipse.jst.j2ee.common.internal.provider;x-internal:=true,
- org.eclipse.jst.j2ee.componentcore,
- org.eclipse.jst.j2ee.componentcore.util,
- org.eclipse.jst.j2ee.contenttype,
- org.eclipse.jst.j2ee.datamodel.properties,
- org.eclipse.jst.j2ee.earcreation,
- org.eclipse.jst.j2ee.internal;x-internal:=true,
- org.eclipse.jst.j2ee.internal.application.common;x-internal:=true,
- org.eclipse.jst.j2ee.internal.application.provider;x-internal:=true,
- org.eclipse.jst.j2ee.internal.archive,
- org.eclipse.jst.j2ee.internal.archive.operations;x-internal:=true,
- org.eclipse.jst.j2ee.internal.classpathdep;x-internal:=true,
- org.eclipse.jst.j2ee.internal.common;x-internal:=true,
- org.eclipse.jst.j2ee.internal.common.classpath,
- org.eclipse.jst.j2ee.internal.common.operations;x-internal:=true,
- org.eclipse.jst.j2ee.internal.componentcore,
- org.eclipse.jst.j2ee.internal.delete;x-internal:=true,
- org.eclipse.jst.j2ee.internal.deploy;x-internal:=true,
- org.eclipse.jst.j2ee.internal.deployables;x-internal:=true,
- org.eclipse.jst.j2ee.internal.earcreation;x-internal:=true,
- org.eclipse.jst.j2ee.internal.earcreation.modulemap;x-internal:=true,
- org.eclipse.jst.j2ee.internal.modulecore.util;x-internal:=true,
- org.eclipse.jst.j2ee.internal.moduleextension;x-internal:=true,
- org.eclipse.jst.j2ee.internal.plugin;x-internal:=true,
- org.eclipse.jst.j2ee.internal.project;x-internal:=true,
- org.eclipse.jst.j2ee.internal.project.facet,
- org.eclipse.jst.j2ee.internal.provider;x-internal:=true,
- org.eclipse.jst.j2ee.internal.rename;x-internal:=true,
- org.eclipse.jst.j2ee.internal.servertarget;x-internal:=true,
- org.eclipse.jst.j2ee.internal.validation;x-internal:=true,
- org.eclipse.jst.j2ee.internal.webservices;x-internal:=true,
- org.eclipse.jst.j2ee.model,
- org.eclipse.jst.j2ee.project,
- org.eclipse.jst.j2ee.project.datamodel.properties,
- org.eclipse.jst.j2ee.project.facet,
- org.eclipse.jst.j2ee.refactor,
- org.eclipse.jst.j2ee.refactor.listeners,
- org.eclipse.jst.j2ee.refactor.operations
-Require-Bundle: org.eclipse.emf.edit;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jem.workbench;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.jst.j2ee.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.wst.server.core;bundle-version="[1.0.102,2.0.0)",
- org.eclipse.jst.server.core;bundle-version="[1.0.102,2.0.0)",
- org.eclipse.wst.common.emf;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.emf.ecore.xmi;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jem.workbench;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.wst.common.emfworkbench.integration;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jem;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.wst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.codegen;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.common.frameworks;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.common.modulecore;bundle-version="[1.1.0,1.2.0)";visibility:=reexport,
- 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.wst.common.uriresolver;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.jst.common.project.facet.core;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.web;bundle-version="[1.1.0,1.2.0)",
- com.ibm.icu;bundle-version="[3.4.4,4.0.0)",
- org.eclipse.wst.common.environment;bundle-version="[1.0.100,1.1.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.jst.j2ee/about.html b/plugins/org.eclipse.jst.j2ee/about.html
deleted file mode 100644
index 2199df3f0..000000000
--- a/plugins/org.eclipse.jst.j2ee/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/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/AppClientArtifactEdit.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/AppClientArtifactEdit.java
deleted file mode 100644
index aa9d2f254..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/AppClientArtifactEdit.java
+++ /dev/null
@@ -1,442 +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.applicationclient.componentcore.util;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.client.ApplicationClient;
-import org.eclipse.jst.j2ee.client.ApplicationClientResource;
-import org.eclipse.jst.j2ee.client.ClientFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.archive.operations.AppClientComponentLoadStrategyImpl;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-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.internal.ArtifactEditModel;
-import org.eclipse.wst.common.componentcore.internal.BinaryComponentHelper;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.util.IArtifactEditFactory;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientArtifactEdit extends EnterpriseArtifactEdit implements IArtifactEditFactory {
-
- private static final String APPCLIENT_CONTENT_TYPE = "org.eclipse.jst.j2ee.appclientDD";
- /**
- * <p>
- * Identifier used to link AppClientArtifactEdit to a AppClientEditAdapterFactory {@see
- * AppClientEditAdapterFactory} stored in an AdapterManger (@see AdapterManager)
- * </p>
- */
-
- public static final Class ADAPTER_TYPE = AppClientArtifactEdit.class;
-
- /**
- *
- */
- public AppClientArtifactEdit() {
- super();
- }
-
- public AppClientArtifactEdit(IVirtualComponent aModule) {
- super(aModule);
- }
-
- protected BinaryComponentHelper initBinaryComponentHelper(IVirtualComponent binaryModule) {
- return new JavaEEBinaryComponentHelper(binaryModule);
- }
-
-
- /**
- * @param aHandle
- * @param toAccessAsReadOnly
- * @throws IllegalArgumentException
- */
- public AppClientArtifactEdit(IProject aProject, boolean toAccessAsReadOnly) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly);
- }
-
- public AppClientArtifactEdit(IProject aProject, boolean toAccessAsReadOnly, boolean forCreate) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly, forCreate, J2EEProjectUtilities.APPLICATION_CLIENT);
- }
-
- public AppClientArtifactEdit(ArtifactEditModel anArtifactEditModel) {
- super(anArtifactEditModel);
- }
-
- /**
- * <p>Note: This method is for internal use only. Clients should not call this method.</p>
- * @param aNature
- * @param aModule
- * @param toAccessAsReadOnly
- */
- protected AppClientArtifactEdit(ModuleCoreNature aNature, IVirtualComponent aModule, boolean toAccessAsReadOnly) {
- super(aNature, aModule, toAccessAsReadOnly);
- }
-
- /**
- * <p>
- * Retrieves the underlying resource from the ArtifactEditModel using defined URI.
- * </p>
- *
- * @return Resource
- *
- */
-
- public Resource getDeploymentDescriptorResource() {
- verifyOperationSupported();
- if(isBinary()){
- return getBinaryComponentHelper().getResource(getRootURI());
- }
- return getArtifactEditModel().getResource(getRootURI());
- }
-
- /**
- * <p>
- * Obtains the ApplicationClient (@see ApplicationClient) root object from the ApplicationClientResource. If the root object does
- * not exist, then one is created (@link addAppClientJarIfNecessary(getAppClientXmiResource())).
- * The root object contains all other resource defined objects.
- * </p>
- *
- * @return EObject
- *
- */
- public EObject getDeploymentDescriptorRoot() {
- verifyOperationSupported();
- List contents = getDeploymentDescriptorResource().getContents();
- if (contents.size() > 0)
- return (EObject) contents.get(0);
- if(isBinary()){
- return null;
- }
- addAppClientIfNecessary(getApplicationClientXmiResource());
- return (EObject) contents.get(0);
- }
-
- /**
- *
- * @return ApplicationClientResource from (@link getDeploymentDescriptorResource())
- *
- */
-
- public ApplicationClientResource getApplicationClientXmiResource() {
- verifyOperationSupported();
- return (ApplicationClientResource) getDeploymentDescriptorResource();
- }
-
- /**
- * <p>
- * Creates a deployment descriptor root object (ApplicationClient) and populates with data. Adds the root
- * object to the deployment descriptor resource.
- * </p>
- *
- * <p>
- *
- * @param aModule
- * A non-null pointing to a {@see XMLResource}
- *
- * Note: This method is typically used for JUNIT - move?
- * </p>
- */
- protected void addAppClientIfNecessary(XMLResource aResource) {
- if(isBinary()){
- throwAttemptedBinaryEditModelAccess();
- }
- if (aResource != null && aResource.getContents().isEmpty()) {
- ApplicationClient appClient = ClientFactory.eINSTANCE.createApplicationClient();
- aResource.getContents().add(appClient);
- URI moduleURI = getArtifactEditModel().getModuleURI();
- try {
- appClient.setDisplayName(StructureEdit.getDeployedName(moduleURI));
- } catch (UnresolveableURIException e) {
- //Ignore
- }
- aResource.setID(appClient, J2EEConstants.APP_CLIENT_ID);
- //TODO add more mandatory elements
- }
- }
-
- /**
- * <p>
- * Method used for adding a j2ee project to an ear project; subclasses must override to create a
- * new instance of the correct kind of Module
- * </p>
- */
- public Module createNewModule() {
- if(isBinary()){
- throwAttemptedBinaryEditModelAccess();
- }
- return ((ApplicationPackage) EPackage.Registry.INSTANCE.getEPackage(ApplicationPackage.eNS_URI)).getApplicationFactory().createJavaClientModule();
- }
-
- /**
- *
- * @return ApplicationClient from (@link getDeploymentDescriptorRoot())
- *
- */
- public ApplicationClient getApplicationClient() {
- verifyOperationSupported();
- return (ApplicationClient) getDeploymentDescriptorRoot();
- }
-
- /**
- * <p>
- * Retrieves J2EE version information from ApplicationClientResource.
- * </p>
- *
- * @return an integer representation of a J2EE Spec version
- *
- */
-
- public int getJ2EEVersion() {
- verifyOperationSupported();
- return getApplicationClientXmiResource().getJ2EEVersionID();
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the given
- * {@see WorkbenchComponent}. Instances of ArtifactEdit that are returned through this method
- * must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an ArtifactEdit facade for a specific {@see WorkbenchComponent}&nbsp;that
- * will not be used for editing. Invocations of any save*() API on an instance returned from
- * this method will throw exceptions.
- * </p>
- * <p>
- * <b>The following method may return null. </b>
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that resolves to an
- * accessible project in the workspace
- * @return An instance of ArtifactEdit that may only be used to read the underlying content
- * model
- */
- public static AppClientArtifactEdit getAppClientArtifactEditForRead(IProject aProject) {
- AppClientArtifactEdit artifactEdit = null;
- try {
- if (isValidApplicationClientModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new AppClientArtifactEdit(aProject, true, false);
- } catch (Exception e) {
- artifactEdit = null;
- }
- return artifactEdit;
- }
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the given
- * {@see WorkbenchComponent}. Instances of ArtifactEdit that are returned through this method
- * must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an ArtifactEdit facade for a specific {@see WorkbenchComponent}&nbsp;that
- * will be used for editing.
- * </p>
- * <p>
- * <b>The following method may return null. </b>
- * </p>
- *
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that resolves to an
- * accessible project in the workspace
- * @return An instance of ArtifactEdit that may be used to modify and persist changes to the
- * underlying content model
- */
- public static AppClientArtifactEdit getAppClientArtifactEditForWrite(IProject aProject) {
- AppClientArtifactEdit artifactEdit = null;
- try {
- if (isValidApplicationClientModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new AppClientArtifactEdit(aProject, false, false);
- } catch (Exception e) {
- artifactEdit = null;
- }
- return artifactEdit;
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the given
- * {@see WorkbenchComponent}. Instances of AppClientArtifactEdit that are returned through this method
- * must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an AppClientArtifactEdit facade for a specific {@see WorkbenchComponent}&nbsp;that will not
- * be used for editing. Invocations of any save*() API on an instance returned from this method
- * will throw exceptions.
- * </p>
- * <p>
- * <b>This method may return null. </b>
- * </p>
- * <p>Note: This method is for internal use only. Clients should not call this method.</p>
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that resolves to an accessible
- * project in the workspace
- * @return An instance of AppClientArtifactEdit that may only be used to read the underlying content
- * model
- * @throws UnresolveableURIException
- * could not resolve uri.
- */
- public static AppClientArtifactEdit getAppClientArtifactEditForRead(IVirtualComponent aModule) {
- if (aModule == null)
- return null;
- if(aModule.isBinary()){
- return new AppClientArtifactEdit(aModule);
- }
- return getAppClientArtifactEditForRead(aModule.getProject());
- }
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the given
- * {@see WorkbenchComponent}. Instances of AppClientArtifactEdit that are returned through this method
- * must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an AppClientArtifactEdit facade for a specific {@see WorkbenchComponent}&nbsp;that
- * will be used for editing.
- * </p>
- * <p>
- * <b>This method may return null. </b>
- * </p>
- * <p>Note: This method is for internal use only. Clients should not call this method.</p>
- * @param aModule
- * A valid {@see WorkbenchComponent}&nbsp;with a handle that resolves to an accessible
- * project in the workspace
- * @return An instance of AppClientArtifactEdit that may be used to modify and persist changes to the
- * underlying content model
- */
- public static AppClientArtifactEdit getAppClientArtifactEditForWrite(IVirtualComponent aModule) {
- if (aModule == null || aModule.isBinary())
- return null;
- return getAppClientArtifactEditForWrite(aModule.getProject());
- }
-
- /**
- * <p>Note: This method is for internal use only. Clients should not call this method.</p>
- * @param module
- * A {@see WorkbenchComponent}
- * @return True if the supplied module
- * {@see ArtifactEdit#isValidEditableModule(WorkbenchComponent)}and the moduleTypeId is a
- * JST module
- */
- public static boolean isValidApplicationClientModule(IVirtualComponent aModule) throws UnresolveableURIException {
- if (!isValidEditableModule(aModule))
- return false;
- return J2EEProjectUtilities.isApplicationClientProject(aModule.getProject());
- }
-
- public EObject createModelRoot() {
- if(isBinary()){
- throwAttemptedBinaryEditModelAccess();
- }
- return createModelRoot(getJ2EEVersion());
- }
- /* (non-Javadoc)
- * @see org.eclipse.jst.j2ee.internal.modulecore.util.EnterpriseArtifactEdit#createModelRoot(java.lang.Integer)
- */
- public EObject createModelRoot(int version) {
- if(isBinary()){
- throwAttemptedBinaryEditModelAccess();
- }
- ApplicationClientResource res = (ApplicationClientResource)getDeploymentDescriptorResource();
- res.setModuleVersionID(version);
- addAppClientIfNecessary(res);
- return ((ApplicationClientResource)getDeploymentDescriptorResource()).getRootObject();
- }
-
- public ArtifactEdit createArtifactEditForRead(IVirtualComponent aComponent) {
-
- return getAppClientArtifactEditForRead(aComponent);
- }
-
- public ArtifactEdit createArtifactEditForWrite(IVirtualComponent aComponent) {
-
- return getAppClientArtifactEditForWrite(aComponent);
- }
-
- public Archive asArchive(boolean includeSource, boolean includeClasspathComponents) throws OpenFailureException{
- if (isBinary()) {
- JavaEEBinaryComponentHelper helper = (JavaEEBinaryComponentHelper)getBinaryComponentHelper();
- return helper.accessLegacyArchive();
- } else {
- AppClientComponentLoadStrategyImpl loader = new AppClientComponentLoadStrategyImpl(getComponent());
- loader.setExportSource(includeSource);
- String uri = ModuleURIUtil.getHandleString(getComponent());
- return CommonarchiveFactory.eINSTANCE.openApplicationClientFile(loader, uri);
- }
- }
-
- public static void createDeploymentDescriptor(IProject project, int version) {
- AppClientArtifactEdit appClientEdit = new AppClientArtifactEdit(project,false,true);
- try {
- appClientEdit.createModelRoot(version);
- appClientEdit.save(null);
- } finally { // Make sure new resource is removed - the uri used for creation shouldn't be cached
- Resource newRes = appClientEdit.getDeploymentDescriptorResource();
- WorkbenchResourceHelperBase.getResourceSet(project).getResources().remove(newRes);
- newRes.unload();
- appClientEdit.dispose();
- }
- }
- public IModelProvider create(IProject project) {
- return (IModelProvider)getAppClientArtifactEditForRead(project);
- }
-
- public IModelProvider create(IVirtualComponent component) {
- return (IModelProvider)getAppClientArtifactEditForRead(component);
- }
- public void modify(Runnable runnable, IPath modelPath) {
- setWritableEdit(getAppClientArtifactEditForWrite(getProject()));
- try{
- runnable.run();
- if( getWritableEdit() != null ){
- // Always save regardless of resource path passed - Artifactedits save resources as a unit
- getWritableEdit().saveIfNecessary( new NullProgressMonitor() );
- }
-
- } finally { //Properly dispose the write artifact edit
- getWritableEdit().dispose();
- setWritableEdit(null);
- }
- }
-
-
- protected String getContentTypeDescriber() {
-
- return APPCLIENT_CONTENT_TYPE;
- }
- protected URI getRootURI() {
- return J2EEConstants.APP_CLIENT_DD_URI_OBJ;
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/package.xml b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/package.xml
deleted file mode 100644
index 49e3e8c7c..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/componentcore/util/package.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
- <head>
- <meta
- name="root"
- content="../../../../../../../" />
- <title>EJB Artifact Edit api overview</title>
- </head>
-
- <body>
- <abstract>
- This package includes the AppClientArtifactEdit api. This api is used to work with the emf model
- of a flexible application client module. It contains api to read and serialize out the emf model for application client modules.
- </abstract>
-
- <a href="#top">top</a>
- </body>
-</html>
- \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientComponentImportDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientComponentImportDataModelProvider.java
deleted file mode 100644
index 9d1eba3cd..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientComponentImportDataModelProvider.java
+++ /dev/null
@@ -1,93 +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.applicationclient.internal.creation;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.datamodel.properties.IAppClientComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.archive.operations.AppClientComponentImportOperation;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.common.XMLResource;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IAppClientFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetInstallDataModelProperties;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-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.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-
-public final class AppClientComponentImportDataModelProvider extends J2EEComponentImportDataModelProvider implements IAppClientComponentImportDataModelProperties {
-
- public AppClientComponentImportDataModelProvider() {
- super();
- }
-
- protected int getType() {
- return XMLResource.APP_CLIENT_TYPE;
- }
-
- protected Archive openArchive(String uri) throws OpenFailureException {
- return CommonarchiveFactory.eINSTANCE.openApplicationClientFile(getArchiveOptions(), uri);
- }
-
- protected void handleUnknownType(JavaEEQuickPeek jqp) {
- jqp.setType(J2EEVersionConstants.APPLICATION_CLIENT_TYPE);
- jqp.setVersion(J2EEVersionConstants.JEE_5_0_ID);
- jqp.setJavaEEVersion(J2EEVersionConstants.JEE_5_0_ID);
- }
-
-
- public IDataModelOperation getDefaultOperation() {
- return new AppClientComponentImportOperation(model);
- }
-
- protected IDataModel createJ2EEComponentCreationDataModel() {
- IDataModel appClientDataModel = DataModelFactory.createDataModel(new AppClientFacetProjectCreationDataModelProvider());
- FacetDataModelMap map = (FacetDataModelMap)appClientDataModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- //need to ensure no default Main class is created during import
- map.getFacetDataModel(J2EEProjectUtilities.APPLICATION_CLIENT).setBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS, false);
- return appClientDataModel;
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean set = super.propertySet(propertyName, propertyValue);
- if (propertyName.equals(ARCHIVE_WRAPPER)) {
- IDataModel moduleDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
- if (getArchiveWrapper() != null) {
- FacetDataModelMap map = (FacetDataModelMap) moduleDM.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel appClientFacetDataModel = map.getFacetDataModel( J2EEProjectUtilities.APPLICATION_CLIENT );
-
- int version = getModuleSpecVersion();
- String versionText = J2EEVersionUtil.getJ2EETextVersion( version );
- appClientFacetDataModel.setStringProperty(IFacetDataModelProperties.FACET_VERSION_STR, versionText);
- updateJavaFacetVersion();
- model.notifyPropertyChange(PROJECT_NAME, IDataModel.VALID_VALUES_CHG);
- }
- }
- return set;
- }
-
- public void init() {
- super.init();
- IDataModel componentCreationDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
- FacetDataModelMap map = (FacetDataModelMap) componentCreationDM.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel appClientFacet = map.getFacetDataModel( IJ2EEFacetConstants.APPLICATION_CLIENT );
- appClientFacet.setBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD, false);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientCreationResourceHandler.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientCreationResourceHandler.java
deleted file mode 100644
index c35ede999..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientCreationResourceHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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.applicationclient.internal.creation;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class AppClientCreationResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "appclientcreation";//$NON-NLS-1$
-
- private AppClientCreationResourceHandler() {
- // Do not instantiate
- }
-
- public static String Error_occured_getting_appl_ERROR_;
- public static String Creating_Application_Clien_UI_;
- public static String Error_occured_loading_appl_UI_;
- public static String Not_an_Application_Client_project_ERROR_;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, AppClientCreationResourceHandler.class);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientFacetProjectCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientFacetProjectCreationDataModelProvider.java
deleted file mode 100644
index 4312433bc..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/AppClientFacetProjectCreationDataModelProvider.java
+++ /dev/null
@@ -1,72 +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.applicationclient.internal.creation;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
-import org.eclipse.jst.common.project.facet.JavaFacetUtils;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetProjectCreationDataModelProvider;
-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.project.facet.core.IProjectFacet;
-import org.eclipse.wst.project.facet.ProductManager;
-
-public class AppClientFacetProjectCreationDataModelProvider extends J2EEFacetProjectCreationDataModelProvider {
-
- public AppClientFacetProjectCreationDataModelProvider() {
- super();
- }
-
- public void init() {
- super.init();
-
- Collection<IProjectFacet> requiredFacets = new ArrayList<IProjectFacet>();
- requiredFacets.add(JavaFacetUtils.JAVA_FACET);
- requiredFacets.add(IJ2EEFacetConstants.APPLICATION_CLIENT_FACET);
- setProperty(REQUIRED_FACETS_COLLECTION, requiredFacets);
-
- FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
- IDataModel javaFacet = map.getFacetDataModel(JavaFacetUtils.JAVA_FACET.getId());
- IDataModel appClientFacet = map.getFacetDataModel(IJ2EEFacetConstants.APPLICATION_CLIENT_FACET.getId());
- String appClientRoot = appClientFacet.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
- javaFacet.setProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME, appClientRoot);
- // If using optimized single root structure, set the output folder to the content root
- if (ProductManager.shouldUseSingleRootStructure())
- javaFacet.setProperty(IJavaFacetInstallDataModelProperties.DEFAULT_OUTPUT_FOLDER_NAME, appClientRoot);
- appClientFacet.addListener(new IDataModelListener() {
- public void propertyChanged(DataModelEvent event) {
- if (IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME.equals(event.getPropertyName())) {
- if (isPropertySet(EAR_PROJECT_NAME))
- setProperty(EAR_PROJECT_NAME, event.getProperty());
- else
- model.notifyPropertyChange(EAR_PROJECT_NAME, IDataModel.DEFAULT_CHG);
- }else if (IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR.equals(event.getPropertyName())) {
- setProperty(ADD_TO_EAR, event.getProperty());
- }
- }
- });
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- if( propertyName.equals( MODULE_URI )){
- FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
- IDataModel appFacet = map.getFacetDataModel( J2EEProjectUtilities.APPLICATION_CLIENT );
- appFacet.setProperty( IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, propertyValue );
- }
- return super.propertySet(propertyName, propertyValue);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/IConfigurationConstants.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/IConfigurationConstants.java
deleted file mode 100644
index 8848cf02b..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/creation/IConfigurationConstants.java
+++ /dev/null
@@ -1,21 +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.applicationclient.internal.creation;
-
-
-/**
- * Insert the type's description here. Creation date: (4/4/2001 10:05:24 AM)
- *
- * @author: Administrator
- */
-public interface IConfigurationConstants {
- final String PLUG_IN_ID = "org.eclipse.jst.j2ee"; //$NON-NLS-1$
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/modulecore/util/AppClientEditAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/modulecore/util/AppClientEditAdapterFactory.java
deleted file mode 100644
index f3f5095bf..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/applicationclient/internal/modulecore/util/AppClientEditAdapterFactory.java
+++ /dev/null
@@ -1,38 +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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.applicationclient.internal.modulecore.util;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.applicationclient.componentcore.util.AppClientArtifactEdit;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-
-public class AppClientEditAdapterFactory implements IAdapterFactory {
-
- public AppClientEditAdapterFactory() {
- super();
- }
-
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType == AppClientArtifactEdit.ADAPTER_TYPE || adapterType == ArtifactEdit.ADAPTER_TYPE) {
- ArtifactEditModel editModel = (ArtifactEditModel) adaptableObject;
- if (J2EEProjectUtilities.isApplicationClientProject(editModel.getProject()))
- return new AppClientArtifactEdit((ArtifactEditModel) adaptableObject);
- }
- return null;
- }
-
- public Class[] getAdapterList() {
- return new Class[]{ArtifactEdit.class, AppClientArtifactEdit.class};
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java
deleted file mode 100644
index 617fa4fd4..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,56 +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.project.facet;
-
-import java.util.Set;
-
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.plugin.IJ2EEModuleConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPreferences;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class AppClientFacetInstallDataModelProvider extends J2EEModuleFacetInstallDataModelProvider implements IAppClientFacetInstallDataModelProperties {
-
- public AppClientFacetInstallDataModelProvider() {
- super();
- }
-
- public Set getPropertyNames() {
- Set names = super.getPropertyNames();
- names.add(CREATE_DEFAULT_MAIN_CLASS);
- return names;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(FACET_ID))
- return APPLICATION_CLIENT;
- else if (propertyName.equals(CREATE_DEFAULT_MAIN_CLASS))
- return Boolean.TRUE;
- else if (propertyName.equals(CONFIG_FOLDER))
- return J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.APP_CLIENT_CONTENT_FOLDER);
- else if (propertyName.equals(MODULE_URI)) {
- String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ','_');
- return projectName + IJ2EEModuleConstants.JAR_EXT;
- } else if (propertyName.equals(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)) {
- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
- if(facetVersion == APPLICATION_CLIENT_50){
- return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.APP_CLIENT_GENERATE_DD));
- }
- return Boolean.TRUE;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- protected int convertFacetVersionToJ2EEVersion(IProjectFacetVersion version) {
- return J2EEVersionUtil.convertAppClientVersionStringToJ2EEVersionID(version.getVersionString());
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java
deleted file mode 100644
index dd892a720..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetInstallDelegate.java
+++ /dev/null
@@ -1,198 +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.project.facet;
-
-import java.io.ByteArrayInputStream;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.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.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-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.jst.common.project.facet.WtpUtils;
-import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
-import org.eclipse.jst.j2ee.applicationclient.componentcore.util.AppClientArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainerUtils;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.FacetDataModelProvider;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-public class AppClientFacetInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
- if (monitor != null)
- monitor.beginTask("", 1); //$NON-NLS-1$
- try {
- IDataModel model = (IDataModel) config;
- final IJavaProject jproj = JavaCore.create(project);
-
- // Add WTP natures.
- WtpUtils.addNatures(project);
-
- // Setup the flexible project structure.
- final IVirtualComponent c = createFlexibleProject(monitor, project, model, jproj, fv);
-
- // Setup the classpath.
- ClasspathHelper.removeClasspathEntries(project, fv);
- if (!ClasspathHelper.addClasspathEntries(project, fv)) {
- // TODO: Support the no runtime case.
- // ClasspathHelper.addClasspathEntries( project, fv, <something> );
- }
-
-
-// // Add main class if necessary
-// if (model.getBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS))
-// addMainClass(monitor, model, project);
-
- if(J2EEComponentClasspathContainerUtils.getDefaultUseEARLibraries()){
- final IPath earLibContainer = new Path(J2EEComponentClasspathContainer.CONTAINER_ID);
- addToClasspath(jproj, JavaCore.newContainerEntry(earLibContainer));
- }
-
- try {
- ((IDataModelOperation) model.getProperty(FacetDataModelProvider.NOTIFICATION_OPERATION)).execute(monitor, null);
- } catch (ExecutionException e) {
- Logger.getLogger().logError(e);
- }
-
- if (monitor != null)
- monitor.worked(1);
- } catch (Exception e) {
- Logger.getLogger().logError(e);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- protected IVirtualComponent createFlexibleProject(IProgressMonitor monitor, IProject project, IDataModel model, IJavaProject jproj, IProjectFacetVersion fv) throws Exception {
- // Create the directory structure.
- final IWorkspace ws = ResourcesPlugin.getWorkspace();
- final IPath pjpath = project.getFullPath();
-
- final IVirtualComponent c = ComponentCore.createComponent(project, false);
- c.create(0, null);
- setOutputFolder(model, c);
- final IVirtualFolder root = c.getRootFolder();
-
- IFolder sourceFolder = null;
- String configFolder = null;
- configFolder = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
- root.createLink(new Path("/" + configFolder), 0, null); //$NON-NLS-1$
- String configFolderName = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
- IPath configFolderpath = pjpath.append(configFolderName);
- sourceFolder = ws.getRoot().getFolder(configFolderpath);
-
- if( fv == IJ2EEFacetConstants.APPLICATION_CLIENT_50 )
- {
- if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
- // Create the deployment descriptor (web.xml) if one doesn't exist
- IFile appClientFile = sourceFolder.getFile(new Path(J2EEConstants.APP_CLIENT_DD_URI));
- if (!appClientFile.exists()) {
- try {
- if(!appClientFile.getParent().exists()
- && (appClientFile.getParent().getType() == IResource.FOLDER)){
- ((IFolder)appClientFile.getParent()).create(true, true, monitor);
- }
- final String appClientXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<application-client version=\"5\" xmlns=\"http://java.sun.com/xml/ns/javaee\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd\">\n <display-name> \n" + project.getName() + "</display-name> \n </application-client>"; //$NON-NLS-1$
- appClientFile.create(new ByteArrayInputStream(appClientXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
-
- } catch (UnsupportedEncodingException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
- else
- {
- if (!sourceFolder.getFile(J2EEConstants.APP_CLIENT_DD_URI).exists()) {
- String ver = model.getStringProperty(IFacetDataModelProperties.FACET_VERSION_STR);
- int nVer = J2EEVersionUtil.convertVersionStringToInt(ver);
- AppClientArtifactEdit.createDeploymentDescriptor(project, nVer);
- }
- }
-
- // add source folder maps
- final IClasspathEntry[] cp = jproj.getRawClasspath();
- for (int i = 0; i < cp.length; i++) {
- final IClasspathEntry cpe = cp[i];
- if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- root.createLink(cpe.getPath().removeFirstSegments(1), 0, null);
- }
- }
- return c;
- }
-
-// private void addMainClass(IProgressMonitor monitor, IDataModel model, IProject project) {
-// try {
-// IDataModel mainClassDataModel = DataModelFactory.createDataModel(NewJavaClassDataModelProvider.class);
-// mainClassDataModel.setProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME, project.getName());
-// mainClassDataModel.setProperty(INewJavaClassDataModelProperties.CLASS_NAME, "Main"); //$NON-NLS-1$
-// mainClassDataModel.setBooleanProperty(INewJavaClassDataModelProperties.MAIN_METHOD, true);
-// String projRelativeSourcePath = IPath.SEPARATOR + project.getName() + IPath.SEPARATOR + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER);
-// mainClassDataModel.setProperty(INewJavaClassDataModelProperties.SOURCE_FOLDER, projRelativeSourcePath);
-// IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
-// mainClassDataModel.setProperty(INewJavaClassDataModelProperties.JAVA_PACKAGE_FRAGMENT_ROOT, javaProject.getPackageFragmentRoots()[0]);
-// mainClassDataModel.getDefaultOperation().execute(monitor, null);
-// createManifestEntryForMainClass(monitor, model, project);
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// }
-
-// protected void createManifestEntryForMainClass(IProgressMonitor monitor, IDataModel model, IProject project) throws CoreException, InvocationTargetException, InterruptedException {
-// IVirtualComponent appClientComponent = ComponentCore.createComponent(project);
-// IVirtualFile vf = appClientComponent.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
-// IFile manifestmf = vf.getUnderlyingFile();
-// if (manifestmf == null || !manifestmf.exists()) {
-// try {
-// createManifest(project, appClientComponent.getRootFolder().getUnderlyingFolder(), monitor);
-// } catch (Exception e) {
-// Logger.getLogger().logError(e);
-// }
-// String manifestFolder = IPath.SEPARATOR + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER) + IPath.SEPARATOR + J2EEConstants.META_INF;
-// IContainer container = project.getFolder(manifestFolder);
-// manifestmf = container.getFile(new Path(J2EEConstants.MANIFEST_SHORT_NAME));
-// }
-// if (model.getBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS)) {
-// IDataModel dm = DataModelFactory.createDataModel(UpdateManifestDataModelProvider.class);
-// dm.setProperty(UpdateManifestDataModelProperties.PROJECT_NAME, project.getName());
-// dm.setBooleanProperty(UpdateManifestDataModelProperties.MERGE, false);
-// dm.setProperty(UpdateManifestDataModelProperties.MANIFEST_FILE, manifestmf);
-// dm.setProperty(UpdateManifestDataModelProperties.MAIN_CLASS, "Main"); //$NON-NLS-1$
-// try {
-// dm.getDefaultOperation().execute(monitor, null);
-// } catch (Exception e) {
-// // Ignore
-// }
-// }
-// }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetPostInstallDelegate.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetPostInstallDelegate.java
deleted file mode 100644
index 4199d6db1..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/AppClientFacetPostInstallDelegate.java
+++ /dev/null
@@ -1,136 +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.project.facet;
-
-import static org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-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.Path;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.application.internal.operations.UpdateManifestDataModelProperties;
-import org.eclipse.jst.j2ee.application.internal.operations.UpdateManifestDataModelProvider;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.operation.IArtifactEditOperationDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-
-public class AppClientFacetPostInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public void execute(IProject project, IProjectFacetVersion fv, Object config, IProgressMonitor monitor) throws CoreException {
- if (monitor != null)
- monitor.beginTask("", 1); //$NON-NLS-1$
- try {
- IDataModel model = (IDataModel) config;
-
- // Add main class if necessary
- if (model.getBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS)){
- addMainClass(monitor, model, project);
- } else {
- createManifestEntryForMainClass(monitor, model, project);
- }
-
- // Associate with an EAR, if necessary.
- final String earProjectName = (String) model.getProperty(IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME);
- if (model.getBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR)) {
- if (earProjectName != null && !earProjectName.equals("")) { //$NON-NLS-1$
- String ver = fv.getVersionString();
-
- String j2eeVersionText = ver;
- installEARFacet(j2eeVersionText, earProjectName, (IRuntime) model.getProperty(IJ2EEFacetInstallDataModelProperties.FACET_RUNTIME), monitor);
- final String moduleURI = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI);
-
- final IFacetedProjectWorkingCopy fpjwc
- = (IFacetedProjectWorkingCopy) model.getProperty( FACETED_PROJECT_WORKING_COPY );
-
- installAndAddModuletoEAR( j2eeVersionText,
- earProjectName,
- fpjwc.getPrimaryRuntime(),
- project,
- moduleURI,
- monitor );
-
- }
- }
-
- if (monitor != null)
- monitor.worked(1);
- } catch (Exception e) {
- Logger.getLogger().logError(e);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
-
- private void addMainClass(IProgressMonitor monitor, IDataModel model, IProject project) {
- try {
- IDataModel mainClassDataModel = DataModelFactory.createDataModel(NewJavaClassDataModelProvider.class);
- mainClassDataModel.setProperty(IArtifactEditOperationDataModelProperties.PROJECT_NAME, project.getName());
- mainClassDataModel.setProperty(INewJavaClassDataModelProperties.CLASS_NAME, "Main"); //$NON-NLS-1$
- mainClassDataModel.setBooleanProperty(INewJavaClassDataModelProperties.MAIN_METHOD, true);
-
- IContainer container = J2EEProjectUtilities.getSourceFolderOrFirst(project, null);
- if( container != null ){
- String projRelativeSourcePath = container.getFullPath().toPortableString();
- mainClassDataModel.setProperty(INewJavaClassDataModelProperties.SOURCE_FOLDER, projRelativeSourcePath);
- mainClassDataModel.getDefaultOperation().execute(monitor, null);
- createManifestEntryForMainClass(monitor, model, project);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- protected void createManifestEntryForMainClass(IProgressMonitor monitor, IDataModel model, IProject project) throws CoreException, InvocationTargetException, InterruptedException {
- IVirtualComponent appClientComponent = ComponentCore.createComponent(project);
- IVirtualFile vf = appClientComponent.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- IFile manifestmf = vf.getUnderlyingFile();
- if (manifestmf == null || !manifestmf.exists()) {
- try {
- createManifest(project, appClientComponent.getRootFolder().getUnderlyingFolder(), monitor);
- } catch (Exception e) {
- Logger.getLogger().logError(e);
- }
- }
- if (model.getBooleanProperty(IAppClientFacetInstallDataModelProperties.CREATE_DEFAULT_MAIN_CLASS)) {
- String manifestFolder = IPath.SEPARATOR + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER) + IPath.SEPARATOR + J2EEConstants.META_INF;
- IContainer container = project.getFolder(manifestFolder);
- manifestmf = container.getFile(new Path(J2EEConstants.MANIFEST_SHORT_NAME));
- IDataModel dm = DataModelFactory.createDataModel(UpdateManifestDataModelProvider.class);
- dm.setProperty(UpdateManifestDataModelProperties.PROJECT_NAME, project.getName());
- dm.setBooleanProperty(UpdateManifestDataModelProperties.MERGE, false);
- dm.setProperty(UpdateManifestDataModelProperties.MANIFEST_FILE, manifestmf);
- dm.setProperty(UpdateManifestDataModelProperties.MAIN_CLASS, "Main"); //$NON-NLS-1$
- try {
- dm.getDefaultOperation().execute(monitor, null);
- } catch (Exception e) {
- // Ignore
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/IAppClientFacetInstallDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/IAppClientFacetInstallDataModelProperties.java
deleted file mode 100644
index c09ad9d06..000000000
--- a/plugins/org.eclipse.jst.j2ee/appclientcreation/org/eclipse/jst/j2ee/project/facet/IAppClientFacetInstallDataModelProperties.java
+++ /dev/null
@@ -1,28 +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.project.facet;
-
-import org.eclipse.jst.j2ee.applicationclient.internal.creation.AppClientFacetProjectCreationDataModelProvider;
-
-public interface IAppClientFacetInstallDataModelProperties extends IJ2EEModuleFacetInstallDataModelProperties {
-
- /**
- * This field should not be used. It is not part of the API and may be modified in the future.
- */
- public static Class _provider_class = AppClientFacetProjectCreationDataModelProvider.class;
-
- /**
- * Optional, type Boolean. the default value is <code>Boolean.TRUE</code>.If this is true and CREATE_DEFAULT_FILES is true, then a default main
- * class will be generated during component creation.
- */
- public static final String CREATE_DEFAULT_MAIN_CLASS = "IAppClientComponentCreationDataModelProperties.CREATE_DEFAULT_MAIN_CLASS"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/common/CreateChildCommand.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/common/CreateChildCommand.java
deleted file mode 100644
index a1f94fd2b..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/common/CreateChildCommand.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.application.common;
-
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CommandWrapper;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandActionDelegate;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-
-/**
- * This is used to generate a command that will add a new child of appropriate type to an object.
- * The implementation specifies an owner, a feature, and a helper to which the implementation is
- * delegated,
- */
-public class CreateChildCommand extends CommandWrapper implements CommandActionDelegate {
-
- /**
- * This is the helper interface to which child creation is delegated.
- */
- public static interface Helper {
- /**
- * This implements the default command behavior
- */
- public Object createChild(Object object);
-
- /**
- * This returns the default label
- */
- public String getCreateChildText(Object object);
-
- /**
- * This returns the default help text
- */
- public String getCreateChildToolTipText(Object object);
-
- /**
- * This returns the default image
- */
- public Object getCreateChildImage(Object object);
- }
-
- /**
- * This is the editing doman in which this command operates.
- */
- protected EditingDomain domain;
- /**
- * This is the owner to which children will be added.
- */
- protected EObject owner;
- /**
- * This is the feature of the owner to which children will be added.
- */
- protected EReference feature;
- /**
- * This is the helper object to which child creation is delegated.
- */
- protected CreateChildCommand.Helper helper;
-
- /**
- * This creates an instances that will add something to the owner's feature based on the
- * delegate helper.
- */
- public CreateChildCommand(EditingDomain domain, EObject owner, EReference feature, CreateChildCommand.Helper helper) {
- super();
-
- this.domain = domain;
- this.owner = owner;
- this.feature = feature;
- this.helper = helper;
- }
-
- /**
- * This returns a command that creates a new child of some appropriate type.
- */
- public static Command create(EditingDomain domain, Object object) {
- return domain.createCommand(CreateChildCommand.class, new CommandParameter(object));
- }
-
- /**
- * This creates the add command that will implement this action and specifies the collection by
- * delegating to {@link CreateChildCommand.Helper#getCreateChildImage}.
- */
- protected Command createCommand() {
- if (feature == null) {
- return AddCommand.create(domain, owner, null, helper.createChild(owner));
- }
- return new AddCommand(domain, owner, feature, helper.createChild(owner));
- }
-
- /**
- * This delegates to {@link CreateChildCommand.Helper#getCreateChildToolTipText}.
- */
- public String getDescription() {
- return helper.getCreateChildToolTipText(owner);
- }
-
- /**
- * This delegates to {@link CreateChildCommand.Helper#getCreateChildImage}.
- */
- public Object getImage() {
- return helper.getCreateChildImage(owner);
- }
-
- /**
- * This delegates to {@link CreateChildCommand.Helper#getCreateChildText}.
- */
- public String getText() {
- return helper.getCreateChildText(owner);
- }
-
- /**
- * This delegates to {@link CreateChildCommand.Helper#getCreateChildToolTipText}.
- */
- public String getToolTipText() {
- return helper.getCreateChildToolTipText(owner);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProvider.java
deleted file mode 100644
index b6f515c3e..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProvider.java
+++ /dev/null
@@ -1,214 +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.application.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.ApplicationFactory;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.internal.provider.CompatibilityDescriptionGroupItemProvider;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Application}object.
- */
-public class ApplicationItemProvider extends CompatibilityDescriptionGroupItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ApplicationItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- Module child = org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getApplicationFactory().createModule();
-
- // TODO: initialize child here...
-
- return child;
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and {@link AddCommand}and
- * {@link RemoveCommand}support in {@link #createCommand}.
- */
- public Collection getChildrenReferences(Object object) {
- ApplicationPackage pkg = ApplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- result.add(pkg.getApplication_SecurityRoles());
- result.add(pkg.getApplication_Modules());
- return result;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EReference getChildReference(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildReference(object, child);
- }
-
-
- /**
- * This returns the image for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getImage(refObject.eClass().getName() + "CreateModule"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return ApplicationProvidersResourceHandler.getString("Create_Module_UI_"); //$NON-NLS-1$
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return ApplicationProvidersResourceHandler.getString("Create_a_child_of_type_Module_for_the_selected_UI_") + refObject.eClass().getName() + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This returns Application.gif.
- */
- public Object getImage(Object object) {
- String key = null;
- if (((Application) object).eResource() == null)
- return J2EEPlugin.getPlugin().getImage("earFile_obj"); //$NON-NLS-1$
- switch (((Application) object).getVersionID()) {
- case J2EEVersionConstants.J2EE_1_2_ID :
- key = "12_ear_obj"; //$NON-NLS-1$
- break;
- case J2EEVersionConstants.J2EE_1_3_ID :
- key = "13_ear_obj"; //$NON-NLS-1$
- break;
- case J2EEVersionConstants.J2EE_1_4_ID :
- default :
- key = "14_ear_obj"; //$NON-NLS-1$
- break;
- }
- return J2EEPlugin.getPlugin().getImage(key);
- }
-
- /**
- * This returns the parent of the Application.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This adds a property descriptor for the Version feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addVersionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Application_version_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Application_version_feature", "_UI_Application_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ApplicationPackage.eINSTANCE.getApplication_Version(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- public String getText(Object object) {
-
- String displayName = ((Application) object).getDisplayName();
- return displayName == null ? ApplicationProvidersResourceHandler.getString("<<No_display_name>>_ERROR_") : displayName; //$NON-NLS-1$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Application.class)) {
- case ApplicationPackage.APPLICATION__VERSION :
- case ApplicationPackage.APPLICATION__SECURITY_ROLES :
- case ApplicationPackage.APPLICATION__MODULES : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_SecurityRoles(), CommonFactory.eINSTANCE.createSecurityRole()));
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createModule()));
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createWebModule()));
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createJavaClientModule()));
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createEjbModule()));
-
- newChildDescriptors.add(createChildParameter(ApplicationPackage.eINSTANCE.getApplication_Modules(), ApplicationFactory.eINSTANCE.createConnectorModule()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapter.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapter.java
deleted file mode 100644
index 173415d7f..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapter.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.application.provider;
-
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-
-
-
-/**
- * This extended item provider supports the following commands:
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}. The
- * commands are implemented uniformly on all our item adapters using this common base class.
- */
-public class ApplicationItemProviderAdapter extends ItemProviderAdapter {
- /**
- * This creates and instance from an adapter factory and a domain notifier.
- */
- protected ApplicationItemProviderAdapter(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This implements the default behavior for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public Object createChild(Object object) {
- return null;
- }
-
- /**
- * This returns the default image for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- return org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getImage("CreateChild"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default label for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return ApplicationProvidersResourceHandler.getString("Create_Child_UI_"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.application.command.CreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return ApplicationProvidersResourceHandler.getString("Create_a_new_child_for_the_selected_UI_") + refObject.eClass().getName() + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java
deleted file mode 100644
index c1000c63d..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,267 +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.application.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.Disposable;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.application.internal.util.ApplicationAdapterFactory;
-
-
-/**
- * This is the factory that is used to provide the interfaces needed to support
- * {@link org.eclipse.jface.viewers.Viewer}s. The adapters generated by this factory convert EMF
- * adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters
- * also support property sheets, see {@link org.eclipse.ui.views.properties}. Note that most of the
- * adapters are shared among multiple instances.
- */
-public class ApplicationItemProviderAdapterFactory extends ApplicationAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- */
- protected ComposedAdapterFactory parentAdapterFactory;
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by
- * {@link #isFactoryForType isFactoryForType}.
- */
- protected Collection supportedTypes = new ArrayList();
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Application}instances.
- */
- protected ApplicationItemProvider applicationItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Module}instances.
- */
- protected ModuleItemProvider moduleItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.WebModule}instances.
- */
- protected WebModuleItemProvider webModuleItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.JavaClientModule}instances.
- */
- protected JavaClientModuleItemProvider javaClientModuleItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.JavaClientModule}instances.
- */
- protected ConnectorModuleItemProvider connectorModuleItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.application.EjbModule}instances.
- */
- protected EjbModuleItemProvider ejbModuleItemProvider;
- protected Disposable disposable = new Disposable();
-
- /**
- * This constructs an instance.
- */
- public ApplicationItemProviderAdapterFactory() {
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(ITableItemLabelProvider.class);
- }
-
- public Adapter adapt(Notifier target, Object adapterKey) {
- return super.adapt(target, this);
- }
-
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- public Adapter adaptNew(Notifier target, Object adapterType) {
- Adapter adapter = super.adaptNew(target, adapterType);
- disposable.add(adapter);
- return adapter;
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Application}.
- */
- public Adapter createApplicationAdapter() {
- if (applicationItemProvider == null) {
- applicationItemProvider = new ApplicationItemProvider(this);
- }
-
- return applicationItemProvider;
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.EjbModule}.
- */
- public Adapter createEjbModuleAdapter() {
- if (ejbModuleItemProvider == null) {
- ejbModuleItemProvider = new EjbModuleItemProvider(this);
- }
-
- return ejbModuleItemProvider;
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.JavaClientModule}.
- */
- public Adapter createJavaClientModuleAdapter() {
- if (javaClientModuleItemProvider == null) {
- javaClientModuleItemProvider = new JavaClientModuleItemProvider(this);
- }
-
- return javaClientModuleItemProvider;
- }
-
- /**
- * This creates an adapter for a connector.
- *
- * @return Adapter
- */
- public Adapter createConnectorModuleAdapter() {
- if (connectorModuleItemProvider == null) {
- connectorModuleItemProvider = new ConnectorModuleItemProvider(this);
- }// if
-
- return connectorModuleItemProvider;
- }// createConnectorModuleAdapter
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Module}.
- */
- public Adapter createModuleAdapter() {
- if (moduleItemProvider == null) {
- moduleItemProvider = new ModuleItemProvider(this);
- }
-
- return moduleItemProvider;
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.WebModule}.
- */
- public Adapter createWebModuleAdapter() {
- if (webModuleItemProvider == null) {
- webModuleItemProvider = new WebModuleItemProvider(this);
- }
-
- return webModuleItemProvider;
- }
-
- public void dispose() {
- disposable.dispose();
- }
-
- /**
- * This calls {@link INotifyChangedListener#fireNotifyChanged fireNotifyChanged}for each viewer
- * in {@link #notifyChangedListeners}.
- */
- /*
- * public void fireNotifyChanged(Object object, int eventType, Object feature, Object oldValue,
- * Object newValue, int index) { for (Iterator i = notifyChangedListeners.iterator();
- * i.hasNext(); ) { INotifyChangedListener notifyChangedListener =
- * (INotifyChangedListener)i.next(); notifyChangedListener.notifyChanged(new
- * ENotificationImpl((InternalEObject)object, eventType,(EStructuralFeature) feature, oldValue,
- * newValue, index)); }
- *
- * if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(object, eventType,
- * feature, oldValue, newValue, index); } }
- */
- /**
- * This returns the root adapter factory that contains this factory.
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- public boolean isFactoryForType(Object type) {
- return super.isFactoryForType(type) || supportedTypes.contains(type);
- }
-
- /**
- * This removes a listener.
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier}and to {@link #parentAdapterFactory}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationProvidersResourceHandler.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationProvidersResourceHandler.java
deleted file mode 100644
index 2bee27955..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ApplicationProvidersResourceHandler.java
+++ /dev/null
@@ -1,93 +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.application.provider;
-
-
-
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-public class ApplicationProvidersResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
- public static ResourceLocator RESOURCE_LOCATOR = new ResourceLocator() {
- public URL getBaseURL() {
- return null;
- }
-
- public Object getImage(String arg0) {
- return J2EEPlugin.getPlugin().getImage(arg0);
- }
-
- public String getString(String arg0) {
- return ApplicationProvidersResourceHandler.getString(arg0);
- }
-
- public String getString(String arg0, Object[] arg1) {
- return ApplicationProvidersResourceHandler.getString(arg0, arg1);
- }
- public String getString(String key, boolean translate) {
- // TODO For now... translate not supported
- return getString(key);
- }
-
- public String getString(String key, Object[] substitutions, boolean translate) {
- // TODO For now... translate not supported
- return getString(key,substitutions);
- }
- };
-
- /**
- * Returns the resource bundle used by all classes in this Project
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("applicationproviders");//$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);
- }
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ConnectorModuleItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ConnectorModuleItemProvider.java
deleted file mode 100644
index ee08848bc..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ConnectorModuleItemProvider.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.application.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.application.ConnectorModule;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-/**
- * This is the item provider adapter for a Connector modules in ears.
- */
-public class ConnectorModuleItemProvider extends ModuleItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- *
- * @param AdapterFactory
- * adapterFactory - Current adapter
- */
- public ConnectorModuleItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }// ConnectorModuleItemProvider
-
- /**
- * This returns resource image
- *
- * @param Object
- * object - resource
- * @return Object
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("full/obj16/connector_module"); //$NON-NLS-1$
- }// getImage
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public String getText(Object object) {
- String label = ((ConnectorModule) object).getUri();
- return label == null || label.length() == 0 ? getString("_UI_ConnectorModule_type") : //$NON-NLS-1$
- getString("_UI_ConnectorModule_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
-
- /**
- * This returns the parent of the ConnectorModule.
- *
- * @param Object
- * object - resource
- * @return Object
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }// getParent
-
- /**
- * This returns the property descriptors for the adapted class.
- *
- * @param Object
- * object - resource
- * @return List
- */
- public List getPropertyDescriptors(Object object) {
-
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- }// if
-
- return itemPropertyDescriptors;
- }// getPropertyDescriptors
-
-}// ConnectorModuleItemProvider
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/EjbModuleItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/EjbModuleItemProvider.java
deleted file mode 100644
index 1dcc01e11..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/EjbModuleItemProvider.java
+++ /dev/null
@@ -1,108 +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.application.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.application.EjbModule;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.EjbModule}object.
- */
-public class EjbModuleItemProvider extends ModuleItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public EjbModuleItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns EjbModule.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("module_ejb_obj"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public String getText(Object object) {
- String label = ((EjbModule) object).getUri();
- return label == null || label.length() == 0 ? getString("_UI_EjbModule_type") : //$NON-NLS-1$
- getString("_UI_EjbModule_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
-
- /**
- * This returns the parent of the EjbModule.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- }
- return itemPropertyDescriptors;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/JavaClientModuleItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/JavaClientModuleItemProvider.java
deleted file mode 100644
index 9e14a7f18..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/JavaClientModuleItemProvider.java
+++ /dev/null
@@ -1,108 +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.application.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.application.JavaClientModule;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.JavaClientModule}object.
- */
-public class JavaClientModuleItemProvider extends ModuleItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public JavaClientModuleItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns JavaClientModule.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("module_clientapp_obj"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public String getText(Object object) {
- String label = ((JavaClientModule) object).getUri();
- return label == null || label.length() == 0 ? getString("_UI_JavaClientModule_type") : //$NON-NLS-1$
- getString("_UI_JavaClientModule_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
-
- /**
- * This returns the parent of the JavaClientModule.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- }
- return itemPropertyDescriptors;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ModuleItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ModuleItemProvider.java
deleted file mode 100644
index c00f59193..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/ModuleItemProvider.java
+++ /dev/null
@@ -1,179 +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.application.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.Module}object.
- */
-public class ModuleItemProvider extends ApplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ModuleItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns Module.gif.
- */
- public Object getImage(Object object) {
- return org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getImage("Module"); //$NON-NLS-1$
- }
-
- /**
- * This returns the parent of the Module.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- ApplicationPackage pkg = ApplicationPackage.eINSTANCE;
-
- // This is for the uri feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Uri_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_uri_property_UI_"), //$NON-NLS-1$
- pkg.getModule_Uri()));
-
- // This is for the altDD feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("AltDD_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_altDD_property_UI_"), //$NON-NLS-1$
- pkg.getModule_AltDD(), false));
-
- // This is for the application feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Application_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_application_property_UI_"), //$NON-NLS-1$
- pkg.getModule_Application(), false));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Uri feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUriPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Module_uri_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Module_uri_feature", "_UI_Module_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ApplicationPackage.eINSTANCE.getModule_Uri(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Alt DD feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addAltDDPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Module_altDD_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Module_altDD_feature", "_UI_Module_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ApplicationPackage.eINSTANCE.getModule_AltDD(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return getURIIfPossible((Module) object);
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Module.class)) {
- case ApplicationPackage.MODULE__URI :
- case ApplicationPackage.MODULE__ALT_DD : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- public static String getURIIfPossible(Module m) {
- return m.getUri() == null ? ApplicationProvidersResourceHandler.getString("<<URI_not_set>>_ERROR_") : m.getUri(); //$NON-NLS-1$
- }
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
- */
- /*
- * public void notifyChanged(Notifier notifier, int eventType, EObject feature, Object oldValue,
- * Object newValue, int index) { ApplicationPackage pkg = ApplicationPackage.eINSTANCE;; if
- * (feature == pkg.getModule_Uri() || feature == pkg.getModule_AltDD() || feature ==
- * pkg.getModule_Application()) { fireNotifyChanged(notifier, eventType, feature, oldValue,
- * newValue, index); // ModuleExtension does not update automatically. // The following code is
- * to explicitly notify ApplicationExtension if (feature == pkg.getModule_Uri() || feature ==
- * pkg.getModule_AltDD() ) { ApplicationExtension applicationExtension =
- * ApplicationExtensionsHelper.getApplicationExtension(((Module)notifier).getApplication()); if
- * (applicationExtension == null) return; EObject newFeature =
- * ApplicationextPackage.eINSTANCE.getApplicationExtension_ModuleExtensions(); Object
- * moduleExtension = applicationExtension.getModuleExtension((Module)notifier); Notification
- * notification = new NotificationImpl(applicationExtension, Notification.SET, newFeature,
- * moduleExtension, moduleExtension); applicationExtension.eNotify(notification); } // code ends
- * return; } super.notifyChanged(notifier, eventType, feature, oldValue, newValue, index); }
- */
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/WebModuleItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/WebModuleItemProvider.java
deleted file mode 100644
index 7b185b653..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/application/provider/WebModuleItemProvider.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.application.provider;
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jst.j2ee.application.ApplicationPackage;
-import org.eclipse.jst.j2ee.application.WebModule;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.application.WebModule}object.
- */
-public class WebModuleItemProvider extends ModuleItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WebModuleItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns WebModule.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("module_web_obj"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public String getText(Object object) {
- String label = ((WebModule) object).getUri();
- return label == null || label.length() == 0 ? getString("_UI_WebModule_type") : //$NON-NLS-1$
- getString("_UI_WebModule_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(WebModule.class)) {
- case ApplicationPackage.WEB_MODULE__CONTEXT_ROOT : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
-
- /**
- * This returns the parent of the WebModule.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- ApplicationPackage pkg = ApplicationPackage.eINSTANCE;
-
- // This is for the contextRoot feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("ContextRoot_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_contextRoot_property_UI_"), //$NON-NLS-1$
- pkg.getWebModule_ContextRoot(), false));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Context Root feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addContextRootPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebModule_contextRoot_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebModule_contextRoot_feature", "_UI_WebModule_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ApplicationPackage.eINSTANCE.getWebModule_ContextRoot(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ApplicationClientItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ApplicationClientItemProvider.java
deleted file mode 100644
index 3fb8b9d26..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ApplicationClientItemProvider.java
+++ /dev/null
@@ -1,275 +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.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.client.ApplicationClient;
-import org.eclipse.jst.j2ee.client.ClientPackage;
-import org.eclipse.jst.j2ee.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.internal.provider.CompatibilityDescriptionGroupItemProvider;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.webservices.WSDLServiceExtManager;
-import org.eclipse.jst.j2ee.internal.webservices.WSDLServiceHelper;
-import org.eclipse.jst.j2ee.webservice.wsclient.Webservice_clientFactory;
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.client.ApplicationClient}object.
- */
-public class ApplicationClientItemProvider extends CompatibilityDescriptionGroupItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ApplicationClientItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: create some child object.
- return null;
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and {@link AddCommand}and
- * {@link RemoveCommand}support in {@link #createCommand}.
- */
- public Collection getChildrenReferences(Object object) {
- ClientPackage pkg = ClientPackage.eINSTANCE;
- Collection result = new ArrayList();
- result.add(pkg.getApplicationClient_EjbReferences());
- result.add(pkg.getApplicationClient_ResourceRefs());
- result.add(pkg.getApplicationClient_ResourceEnvRefs());
- result.add(pkg.getApplicationClient_EnvironmentProps());
- result.add(pkg.getApplicationClient_MessageDestinationRefs());
- result.add(pkg.getApplicationClient_ServiceRefs());
- return result;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EReference getChildReference(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildReference(object, child);
- }
-
-
- /**
- * This returns the image for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return J2EEPlugin.getPlugin().getImage(refObject.eClass().getName() + "Create#CHILD_CLASS_NAME#"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return ApplicationProvidersResourceHandler.getString("Create_Child_UI_"); //$NON-NLS-1$
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return ApplicationProvidersResourceHandler.getString("Create_a_child_for_the_selected_UI_") + refObject.eClass().getName() + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This returns ApplicationClient.gif.
- */
- public Object getImage(Object object) {
- String key = null;
- if (((ApplicationClient) object).eResource() == null)
- return J2EEPlugin.getPlugin().getImage("applclientJAR_obj"); //$NON-NLS-1$
- switch (((ApplicationClient) object).getVersionID()) {
- case J2EEVersionConstants.J2EE_1_2_ID :
- key = "appclient_12"; //$NON-NLS-1$
- break;
- case J2EEVersionConstants.J2EE_1_3_ID :
- key = "appclient_13"; //$NON-NLS-1$
- break;
- case J2EEVersionConstants.J2EE_1_4_ID :
- default :
- key = "appclient_14"; //$NON-NLS-1$
- break;
- }
- return J2EEPlugin.getPlugin().getImage(key);
- }
-
- /**
- * This returns the parent of the ApplicationClient.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This adds a property descriptor for the Version feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addVersionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ApplicationClient_version_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ApplicationClient_version_feature", "_UI_ApplicationClient_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ClientPackage.eINSTANCE.getApplicationClient_Version(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Callback Handler feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addCallbackHandlerPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ApplicationClient_callbackHandler_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ApplicationClient_callbackHandler_feature", "_UI_ApplicationClient_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ClientPackage.eINSTANCE.getApplicationClient_CallbackHandler(), true));
- }
-
- public String getText(Object object) {
-
- /*
- * String displayName = ((ApplicationClient) object).getDisplayName(); return displayName ==
- * null ? "" ApplicationProvidersResourceHandler.getString(" < <No_display_name>>_ERROR_") :
- * displayName; //$NON-NLS-1$
- */
- ApplicationClient appclient = ((ApplicationClient) object);
- if (appclient.getDisplayName() == null) {
- try {
- IProject project = ProjectUtilities.getProject(appclient);
- return project.getDescription().getName();
- } catch (Exception e) {
- //Ignore
- }
-
- Resource resource = appclient.eResource();
- if (resource != null) {
- return new Path(resource.getURI().toString()).removeFileExtension().lastSegment();
- }
- return ""; //$NON-NLS-1$
- }
- return appclient.getDisplayName();
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ApplicationClient.class)) {
- case ClientPackage.APPLICATION_CLIENT__VERSION :
- case ClientPackage.APPLICATION_CLIENT__RESOURCE_REFS :
- case ClientPackage.APPLICATION_CLIENT__ENVIRONMENT_PROPS :
- case ClientPackage.APPLICATION_CLIENT__EJB_REFERENCES :
- case ClientPackage.APPLICATION_CLIENT__RESOURCE_ENV_REFS :
- case ClientPackage.APPLICATION_CLIENT__SERVICE_REFS :
- case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATION_REFS :
- case ClientPackage.APPLICATION_CLIENT__MESSAGE_DESTINATIONS : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_ResourceRefs(), CommonFactory.eINSTANCE.createResourceRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_EnvironmentProps(), CommonFactory.eINSTANCE.createEnvEntry()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_EjbReferences(), CommonFactory.eINSTANCE.createEjbRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_EjbReferences(), CommonFactory.eINSTANCE.createEJBLocalRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_ResourceEnvRefs(), CommonFactory.eINSTANCE.createResourceEnvRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_ServiceRefs(), Webservice_clientFactory.eINSTANCE.createServiceRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_MessageDestinationRefs(), CommonFactory.eINSTANCE.createMessageDestinationRef()));
-
- newChildDescriptors.add(createChildParameter(ClientPackage.eINSTANCE.getApplicationClient_MessageDestinations(), CommonFactory.eINSTANCE.createMessageDestination()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- ApplicationClient client = (ApplicationClient) object;
- Collection myChildren = super.getChildren(object);
- myChildren.addAll(client.getMessageDestinations());
- if (client.getVersionID() <= J2EEVersionConstants.J2EE_1_3_ID) {
- WSDLServiceHelper serviceHelper = WSDLServiceExtManager.getServiceHelper();
- myChildren.addAll(serviceHelper.get13ServiceRefs(client));
- }
- return myChildren;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapter.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapter.java
deleted file mode 100644
index 4253a6b5a..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapter.java
+++ /dev/null
@@ -1,80 +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.command.Command;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.application.common.CreateChildCommand;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-
-
-
-/**
- * This extended item provider supports the following commands:
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}. The commands
- * are implemented uniformly on all our item adapters using this common base class.
- */
-public class ClientItemProviderAdapter extends ItemProviderAdapter implements org.eclipse.jst.j2ee.internal.application.common.CreateChildCommand.Helper {
- /**
- * This creates and instance from an adapter factory and a domain notifier.
- */
- protected ClientItemProviderAdapter(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This implements the default behavior for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public Object createChild(Object object) {
- return null;
- }
-
- /**
- * This creates the supported commands.
- */
- public Command createCommand(Object object, EditingDomain editingDomain, Class commandClass, CommandParameter commandParameter) {
- if (commandClass == CreateChildCommand.class) {
- return new CreateChildCommand(editingDomain, (EObject) object, null, this);
- }
- return super.createCommand(object, editingDomain, commandClass, commandParameter);
- }
-
- /**
- * This returns the default image for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- return org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.getPlugin().getImage("CreateChild"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default label for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return ApplicationProvidersResourceHandler.getString("Create_Child_UI_"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.client.command.CreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return ApplicationProvidersResourceHandler.getString("Create_a_new_child_for_the_selected_UI_") + refObject.eClass().getName() + "."; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java
deleted file mode 100644
index 5a5b15955..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ClientItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,180 +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.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.Disposable;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.client.internal.util.ClientAdapterFactory;
-
-
-/**
- * This is the factory that is used to provide the interfaces needed to support
- * {@link org.eclipse.jface.viewers.Viewer}s. The adapters generated by this factory convert EMF
- * adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters
- * also support property sheets, see {@link org.eclipse.ui.views.properties}. Note that most of the
- * adapters are shared among multiple instances.
- */
-public class ClientItemProviderAdapterFactory extends ClientAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- */
- protected ComposedAdapterFactory parentAdapterFactory;
- /**
- * This is used to implement {@link #IChangeNotifier}.
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
- /**
- * This keeps track of all the supported types checked by
- * {@link #isFactoryForType isFactoryForType}.
- */
- protected Collection supportedTypes = new ArrayList();
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.client.ApplicationClient}instances.
- */
- protected ApplicationClientItemProvider applicationClientItemProvider;
- protected Disposable disposable = new Disposable();
-
- /**
- * This constructs an instance.
- */
- public ClientItemProviderAdapterFactory() {
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(ITableItemLabelProvider.class);
- }
-
- public Adapter adapt(Notifier target, Object adapterKey) {
- return super.adapt(target, this);
- }
-
- public Object adapt(Object object, Object type) {
- // This is a kludge to deal with enumerators, which crash the doSwitch.
- //
- if (object instanceof EObject && ((EObject) object).eClass() == null) {
- return null;
- }
-
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- public Adapter adaptNew(Notifier target, Object adapterType) {
- Adapter adapter = super.adaptNew(target, adapterType);
- disposable.add(adapter);
- return adapter;
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.client.ApplicationClient}.
- */
- public Adapter createApplicationClientAdapter() {
- if (applicationClientItemProvider == null) {
- applicationClientItemProvider = new ApplicationClientItemProvider(this);
- }
-
- return applicationClientItemProvider;
- }
-
- public void dispose() {
- disposable.dispose();
- }
-
- /**
- * This delegates to {@link #changeNotifier}and to {@link #parentAdapterFactory}.
- */
- /*
- * public void fireNotifyChanged(Object object, int eventType, Object feature, Object oldValue,
- * Object newValue, int index) { changeNotifier.fireNotifyChanged(object, eventType, feature,
- * oldValue, newValue, index);
- *
- * if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(object, eventType,
- * feature, oldValue, newValue, index); } }
- */
- /**
- * This returns the root adapter factory that contains this factory.
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- public boolean isFactoryForType(Object type) {
- return super.isFactoryForType(type) || supportedTypes.contains(type);
- }
-
- /**
- * This removes a listener.
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier}and to {@link #parentAdapterFactory}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/EARProjectMapItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/EARProjectMapItemProvider.java
deleted file mode 100644
index 1edbb7d92..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/EARProjectMapItemProvider.java
+++ /dev/null
@@ -1,166 +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.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.EARProjectMap;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.EARProjectMap}
- * object.
- */
-public class EARProjectMapItemProvider extends ModulemapItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /** Added to generated code */
- protected boolean includeModules = false;
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public EARProjectMapItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- public EARProjectMapItemProvider(AdapterFactory adapterFactory, boolean includeModules) {
- this(adapterFactory);
- this.includeModules = includeModules;
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and {@link AddCommand}and
- * {@link RemoveCommand}support in {@link #createCommand}.
- */
- public Collection getChildrenReferences(Object object) {
- if (childrenReferences == null) {
- super.getChildrenReferences(object);
- if (includeModules)
- childrenReferences.add(ModulemapPackage.eINSTANCE.getEARProjectMap_Mappings());
- childrenReferences.add(ModulemapPackage.eINSTANCE.getEARProjectMap_UtilityJARMappings());
- }
- return childrenReferences;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected EReference getChildReference(Object object, Object child) {
- // TODO: Check the type of the specified child object and return the proper feature to use
- // for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildReference(object, child);
- }
-
-
- /**
- * This returns the parent of the EARProjectMap.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns EARProjectMap.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("EARProjectMap"); //$NON-NLS-1$
- }
-
- public String getText(Object object) {
- return ApplicationProvidersResourceHandler.getString("EARProjectMap_UI_"); //$NON-NLS-1$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(EARProjectMap.class)) {
- case ModulemapPackage.EAR_PROJECT_MAP__MAPPINGS :
- case ModulemapPackage.EAR_PROJECT_MAP__UTILITY_JAR_MAPPINGS : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
- */
- /*
- * public void notifyChanged(Notifier notifier, int eventType, EObject feature, Object oldValue,
- * Object newValue, int index) { ModulemapPackage pkg = ModulemapPackage.eINSTANCE;; if
- * (!includeModules && feature == pkg.getEARProjectMap_Mappings()) return;
- *
- * if (feature == pkg.getEARProjectMap_Mappings() || feature ==
- * pkg.getEARProjectMap_UtilityJARMappings()) { fireNotifyChanged(notifier, eventType, feature,
- * oldValue, newValue, index); return; } super.notifyChanged(notifier, eventType, feature,
- * oldValue, newValue, index); }
- */
-
- /**
- * This adds to the collection of {@linkcom.ibm.etools.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object.
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- if (includeModules)
- newChildDescriptors.add(createChildParameter(modulemapPackage.getEARProjectMap_Mappings(), modulemapPackage.getModuleMapping()));
- newChildDescriptors.add(createChildParameter(modulemapPackage.getEARProjectMap_UtilityJARMappings(), modulemapPackage.getUtilityJARMapping()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/FacetedProjectPropertyTester.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/FacetedProjectPropertyTester.java
deleted file mode 100644
index 09474d081..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/FacetedProjectPropertyTester.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.eclipse.jst.j2ee.internal.provider;
-
-import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-
-public class FacetedProjectPropertyTester extends PropertyTester
-
-{
- public boolean test( final Object receiver,
- final String property,
- final Object[] args,
- final Object value )
- {
- try
- {
- if( ! ( receiver instanceof J2EEItemProvider ) )
- {
- return false;
- }
-
- IResource resource = ((J2EEItemProvider) receiver).getAssociatedFile();
- final IProject pj = resource.getProject();
-
- if( pj == null )
- {
- return false;
- }
-
- final String val = (String) value;
- final int colon = val.indexOf( ':' );
-
- final String fid;
- final String vexpr;
-
- if( colon == -1 || colon == val.length() - 1 )
- {
- fid = val;
- vexpr = null;
- }
- else
- {
- fid = val.substring( 0, colon );
- vexpr = val.substring( colon + 1 );
- }
-
- return FacetedProjectFramework.hasProjectFacet( pj, fid, vexpr );
- }
- catch( CoreException e )
- {
- //
- }
-
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/J2EEItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/J2EEItemProvider.java
deleted file mode 100644
index d7b71f178..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/J2EEItemProvider.java
+++ /dev/null
@@ -1,250 +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.Collection;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.edit.provider.ItemProvider;
-
-public class J2EEItemProvider extends ItemProvider implements IAdaptable {
-
- protected static final Class IRESOURCE_CLASS = IResource.class;
- protected static final Class IFILE_CLASS = IFile.class;
-
-
- /**
- * Constructor for J2EEItemProvider.
- */
- public J2EEItemProvider() {
- super();
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param children
- */
- public J2EEItemProvider(Collection children) {
- super(children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- */
- public J2EEItemProvider(String text) {
- super(text);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- * @param children
- */
- public J2EEItemProvider(String text, Collection children) {
- super(text, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- * @param image
- */
- public J2EEItemProvider(String text, Object image) {
- super(text, image);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- * @param image
- * @param children
- */
- public J2EEItemProvider(String text, Object image, Collection children) {
- super(text, image, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- * @param image
- * @param parent
- */
- public J2EEItemProvider(String text, Object image, Object parent) {
- super(text, image, parent);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param text
- * @param image
- * @param parent
- * @param children
- */
- public J2EEItemProvider(String text, Object image, Object parent, Collection children) {
- super(text, image, parent, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- */
- public J2EEItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text) {
- super(adapterFactory, text);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text, Object image) {
- super(adapterFactory, text, image);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param parent
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent) {
- super(adapterFactory, text, image, parent);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param children
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, Collection children) {
- super(adapterFactory, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param children
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text, Collection children) {
- super(adapterFactory, text, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param children
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text, Object image, Collection children) {
- super(adapterFactory, text, image, children);
- }
-
- /**
- * Constructor for J2EEItemProvider.
- *
- * @param adapterFactory
- * @param text
- * @param image
- * @param parent
- * @param children
- */
- public J2EEItemProvider(AdapterFactory adapterFactory, String text, Object image, Object parent, Collection children) {
- super(adapterFactory, text, image, parent, children);
- }
-
- protected boolean notificationOn = true;
-
- protected void disableNotification() {
- notificationOn = false;
- }
-
- protected void enableNotification() {
- notificationOn = true;
- }
-
-
- public void fireNotifyChanged(Notification notification) {
- if (notificationOn)
- super.fireNotifyChanged(notification);
- }
-
- public Collection getChildren(Object object) {
- if (children.isEmpty()) {
- try {
- disableNotification();
- initializeChildren();
- } finally {
- enableNotification();
- }
- }
- return children;
- }
-
- protected void initializeChildren() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
- if (adapter == IRESOURCE_CLASS || adapter == IFILE_CLASS)
- return null; //return getAssociatedFile();
- return Platform.getAdapterManager().getAdapter(this, adapter);
- }
-
- public IFile getAssociatedFile() {
- return null;
- }
-
- /**
- * @return
- */
-// private IProject getProjectFromParent() {
-// return ProjectUtilities.getProject(getParent());
-// }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModuleMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModuleMappingItemProvider.java
deleted file mode 100644
index d7c6f84b0..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModuleMappingItemProvider.java
+++ /dev/null
@@ -1,166 +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.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModuleMapping;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.ModuleMapping}
- * object.
- */
-public class ModuleMappingItemProvider extends ModulemapItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ModuleMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- ModulemapPackage pkg = ModulemapPackage.eINSTANCE;
- ;
-
- // This is for the projectName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Project_Name_1"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_project_name_property_of_the_module_mapping_UI_"), //$NON-NLS-1$
- pkg.getModuleMapping_ProjectName(), true, ItemPropertyDescriptor.TEXT_VALUE_IMAGE));
-
- // This is for the module feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Module_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_module_of_the_module_mapping_UI_"), //$NON-NLS-1$
- pkg.getModuleMapping_Module(), false));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Project Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addProjectNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ModuleMapping_projectName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ModuleMapping_projectName_feature", "_UI_ModuleMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModulemapPackage.eINSTANCE.getModuleMapping_ProjectName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Module feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addModulePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ModuleMapping_module_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ModuleMapping_module_feature", "_UI_ModuleMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModulemapPackage.eINSTANCE.getModuleMapping_Module(), true));
- }
-
-
- /**
- * This returns the parent of the ModuleMapping.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns ModuleMapping.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("ModuleMapping"); //$NON-NLS-1$
- }
-
- public String getText(Object object) {
- ModuleMapping moduleMapping = ((ModuleMapping) object);
- return ApplicationProvidersResourceHandler.getString("ModuleMapping_UI_") + moduleMapping.getProjectName(); //$NON-NLS-1$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ModuleMapping.class)) {
- case ModulemapPackage.MODULE_MAPPING__PROJECT_NAME :
- case ModulemapPackage.MODULE_MAPPING__MODULE : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
- */
- /*
- * public void notifyChanged(Notifier notifier, int eventType, EObject feature, Object oldValue,
- * Object newValue, int index) { ModulemapPackage pkg = ModulemapPackage.eINSTANCE;; if (
- * feature == pkg.getModuleMapping_ProjectName() || feature == pkg.getModuleMapping_Module() ) {
- * fireNotifyChanged(notifier, eventType, feature, oldValue, newValue, index); return; }
- * super.notifyChanged(notifier, eventType, feature, oldValue, newValue, index); }
- */
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapEditPlugin.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapEditPlugin.java
deleted file mode 100644
index ebf6adf34..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapEditPlugin.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.provider;
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.MessageFormat;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapFactory;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackage;
-
-
-
-/**
- * @deprecated Leaving this in for now, to minimize breakage to all the providers; should delete
- * when we regen all providers for mof5
- *
- * This is the central singleton for the modulemap plugin.
- */
-public class ModulemapEditPlugin extends Plugin {
- /**
- * Keep track of the singleton.
- */
- protected static ModulemapEditPlugin plugin;
-
- /**
- * Keep track of the modulemap package.
- */
- protected ModulemapPackage modulemapPackage;
-
- /**
- * Create the instance.
- */
- public ModulemapEditPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
-
- // Remember the static instance.
- //
- plugin = this;
- }
-
- /**
- * Get the one modulemap package.
- */
- public ModulemapPackage getModulemapPackage() {
- return modulemapPackage;
- }
-
- /**
- * Get the one modulemap factory.
- */
- public ModulemapFactory getModulemapFactory() {
- return (ModulemapFactory) modulemapPackage.getEFactoryInstance();
- }
-
- /**
- * Do initialization stuff here.
- */
- public void startup() throws CoreException {
- super.startup();
- modulemapPackage = org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapFactoryImpl.getPackage();
- }
-
- /**
- * Get the singleton instance.
- */
- public static ModulemapEditPlugin getPlugin() {
- return plugin;
- }
-
- /**
- * Get a .gif from the icons folder.
- */
- public Object getImage(String key) {
- try {
- return new URL(getDescriptor().getInstallURL(), "icons/" + key + ".gif"); //$NON-NLS-1$ //$NON-NLS-2$
- } catch (MalformedURLException exception) {
- System.out.println(ApplicationProvidersResourceHandler.getString("Failed_to_load_image_for_ERROR_") + key + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- exception.printStackTrace();
- }
-
- return null;
- }
-
- /**
- * Get a translated string from the resource bundle.
- */
- public String getString(String key) {
- return getDescriptor().getResourceBundle().getString(key);
- }
-
- /**
- * Get a translated string from the resource bundle, with an object substitution.
- */
- public String getString(String key, Object s1) {
- return MessageFormat.format(getString(key), new Object[]{s1});
- }
-
- /**
- * Get a translated string from the resource bundle, with two object substitutions.
- */
- public String getString(String key, Object s1, Object s2) {
- return MessageFormat.format(getString(key), new Object[]{s1, s2});
- }
-
- /**
- * Get a translated string from the resource bundle, with three object substitutions.
- */
- public String getString(String key, Object s1, Object s2, Object s3) {
- return MessageFormat.format(getString(key), new Object[]{s1, s2, s3});
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapter.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapter.java
deleted file mode 100644
index 49bc8c44b..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapter.java
+++ /dev/null
@@ -1,137 +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.Collection;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapFactory;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackage;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This extended item provider supports the following commands:
- * <ul>
- * <li>{@link CreateChildCommand}
- * </ul>
- * <p>
- * The commands are implemented uniformly on all our item adapters using this common base class.
- */
-public class ModulemapItemProviderAdapter extends ItemProviderAdapter {
- /**
- * This is the package for the modulemap model.
- */
- protected static final ModulemapPackage modulemapPackage = (ModulemapPackage) EPackage.Registry.INSTANCE.getEPackage(ModulemapPackage.eNS_URI);
- /**
- * This is the factory for the modulemap model.
- */
- protected static final ModulemapFactory modulemapFactory = modulemapPackage.getModulemapFactory();
-
- /**
- * This creates an instance from an adapter factory and a domain notifier.
- */
- protected ModulemapItemProviderAdapter(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates the supported commands.
- */
- public Command createCommand(Object object, EditingDomain editingDomain, Class commandClass, CommandParameter commandParameter) {
- return super.createCommand(object, editingDomain, commandClass, commandParameter);
- }
-
- /**
- * This is a convenience method for creating <code>CommandParameter</code> s for a given
- * parent feature and child type (MOF meta-object).
- */
- protected CommandParameter createChildParameter(EReference feature, EObject childType) {
- return new CommandParameter(null, feature, modulemapFactory.create(childType.eClass()));
- }
-
- /**
- * This returns the default owner object for {@link CreateChildCommand}.
- */
- public Object getCreateChildOwner(Object parent) {
- return parent;
- }
-
- /**
- * This returns the default result collection for {@link CreateChildCommand}.
- */
- public Collection getCreateChildResult(Object child) {
- Collection result = new ArrayList(1);
- result.add(child);
- return result;
- }
-
- /**
- * This returns the default label for {@link CreateChildCommand}.
- */
- public String getCreateChildText(Object parent, Object feature, Object child) {
- return J2EEPlugin.getPlugin().getString("_UI_CreateChild_text"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default description for {@link CreateChildCommand}.
- */
- public String getCreateChildDescription(Object parent, Object feature, Object child) {
- return J2EEPlugin.getPlugin().getString("_UI_CreateChild_description"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default help text for {@link CreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object parent, Object feature, Object child) {
- return J2EEPlugin.getPlugin().getString("_UI_CreateChild_tooltip"); //$NON-NLS-1$
- }
-
- /**
- * This returns the default image for {@link CreateChildCommand}.
- */
- public Object getCreateChildImage(Object parent, Object feature, Object child) {
- Object image = null;
-
- if (parent instanceof EObject && child instanceof EObject) {
- String name = ((EObject) parent).eClass().getName() + "Create" + ((EObject) child).eClass().getName(); //$NON-NLS-1$
- image = J2EEPlugin.getPlugin().getImage(name);
- }
- return image;
- }
-
- /**
- * This looks up the name of the type of the specified object.
- */
- protected String getTypeText(Object object) {
- String typeKey = object instanceof EObject ? ((EObject) object).eClass().getName() : "Unknown"; //$NON-NLS-1$
- return J2EEPlugin.getPlugin().getString("_UI_" + typeKey + "_type"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * This looks up the name of the specified feature.
- */
- protected String getFeatureText(Object feature) {
- String featureKey = feature instanceof EReference ? ((EReference) feature).getName() : "Unknown"; //$NON-NLS-1$
- return J2EEPlugin.getPlugin().getString("_UI_" + featureKey + "_feature"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapterFactory.java
deleted file mode 100644
index bc415ac53..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/ModulemapItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,215 +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.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapAdapterFactory;
-
-
-
-/**
- * This is the factory that is used to provide the interfaces needed to support
- * {@link org.eclipse.jface.viewers.Viewer}s. The adapters generated by this factory convert EMF
- * adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. The adapters
- * also support property sheets, see {@link org.eclipse.ui.views.properties}. Note that most of the
- * adapters are shared among multiple instances.
- */
-public class ModulemapItemProviderAdapterFactory extends ModulemapAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link #com.ibm.etools.emf.edit.provider.IChangeNotifier}.
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by
- * {@link #isFactoryForType isFactoryForType}.
- */
- protected Collection supportedTypes = new ArrayList();
-
- /**
- * This constructs an instance.
- */
- public ModulemapItemProviderAdapterFactory() {
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(ITableItemLabelProvider.class);
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.ModuleMapping}
- * instances.
- */
- protected ModuleMappingItemProvider moduleMappingItemProvider;
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.ModuleMapping}.
- */
- public Adapter createModuleMappingAdapter() {
- if (moduleMappingItemProvider == null) {
- moduleMappingItemProvider = new ModuleMappingItemProvider(this);
- }
-
- return moduleMappingItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.EARProjectMap}
- * instances.
- */
- protected EARProjectMapItemProvider earProjectMapItemProvider;
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.EARProjectMap}.
- */
- public Adapter createEARProjectMapAdapter() {
- if (earProjectMapItemProvider == null) {
- earProjectMapItemProvider = new EARProjectMapItemProvider(this);
- }
-
- return earProjectMapItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.UtilityJARMapping}
- * instances.
- */
- protected UtilityJARMappingItemProvider utilityJARMappingItemProvider;
-
- /**
- * This creates an adapter for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.UtilityJARMapping}.
- */
- public Adapter createUtilityJARMappingAdapter() {
- if (utilityJARMappingItemProvider == null) {
- utilityJARMappingItemProvider = new UtilityJARMappingItemProvider(this);
- }
-
- return utilityJARMappingItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- public boolean isFactoryForType(Object type) {
- return super.isFactoryForType(type) || supportedTypes.contains(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- */
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- public Object adapt(Object object, Object type) {
- // This is a kludge to deal with enumerators, which crash the doSwitch.
- //
- if (object instanceof EObject && ((EObject) object).eClass() == null) {
- return null;
- }
-
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class) type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- *
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier}and to {@link #parentAdapterFactory}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This delegates to {@link #changeNotifier}and to {@link #parentAdapterFactory}.
- */
- /*
- * public void fireNotifyChanged(Object object, int eventType, Object feature, Object oldValue,
- * Object newValue, int index) { changeNotifier.fireNotifyChanged(object, eventType, feature,
- * oldValue, newValue, index);
- *
- * if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(object, eventType,
- * feature, oldValue, newValue, index); } }
- */
-}
diff --git a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/UtilityJARMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/UtilityJARMappingItemProvider.java
deleted file mode 100644
index 6cf3c105f..000000000
--- a/plugins/org.eclipse.jst.j2ee/applicationedit/org/eclipse/jst/j2ee/internal/provider/UtilityJARMappingItemProvider.java
+++ /dev/null
@@ -1,191 +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.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.jst.j2ee.internal.application.provider.ApplicationProvidersResourceHandler;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.ModulemapPackage;
-import org.eclipse.jst.j2ee.internal.earcreation.modulemap.UtilityJARMapping;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.internal.earcreation.modulemap.UtilityJARMapping}
- * object.
- */
-public class UtilityJARMappingItemProvider extends ModulemapItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public UtilityJARMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- ModulemapPackage pkg = ModulemapPackage.eINSTANCE;
- ;
-
- // This is for the projectName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Project_Name_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_project_name_property_of_the_utility_jar_mapping_UI_"), //$NON-NLS-1$
- pkg.getUtilityJARMapping_ProjectName(), false, ItemPropertyDescriptor.TEXT_VALUE_IMAGE));
-
- // This is for the uri feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), ApplicationProvidersResourceHandler.getString("Uri_UI_"), //$NON-NLS-1$
- ApplicationProvidersResourceHandler.getString("The_uri_property_of_the_utility_jar_mapping_UI_"), //$NON-NLS-1$
- pkg.getUtilityJARMapping_Uri(), true, ItemPropertyDescriptor.TEXT_VALUE_IMAGE));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Project Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addProjectNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_UtilityJARMapping_projectName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_UtilityJARMapping_projectName_feature", "_UI_UtilityJARMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModulemapPackage.eINSTANCE.getUtilityJARMapping_ProjectName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Uri feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUriPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_UtilityJARMapping_uri_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_UtilityJARMapping_uri_feature", "_UI_UtilityJARMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ModulemapPackage.eINSTANCE.getUtilityJARMapping_Uri(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- /**
- * This returns the parent of the UtilityJARMapping.
- */
- public Object getParent(Object object) {
- return ((EObject) object).eContainer();
- }
-
- /**
- * This returns UtilityJARMapping.gif.
- */
- public Object getImage(Object object) {
- return J2EEPlugin.getPlugin().getImage("icons/full/obj16/prjutiljar_obj"); //$NON-NLS-1$
- }
-
- // /**
- // * @param object
- // * @return
- // */
- // private boolean isEJBClientJAR(Object object) {
- // UtilityJARMapping map = (UtilityJARMapping) object;
- // IProject project = ProjectUtilities.getProject(map);
- // if (project == null)
- // return false;
- //
- // EARNatureRuntime runtime = EARNatureRuntime.getRuntime(project);
- // if (runtime == null)
- // return false;
- //
- // EAREditModel model = null;
- // try {
- // model = runtime.getEarEditModelForRead(this);
- // return model.isEjbClientJarMapping(map);
- // } finally {
- // if (model != null)
- // model.releaseAccess(this);
- // }
- // }
-
- public String getText(Object object) {
- UtilityJARMapping map = ((UtilityJARMapping) object);
- return map == null ? "<??>" : map.getUri(); //$NON-NLS-1$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(UtilityJARMapping.class)) {
- case ModulemapPackage.UTILITY_JAR_MAPPING__PROJECT_NAME :
- case ModulemapPackage.UTILITY_JAR_MAPPING__URI : {
- fireNotifyChanged(notification);
- return;
- }
- }
- super.notifyChanged(notification);
- }
-
- /**
- * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
- * describing all of the children that can be created under this object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return ApplicationProvidersResourceHandler.RESOURCE_LOCATOR;
- }
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
- */
- /*
- * public void notifyChanged(Notifier notifier, int eventType, EObject feature, Object oldValue,
- * Object newValue, int index) { ModulemapPackage pkg = ModulemapPackage.eINSTANCE;; if (
- * feature == pkg.getUtilityJARMapping_ProjectName() || feature ==
- * pkg.getUtilityJARMapping_Uri() ) { fireNotifyChanged(notifier, eventType, feature, oldValue,
- * newValue, index); return; } super.notifyChanged(notifier, eventType, feature, oldValue,
- * newValue, index); }
- */
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/archive/IArchiveExportParticipant.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/archive/IArchiveExportParticipant.java
deleted file mode 100644
index b38176d8b..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/archive/IArchiveExportParticipant.java
+++ /dev/null
@@ -1,47 +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.archive;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-/**
- * Used in conjunction with the <code>org.eclipse.jst.j2ee.archiveExportParticipants</code>
- * extension point in order to extend the base module archive export operation.
- *
- * @since 3.0
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public interface IArchiveExportParticipant
-{
- /**
- * Creates the data model that will be used to configure the operation.
- *
- * @param rootArchiveExportDataModel the data model of the module archive export
- * operation that this participant is extending
- * @return the created data model
- */
-
- IDataModel createDataModel( IDataModel rootArchiveExportDataModel );
-
- /**
- * Creates the operation that will be invoked in order to let this extension
- * participate in the export process.
- *
- * @param extensionDataModel the data model associated with this export
- * participant (previously returned by the createDataModel() method)
- * @return the created operation
- */
-
- IDataModelOperation createOperation( IDataModel extensionDataModel );
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAddWebComponentToEnterpriseApplicationDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAddWebComponentToEnterpriseApplicationDataModelProperties.java
deleted file mode 100644
index 45d5e29ea..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAddWebComponentToEnterpriseApplicationDataModelProperties.java
+++ /dev/null
@@ -1,19 +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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.datamodel.properties;
-
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-
-public interface IAddWebComponentToEnterpriseApplicationDataModelProperties extends ICreateReferenceComponentsDataModelProperties{
-
- public static final String CONTEXT_ROOT = "IAddWebComponentToEnterpriseApplicationDataModelProperties.CONTEXT_ROOT"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentExportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentExportDataModelProperties.java
deleted file mode 100644
index 00fa5d0ba..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentExportDataModelProperties.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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.datamodel.properties;
-/**
- * <p>
- * IAppClientComponentExportDataModelProperties provides properties to the IDataModel associated with the
- * AppClientComponentExportDataModelProvider.
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IAppClientComponentExportDataModelProperties extends IJ2EEComponentExportDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentImportDataModelProperties.java
deleted file mode 100644
index f2895dc90..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IAppClientComponentImportDataModelProperties.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.datamodel.properties;
-
-/**
- * <p>
- * IAppClientComponentImportDataModelProperties provides properties to the IDataModel associated with the
- * AppClientComponentImportDataModelProvider.
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IAppClientComponentImportDataModelProperties extends IJ2EEModuleImportDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentExportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentExportDataModelProperties.java
deleted file mode 100644
index d6e8b1a81..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentExportDataModelProperties.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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.datamodel.properties;
-/**
- * <p>
- * IEARComponentExportDataModelProperties provides properties to the DataModel associated with the
- * EARComponentExportDataModelProvider.
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IEARComponentExportDataModelProperties extends IJ2EEComponentExportDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentImportDataModelProperties.java
deleted file mode 100644
index c30fa4a1b..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IEARComponentImportDataModelProperties.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.datamodel.properties;
-
-/**
- * <p>
- * IEARComponentImportDataModelProperties provides properties to the IDataModel associated with the
- * EARComponentImportDataModelProvider. NOTE: The associated Provider and Operations will be created
- * during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IEARComponentImportDataModelProperties extends IJ2EEComponentImportDataModelProperties {
-
- /**
- * Optional, type IPath default is ear location
- */
- public static final String NESTED_MODULE_ROOT = "IEnterpriseApplicationImportDataModelProperties.NESTED_MODULE_ROOT"; //$NON-NLS-1$
-
- /**
- * Optional, A List containing utililty jars. This list should consist of the CommonArchive
- * Archives of all the Utility Jars that should be extracted into projects.
- */
- public static final String UTILITY_LIST = "IEnterpriseApplicationImportDataModelProperties.UTILITY_LIST"; //$NON-NLS-1$
- /**
- * Optional, A List containing modules to be imported list;
- */
- public static final String SELECTED_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.SELECTED_MODELS_LIST"; //$NON-NLS-1$
- /**
- * Optional, A List containing ejb client jars associated with any ejb components which are to
- * be imported.
- */
- public static final String EJB_CLIENT_LIST = "IEnterpriseApplicationImportDataModelProperties.EJB_CLIENT_LIST"; //$NON-NLS-1$
-
- /**
- * Optional. This is a list of data models. This list must contain all non-utilty projects in
- * the ear to be imported
- */
- public static final String MODULE_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.MODULE_MODELS_LIST"; //$NON-NLS-1$
-
- /**
- * Optional. This is a list of data models. This list must contain all utility jars selected to
- * be imported
- */
- public static final String UTILITY_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.UTILITY_MODELS_LIST"; //$NON-NLS-1$
-
- /**
- * This is an unsettable property which will return all the project DataModels.
- */
- public static final String ALL_PROJECT_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.ALL_PROJECT_MODELS_LIST"; //$NON-NLS-1$
-
- /**
- * This is an unsettable property which will return .
- */
- public static final String UNHANDLED_PROJECT_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.UNHANDLED_PROJECT_MODELS_LIST"; //$NON-NLS-1$
-
- /**
- * This is an unsettable property which will return .
- */
- public static final String HANDLED_PROJECT_MODELS_LIST = "IEnterpriseApplicationImportDataModelProperties.HANDLED_PROJECT_MODELS_LIST"; //$NON-NLS-1$
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentCreationDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentCreationDataModelProperties.java
deleted file mode 100644
index 3771f1538..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentCreationDataModelProperties.java
+++ /dev/null
@@ -1,105 +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.datamodel.properties;
-
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-
-
-
-/**
- * <p>
- * IJ2EEComponentCreationDataModelProperties provides properties to the
- * J2EEComponentCreationDataModelProvider as well as all extending interfaces extending
- * IJ2EEComponentCreationDataModelProperties
- * @see org.eclipse.jst.j2ee.internal.archive.operations.J2EEComponentCreationDataModelProvider
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- * @see org.eclipse.jst.j2ee.datamodel.properties.IJavaComponentCreationDataModelProperties
- * @plannedfor 1.0
- */
-
-/**
- * This has been slated for removal post WTP 1.5. Do not use this class/interface
- *
- * @deprecated
- *
- * @see IJ2EEFacetProjectCreationDataModelProperties
- */
-public interface IJ2EEComponentCreationDataModelProperties extends IJavaComponentCreationDataModelProperties, DoNotUseMeThisWillBeDeletedPost15{
-
- /**
- * Required, type Boolean, the default value is <code>Boolean.FALSE</code>.
- */
- public static final String ADD_TO_EAR = "IJ2EEComponentCreationDataModelProperties.ADD_TO_EAR"; //$NON-NLS-1$
-
- public static final String MODULE_URI = "IJ2EEComponentCreationDataModelProperties.MODULE_URI"; //$NON-NLS-1$
- /**
- * type String, this property needs to be set if the value of the property ADD_TO_EAR is set to <code>Boolean.TRUE</code>
- */
- public static final String EAR_COMPONENT_NAME = "IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_NAME"; //$NON-NLS-1$
- /**
- * type String, this property needs to be set if the value of the property ADD_TO_EAR is set to <code>Boolean.TRUE</code>
- */
- public static final String EAR_COMPONENT_DEPLOY_NAME = "IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_DEPLOY_NAME"; //$NON-NLS-1$
- /**
- * type ComponentHandle, this property needs to be set if the value of the property ADD_TO_EAR is set to <code>Boolean.TRUE</code>. Represents
- * a handle to the EAR
- */
- public static final String EAR_COMPONENT_PROJECT = "IJ2EEComponentCreationDataModelProperties.EAR_COMPONENT_PROJECT"; //$NON-NLS-1$
-
- /**
- * type Boolean; the default value is <code>Boolean.TRUE</code>, this is UI only property
- */
- public static final String UI_SHOW_EAR_SECTION = "IJ2EEComponentCreationDataModelProperties.UI_SHOW_EAR_SECTION"; //$NON-NLS-1$
-
- /**
- * Optional, type String
- * String indicates the name of the the folder where the deployment descriptor exists.
- * Each J2EE componenr provider will default the Deployment descriptor folder.
- *
- */
-
- public static final String DD_FOLDER = "IJ2EEComponentCreationDataModelProperties.DD_FOLDER"; //$NON-NLS-1$
-
- /**
- * Required, type Integer. The user defined version of the component.
- */
- public static final String COMPONENT_VERSION = "IComponentCreationDataModelProperties.COMPONENT_VERSION"; //$NON-NLS-1$
-
- /**
- * type Integer
- */
- public static final String VALID_COMPONENT_VERSIONS_FOR_PROJECT_RUNTIME = "IComponentCreationDataModelProperties.VALID_COMPONENT_VERSIONS_FOR_PROJECT_RUNTIME"; //$NON-NLS-1$
- /**
- * type AddComponentToEnterpriseApplicationDataModel
- */
- public static final String NESTED_ADD_COMPONENT_TO_EAR_DM = "IComponentCreationDataModelProperties.NESTED_ADD_COMPONENT_TO_EAR_DM"; //$NON-NLS-1$
- /**
- * type EARComponentCreationDataModel
- */
- public static final String NESTED_EAR_COMPONENT_CREATION_DM = "IComponentCreationDataModelProperties.NESTED_EAR_COMPONENT_CREATION_DM"; //$NON-NLS-1$
- /**
- * type UpdateManifestDataModel
- */
- public static final String NESTED_UPDATE_MANIFEST_DM = "IComponentCreationDataModelProperties.NESTED_UPDATE_MANIFEST_DM"; //$NON-NLS-1$
- /**
- * type ClassPathSelection
- */
- public static final String CLASSPATH_SELECTION = "IComponentCreationDataModelProperties.CLASSPATH_SELECTION"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentExportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentExportDataModelProperties.java
deleted file mode 100644
index d8663bf1e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentExportDataModelProperties.java
+++ /dev/null
@@ -1,94 +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.datamodel.properties;
-
-import org.eclipse.jst.j2ee.archive.IArchiveExportParticipant;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
-/**
- * <p>
- * IJ2EEComponentExportDataModelProperties provides properties to the IDataModel associated with the
- * J2EEComponentExportDataModelProvider as well as all extending interfaces extending
- * IJ2EEComponentExportDataModelProperties specifically all J2EE component specific exports.
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IJ2EEComponentExportDataModelProperties extends IDataModelProperties {
-
- /**
- * Required, type String. The user defined name of the project to be exported.
- */
- public static final String PROJECT_NAME = "IJ2EEComponentExportDataModelProperties.PROJECT_NAME"; //$NON-NLS-1$
-
- /**
- * Required, type IPath. The user defined export location including fully qualified Path and archive file
- * to be created name.
- */
- public static final String ARCHIVE_DESTINATION = "IJ2EEComponentExportDataModelProperties.ARCHIVE_DESTINATION"; //$NON-NLS-1$
- /**
- * Optional, type Boolean. If <code>Boolean.TRUE</code> source and class fields will both be archived and exported.
- * Otherwise if <code>Boolean.FALSE</code> only output files are exported.
- */
- public static final String EXPORT_SOURCE_FILES = "IJ2EEComponentExportDataModelProperties.EXPORT_SOURCE_FILES"; //$NON-NLS-1$
- /**
- * Optional, type Boolean. If <code>Boolean.TRUE</code> and an archive with the same name exists in the
- * ARCHIVE_DESTINATION, the existing will be overwritten by the archive to be created. Otherwise,
- * if <code>Boolean.FALSE</code> a error message will be show indicating name collisions.
- */
- public static final String OVERWRITE_EXISTING = "IJ2EEComponentExportDataModelProperties.OVERWRITE_EXISTING"; //$NON-NLS-1$
- /**
- * Optional, type boolean, Default <code>Boolean.TRUE</code> indicating a Build runs before exporting thus output files are created
- * and archived. However, if <code>Boolean.FALSE</code> the component is archived as is.
- */
- public static final String RUN_BUILD = "IJ2EEComponentExportDataModelProperties.RUN_BUILD"; //$NON-NLS-1$}
-
- public static final String COMPONENT = "IJ2EEComponentExportDataModelProperties.COMPONENT"; //$NON-NLS-1$
-
- /**
- * @since 3.0
- */
-
- public static final String OPTIMIZE_FOR_SPECIFIC_RUNTIME = "IJ2EEComponentExportDataModelProperties.OPTIMIZE_FOR_SPECIFIC_RUNTIME";
-
- /**
- * @since 3.0
- */
-
- public static final String RUNTIME = "IJ2EEComponentExportDataModelProperties.RUNTIME"; //$NON-NLS-1
-
- /**
- * @since 3.0
- */
-
- public static final String RUNTIME_SPECIFIC_PARTICIPANTS
- = "IJ2EEComponentExportDataModelProperties.RUNTIME_SPECIFIC_PARTICIPANTS"; //$NON-NLS-1
-
- /**
- * @since 3.0
- */
-
- interface IArchiveExportParticipantData
- {
- String getId();
- IArchiveExportParticipant getParticipant();
- IDataModel getDataModel();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentImportDataModelProperties.java
deleted file mode 100644
index 645eeea06..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEComponentImportDataModelProperties.java
+++ /dev/null
@@ -1,90 +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.datamodel.properties;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
-
-/**
- * <p>
- * IJ2EEComponentImportDataModelProperties provides properties to the IDataModel associated with the
- * J2EEComponentImportDataModelProvider as well as all extending interfaces extending
- * IJ2EEComponentImportDataModelProperties specifically all J2EE component specific imports.
- *
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-
-public interface IJ2EEComponentImportDataModelProperties extends IDataModelProperties {
-
- /**
- * Required, type String, name of the file to be imported.
- */
- public static final String FILE_NAME = "IJ2EEArtifactImportDataModelProperties.FILE_NAME"; //$NON-NLS-1$
-
- /**
- * Optional, type Archive, used when a file is available as an object rather than a url (i.e.
- * using the FILE_NAME property will not work).
- * @deprecated use {@link #ARCHIVE_WRAPPER}
- */
- public static final String FILE = "IJ2EEArtifactImportDataModelProperties.FILE"; //$NON-NLS-1$
- /**
- * Required, type String, name of the Project which the Archive will be imported.
- */
- public static final String PROJECT_NAME = "IJ2EEComponentImportDataModelProperties.PROJECT_NAME"; //$NON-NLS-1$
-
- /**
- * Unsettable property used to retreive the component after the operation has executed.
- */
- public static final String COMPONENT = "IJ2EEComponentImportDataModelProperties.COMPONENT"; //$NON-NLS-1$
-
- /**
- * Unsettable property used for archive switch.
- */
- public static final String ARCHIVE_WRAPPER = "IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER"; //$NON-NLS-1$
-
-
- /**
- * Optional, type IOverwriteHandler. Defines a IOverwriteHandler for the component in the
- * workspace if an existing component should be overwritten (OVERWRITE_COMPONENT).
- */
- public static final String OVERWRITE_HANDLER = "IJ2EEArtifactImportDataModelProperties.OVERWRITE_HANDLER"; //$NON-NLS-1$
-
- /**
- * Optional, type SaveFilter, default is null
- * @deprecated
- */
- public static final String SAVE_FILTER = "IJ2EEArtifactImportDataModelProperties.SAVE_FILTER"; //$NON-NLS-1$
-
- /**
- * Optional, type Boolean - Should the archive be closed on dispose?
- */
- public static final String CLOSE_ARCHIVE_ON_DISPOSE = "IJ2EEArtifactImportDataModelProperties.closeArchiveOnDispose"; //$NON-NLS-1$
- /**
- * Optional - type List, populated list of files previously selected. This can be used for GUIs
- * which wish to show preivous selections.
- */
- public static final String FILE_SELECTION_HISTORY = "IJ2EEArtifactImportDataModelProperties.FILE_SELECTION_HISTORY"; //$NON-NLS-1$
- /**
- * Optional, type IDataModel. This IDataModel will have a J2EE specific component creation
- * provider associated with it.
- */
- public static final String NESTED_MODEL_J2EE_COMPONENT_CREATION = "IJ2EEArtifactImportDataModelProperties.NESTED_MODEL_J2EE_COMPONENT_CREATION"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEModuleImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEModuleImportDataModelProperties.java
deleted file mode 100644
index 25c1ca9e2..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEModuleImportDataModelProperties.java
+++ /dev/null
@@ -1,52 +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.datamodel.properties;
-
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-
-
-/**
- * <p>
- * IJ2EEModuleImportDataModelProperties provides properties to the IDataModel associated with the
- * J2EEModuleImportDataModelProvider as well as all extending interfaces extending
- * IJ2EEModuleImportDataModelProperties specifically all J2EE component specific imports.
- *
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IJ2EEModuleImportDataModelProperties extends IJ2EEComponentImportDataModelProperties {
-
- /**
- * @deprecated use the {@link IJ2EEFacetProjectCreationDataModelProperties#EAR_PROJECT_NAME} on the nested project creation model
- *
- * @see DoNotUseMeThisWillBeDeletedPost15
- */
- public static final String EAR_COMPONENT_NAME = "IJ2EEModuleImportDataModelProperties.EAR_COMPONENT_NAME"; //$NON-NLS-1$
- /**
- * @deprecated use the {@link IJ2EEFacetProjectCreationDataModelProperties#ADD_TO_EAR} on the nested project creation model
- *
- * @see DoNotUseMeThisWillBeDeletedPost15
- */
- public static final String ADD_TO_EAR = "IJ2EEModuleImportDataModelProperties.ADD_TO_EAR"; //$NON-NLS-1$
-
- public static final String EXTENDED_IMPORT_FACTORY = "IJ2EEModuleImportDataModelProperties.EXTENDED_IMPORT_FACTORY"; //$NON-NLS-1$
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEUtilityJarListImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEUtilityJarListImportDataModelProperties.java
deleted file mode 100644
index d60cf433f..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJ2EEUtilityJarListImportDataModelProperties.java
+++ /dev/null
@@ -1,72 +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.datamodel.properties;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
-
-public interface IJ2EEUtilityJarListImportDataModelProperties extends IDataModelProperties{
-
- /**
- * Required. The EAR Project to which Utility Jars should be added.
- */
- public static final String EAR_PROJECT_NAME = IJavaUtilityJarImportDataModelProperties.EAR_PROJECT_NAME;
-
- /**
- * Optional. Boolean Property. True indicates to create a Project Can be used with
- * LINK_IMPORT="true|"false" or BINARY_IMPORT="true|false" The default value is true.
- */
- public static final String CREATE_PROJECT = "J2EEUtilityJarListImportDataModel.CREATE_PROJECT"; //$NON-NLS-1$
-
- /**
- * Optional. Boolean property. True indicates to import the jar as a linked project Can be
- * specified with BINARY_IMPORT="true|false" and/or CREATE_PROJECT="true|false" The default
- * value is false.
- */
- public static final String LINK_IMPORT = "J2EEUtilityJarListImportDataModel.LINK_IMPORT"; //$NON-NLS-1$
-
- /**
- * Optional. Boolean Property. True indicates to create a Project Can be used with
- * LINK_IMPORT="true|"false" or BINARY_IMPORT="true|false" The default value is true.
- */
- public static final String CREATE_LINKED_PROJECT = "J2EEUtilityJarListImportDataModel.CREATE_LINKED_PROJECT"; //$NON-NLS-1$
-
- /**
- * Optional. Boolean property. True indicates to import the jar as a linked project Can be
- * specified with BINARY_IMPORT="true|false" and/or CREATE_PROJECT="true|false" The default
- * value is false.
- */
- public static final String COPY = "J2EEUtilityJarListImportDataModel.COPY"; //$NON-NLS-1$
-
- /**
- * Optional. Boolean property. True indicates to import the jar as a binary project Can be
- * specified with LINK_IMPORT="true|false" and/or CREATE_PROJECT="true|false" The default value
- * is false.
- */
- public static final String BINARY_IMPORT = "J2EEUtilityJarListImportDataModel.BINARY_IMPORT"; //$NON-NLS-1$
-
- /**
- * Required. A java.util.List of fully qualified file names for each Utility Jar that should be
- * imported.
- */
- public static final String UTILITY_JAR_LIST = "J2EEUtilityJarListImportDataModel.UTILITY_JAR_LIST"; //$NON-NLS-1$
-
- public static final String AVAILABLE_JARS_DIRECTORY = "J2EEUtilityJarListImportDataModel.AVAILABLE_JARS_DIRECTORY"; //$NON-NLS-1$
-
- public static final String PROJECT_ROOT = "J2EEUtilityJarListImportDataModel.PROJECT_ROOT"; //$NON-NLS-1$
-
- public static final String OVERRIDE_PROJECT_ROOT = "J2EEUtilityJarListImportDataModel.OVERRIDE_PROJECT_ROOT"; //$NON-NLS-1$
-
- public static final String OVERWRITE_IF_NECESSARY = "J2EEUtilityJarListImportDataModel.OVERWRITE_IF_NECESSARY"; //$NON-NLS-1$
-
- public static final String CREATE_LINKED_PATH_VARIABLE = "J2EEUtilityJarListImportDataModel.CREATE_LINKED_PATH"; //$NON-NLS-1$
-
- public static final String LINKED_PATH_VARIABLE = "J2EEUtilityJarListImportDataModel.LINKED_PATH_VARIABLE"; //$NON-NLS-1$
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaComponentCreationDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaComponentCreationDataModelProperties.java
deleted file mode 100644
index dd037fd8d..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaComponentCreationDataModelProperties.java
+++ /dev/null
@@ -1,64 +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.datamodel.properties;
-
-import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.datamodel.properties.IJ2EEProjectServerTargetDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IComponentCreationDataModelProperties;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-
-/**
- * <p>
- * IJavaComponentCreationDataModelProperties provides properties to the
- * JavaComponentCreationDataModelProvider as well as all extending interfaces extending
- * IJavaComponentCreationDataModelProperties specifically, but not limited to all J2EE component related
- * creation.
- * @see org.eclipse.jst.j2ee.internal.archive.operations.JavaComponentCreationDataModelProvider
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-
-/**
- * This has been slated for removal post WTP 1.5. Do not use this class/interface
- *
- * @deprecated
- *
- * @see IJavaFacetInstallDataModelProperties
- */
-public interface IJavaComponentCreationDataModelProperties extends IComponentCreationDataModelProperties, DoNotUseMeThisWillBeDeletedPost15 {
- /**
- * Optional, type String
- * String indicating the name of the the root Java Source Folder in the component being created.
- * The DataModelProvider will default the Java Source Folder to the Component folder.
- *
- */
- public static final String JAVASOURCE_FOLDER = "IJavaComponentCreationDataModelProperties.JAVASOURCE_FOLDER";
- /**
- * Optional, type String
- * String indicating the name of the the root folder containing the Manifest.MF in the component being created.
- * The DataModelProvider will default the Manifest folder to the Component folder/META-INF.
- */
- public static final String MANIFEST_FOLDER = "IJavaComponentCreationDataModelProperties.MANIFEST_FOLDER";
-
- /**
- * Required, type String. This is used to specify the server target.
- *
- */
- public static final String RUNTIME_TARGET_ID = IJ2EEProjectServerTargetDataModelProperties.RUNTIME_TARGET_ID;
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaUtilityJarImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaUtilityJarImportDataModelProperties.java
deleted file mode 100644
index a8570f94e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/IJavaUtilityJarImportDataModelProperties.java
+++ /dev/null
@@ -1,37 +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.datamodel.properties;
-
-/**
- * <p>
- * IJavaUtilityJarImportDataModelProperties provides properties to the IDataModel associated with the
- * JavaUtilityJarImportDataModelProvider.
- *
- * NOTE: The associated Provider and Operations will be created during M5
- * </p>
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.DataModelFactory
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties
- *
- * @plannedfor 1.0
- */
-public interface IJavaUtilityJarImportDataModelProperties extends IJ2EEComponentImportDataModelProperties {
- /**
- * Required, type String. Represents the name of the Project containing the EAR component, which the utility
- * jar will be added.
- */
- public static final String EAR_PROJECT_NAME = "J2EEUtilityJarImportDataModel.EAR_PROJECT_NAME"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/package.xml b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/package.xml
deleted file mode 100644
index 3bf43aad3..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/datamodel/properties/package.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
- <head>
- <meta
- name="root"
- content="../../../../../../../" />
- <title>j2ee module common data model api overview</title>
- </head>
-
- <body>
- <abstract>
- This package includes the api the common create, import and export j2ee modules. It also includes the enterprise application and applciation client creation, import and export api. The interfaces in this package
- define the properties that can be set on the j2ee modules data models that are used to run the data model operations and drive the wizard data, validation.
- </abstract>
-
- <a href="#top">top</a>
- </body>
-</html>
- \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientArchiveTypeHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientArchiveTypeHandler.java
deleted file mode 100644
index e839d8025..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientArchiveTypeHandler.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveHandler;
-
-public class AppClientArchiveTypeHandler implements IArchiveHandler {
-
- public boolean handlesArchive(IArchive archive) {
- if (archive.getLoadAdapter() instanceof AppClientComponentArchiveLoadAdapter) {
- return true;
- } else if (archive.containsArchiveResource(new Path(J2EEConstants.APP_CLIENT_DD_URI))) {
- return true;
- } else {
- // TODO handle the no DD case
- return false;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveLoadAdapter.java
deleted file mode 100644
index 56387a5f7..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,29 +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.archive;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter {
-
- public AppClientComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- @Override
- protected IPath getDefaultModelObjectPath() {
- return new Path(J2EEConstants.APP_CLIENT_DD_URI);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveSaveAdapter.java
deleted file mode 100644
index 632669faa..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/AppClientComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,21 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentArchiveSaveAdapter extends J2EEComponentArchiveSaveAdapter {
-
- public AppClientComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint$PluginUtil.properties b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint$PluginUtil.properties
deleted file mode 100644
index 24734903a..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint$PluginUtil.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-missingAttribute = Extension element <{2}> is missing required attribute "{3}". [plugin: "{0}"; extension point: "{1}"]
-missingElement = Extension element <{2}> is missing required child element <{3}>. [plugin: "{0}"; extension point: "{1}"]
-failedToCreate = Failed to instantiate class {0}.
-doesNotImplement = Class {0} does not implement {1} interface.
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint.java
deleted file mode 100644
index 7075a1e20..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveExportParticipantsExtensionPoint.java
+++ /dev/null
@@ -1,436 +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.internal.archive;
-
-import static org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.*;
-import static org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.*;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-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;
-import org.eclipse.jst.j2ee.archive.IArchiveExportParticipant;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveExportParticipantsExtensionPoint.PluginUtil.InvalidExtensionException;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponentType;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponentVersion;
-import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
-import org.osgi.framework.Bundle;
-
-/**
- * Contains the logic for processing the <code>org.eclipse.jst.j2ee.archiveExportParticipants</code>
- * extension point.
- *
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class ArchiveExportParticipantsExtensionPoint
-{
- public static final String EXTENSION_POINT_ID = "archiveExportParticipants"; //$NON-NLS-1$
-
- private static final String EL_PARTICIPANT = "participant"; //$NON-NLS-1$
- private static final String EL_RUNTIME_COMPONENT = "runtime-component"; //$NON-NLS-1$
- private static final String EL_FACTORY = "factory"; //$NON-NLS-1$
- private static final String EL_ENABLEMENT = "enablement";
- private static final String ATTR_ID = "id"; //$NON-NLS-1$
- private static final String ATTR_TYPE = "type"; //$NON-NLS-1$
- private static final String ATTR_VERSION = "version"; //$NON-NLS-1$
- private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
-
- private static List<ParticipantInfo> extensions = null;
-
- public static class ParticipantInfo
- {
- private String id;
- private String pluginId = null;
- private String className = null;
- private IRuntimeComponentType runtimeComponentType = null;
- private String runtimeComponentVersionExpr = null;
- private Expression enablementCondition = null;
-
- public String getId()
- {
- return this.id;
- }
-
- public IArchiveExportParticipant loadParticipant()
- {
- try
- {
- return instantiate( this.pluginId, this.className, IArchiveExportParticipant.class );
- }
- catch( CoreException e )
- {
- log( e.getStatus() );
- return null;
- }
- }
- }
-
- public static List<ParticipantInfo> getExtensions( final IProject project,
- final IRuntime runtime )
- {
- readExtensions();
-
- final List<ParticipantInfo> result = new ArrayList<ParticipantInfo>();
-
- for( ParticipantInfo partInfo : extensions )
- {
- boolean match = false;
-
- for( IRuntimeComponent rc : runtime.getRuntimeComponents() )
- {
- final IRuntimeComponentType rct = rc.getRuntimeComponentType();
-
- if( rct == partInfo.runtimeComponentType )
- {
- final IRuntimeComponentVersion rcv = rc.getRuntimeComponentVersion();
-
- try
- {
- if( rct.getVersions( partInfo.runtimeComponentVersionExpr ).contains( rcv ) )
- {
- match = true;
- break;
- }
- }
- catch( CoreException e )
- {
- logError( -1, e.getMessage(), e );
- }
- }
- }
-
- if( match && partInfo.enablementCondition != null )
- {
- final EvaluationContext evalContext = new EvaluationContext( null, project );
- evalContext.setAllowPluginActivation( true );
-
- try
- {
- final EvaluationResult evalResult
- = partInfo.enablementCondition.evaluate( evalContext );
-
- if( evalResult != EvaluationResult.TRUE )
- {
- match = false;
- }
- }
- catch( CoreException e )
- {
- logError( -1, e.getMessage(), e );
- }
- }
-
- if( match )
- {
- result.add( partInfo );
- }
- }
-
- return Collections.unmodifiableList( result );
- }
-
- private static synchronized void readExtensions()
- {
- if( extensions != null )
- {
- return;
- }
-
- extensions = new ArrayList<ParticipantInfo>();
-
- for( IConfigurationElement element
- : getTopLevelElements( findExtensions( PLUGIN_ID, EXTENSION_POINT_ID ) ) )
- {
- if( element.getName().equals( EL_PARTICIPANT ) )
- {
- 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 ParticipantInfo info = new ParticipantInfo();
-
- info.pluginId = config.getContributor().getName();
- info.id = info.pluginId + "." + findRequiredAttribute( config, ATTR_ID );
-
- final IConfigurationElement elFactory = findRequiredElement( config, EL_FACTORY );
- info.className = findRequiredAttribute( elFactory, ATTR_CLASS );
-
- final IConfigurationElement elRuntimeComponent
- = findRequiredElement( config, EL_RUNTIME_COMPONENT );
-
- final String rcTypeString = findRequiredAttribute( elRuntimeComponent, ATTR_TYPE );
-
- if( ! RuntimeManager.isRuntimeComponentTypeDefined( rcTypeString ) )
- {
- // TODO: Log the problem
- throw new InvalidExtensionException();
- }
-
- info.runtimeComponentType = RuntimeManager.getRuntimeComponentType( rcTypeString );
- info.runtimeComponentVersionExpr = elRuntimeComponent.getAttribute( ATTR_VERSION );
-
- final IConfigurationElement elEnablement = findOptionalElement( config, EL_ENABLEMENT );
-
- try
- {
- info.enablementCondition = ExpressionConverter.getDefault().perform( elEnablement );
- }
- catch( CoreException e )
- {
- logError( -1, e.getMessage(), e );
- throw new InvalidExtensionException();
- }
-
- extensions.add( info );
- }
-
- /**
- * Utility methods that are helpful for implementing extension points.
- *
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
- public static final class PluginUtil
- {
- public static final class InvalidExtensionException
-
- extends Exception
-
- {
- private static final long serialVersionUID = 1L;
- }
-
- private PluginUtil() {}
-
- public 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;
- }
-
- public 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;
- }
-
- public static void reportMissingAttribute( final IConfigurationElement el,
- final String attribute )
- {
- final String pluginId = el.getContributor().getName();
- final String extPointId = el.getDeclaringExtension().getExtensionPointUniqueIdentifier();
-
- final String msg
- = Resources.bind( Resources.missingAttribute, pluginId, extPointId, el.getName(),
- attribute );
-
- log( createErrorStatus( -1, msg, null ) );
- }
-
- public static void reportMissingElement( final IConfigurationElement el,
- final String element )
- {
- final String pluginId = el.getContributor().getName();
- final String extPointId = el.getDeclaringExtension().getExtensionPointUniqueIdentifier();
-
- final String msg
- = Resources.bind( Resources.missingElement, pluginId, extPointId, el.getName(),
- element );
-
- log( createErrorStatus( -1, msg, null ) );
- }
-
- public static String findRequiredAttribute( final IConfigurationElement el,
- final String attribute )
-
- throws InvalidExtensionException
-
- {
- final String val = el.getAttribute( attribute );
-
- if( val == null )
- {
- reportMissingAttribute( el, attribute );
- throw new InvalidExtensionException();
- }
-
- return val;
- }
-
- public static IConfigurationElement findRequiredElement( final IConfigurationElement el,
- final String childElement )
-
- throws InvalidExtensionException
-
- {
- final IConfigurationElement[] children = el.getChildren( childElement );
-
- if( children.length == 0 )
- {
- reportMissingElement( el, childElement );
- throw new InvalidExtensionException();
- }
-
- return children[ 0 ];
- }
-
- public static IConfigurationElement findOptionalElement( final IConfigurationElement el,
- final String childElement )
- {
- final IConfigurationElement[] children = el.getChildren( childElement );
-
- if( children.length == 0 )
- {
- return null;
- }
- else
- {
- return children[ 0 ];
- }
- }
-
- public static String getElementValue( final IConfigurationElement el,
- final String defaultValue )
- {
- if( el != null )
- {
- String text = el.getValue();
-
- if( text != null )
- {
- text = text.trim();
-
- if( text.length() > 0 )
- {
- return text;
- }
- }
- }
-
- return defaultValue;
- }
-
- @SuppressWarnings( "unchecked" )
- public static <T> T instantiate( final String pluginId,
- final String clname,
- final Class<T> interfc )
-
- throws CoreException
-
- {
- final Bundle bundle = Platform.getBundle( pluginId );
-
- final Object obj;
-
- try
- {
- final Class cl = bundle.loadClass( clname );
- obj = cl.newInstance();
- }
- catch( Exception e )
- {
- final String msg = NLS.bind( Resources.failedToCreate, clname );
- throw new CoreException( createErrorStatus( -1, msg, e ) );
- }
-
- if( ! interfc.isAssignableFrom( obj.getClass() ) )
- {
- final String msg
- = NLS.bind( Resources.doesNotImplement, clname, interfc.getClass().getName() );
-
- throw new CoreException( createErrorStatus( -1, msg, null ) );
- }
-
- return (T) obj;
- }
-
- private static final class Resources
-
- extends NLS
-
- {
- public static String missingAttribute;
- public static String missingElement;
- public static String failedToCreate;
- public static String doesNotImplement;
-
- static
- {
- initializeMessages( PluginUtil.class.getName(), Resources.class );
- }
-
- public static String bind( final String message,
- final String arg1,
- final String arg2,
- final String arg3,
- final String arg4 )
- {
- return bind( message, new Object[] { arg1, arg2, arg3, arg4 } );
- }
- }
-
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java
deleted file mode 100644
index 41b2ed4ce..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ArchiveWrapper.java
+++ /dev/null
@@ -1,599 +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.archive;
-
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.application.WebModule;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EJBJarFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.ModuleFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.FileImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.ejb.EJBJar;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.archive.operations.EARArchiveOpsResourceHandler;
-import org.eclipse.jst.javaee.application.Application;
-import org.eclipse.jst.javaee.application.Module;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.ArchiveOpenFailureException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-
-public class ArchiveWrapper {
-
- //TODO remove commonArchive; possibly remove this entire class and
- //code directly to IArchive
- private Archive commonArchive = null;
- private IArchive archive = null;
- private JavaEEQuickPeek jqp = null;
-
- public ArchiveWrapper(IArchive archive) {
- this.archive = archive;
- JavaEEArchiveUtilities jea = JavaEEArchiveUtilities.INSTANCE;
- jqp = jea.getJavaEEQuickPeek(archive);
- }
-
- public ArchiveWrapper(Archive mFile) {
- this.commonArchive = mFile;
- int type = J2EEConstants.UNKNOWN;
-
- if (mFile.isApplicationClientFile()) {
- type = J2EEConstants.APPLICATION_CLIENT_TYPE;
- } else if (mFile.isEARFile()) {
- type = J2EEConstants.APPLICATION_TYPE;
- } else if (mFile.isEJBJarFile()) {
- type = J2EEConstants.EJB_TYPE;
- } else if (mFile.isWARFile()) {
- type = J2EEConstants.WEB_TYPE;
- } else if (mFile.isRARFile()) {
- type = J2EEConstants.CONNECTOR_TYPE;
- }
- if (type != J2EEConstants.UNKNOWN) {
- int version = ArchiveUtil.getFastSpecVersion((ModuleFile) mFile);
- jqp = new JavaEEQuickPeek(type, version);
- } else {
- jqp = new JavaEEQuickPeek(null);
- }
- }
-
- public JavaEEQuickPeek getJavaEEQuickPeek() {
- return jqp;
- }
-
- public Archive getCommonArchive() {
- return (Archive) commonArchive;
- }
-
- public Object getUnderLyingArchive() {
- if (archive != null) {
- return archive;
- }
- if (commonArchive != null) {
- return commonArchive;
- }
- fail();
- return null;
- }
-
- private ArchiveWrapper cachedParent = null;
-
- public ArchiveWrapper getParent() {
- if (null != cachedParent) {
- return cachedParent;
- }
- if (archive != null) {
- cachedParent = new ArchiveWrapper(archive.getArchive());
- return cachedParent;
- }
- if (commonArchive != null) {
- cachedParent = new ArchiveWrapper((Archive) commonArchive.eContainer());
- return cachedParent;
- }
- fail();
- return null;
- }
-
- public IArchive getIArchive() {
- return archive;
- }
-
- public void close() {
- try {
- if (commonArchive != null && commonArchive.isOpen()) {
- commonArchive.close();
- }
- if (archive != null && archive.isOpen()) {
- JavaEEArchiveUtilities.INSTANCE.closeArchive(archive);
- }
- } catch (RuntimeException e) {
- Logger.getLogger().logError(e);
- throw e;
- }
- }
-
- public IPath getPath() {
- if (commonArchive != null) {
- IPath path = new Path(commonArchive.getURI());
- return path;
- }
- if (archive != null) {
- return archive.getPath();
- }
- fail();
- return null;
- }
-
- private void fail() {
- throw new RuntimeException("ArchiveWrapper is inconsistent.");
- }
-
- public int getSize() {
- if (commonArchive != null)
- return commonArchive.getFiles().size();
- else
- return archive.getArchiveResources().size();
- }
-
- private List<ArchiveWrapper> cachedWebLibs;
-
- public List<ArchiveWrapper> getWebLibs() {
- if (cachedWebLibs != null) {
- return cachedWebLibs;
- }
- if (jqp.getType() != J2EEVersionConstants.WEB_TYPE) {
- fail();
- }
-
- cachedWebLibs = new ArrayList<ArchiveWrapper>();
-
- if (commonArchive != null) {
- WARFile war = (WARFile) commonArchive;
- List libs = war.getLibArchives();
- for (int i = 0; i < libs.size(); i++) {
- cachedWebLibs.add(new ArchiveWrapper((Archive) libs.get(i)));
- }
- return cachedWebLibs;
- }
- if (archive != null) {
- List<IArchiveResource> resources = archive.getArchiveResources();
- for (IArchiveResource resource : resources) {
- if (resource.getType() != IArchiveResource.DIRECTORY_TYPE) {
- IPath path = resource.getPath();
- if (path.segmentCount() > 2) {
- if (path.segment(0).equals("WEB-INF") && path.segment(1).equals("lib")) {
- String lastSegment = path.lastSegment();
- if (lastSegment.endsWith("jar") || lastSegment.endsWith("zip")) {
- IArchive webLib;
- try {
- webLib = archive.getNestedArchive(resource);
- cachedWebLibs.add(new ArchiveWrapper(webLib));
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
- }
- }
- return cachedWebLibs;
- }
- fail();
- return null;
- }
-
- private List <String>cachedDDMappedModuleURIs = null;
-
- public List<String> getDDMappedModuleURIs() {
- if(cachedDDMappedModuleURIs != null){
- return cachedDDMappedModuleURIs;
- }
- if (jqp.getType() != J2EEVersionConstants.APPLICATION_TYPE) {
- fail();
- }
-
- cachedDDMappedModuleURIs = new ArrayList<String>();
-
- if (commonArchive != null) {
- EARFile ear = (EARFile) commonArchive;
- List earMods = ear.getModuleFiles();
- for (int i = 0; i < earMods.size(); i++) {
- cachedDDMappedModuleURIs.add(((Archive) earMods.get(i)).getURI());
- }
- return cachedDDMappedModuleURIs;
- } else if(archive != null) {
- if(archive.containsArchiveResource(new Path(J2EEConstants.APPLICATION_DD_URI))){
- if(jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID){
- try {
- Application application = (Application) archive.getModelObject();
- List modules = application.getModules();
- for(int i=0;i<modules.size();i++){
- Module module = (Module)modules.get(i);
- String uri = module.getUri();
- cachedDDMappedModuleURIs.add(uri);
- }
- } catch (ArchiveModelLoadException e) {
- Logger.getLogger().logError(e);
- }
- } else {
- try{
- org.eclipse.jst.j2ee.application.Application application = (org.eclipse.jst.j2ee.application.Application)archive.getModelObject();
- List modules = application.getModules();
- for(int i=0;i<modules.size();i++){
- org.eclipse.jst.j2ee.application.Module module = (org.eclipse.jst.j2ee.application.Module)modules.get(i);
- String uri = module.getUri();
- cachedDDMappedModuleURIs.add(uri);
- }
- }catch (ArchiveModelLoadException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
- return cachedDDMappedModuleURIs;
- }
-
-
- private List<ArchiveWrapper> cachedEARModules;
-
- public List<ArchiveWrapper> getEarModules() {
- if (cachedEARModules != null) {
- return cachedEARModules;
- }
- if (jqp.getType() != J2EEVersionConstants.APPLICATION_TYPE) {
- fail();
- }
- cachedEARModules = new ArrayList<ArchiveWrapper>();
-
- if (commonArchive != null) {
- EARFile ear = (EARFile) commonArchive;
- List earMods = ear.getModuleFiles();
- for (int i = 0; i < earMods.size(); i++) {
- cachedEARModules.add(new ArchiveWrapper((Archive) earMods.get(i)));
- }
- return cachedEARModules;
- }
- if (archive != null) {
- if(jqp.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID){
- List<IArchiveResource> resources = archive.getArchiveResources();
- for (IArchiveResource resource : resources) {
- if (resource.getType() != IArchiveResource.DIRECTORY_TYPE) {
- IPath path = resource.getPath();
- if (path.segmentCount() > 0) {
- String lastSegment = path.lastSegment();
- if (lastSegment.endsWith("jar") || lastSegment.endsWith("zip") || lastSegment.endsWith("rar") || lastSegment.endsWith("war")) {
- IArchive earmodule;
- try {
- earmodule = archive.getNestedArchive(resource);
- cachedEARModules.add(new ArchiveWrapper(earmodule));
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
- }
- } else {
- try {
- org.eclipse.jst.j2ee.application.Application app = (org.eclipse.jst.j2ee.application.Application)archive.getModelObject();
- List modules = app.getModules();
- for(int i=0;i<modules.size();i++){
- org.eclipse.jst.j2ee.application.Module mod = (org.eclipse.jst.j2ee.application.Module)modules.get(i);
- String uri = mod.getUri();
- IPath path = new Path(uri);
- if(archive.containsArchiveResource(path)){
- try {
- IArchiveResource resource = archive.getArchiveResource(path);
- IArchive earmodule;
- earmodule = archive.getNestedArchive(resource);
- cachedEARModules.add(new ArchiveWrapper(earmodule));
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- } catch (FileNotFoundException e) {
- org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.logError(e);
- }
- }
- }
- } catch (ArchiveModelLoadException e) {
- org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.logError(e);
- }
- }
- return cachedEARModules;
- }
- fail();
- return null;
- }
-
- public String getName() {
- if (commonArchive != null) {
- return commonArchive.getName();
- }
- if (archive != null) {
- return archive.getPath().lastSegment();
- }
- fail();
- return null;
- }
-
- public boolean isModule() {
- if (isApplicationClientFile()) {
- return true;
- }
- if (isWARFile()) {
- return true;
- }
- if (isEJBJarFile()) {
- return true;
- }
- if (isRARFile()) {
- return true;
- }
- return false;
- }
-
- public boolean isApplicationClientFile() {
- if (commonArchive != null)
- return commonArchive.isApplicationClientFile();
- if (archive != null)
- return (JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive).getType() == J2EEConstants.APPLICATION_CLIENT_TYPE);
- fail();
- return false;
- }
-
- public boolean isWARFile() {
- if (commonArchive != null)
- return commonArchive.isWARFile();
- if (archive != null)
- return (JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive).getType() == J2EEConstants.WEB_TYPE);
- fail();
- return false;
- }
-
- public boolean isEJBJarFile() {
- if (commonArchive != null)
- return commonArchive.isEJBJarFile();
- if (archive != null)
- return (JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive).getType() == J2EEConstants.EJB_TYPE);
- fail();
- return false;
- }
-
- public boolean isEarFile() {
- if (commonArchive != null)
- return commonArchive.isEARFile();
- if (archive != null)
- return (JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive).getType() == J2EEConstants.APPLICATION_TYPE);
- fail();
- return false;
- }
-
- public boolean isRARFile() {
- if (commonArchive != null)
- return commonArchive.isRARFile();
- if (archive != null)
- return (JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive).getType() == J2EEConstants.CONNECTOR_TYPE);
- fail();
- return false;
- }
-
- // This is an array so we can tell the difference between initialized and null vs not initialized
- private String[] cachedWebContextRoot = null;
-
- public String getWebContextRoot() {
- if (cachedWebContextRoot != null) {
- return cachedWebContextRoot[0];
- }
-
- if (!isWARFile()) {
- fail();
- return null;
- }
- cachedWebContextRoot = new String[1];
-
- if (commonArchive != null) {
- cachedWebContextRoot[0] = ((WebModule) ((EARFile) commonArchive.getContainer()).getModule(commonArchive.getURI(), null)).getContextRoot();
- return cachedWebContextRoot[0];
- }
- if (archive != null) {
- IArchive earArchive = archive.getArchive();
- if(earArchive.containsArchiveResource(new Path(J2EEConstants.APPLICATION_DD_URI))){
- JavaEEQuickPeek earJQP = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(earArchive);
- if(earJQP.getJavaEEVersion() == JavaEEQuickPeek.JEE_5_0_ID){
- try {
- Application application = (Application) earArchive.getModelObject();
- String moduleName = archive.getPath().toString();
- Module module = (Module) application.getFirstModule(moduleName);
- if(module != null){
- cachedWebContextRoot[0] = module.getWeb().getContextRoot();
- } else {
- cachedWebContextRoot[0] = getDefaultContextRoot();
- }
- } catch (ArchiveModelLoadException e) {
- Logger.getLogger().logError(e);
- }
- } else {
- try{
- org.eclipse.jst.j2ee.application.Application application = (org.eclipse.jst.j2ee.application.Application)earArchive.getModelObject();
- String moduleName = archive.getPath().toString();
- org.eclipse.jst.j2ee.application.WebModule module = (org.eclipse.jst.j2ee.application.WebModule)application.getFirstModule(moduleName);
- if(module == null){
- cachedWebContextRoot[0] = null;
- } else {
- cachedWebContextRoot[0] = module.getContextRoot();
- }
- } catch (ArchiveModelLoadException e) {
- Logger.getLogger().logError(e);
- }
- }
- } else {
- cachedWebContextRoot[0] = getDefaultContextRoot();
- }
- return cachedWebContextRoot[0];
- }
- fail();
- return null;
- }
-
- private String getDefaultContextRoot() {
- //J2EE spec 8.3.1.3.c (pg 149)
- String contextRoot = archive.getPath().toString();
- contextRoot = contextRoot.substring(0, contextRoot.lastIndexOf('.'));
- return contextRoot;
- }
-
- // This is an array so we can tell the difference between initialized and null vs not initialized
- private HashMap<ArchiveWrapper, ArchiveWrapper> cachedEJBClientArchiveWrapper = null;
-
- public ArchiveWrapper getEJBClientArchiveWrapper(ArchiveWrapper ejbWrapper) {
- if (cachedEJBClientArchiveWrapper == null) {
- cachedEJBClientArchiveWrapper = new HashMap<ArchiveWrapper, ArchiveWrapper>();
- }
-
- if(cachedEJBClientArchiveWrapper.containsKey(ejbWrapper)){
- return cachedEJBClientArchiveWrapper.get(ejbWrapper);
- }
-
-
- if (!ejbWrapper.isEJBJarFile() || !isEarFile()) {
- fail();
- return null;
- }
-
- ArchiveWrapper ejbClientArchiveWrapper = null;
- try{
- if (commonArchive != null) {
- try {
- EJBJar jar = ((EJBJarFile) ejbWrapper.getUnderLyingArchive()).getDeploymentDescriptor();
- if (jar != null) {
- if (jar.getEjbClientJar() != null) {
- String clientName = jar.getEjbClientJar();
- ejbClientArchiveWrapper = new ArchiveWrapper((Archive) ((EARFile) commonArchive).getFile(clientName));
- }
- }
- return ejbClientArchiveWrapper;
- } catch (FileNotFoundException e) {
- Logger.getLogger().logError(e);
- }
- }
- if (archive != null) {
- try {
- JavaEEQuickPeek jqp = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(ejbWrapper.archive);
- String clientJarName = null;
- if(jqp.getVersion() == J2EEVersionConstants.EJB_3_0_ID){
- if(ejbWrapper.archive.containsArchiveResource(new Path(J2EEConstants.EJBJAR_DD_URI))){
- org.eclipse.jst.javaee.ejb.EJBJar edd = (org.eclipse.jst.javaee.ejb.EJBJar) ejbWrapper.archive.getModelObject();
- clientJarName = edd.getEjbClientJar();
- }
- } else {
- EJBJar jar = (EJBJar)ejbWrapper.archive.getModelObject();
- if (jar != null) {
- clientJarName = jar.getEjbClientJar();
- }
- }
-
- if (null != clientJarName) {
- IPath clientJarPath = new Path(clientJarName);
- if(archive.containsArchiveResource(clientJarPath)){
- IArchiveResource clientJar = archive.getArchiveResource(clientJarPath);
- if(null != clientJar){
- if (clientJar.getType() == IArchiveResource.ARCHIVE_TYPE) {
- ejbClientArchiveWrapper = new ArchiveWrapper((IArchive) clientJar);
- } else {
- try {
- ejbClientArchiveWrapper = new ArchiveWrapper(archive.getNestedArchive(clientJar));
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- } else {
- Logger.getLogger().logWarning(EARArchiveOpsResourceHandler.bind(EARArchiveOpsResourceHandler.MISSING_CLIENT_JAR, new Object[] {clientJarName, ejbWrapper.getName(), archive.getPath()}));
- }
- }
- return ejbClientArchiveWrapper;
- } catch (FileNotFoundException e) {
- Logger.getLogger().logError(e);
- } catch (ArchiveModelLoadException e) {
- Logger.getLogger().logError(e);
- }
- }
- } finally {
- cachedEJBClientArchiveWrapper.put(ejbWrapper, ejbClientArchiveWrapper);
- }
- fail();
- return null;
- }
-
- private List<ArchiveWrapper> cachedEARUtilitiesAndWebLibs = null;
-
- public List<ArchiveWrapper> getEARUtilitiesAndWebLibs() {
- if (null != cachedEARUtilitiesAndWebLibs) {
- return cachedEARUtilitiesAndWebLibs;
- }
-
- if (!isEarFile()) {
- fail();
- return null;
- }
-
- cachedEARUtilitiesAndWebLibs = new ArrayList<ArchiveWrapper>();
- if (commonArchive != null) {
- List files = commonArchive.getFiles();
- for (int i = 0; i < files.size(); i++) {
- FileImpl file = (FileImpl) files.get(i);
- if (file.isArchive() && !file.isModuleFile() && file.getURI().endsWith(".jar")) { //$NON-NLS-1$
- cachedEARUtilitiesAndWebLibs.add(new ArchiveWrapper((Archive) file));
- }
- if (file.isWARFile()) {
- ArchiveWrapper wrapper = new ArchiveWrapper((Archive) file);
- cachedEARUtilitiesAndWebLibs.addAll(wrapper.getWebLibs());
- }
- }
- return cachedEARUtilitiesAndWebLibs;
- }
- if (archive != null) {
- List files = archive.getArchiveResources();
- for (int i = 0; i < files.size(); i++) {
- IArchiveResource file = (IArchiveResource) files.get(i);
- String lastSegment = file.getPath().lastSegment();
- if (lastSegment.endsWith(".jar") || lastSegment.endsWith(".rar") || lastSegment.endsWith(".war") || lastSegment.endsWith("zip")) {
- IArchive nestedArchive;
- try {
- nestedArchive = archive.getNestedArchive(file);
- ArchiveWrapper nestedWrapper = new ArchiveWrapper(nestedArchive);
- if (nestedWrapper.isWARFile()) {
- cachedEARUtilitiesAndWebLibs.addAll(nestedWrapper.getWebLibs());
- } else if (!nestedWrapper.isModule()) {
- cachedEARUtilitiesAndWebLibs.add(nestedWrapper);
- }
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- return cachedEARUtilitiesAndWebLibs;
-
- }
- fail();
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveLoadAdapter.java
deleted file mode 100644
index 1b457b745..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,704 +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.archive;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.archive.operations.EARArchiveOpsResourceHandler;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyManifestUtil;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyVirtualComponent;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.jee.archive.AbstractArchiveLoadAdapter;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveLoadAdapter;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.archive.internal.ArchiveURIConverter;
-import org.eclipse.jst.jee.archive.internal.ArchiveUtil;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-
-public abstract class ComponentArchiveLoadAdapter extends AbstractArchiveLoadAdapter {
-
- protected static final String DOT_SQLJ = ".sqlj"; //$NON-NLS-1$
-
- protected static final String DOT_JSP = ".jsp"; //$NON-NLS-1$
-
- protected static final String DOT_PROJECT = ".project"; //$NON-NLS-1$
-
- protected static final String DOT_CLASSPATH = ".classpath"; //$NON-NLS-1$
-
- protected static final String DOT_SETTINGS = ".settings"; //$NON-NLS-1$
-
- protected static final String DOT_CVS_IGORE = ".cvsignore"; //$NON-NLS-1$
-
- protected IVirtualComponent vComponent;
-
- protected boolean exportSource = true;
-
- private List zipFiles = new ArrayList();
-
- private List javaClasspathURIs = new ArrayList();
-
- protected boolean includeClasspathComponents = true;
-
- protected class FilesHolder {
-
- private Map pathsToArchiveResources = new HashMap();
-
- private Map pathsToWorkbenchResources = new HashMap();
-
- private Map workbenchResourcesToPaths = new HashMap();
-
- private Map pathsToDiskFiles;
-
- private Map pathsToZipEntry = new HashMap();
-
- public void removeIFile(IFile file) {
- IPath path = (IPath) workbenchResourcesToPaths.get(file);
- remove(path);
- }
-
- public void remove(IPath path) {
- pathsToArchiveResources.remove(path);
- Object resource = pathsToWorkbenchResources.remove(path);
- if (resource != null) {
- workbenchResourcesToPaths.remove(resource);
- }
- if (pathsToDiskFiles != null) {
- pathsToDiskFiles.remove(path);
- }
- }
-
- public void addFile(IArchiveResource file) {
- IPath path = file.getPath();
- pathsToArchiveResources.put(path, file);
- }
-
- public void addFile(IArchiveResource file, java.io.File externalDiskFile) {
- IPath path = file.getPath();
- pathsToArchiveResources.put(path, file);
- if (null == pathsToDiskFiles) {
- pathsToDiskFiles = new HashMap();
- }
- pathsToDiskFiles.put(path, externalDiskFile);
- }
-
- public void addFile(IArchiveResource file, IResource resource) {
- IPath path = file.getPath();
- pathsToArchiveResources.put(path, file);
- pathsToWorkbenchResources.put(path, resource);
- }
-
- public InputStream getInputStream(IPath path) throws IOException, FileNotFoundException {
- java.io.File diskFile = null;
-
- if (pathsToDiskFiles != null && pathsToDiskFiles.containsKey(path)) {
- diskFile = (java.io.File) pathsToDiskFiles.get(path);
- } else if (pathsToWorkbenchResources != null && pathsToWorkbenchResources.containsKey(path)) {
- IResource resource = (IResource) pathsToWorkbenchResources.get(path);
- diskFile = new java.io.File(resource.getLocation().toOSString());
- }
- if (diskFile != null) {
- return new FileInputStream(diskFile);
- } else if (pathsToZipEntry.containsKey(path)) {
- Map fileURIMap = (Map) pathsToZipEntry.get(path);
- Iterator it = fileURIMap.keySet().iterator();
-
- String sourceFileUri = ""; //$NON-NLS-1$
- ZipFile zipFile = null;
-
- // there is only one key, pair
- while (it.hasNext()) {
- sourceFileUri = (String) it.next();
- zipFile = (ZipFile) fileURIMap.get(sourceFileUri);
- }
- ZipEntry entry = zipFile.getEntry(sourceFileUri);
- InputStream in = zipFile.getInputStream(entry);
- return in;
- } else {
- IArchiveResource res = getArchiveResource(path);
- return ComponentArchiveLoadAdapter.this.getSuperInputStream(res);
- }
- }
-
- public List<IArchiveResource> getFiles() {
- return new ArrayList<IArchiveResource>(pathsToArchiveResources.values());
- }
-
- public boolean contains(IPath path) {
- return pathsToArchiveResources.containsKey(path);
- }
-
- public IArchiveResource getArchiveResource(IPath path) {
- return (IArchiveResource) pathsToArchiveResources.get(path);
- }
-
- public void addEntry(ZipEntry entry, ZipFile zipFile, IPath runtimePath) {
- if (runtimePath != null) {
- if (!runtimePath.equals("/")) //$NON-NLS-1$
- runtimePath = runtimePath.append(entry.getName());
- else
- runtimePath = new Path(entry.getName());
- } else {
- runtimePath = new Path(entry.getName());
- }
-
- IArchiveResource file = createFile(runtimePath);
-
- Map fileURIMap = new HashMap();
- fileURIMap.put(entry.getName(), zipFile);
-
- pathsToZipEntry.put(file.getPath(), fileURIMap);
- pathsToArchiveResources.put(file.getPath(), file);
- }
- }
-
- protected FilesHolder filesHolder;
-
- private IVirtualFile manifestFile = null;
-
- public ComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- this(vComponent, true);
- }
-
- public ComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- this.vComponent = vComponent;
- filesHolder = new FilesHolder();
- setIncludeClasspathComponents(includeClasspathComponents);
- }
-
- public void setIncludeClasspathComponents(boolean includeClasspathComponents) {
- this.includeClasspathComponents = includeClasspathComponents;
- if (includeClasspathComponents) {
- this.manifestFile = vComponent.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- saveJavaClasspathReferences();
- } else {
- this.manifestFile = null;
- javaClasspathURIs.clear();
- }
- }
-
- public IArchiveResource getArchiveResource(IPath resourcePath) throws FileNotFoundException {
- initArchiveResources();
- return filesHolder.getArchiveResource(resourcePath);
- }
-
- public boolean containsArchiveResource(IPath path) {
- initArchiveResources();
- return filesHolder.contains(path);
- }
-
- protected boolean archiveResourcesInitialized = false;
-
- protected void initArchiveResources() {
- if (!archiveResourcesInitialized) {
- archiveResourcesInitialized = true;
- aggregateSourceFiles();
- aggregateClassFiles();
- addUtilities();
- }
- }
-
- public List<IArchiveResource> getArchiveResources() {
-
- initArchiveResources();
- return filesHolder.getFiles();
- }
-
- /**
- * Adds library cp entries that point to class folders and have been tagged with the publish/export attribute.
- */
- protected void addMappedClassFolders(final IPath targetRuntimePath) {
- // retrieve all mapped class folders
- if (vComponent instanceof J2EEModuleVirtualComponent) {
- try {
- final J2EEModuleVirtualComponent j2eeComponent = (J2EEModuleVirtualComponent) vComponent;
- final IVirtualReference[] cpRefs = j2eeComponent.getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- final IPath runtimePath = ref.getRuntimePath();
- // only process mappings with the specified runtime path
- if (ref.getReferencedComponent() instanceof ClasspathDependencyVirtualComponent
- && runtimePath.equals(targetRuntimePath)) {
- final ClasspathDependencyVirtualComponent comp = (ClasspathDependencyVirtualComponent) ref.getReferencedComponent();
- if (comp.isClassFolder()) {
- final IContainer classFolder = comp.getClassFolder();
- if (classFolder != null && classFolder.exists()) {
- aggregateOutputFiles(new IResource[]{classFolder}, runtimePath.makeRelative(), classFolder.getProjectRelativePath().segmentCount());
- }
- }
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- protected void saveJavaClasspathReferences() {
- if (vComponent instanceof J2EEModuleVirtualComponent) {
- final J2EEModuleVirtualComponent j2eeComp = (J2EEModuleVirtualComponent) vComponent;
- final IVirtualReference[] refs = j2eeComp.getJavaClasspathReferences();
- if (refs == null) {
- return;
- }
- for (int i = 0; i < refs.length; i++) {
- if (refs[i].getRuntimePath().equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- javaClasspathURIs.add(refs[i].getArchiveName());
- }
- }
- }
- }
-
- protected void addUtilities() {
- IVirtualReference[] components = vComponent.getReferences();
- for (int i = 0; i < components.length; i++) {
- IVirtualReference reference = components[i];
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
-
- if (referencedComponent.isBinary() && reference.getDependencyType() == DependencyType.CONSUMES) {
- java.io.File diskFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingDiskFile();
- ZipFile zipFile;
- IPath path = reference.getRuntimePath();
- try {
- zipFile = ArchiveUtil.newZipFile(diskFile);
- zipFiles.add(zipFile);
- Enumeration enumeration = zipFile.entries();
- while (enumeration.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) enumeration.nextElement();
- filesHolder.addEntry(entry, zipFile, path);
- }
- } catch (ZipException e) {
- Logger.getLogger().logError(e);
- } catch (IOException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
-
- /**
- * This is a cache of the IResource roots for all java source folders and is
- * used by {@link #inJavaSrc(IVirtualResource)}.
- */
- private IResource[] sourceRoots = null;
-
- protected void aggregateSourceFiles() {
- try {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource[] members = rootFolder.members();
- IPackageFragmentRoot[] srcPkgs = J2EEProjectUtilities.getSourceContainers(vComponent.getProject());
- sourceRoots = new IResource[srcPkgs.length];
- for (int i = 0; i < srcPkgs.length; i++) {
- sourceRoots[i] = srcPkgs[i].getCorrespondingResource();
- }
- inJavaSrc = false;
- aggregateFiles(members);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- protected void aggregateClassFiles() {
- StructureEdit se = null;
- try {
- IPackageFragmentRoot[] sourceRoots = J2EEProjectUtilities.getSourceContainers(vComponent.getProject());
- se = StructureEdit.getStructureEditForRead(vComponent.getProject());
- for (int i = 0; i < sourceRoots.length; i++) {
- IPath outputPath = sourceRoots[i].getRawClasspathEntry().getOutputLocation();
- if (outputPath == null) {
- IProject project = vComponent.getProject();
- if (project.hasNature(JavaCore.NATURE_ID)) {
- IJavaProject javaProject = JavaCore.create(project);
- outputPath = javaProject.getOutputLocation();
- }
- }
-
- if (outputPath != null) {
- IContainer javaOutputContainer = outputPath.segmentCount() > 1 ? (IContainer) ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath) : (IContainer) ResourcesPlugin
- .getWorkspace().getRoot().getProject(outputPath.lastSegment());
- IPath runtimePath = null;
- try {
- ComponentResource[] componentResources = se.findResourcesBySourcePath(sourceRoots[i].getResource().getProjectRelativePath());
- if (componentResources.length > 0) {
- IPath tmpRuntimePath = componentResources[0].getRuntimePath();
- IPath tmpSourcePath = componentResources[0].getSourcePath();
- if (!tmpRuntimePath.equals(tmpSourcePath)) {
- while (tmpSourcePath.segmentCount() > 0 && tmpRuntimePath.segmentCount() > 0 && tmpRuntimePath.lastSegment().equals(tmpSourcePath.lastSegment())) {
- tmpRuntimePath = tmpRuntimePath.removeLastSegments(1);
- tmpSourcePath = tmpSourcePath.removeLastSegments(1);
- }
- if (tmpRuntimePath.segmentCount() != 0) {
- runtimePath = tmpRuntimePath.makeRelative();
- }
- }
- }
- } catch (UnresolveableURIException e) {
- Logger.getLogger().logError(e);
- }
- if (null == runtimePath) {
- runtimePath = new Path(""); //$NON-NLS-1$
- }
-
- aggregateOutputFiles(new IResource[] { javaOutputContainer }, runtimePath, javaOutputContainer.getProjectRelativePath().segmentCount());
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- } finally {
- if (se != null) {
- se.dispose();
- }
- }
- }
-
- protected boolean aggregateOutputFiles(IResource[] resources, final IPath runtimePathPrefix, int outputFolderSegmentCount) throws CoreException {
- boolean fileAdded = false;
- for (int i = 0; i < resources.length; i++) {
- IArchiveResource cFile = null;
- if (!resources[i].exists()) {
- continue;
- }
- // We have to avoid duplicates between the source and output folders
- // (non-java
- // resources)
- IPath runtimePath = runtimePathPrefix.append(resources[i].getProjectRelativePath().removeFirstSegments(outputFolderSegmentCount));
- if (runtimePath == null)
- continue;
- if (resources[i].getType() == IResource.FILE) {
- if (!shouldInclude(runtimePath))
- continue;
- cFile = createFile(runtimePath);
- cFile.setLastModified(getLastModified(resources[i]));
- filesHolder.addFile(cFile, resources[i]);
- fileAdded = true;
- } else if (shouldInclude((IContainer) resources[i])) {
- IResource[] nestedResources = ((IContainer) resources[i]).members();
- aggregateOutputFiles(nestedResources, runtimePathPrefix, outputFolderSegmentCount);
- if (!filesHolder.contains(runtimePath)) {
- if (!shouldInclude(runtimePath))
- continue;
- cFile = createDirectory(runtimePath);
- cFile.setLastModified(getLastModified(resources[i]));
- filesHolder.addFile(cFile);
- fileAdded = true;
- }
- }
- }
- return fileAdded;
- }
-
- /**
- * This is used to track whether {@link #aggregateFiles(IVirtualResource[])}
- * is currently within a Java Source folder.
- */
- private boolean inJavaSrc = false;
-
- protected boolean aggregateFiles(IVirtualResource[] virtualResources) throws CoreException {
- boolean fileAdded = false;
- for (int i = 0; i < virtualResources.length; i++) {
- if (!virtualResources[i].exists()) {
- continue;
- }
- // We have to avoid duplicates between the source and output folders
- // (non-java
- // resources)
- IPath runtimePath = virtualResources[i].getRuntimePath();
- if (runtimePath == null)
- continue;
- runtimePath = runtimePath.setDevice(null).makeRelative();
- if (filesHolder.contains(runtimePath))
- continue;
-
- IArchiveResource cFile = null;
-
- if (virtualResources[i].getType() == IVirtualResource.FILE) {
- if (!shouldInclude(runtimePath))
- continue;
- IResource resource = virtualResources[i].getUnderlyingResource();
- // want to ignore derived resources nested within Java src
- // directories; this covers the case where
- // a user has nested a Java output directory within a Java src
- // directory (note: should ideally be
- // respecting Java src path exclusion filters)
- if (inJavaSrc && resource.isDerived()) {
- continue;
- }
- cFile = createFile(runtimePath);
- cFile.setLastModified(getLastModified(resource));
- filesHolder.addFile(cFile, resource);
- fileAdded = true;
- } else if (shouldInclude((IVirtualContainer) virtualResources[i])) {
- boolean inJavaSrcAtThisLevel = inJavaSrc;
- try {
- if (!inJavaSrc) {
- // if not already inside a Java src dir, check again
- inJavaSrc = inJavaSrc(virtualResources[i]);
- }
- IVirtualResource[] nestedVirtualResources = ((IVirtualContainer) virtualResources[i]).members();
- aggregateFiles(nestedVirtualResources);
- if (!filesHolder.contains(runtimePath)) {
- if (!shouldInclude(runtimePath))
- continue;
- IResource resource = virtualResources[i].getUnderlyingResource();
- if (inJavaSrc && resource.isDerived()) {
- continue;
- }
- cFile = createDirectory(runtimePath);
- cFile.setLastModified(getLastModified(resource));
- filesHolder.addFile(cFile);
- fileAdded = true;
- }
- } finally {
- inJavaSrc = inJavaSrcAtThisLevel;
- }
- }
- }
- return fileAdded;
- }
-
- /**
- * Determines if the specified IVirtualResource maps to a IResource that is
- * contained within a Java src root.
- *
- * @param virtualResource
- * IVirtualResource to check.
- * @param sourceRoots
- * Current Java src roots.
- * @return True if contained in a Java src root, false otherwise.
- */
- protected boolean inJavaSrc(final IVirtualResource virtualResource) {
- if (sourceRoots.length == 0) {
- return false;
- }
- // all mapped resources must be associated with Java src for the
- // resource to be considered in Java src
- final IResource[] resources = virtualResource.getUnderlyingResources();
- boolean inJavaSrc = false;
- for (int i = 0; i < resources.length; i++) {
- inJavaSrc = false;
- for (int j = 0; j < sourceRoots.length; j++) {
- if (sourceRoots[j].getFullPath().isPrefixOf(resources[i].getFullPath())) {
- inJavaSrc = true;
- break;
- }
- }
- // if this one was not in Java src, can break
- if (!inJavaSrc) {
- break;
- }
- }
-
- return inJavaSrc;
- }
-
- protected long getLastModified(IResource aResource) {
- return aResource.getLocation().toFile().lastModified();
- }
-
- public void setExportSource(boolean newExportSource) {
- exportSource = newExportSource;
- }
-
- public boolean isExportSource() {
- return exportSource;
- }
-
- protected boolean shouldInclude(IContainer aContainer) {
- return true;
- }
-
- protected boolean shouldInclude(IVirtualContainer vContainer) {
- IContainer iContainer = (IContainer) vContainer.getUnderlyingResource();
- return shouldInclude(iContainer);
- }
-
- // TODO add a mechanism for ignoring specific file types
- protected boolean shouldInclude(IPath path) {
- String lastSegment = path.lastSegment();
- if (null == lastSegment) {
- return false;
- }
- if (lastSegment.endsWith(DOT_PROJECT) || lastSegment.endsWith(DOT_CLASSPATH) || lastSegment.endsWith(DOT_CVS_IGORE) || path.segment(0).startsWith(DOT_SETTINGS)) {
- return false;
- }
- return isExportSource() || !isSource(path);
- }
-
- // TODO add a mechanism for ignoring specific file types
- protected boolean isSource(IPath path) {
- if (path == null)
- return false;
- return path.lastSegment().endsWith(JavaEEArchiveUtilities.DOT_JAVA) || path.lastSegment().endsWith(DOT_SQLJ);
- }
-
- protected void addExternalFile(IPath path, java.io.File externalDiskFile) {
- IArchiveResource aFile = createFile(path);
- filesHolder.addFile(aFile, externalDiskFile);
- }
-
- protected InputStream getSuperInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException {
- if (archiveResource.getType() == IArchive.ARCHIVE_TYPE) {
- IArchiveLoadAdapter nestedLoadAdapter = (IArchiveLoadAdapter)((IArchive)archiveResource).getLoadAdapter();
- if(nestedLoadAdapter instanceof ComponentArchiveLoadAdapter){
- ((ComponentArchiveLoadAdapter)nestedLoadAdapter).setExportSource(isExportSource());
- }
- }
-
- return super.getInputStream(archiveResource);
- }
-
- public InputStream getInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException {
- IPath path = archiveResource.getPath();
- // If the MANIFEST.MF of a module component is being requested and that
- // module component references
- // Java build path-based components, need to dynamically update the
- // manifest classpath to reflect the resolved
- // contributions from the build path
- if (includeClasspathComponents && path.equals(J2EEConstants.MANIFEST_URI) && !javaClasspathURIs.isEmpty() && manifestFile != null && manifestFile.getUnderlyingFile() != null
- && manifestFile.getUnderlyingFile().exists()) {
- // update the manifest classpath for the component
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ClasspathDependencyManifestUtil.updateManifestClasspath(manifestFile.getUnderlyingFile(), javaClasspathURIs, baos);
- return new ByteArrayInputStream(baos.toByteArray());
- }
-
- if (filesHolder.contains(path)) {
- return filesHolder.getInputStream(path);
- }
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource vResource = rootFolder.findMember(path);
- String filePath = null;
- if (null != vResource && vResource.exists()) {
- filePath = vResource.getUnderlyingResource().getLocation().toOSString();
- java.io.File file = new java.io.File(filePath);
- return new FileInputStream(file);
- }
- String eString = EARArchiveOpsResourceHandler.ARCHIVE_OPERATION_FileNotFound;
- throw new FileNotFoundException(eString);
- }
-
- public IVirtualComponent getComponent() {
- return vComponent;
- }
-
- protected JavaEEEMFArchiveAdapterHelper emfHelper = null;
-
- protected void initEMFHelper() {
- if (emfHelper == null) {
- emfHelper = new JavaEEEMFArchiveAdapterHelper(getArchive());
- emfHelper.setArchiveURIConverter(new ArchiveURIConverter(emfHelper.getArchive()) {
- protected URI convertPathToURI(IPath modelObjectPath) {
- // TODO find a better way to getplatformURI
- IPath path = getComponent().getRootFolder().getFile(modelObjectPath).getUnderlyingFile().getFullPath();
- return URI.createURI("platform:/resource/" + path.toString());
- }
- });
- }
- }
-
- public boolean containsModelObject(IPath modelObjectPath) {
- initEMFHelper();
- if (IArchive.EMPTY_MODEL_PATH == modelObjectPath) {
- modelObjectPath = getDefaultModelObjectPath();
- }
- return emfHelper.containsModelObject(modelObjectPath);
- }
-
- public Object getModelObject(IPath modelObjectPath) throws ArchiveModelLoadException {
- initEMFHelper();
- if (IArchive.EMPTY_MODEL_PATH == modelObjectPath) {
- modelObjectPath = getDefaultModelObjectPath();
- }
- return emfHelper.getModelObject(modelObjectPath);
- }
-
- protected IPath getDefaultModelObjectPath() {
- return new Path("/"); //$NON-NLS-1$
- }
-
- public String toString() {
- int packageLength = this.getClass().getPackage().getName().length() + 1;
- StringBuffer buffer = new StringBuffer(this.getClass().getName().substring(packageLength));
- buffer.append(", Component: "); //$NON-NLS-1$
- buffer.append(getComponent());
- return buffer.toString();
- }
-
- /**
- * protected IProgressMonitor monitor = null;
- *
- * public void setProgressMonitor(IProgressMonitor monitor){ this.monitor =
- * monitor; }
- *
- * protected final int FILE_SAVE_WORK = 100;
- *
- * public FileIterator getFileIterator() throws IOException { return new
- * FileIteratorImpl(getContainer().getFiles()){ protected SubProgressMonitor
- * lastSubMon = null; boolean firstVisit = true;
- *
- * public File next() { if(firstVisit){ firstVisit = false; if(monitor !=
- * null){
- * monitor.beginTask(ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Exporting_archive,
- * new Object [] { getContainer().getURI() }), files.size() *
- * FILE_SAVE_WORK); } } if(lastSubMon != null){ lastSubMon.done();
- * lastSubMon = null; } else if(monitor != null){
- * monitor.worked(FILE_SAVE_WORK); } File file = super.next(); if(monitor !=
- * null){ if(file.isContainer() &&
- * ComponentArchiveLoadAdapter.class.isInstance(((ContainerImpl)file).getLoadStrategy())){
- * ComponentArchiveLoadAdapter ls =
- * (ComponentArchiveLoadAdapter)((ContainerImpl)file).getLoadStrategy();
- * lastSubMon = new SubProgressMonitor(monitor, FILE_SAVE_WORK,
- * SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
- * ls.setProgressMonitor(lastSubMon); } else {
- * monitor.subTask(file.getURI()); } } return file; } }; }
- */
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveSaveAdapter.java
deleted file mode 100644
index 07c1be8bf..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,285 +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.archive;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jst.j2ee.internal.archive.operations.EJBArchiveOpsResourceHandler;
-import org.eclipse.jst.j2ee.internal.archive.operations.IOverwriteHandler;
-import org.eclipse.jst.j2ee.internal.archive.operations.OverwriteHandlerException;
-import org.eclipse.jst.jee.archive.AbstractArchiveSaveAdapter;
-import org.eclipse.jst.jee.archive.ArchiveSaveFailureException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-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.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.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-
-// hari: make abstract
-public class ComponentArchiveSaveAdapter extends AbstractArchiveSaveAdapter {
-
- protected IDataModel dataModel;
-
- protected IVirtualComponent vComponent;
-
- protected IOverwriteHandler overwriteHandler;
-
- protected IProgressMonitor progressMonitor;
-
- private String archiveComponentsDeployPath;
-
- private List archiveComponents;
-
- private Map archiveComponentURIMap;
-
- public ComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super();
- if (null == vComponent) {
- throw new NullPointerException();
- }
- this.vComponent = vComponent;
- }
-
- public void setDataModel(IDataModel dataModel) {
- this.dataModel = dataModel;
- }
-
- public void setOverwriteHandler(IOverwriteHandler newOverwriteHandler) {
- overwriteHandler = newOverwriteHandler;
- }
-
- public void setProgressMonitor(IProgressMonitor newProgressMonitor) {
- progressMonitor = newProgressMonitor;
- }
-
- protected void validateEdit(IFile aFile) {
- if (overwriteHandler == null)
- return;
- if (!(aFile.exists() && aFile.isReadOnly()))
- return;
-
- overwriteHandler.validateEdit(aFile);
- }
-
- protected boolean shouldOverwrite(String uri) {
- if (overwriteHandler.isOverwriteNone())
- return false;
- return (overwriteHandler.isOverwriteResources() || overwriteHandler.isOverwriteAll() || overwriteHandler.shouldOverwrite(uri));
- }
-
- protected OutputStream getOutputStreamForResource(Resource aResource) throws IOException {
- // this method has no references in the hirarchy
- return null;
- }
-
- public void save(IProgressMonitor monitor) throws ArchiveSaveFailureException {
- final int SUPER_TICKS = 1000;
- final int LOCAL_TICKS = 10;
- final int TOTAL_TICKS = SUPER_TICKS + LOCAL_TICKS;
- try {
- monitor.beginTask("Importing " + vComponent.getName(), TOTAL_TICKS);
- super.save(new SubProgressMonitor(monitor, SUPER_TICKS));
- linkArchiveComponents();
- monitor.worked(LOCAL_TICKS);
- } finally {
- monitor.done();
- }
- }
-
- public void save(IArchiveResource aFile) throws ArchiveSaveFailureException {
-
- try {
- if (progressMonitor == null)
- progressMonitor = new NullProgressMonitor();
- progressMonitor.subTask(aFile.getPath().toString());
- InputStream in = aFile.getInputStream();
-
- IPath projectRelativePath = getProjectRelativePath(aFile);
- if (aFile.getType() == IArchiveResource.ARCHIVE_TYPE) {
- saveAsArchiveComponent((IArchive) aFile, projectRelativePath, in);
- } else if (aFile.getType() != IArchiveResource.DIRECTORY_TYPE) {
- saveToOutputPath(projectRelativePath, in);
- } else {
- createDirectory(projectRelativePath);
- }
- } catch (OverwriteHandlerException ohe) {
- throw ohe;
- } catch (Exception e) {
- String errorString = EJBArchiveOpsResourceHandler.ARCHIVE_OPERATION_SaveFile + aFile.getPath();
- throw new ArchiveSaveFailureException(errorString);
- } finally {
- if(null != progressMonitor){
- progressMonitor.worked(1);
- }
- }
- }
-
- /**
- * Returns the project relative path for where the specified file should be
- * saved.
- *
- * @param aFile
- * @return
- */
- protected IPath getProjectRelativePath(IArchiveResource aFile) {
- IPath path = aFile.getPath();
- IFile iFile = null;
- if (path.lastSegment() != null && path.lastSegment().startsWith(IModuleConstants.DOT_SETTINGS)) {
- iFile = vComponent.getProject().getFile(path);
- } else {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile(path);
- iFile = vFile.getUnderlyingFile();
- }
- return iFile.getProjectRelativePath();
- }
-
- /**
- * Creates the IFolder specified by the project relative path.
- *
- * @param projectRelativePath
- * @throws CoreException
- */
- protected void createDirectory(IPath projectRelativePath) throws CoreException {
- IFolder iFolder = vComponent.getProject().getFolder(projectRelativePath);
- if (!iFolder.exists()) {
- mkdirs(iFolder);
- }
- }
-
- /**
- * Creates the specified IFolder
- *
- * @param folder
- * @throws CoreException
- */
- protected void mkdirs(IFolder folder) throws CoreException {
- IContainer container = folder.getParent();
- if (!container.exists()) {
- mkdirs((IFolder) container);
- }
- folder.create(true, true, null);
- }
-
- /**
- * Save the specified Archive to the specified project relative path using
- * the passed input stream.
- *
- * @param archive
- * @param projectRelativePath
- * @param in
- * @throws Exception
- */
- protected void saveAsArchiveComponent(IArchive archive, IPath projectRelativePath, InputStream in) throws Exception {
- IFile iFile = saveToOutputPathIFile(projectRelativePath, in);
- // TODO investigate removing this block and related variables and
- // linkArchiveComponents(); see bugzilla 159160
- if (shouldLinkAsComponentRef(archive)) {
- IVirtualComponent archiveComponent = ComponentCore.createArchiveComponent(vComponent.getProject(), VirtualArchiveComponent.LIBARCHIVETYPE + iFile.getFullPath().toString());
- if (archiveComponents == null) {
- archiveComponents = new ArrayList();
- archiveComponentURIMap = new HashMap();
- archiveComponentsDeployPath = IPath.SEPARATOR + projectRelativePath.removeLastSegments(1).toString();
- }
- archiveComponents.add(archiveComponent);
- archiveComponentURIMap.put(archiveComponent, iFile.getName());
- }
- }
-
- protected boolean shouldLinkAsComponentRef(IArchive archive) {
- return false;
- }
-
- protected void linkArchiveComponents() {
- if (archiveComponents != null && archiveComponents.size() > 0) {
- IDataModel createReferencesDataModel = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, vComponent);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, archiveComponentsDeployPath);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, archiveComponents);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, archiveComponentURIMap);
- try {
- createReferencesDataModel.getDefaultOperation().execute(null, null);
- } catch (ExecutionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Saves to the specified project relative output path. Warning this method
- * will be changed post 1.5 to return an IFile
- *
- * @param projectRelativePath
- * @param in
- * @throws Exception
- */
- protected void saveToOutputPath(IPath projectRelativePath, InputStream in) throws Exception {
- saveToOutputPathIFile(projectRelativePath, in);
- }
-
- /**
- * TODO refactor change the method above to return IFile
- * {@link DoNotUseMeThisWillBeDeletedPost15}
- */
- protected IFile saveToOutputPathIFile(IPath projectRelativePath, InputStream in) throws Exception {
- IFile iFile = vComponent.getProject().getFile(projectRelativePath);
- saveToIFile(iFile, in);
- return iFile;
- }
-
- protected void saveToIFile(IFile iFile, InputStream in) throws Exception {
- validateEdit(iFile);
- if (iFile.exists())
- iFile.setContents(in, true, true, null);
- else {
- mkdirs(iFile.getFullPath().removeLastSegments(1), ResourcesPlugin.getWorkspace().getRoot());
- iFile.create(in, true, null);
- }
- }
-
- protected void mkdirs(IPath path, IWorkspaceRoot root) throws CoreException {
- if (path.segmentCount() <= 1)
- return;
- IFolder folder = root.getFolder(path);
- if (!folder.exists()) {
- mkdirs(path.removeLastSegments(1), root);
- folder.create(true, true, null);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveLoadAdapter.java
deleted file mode 100644
index b128e0876..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,299 +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.archive;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-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.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.jee.archive.ArchiveOpenFailureException;
-import org.eclipse.jst.jee.archive.ArchiveOptions;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveFactory;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualContainer;
-
-public class ConnectorComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter {
-
- private int dotJavaLength = JavaEEArchiveUtilities.DOT_JAVA.length();
-
- private List alreadyIndexed = new ArrayList();
-
- private Map classesMap;
-
- private IFile knownDD;
-
- public static String[] knownLibExtensions = { ".jar", //$NON-NLS-1$
- ".zip", //$NON-NLS-1$
- ".so", //$NON-NLS-1$
- ".o", //$NON-NLS-1$
- ".sl", //$NON-NLS-1$
- ".dll", //$NON-NLS-1$
- };
-
- public ConnectorComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- this(vComponent, true);
- }
-
- public ConnectorComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- knownDD = vComponent.getRootFolder().getFile(J2EEConstants.RAR_DD_URI).getUnderlyingFile();
- }
-
- public List<IArchiveResource> getArchiveResources() {
- addNestedJARsFromSourceRoots();
- aggregateSourceFiles();
- return filesHolder.getFiles();
- }
-
- private void addNestedJARsFromSourceRoots() {
- IPackageFragmentRoot[] sourceRoots = J2EEProjectUtilities.getSourceContainers(vComponent.getProject());
- for (int i = 0; i < sourceRoots.length; i++) {
- IArchiveResource aFile;
- try {
- aFile = getNestedJar(sourceRoots[i]);
- if (null != aFile) {
- filesHolder.addFile(aFile);
- }
- } catch (JavaModelException e) {
- Logger.getLogger().logError(e);
- } catch (ArchiveOpenFailureException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- private IArchiveResource getNestedJar(IPackageFragmentRoot sourceRoot) throws JavaModelException, ArchiveOpenFailureException {
- IPath outputPath = sourceRoot.getRawClasspathEntry().getOutputLocation();
- if (outputPath == null) {
- IProject project = vComponent.getProject();
- try {
- if (project.hasNature(JavaCore.NATURE_ID)) {
- IJavaProject javaProject = JavaCore.create(project);
- outputPath = javaProject.getOutputLocation();
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- if (outputPath == null) {
- return null;
- }
- }
-
- IFolder javaOutputFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath);
- indexClassesForOutputFolder(javaOutputFolder);
- IContainer sourceContainer = (IContainer) sourceRoot.getResource();
-
- int sourceContainerSegmentCount = sourceContainer.getProjectRelativePath().segmentCount();
- boolean isModuleRoot = knownDD.getProjectRelativePath().toString().startsWith(sourceContainer.getProjectRelativePath().toString());
- Set iFilesSet = new HashSet();
- boolean foundJava = gatherFilesForJAR(iFilesSet, sourceContainer, isModuleRoot, false, sourceContainerSegmentCount);
- if (!isModuleRoot || foundJava) {
- List <IFile> iFilesList = Collections.list(Collections.enumeration(iFilesSet));
- for (int i = 0; i < iFilesList.size(); i++) {
- filesHolder.removeIFile((IFile) iFilesList.get(i));
- }
- IArchiveResource nestedArchive = createNestedArchive(iFilesList, sourceContainer, javaOutputFolder);
- return nestedArchive;
- }
- return null;
- }
-
- private boolean gatherFilesForJAR(Collection iFiles, IContainer current, boolean isModuleRoot, boolean foundJava, int sourceContainerSegmentCount) {
- IResource[] members = null;
- try {
- members = current.members();
- } catch (CoreException core) {
- // TODO
- // throw new ArchiveRuntimeException(core);
- }
-
- IContainer ddFolder = vComponent.getRootFolder().getFolder(J2EEConstants.META_INF).getUnderlyingFolder();
-
- for (int i = 0; i < members.length; i++) {
- IResource res = members[i];
- if (res.getType() == IResource.FOLDER) {
- if (!ddFolder.equals(res)) {//if it's not the dd folder
- foundJava = gatherFilesForJAR(iFiles, (IFolder) res, isModuleRoot, foundJava, sourceContainerSegmentCount) || foundJava;
- }
- } else {// it must be a file
- IFile srcFile = (IFile) res;
- if (belongsInNestedJAR(srcFile, isModuleRoot)) {
- if (JavaEEArchiveUtilities.isJava(srcFile)) {
- if (exportSource) {
- iFiles.add(srcFile); // don't need to check
- // duplicates here
- }
- String className = srcFile.getProjectRelativePath().removeFirstSegments(sourceContainerSegmentCount).toString();
- className = className.substring(0, className.length() - dotJavaLength);
- List classes = retrieveClasses(className);
- if (null != classes) {
- Iterator iterator = classes.iterator();
- while (iterator.hasNext()) {
- IFile clazz = (IFile) iterator.next();
- if (!iFiles.contains(clazz)) {
- // .class need to check for duplicates
- iFiles.add(clazz);
- }
- }
- }
- } else {
- if (!iFiles.contains(srcFile)) {
- // if it's not src, then it could be .class and need
- // to check for duplicates
- iFiles.add(srcFile);
- }
- }
- if (isModuleRoot)
- foundJava = foundJava || JavaEEArchiveUtilities.isJava(srcFile) || JavaEEArchiveUtilities.isClass(srcFile);
- }
- }
- }
- return foundJava;
- }
-
- private IArchive createNestedArchive(List <IFile> files, IContainer sourceContainer, IFolder javaOutputFolder) throws ArchiveOpenFailureException {
- ConnectorComponentNestedJARArchiveLoadAdapter nestedLoader = new ConnectorComponentNestedJARArchiveLoadAdapter(files, sourceContainer, javaOutputFolder);
- ArchiveOptions nestedOptions = new ArchiveOptions();
- nestedOptions.setOption(ArchiveOptions.LOAD_ADAPTER, nestedLoader);
- IArchive nestedArchive = IArchiveFactory.INSTANCE.openArchive(nestedOptions);
- nestedArchive.setPath(new Path(computeUniqueArchiveURI(sourceContainer)));
- nestedArchive.setArchive(archive);
- return nestedArchive;
- }
-
- private String computeUniqueArchiveURI(IResource resource) {
- int increment = 0;
- String name = resource.getName();
- StringBuffer sb = null;
- do {
- sb = new StringBuffer(name.length() + 5);
- sb.append('_');
- sb.append(name);
- if (increment > 0)
- sb.append(increment);
- sb.append(".jar"); //$NON-NLS-1$
- increment++;
- } while (filesHolder.contains(new Path(sb.toString())));
- return sb.toString();
- }
-
- private boolean belongsInNestedJAR(IFile iFile, boolean isModuleRoot) {
- if (isModuleRoot && isDeploymentDescriptor(iFile)) {
- return false;
- }
- for (int i = 0; i < knownLibExtensions.length; i++) {
- if (JavaEEArchiveUtilities.hasExtension(iFile, knownLibExtensions[i]))
- return false;
- }
- return true;
- }
-
- protected boolean shouldInclude(IPath path) {
- String lastSegment = path.lastSegment();
- return null != lastSegment && !JavaEEArchiveUtilities.hasExtension(lastSegment, JavaEEArchiveUtilities.DOT_CLASS) && !JavaEEArchiveUtilities.hasExtension(lastSegment, JavaEEArchiveUtilities.DOT_JAVA);
- }
-
- /**
- * Find all the .class files and index them so inner classes can be located.
- */
- private void indexClassesForOutputFolder(IFolder javaOutputFolder) {
- if (null == javaOutputFolder || alreadyIndexed.contains(javaOutputFolder)) {
- return;
- }
- alreadyIndexed.add(javaOutputFolder);
- int segmentCount = javaOutputFolder.getProjectRelativePath().segmentCount();
- indexClasses(javaOutputFolder, segmentCount);
- }
-
- private void indexClasses(IResource resource, int javaOutputSegmentCount) {
- switch (resource.getType()) {
- case IResource.FILE:
- indexClass((IFile) resource, javaOutputSegmentCount);
- break;
- case IResource.FOLDER:
- try {
- IResource[] members = ((IFolder) resource).members();
- for (int i = 0; i < members.length; i++) {
- indexClasses(members[i], javaOutputSegmentCount);
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- break;
- }
- }
-
- private void indexClass(IFile iFile, int javaOutputSegmentCount) {
- if (!JavaEEArchiveUtilities.isClass(iFile))
- return;
- if (classesMap == null)
- classesMap = new HashMap();
- String name = iFile.getName();
- IPath relPath = iFile.getProjectRelativePath().removeFirstSegments(javaOutputSegmentCount);
- String key = relPath.toString();
- if (name.indexOf('$') != -1) {
- key = key.substring(0, key.indexOf('$'));
- } else {
- key = key.substring(0, key.indexOf('.'));
- }
- List inners = (List) classesMap.get(key);
- if (inners == null) {
- inners = new ArrayList(1);
- classesMap.put(key, inners);
- }
- inners.add(iFile);
- }
-
- public List retrieveClasses(String key) {
- if (classesMap == null)
- return null;
- return (List) classesMap.get(key);
- }
-
- private boolean isDeploymentDescriptor(IFile iFile) {
- return knownDD.equals(iFile);
- }
-
- @Override
- protected IPath getDefaultModelObjectPath() {
- return new Path(J2EEConstants.RAR_DD_URI);
- }
-
- protected boolean shouldInclude(IVirtualContainer vContainer) {
- boolean isDDFolder = vComponent.getRootFolder().getFolder(J2EEConstants.META_INF).equals(vContainer);
- return isDDFolder || !inJavaSrc(vContainer);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveSaveAdapter.java
deleted file mode 100644
index d1dd89c15..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,21 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class ConnectorComponentArchiveSaveAdapter extends J2EEComponentArchiveSaveAdapter {
-
- public ConnectorComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveTypeHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveTypeHandler.java
deleted file mode 100644
index 0393c78f4..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentArchiveTypeHandler.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveHandler;
-
-public class ConnectorComponentArchiveTypeHandler implements IArchiveHandler {
-
- public boolean handlesArchive(IArchive archive) {
- if (archive.getLoadAdapter() instanceof ConnectorComponentArchiveLoadAdapter) {
- return true;
- } else if (archive.containsArchiveResource(new Path(J2EEConstants.RAR_DD_URI))) {
- return true;
- } else {
- // TODO handle the no DD case
- return false;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentNestedJARArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentNestedJARArchiveLoadAdapter.java
deleted file mode 100644
index 0812304d2..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/ConnectorComponentNestedJARArchiveLoadAdapter.java
+++ /dev/null
@@ -1,151 +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.archive;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-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.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.AbstractArchiveLoadAdapter;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-
-public class ConnectorComponentNestedJARArchiveLoadAdapter extends AbstractArchiveLoadAdapter {
-
- private List<IFile> iFiles;
-
- private int sourceSegmentCount;
-
- private int outputSegmentCount;
-
- private Map<IPath, IFile> pathsToIFiles;
-
- private Map<IPath, IArchiveResource> pathsToIArchiveResources;
-
- private IContainer sourceContainer;
-
- /**
- * Constructor for NestedJARLoadStrategyImpl.
- */
- public ConnectorComponentNestedJARArchiveLoadAdapter(List<IFile> iFiles, IContainer sourceContainer, IFolder javaOutputFolder) {
- super();
- this.iFiles = iFiles;
- this.sourceContainer = sourceContainer;
- sourceSegmentCount = sourceContainer.getProjectRelativePath().segmentCount();
- outputSegmentCount = javaOutputFolder.getProjectRelativePath().segmentCount();
- }
-
- public String toString() {
- int packageLength = this.getClass().getPackage().getName().length() + 1;
- StringBuffer buffer = new StringBuffer(this.getClass().getName().substring(packageLength));
- buffer.append(", Source Container: "); //$NON-NLS-1$
- buffer.append(sourceContainer.getName());
- return buffer.toString();
- }
-
- private boolean indexed = false;
-
- private List<IArchiveResource> fullIndex = null;
-
- public List<IArchiveResource> getArchiveResources() {
- if (!indexed) {
- indexed = true;
- pathsToIFiles = new HashMap<IPath, IFile>();
- pathsToIArchiveResources = new HashMap<IPath, IArchiveResource>();
- for (IFile iFile : iFiles) {
- IPath relPath;
- if (JavaEEArchiveUtilities.isClass(iFile)) {
- relPath = getRelativePath(iFile, outputSegmentCount);
- } else {
- relPath = getRelativePath(iFile, sourceSegmentCount);
- }
- addFile(iFile, relPath);
- }
- IPath manifestPath = new Path(J2EEConstants.MANIFEST_URI);
- if (!pathsToIArchiveResources.containsKey(manifestPath)) {
- IArchiveResource manifest = createManifest(manifestPath);
- pathsToIArchiveResources.put(manifest.getPath(), manifest);
- }
- List<IArchiveResource> list = new ArrayList();
- list.addAll(pathsToIArchiveResources.values());
- fullIndex = Collections.unmodifiableList(list);
- }
- return fullIndex;
- }
-
- protected void addFile(IFile iFile, IPath relPath) {
- IArchiveResource aFile = createFile(iFile, relPath);
- pathsToIArchiveResources.put(aFile.getPath(), aFile);
- pathsToIFiles.put(aFile.getPath(), iFile);
- }
-
- protected long getLastModified(IResource aResource) {
- return aResource.getLocation().toFile().lastModified();
- }
-
- private IArchiveResource createFile(IFile iFile, IPath relPath) {
- IArchiveResource cFile = createFile(relPath);
- cFile.setLastModified(getLastModified(iFile));
- return cFile;
- }
-
- private IPath getRelativePath(IFile file, int parentSegmentCount) {
- return file.getProjectRelativePath().removeFirstSegments(parentSegmentCount);
- }
-
- public boolean containsArchiveResource(IPath resourcePath) {
- if (!indexed) {
- getArchiveResources();
- }
- return pathsToIArchiveResources.containsKey(resourcePath);
- }
-
- public IArchiveResource getArchiveResource(IPath resourcePath) throws FileNotFoundException {
- if (!indexed) {
- getArchiveResources();
- }
- return pathsToIArchiveResources.get(resourcePath);
- }
-
- public InputStream getInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException {
- IFile file = pathsToIFiles.get(archiveResource.getPath());
- if (file != null) {
- try {
- return file.getContents();
- } catch (CoreException core) {
- throw new IOException("Unable to get contents from " + file.getProjectRelativePath() + " message " + core.getLocalizedMessage());
- }
- }
- throw new FileNotFoundException(archiveResource.getPath().toString());
- }
-
- public boolean containsModelObject(IPath modelObjectPath) {
- return false;
- }
-
- public Object getModelObject(IPath modelObjectPath) throws ArchiveModelLoadException {
- return null; // no model objects here
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveLoadAdapter.java
deleted file mode 100644
index ded441323..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,154 +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
- * Kaloyan Raev, kaloyan.raev@sap.com - bug 220912
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.archive;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyVirtualComponent;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.jee.archive.ArchiveOpenFailureException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveLoadAdapter;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.archive.internal.ArchiveUtil;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class EARComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter {
-
- // Optimization to directly copy binary files
- private Map<IArchiveResource, File> binaryResourcesToDiskFiles = new HashMap<IArchiveResource, File>();
-
- public EARComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public EARComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- public List<IArchiveResource> getArchiveResources() {
- aggregateSourceFiles();
- addModulesAndUtilities();
- List<IArchiveResource> files = filesHolder.getFiles();
- IPath manifestPath = new Path(J2EEConstants.MANIFEST_URI);
- if (!filesHolder.contains(manifestPath)) {
- IArchiveResource manifest = createManifest(manifestPath);
- files.add(manifest);
- }
- return files;
- }
-
- public InputStream getInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException {
- if (binaryResourcesToDiskFiles.containsKey(archiveResource)) {
- java.io.File diskFile = binaryResourcesToDiskFiles.get(archiveResource);
- return new FileInputStream(diskFile);
- }
- return super.getInputStream(archiveResource);
- }
-
- public void addModulesAndUtilities() {
- IVirtualReference[] components = J2EEProjectUtilities.getComponentReferences(vComponent);
- for (int i = 0; i < components.length; i++) {
- IVirtualReference reference = components[i];
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
- if(vComponent.equals(referencedComponent)){
- continue;
- }
- try {
- IArchive nestedModuleArchive = JavaEEArchiveUtilities.INSTANCE.openArchive(referencedComponent);
- String sPath = reference.getArchiveName();
- String srtp = reference.getRuntimePath().toString();
- if (srtp.startsWith("" + IPath.SEPARATOR)) srtp = srtp.substring(1);
- String spt = srtp + IPath.SEPARATOR + sPath;
- if (spt.startsWith("" + IPath.SEPARATOR)) spt = spt.substring(1);
- nestedModuleArchive.setPath(new Path(spt));
- nestedModuleArchive.setArchive(archive);
- filesHolder.addFile(nestedModuleArchive);
-
- if (referencedComponent.isBinary()) {
- java.io.File diskFile = null;
- diskFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingDiskFile();
- if (!diskFile.exists()) {
- IFile wbFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingWorkbenchFile();
- diskFile = new File(wbFile.getLocation().toOSString());
- }
- binaryResourcesToDiskFiles.put(nestedModuleArchive, diskFile);
- } else {
- // Bug 220912 - set "export source" flag before calling JavaEEQuickPeek
- if (nestedModuleArchive.getType() == IArchive.ARCHIVE_TYPE) {
- IArchiveLoadAdapter nestedLoadAdapter = (IArchiveLoadAdapter)((IArchive)nestedModuleArchive).getLoadAdapter();
- if(nestedLoadAdapter instanceof ComponentArchiveLoadAdapter){
- ((ComponentArchiveLoadAdapter)nestedLoadAdapter).setExportSource(isExportSource());
- }
- }
-
- JavaEEQuickPeek quickPeek = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(nestedModuleArchive);
- switch (quickPeek.getType()) {
- case JavaEEQuickPeek.CONNECTOR_TYPE:
- case JavaEEQuickPeek.EJB_TYPE:
- case JavaEEQuickPeek.WEB_TYPE:
- ((ComponentArchiveLoadAdapter) nestedModuleArchive.getLoadAdapter()).setIncludeClasspathComponents(includeClasspathComponents);
- addClasspathComponentDependencies(referencedComponent);
- }
-
- }
- } catch (ArchiveOpenFailureException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
-
- private void addClasspathComponentDependencies(final IVirtualComponent referencedComponent) {
- // retrieve all Java classpath component dependencies
- if (includeClasspathComponents && referencedComponent instanceof J2EEModuleVirtualComponent) {
- final IVirtualReference[] cpRefs = ((J2EEModuleVirtualComponent) referencedComponent).getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- // only ../ runtime paths contribute to the EAR
- if (ref.getRuntimePath().equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- if (ref.getReferencedComponent() instanceof ClasspathDependencyVirtualComponent) {
- final ClasspathDependencyVirtualComponent comp = (ClasspathDependencyVirtualComponent) ref.getReferencedComponent();
- File cpEntryFile = comp.getUnderlyingDiskFile();
- if (!cpEntryFile.exists()) {
- final IFile wbFile = comp.getUnderlyingWorkbenchFile();
- cpEntryFile = new File(wbFile.getLocation().toOSString());
- }
- addExternalFile(new Path(ref.getArchiveName()), cpEntryFile);
- }
- }
- }
- }
- }
-
- @Override
- protected IPath getDefaultModelObjectPath() {
- return new Path(J2EEConstants.APPLICATION_DD_URI);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveSaveAdapter.java
deleted file mode 100644
index 7a5ff80cf..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,21 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class EARComponentArchiveSaveAdapter extends ComponentArchiveSaveAdapter {
-
- public EARComponentArchiveSaveAdapter(IVirtualComponent component) {
- super(component);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveTypeHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveTypeHandler.java
deleted file mode 100644
index c1b81438e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EARComponentArchiveTypeHandler.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveHandler;
-
-public class EARComponentArchiveTypeHandler implements IArchiveHandler {
-
- public boolean handlesArchive(IArchive archive) {
- if (archive.getLoadAdapter() instanceof EARComponentArchiveLoadAdapter) {
- return true;
- } else if (archive.containsArchiveResource(new Path(J2EEConstants.APPLICATION_DD_URI))) {
- return true;
- } else {
- // TODO handle the no DD case
- return false;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveLoadAdapter.java
deleted file mode 100644
index 9eef178d3..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class EJBComponentArchiveLoadAdapter extends J2EEComponentArchiveLoadAdapter {
-
- public EJBComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- this(vComponent, true);
- }
-
- public EJBComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- protected IPath getDefaultModelObjectPath() {
- return new Path(J2EEConstants.EJBJAR_DD_URI);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveSaveAdapter.java
deleted file mode 100644
index 0c04bfe96..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,22 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class EJBComponentArchiveSaveAdapter extends J2EEComponentArchiveSaveAdapter {
-
- public EJBComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveTypeHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveTypeHandler.java
deleted file mode 100644
index fd90d8d92..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/EJBComponentArchiveTypeHandler.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveHandler;
-
-public class EJBComponentArchiveTypeHandler implements IArchiveHandler {
-
- public boolean handlesArchive(IArchive archive) {
- if (archive.getLoadAdapter() instanceof EJBComponentArchiveLoadAdapter) {
- return true;
- } else if (archive.containsArchiveResource(new Path(J2EEConstants.EJBJAR_DD_URI))) {
- return true;
- } else {
- // TODO handle the no DD case
- return false;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveLoadAdapter.java
deleted file mode 100644
index f7cd5d395..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,36 +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.archive;
-
-import java.util.List;
-
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public abstract class J2EEComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter{
-
- public J2EEComponentArchiveLoadAdapter(IVirtualComponent component) {
- super(component);
- }
-
- public J2EEComponentArchiveLoadAdapter(IVirtualComponent component, boolean includeClasspathComponents) {
- super(component, includeClasspathComponents);
- }
-
- public List <IArchiveResource> getArchiveResources() {
- super.getArchiveResources();
- if (includeClasspathComponents) {
- addMappedClassFolders(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_COMPONENT_PATH);
- }
- return filesHolder.getFiles();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveSaveAdapter.java
deleted file mode 100644
index 95b12b547..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,175 +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.archive;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-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.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.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jst.jee.archive.ArchiveSaveFailureException;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-import com.ibm.icu.util.StringTokenizer;
-
-public abstract class J2EEComponentArchiveSaveAdapter extends ComponentArchiveSaveAdapter {
-
- protected final String DOT_CLASS = ".class"; //$NON-NLS-1$
-
- protected final String DOT_JAVA = ".java"; //$NON-NLS-1$
-
- protected final String IMPORTED_CLASSES = "ImportedClasses"; //$NON-NLS-1$
-
- public J2EEComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public void save(IProgressMonitor monitor) throws ArchiveSaveFailureException {
- final int SUPER_TICKS = 1000;
- final int LOCAL_TICKS = 10;
- final int REFRESH_TICKS = 100;
- final int TOTAL_TICKS = SUPER_TICKS + LOCAL_TICKS + REFRESH_TICKS;
-
- try {
- monitor.beginTask("Importing " + vComponent.getName(), TOTAL_TICKS);
- super.save(new SubProgressMonitor(monitor, SUPER_TICKS));
- linkImportedClassesFolderIfNecessary();
- monitor.worked(LOCAL_TICKS);
- try {
- vComponent.getProject().refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, REFRESH_TICKS));
- } catch (CoreException ex) {
- Logger.getLogger().logError(ex);
- }
- } finally {
- monitor.done();
- }
- }
-
- public boolean endsWithClassType(String aFileName) {
-
- if (aFileName != null && aFileName.endsWith(DOT_CLASS))
- return true;
- return false;
- }
-
- protected boolean shouldSave(IArchiveResource aFile) {
- if (endsWithClassType(aFile.getPath().lastSegment())) {
- boolean shouldSave = isClassWithoutSource(aFile);
- if (shouldSave && !importedClassesFolderCreated) {
- createImportedClassesFolder();
- }
- return shouldSave;
- }
- return super.shouldSave(aFile);
- }
-
- /*
- * public void save(ArchiveManifest aManifest) throws SaveFailureException {
- * IVirtualFolder rootFolder = vComponent.getRootFolder(); IVirtualFile
- * vFile = rootFolder.getFile(new Path(J2EEConstants.MANIFEST_URI)); IFile
- * iFile = vFile.getUnderlyingFile(); validateEdit(iFile); OutputStream out =
- * new WorkbenchByteArrayOutputStream(iFile); try { aManifest.write(out); }
- * catch (IOException e) { Logger.getLogger().logError(e); } finally { try {
- * out.close(); } catch (IOException e) { Logger.getLogger().logError(e); } } }
- */
- protected boolean importedClassesFolderCreated = false;
-
- protected IFolder importedClassesFolder;
-
- protected void createImportedClassesFolder() {
- importedClassesFolderCreated = true;
- IContainer jarParent = vComponent.getRootFolder().getUnderlyingFolder().getParent();
- importedClassesFolder = jarParent.getFolder(new Path(IMPORTED_CLASSES));
- try {
- importedClassesFolder.create(true, true, null);
- } catch (CoreException e1) {
- Logger.getLogger().logError(e1);
- }
- }
-
- protected void linkImportedClassesFolderIfNecessary() {
- if (importedClassesFolder != null) {
- try {
- vComponent.getRootFolder().getFolder(getImportedClassesRuntimePath()).createLink(importedClassesFolder.getProjectRelativePath(), 0, null);
- if (shouldAddImportedClassesToClasspath()) {
- if (JemProjectUtilities.getJavaProject(vComponent.getProject()) != null) {
- IJavaProject javaProject = JavaCore.create(vComponent.getProject());
- IClasspathEntry[] javaClasspath = javaProject.getRawClasspath();
- IClasspathEntry[] newJavaClasspath = new IClasspathEntry[javaClasspath.length + 1];
- System.arraycopy(javaClasspath, 0, newJavaClasspath, 0, javaClasspath.length);
- newJavaClasspath[newJavaClasspath.length - 1] = JavaCore.newLibraryEntry(importedClassesFolder.getFullPath(), null, null, true);
- javaProject.setRawClasspath(newJavaClasspath, new NullProgressMonitor());
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- protected boolean shouldAddImportedClassesToClasspath() {
- return true;
- }
-
- protected IPath getImportedClassesRuntimePath() {
- return new Path("/");
- }
-
- @Override
- protected IPath getProjectRelativePath(IArchiveResource aFile) {
- if (endsWithClassType(aFile.getPath().lastSegment())) {
- return importedClassesFolder.getFile(getImportedClassesURI(aFile)).getProjectRelativePath();
- }
- return super.getProjectRelativePath(aFile);
- }
-
- protected IPath getImportedClassesURI(IArchiveResource aFile) {
- return aFile.getPath();
- }
-
- protected boolean isClassWithoutSource(IArchiveResource aFile) {
- String javaUri = classUriToJavaUri(aFile.getPath().toString());
- if (javaUri == null)
- return false;
- return !archive.containsArchiveResource(new Path(javaUri));
- }
-
- public String classUriToJavaUri(String classUri) {
- if (classUri == null || !classUri.endsWith(DOT_CLASS))
- return null;
-
- String truncated = truncateIgnoreCase(classUri, DOT_CLASS);
- StringTokenizer tok = new StringTokenizer(truncated, "$"); //$NON-NLS-1$
- return tok.nextToken().concat(DOT_JAVA);
- }
-
- /**
- * Return a substring of the first parameter, up to the last index of the
- * second
- */
- public static String truncateIgnoreCase(String aString, String trailingSubString) {
- int index = aString.toLowerCase().lastIndexOf(trailingSubString.toLowerCase());
- if (index != -1)
- return aString.substring(0, index);
- return aString;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEJavaComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEJavaComponentArchiveSaveAdapter.java
deleted file mode 100644
index d53454bea..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/J2EEJavaComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,20 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class J2EEJavaComponentArchiveSaveAdapter extends J2EEComponentArchiveSaveAdapter {
-
- public J2EEJavaComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveLoadAdapter.java
deleted file mode 100644
index 4aeb03dfb..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,37 +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.archive;
-
-import java.util.List;
-
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class JavaComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter {
-
- public JavaComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public JavaComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- public List <IArchiveResource> getArchiveResources() {
- super.getArchiveResources();
- if (includeClasspathComponents) {
- addMappedClassFolders(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_COMPONENT_PATH);
- }
- return filesHolder.getFiles();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveSaveAdapter.java
deleted file mode 100644
index 585d873d4..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,21 +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.archive;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class JavaComponentArchiveSaveAdapter extends ComponentArchiveSaveAdapter {
-
- public JavaComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java
deleted file mode 100644
index 02cf96814..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEArchiveUtilities.java
+++ /dev/null
@@ -1,746 +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.archive;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jdt.core.ToolFactory;
-import org.eclipse.jdt.core.util.IAnnotation;
-import org.eclipse.jdt.core.util.IClassFileAttribute;
-import org.eclipse.jdt.core.util.IClassFileReader;
-import org.eclipse.jdt.core.util.IRuntimeVisibleAnnotationsAttribute;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualArchiveComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentLoadAdapter;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.ArchiveOpenFailureException;
-import org.eclipse.jst.jee.archive.ArchiveOptions;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveFactory;
-import org.eclipse.jst.jee.archive.IArchiveLoadAdapter;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl;
-import org.eclipse.jst.jee.archive.internal.ArchiveImpl;
-import org.eclipse.jst.jee.archive.internal.ArchiveUtil;
-import org.eclipse.jst.jee.archive.internal.ZipFileArchiveLoadAdapterImpl;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class JavaEEArchiveUtilities extends ArchiveFactoryImpl implements IArchiveFactory {
-
- /**
- * Default value = Boolean.TRUE Valid values = Boolean.TRUE or Boolean.FALSE
- *
- * An ArchiveOption used to specify whether
- * {@link #openArchive(ArchiveOptions)} should attempt to discriminate
- * between different Java EE archive types. The default behavior is to
- * always discriminate fully for all types except EJB 3.0 archives
- * {@link #DISCRIMINATE_EJB_ANNOTATIONS}. In order to fully discriminate
- * EJB 3.0 archives, it is necessary to set both this flag and
- * {@link #DISCRIMINATE_EJB_ANNOTATIONS} to true.
- */
- public static final String DISCRIMINATE_JAVA_EE = "DISCRIMINATE_EJB"; //$NON-NLS-1$
-
- /**
- * Default value = Boolean.TRUE Valid values = Boolean.TRUE or Boolean.FALSE
- *
- * An ArchiveOption used to specify whether
- * {@link #openArchive(ArchiveOptions)} should attempt to fully discriminate
- * a JAR file from an EJB JAR file. This option is only relevant if the
- * {@link #DISCRIMINATE_JAVA_EE} option is also set to Boolean.TRUE. If both
- * options are set to true then as a last resort all .class files byte codes
- * will be analyzed for EJB annotations in order to discriminate whether the
- * specified IArchive is an EJB 3.0 jar.
- */
- public static final String DISCRIMINATE_EJB_ANNOTATIONS = "DISCRIMINATE_EJB_ANNOTATIONS"; //$NON-NLS-1$
-
- /**
- * Default value = null
- *
- * An ArchiveOption used to specify the original load adapter in the case it
- * swapped out with an {@link #JavaEEWrappingLoadAdapter}.
- */
- public static final String WRAPPED_LOAD_ADAPTER = "WRAPPED_LOAD_ADAPTER"; //$NON-NLS-1$
-
- private JavaEEArchiveUtilities() {
- }
-
- public static JavaEEArchiveUtilities INSTANCE = new JavaEEArchiveUtilities();
-
- public static final String DOT_JAVA = ".java"; //$NON-NLS-1$
-
- public static final String DOT_CLASS = ".class"; //$NON-NLS-1$
-
- public static boolean isJava(IFile iFile) {
- return hasExtension(iFile, DOT_JAVA);
- }
-
- public static boolean isClass(IFile iFile) {
- return hasExtension(iFile, DOT_CLASS);
- }
-
- public static boolean hasExtension(IFile iFile, String ext) {
- String name = iFile.getName();
- return hasExtension(name, ext);
- }
-
- public static boolean hasExtension(String name, String ext) {
- int offset = ext.length();
- return name.regionMatches(true, name.length() - offset, ext, 0, offset);
- }
-
- public IArchive openArchive(IVirtualComponent virtualComponent) throws ArchiveOpenFailureException {
- if (virtualComponent.isBinary()) {
- J2EEModuleVirtualArchiveComponent archiveComponent = (J2EEModuleVirtualArchiveComponent) virtualComponent;
- JavaEEBinaryComponentLoadAdapter loadAdapter = new JavaEEBinaryComponentLoadAdapter(archiveComponent);
- ArchiveOptions archiveOptions = new ArchiveOptions();
- archiveOptions.setOption(ArchiveOptions.LOAD_ADAPTER, loadAdapter);
- archiveOptions.setOption(ArchiveOptions.ARCHIVE_PATH, loadAdapter.getArchivePath());
- IArchive parentEARArchive = null;
- try {
- if(archiveComponent.isLinkedToEAR()){
- try {
- IProject earProject = virtualComponent.getProject();
- if(earProject != null && EarUtilities.isEARProject(earProject)){
- IVirtualComponent earComponent = ComponentCore.createComponent(virtualComponent.getProject());
- if(earComponent != null) {
- parentEARArchive = openArchive(earComponent);
- if(parentEARArchive != null) {
- archiveOptions.setOption(ArchiveOptions.PARENT_ARCHIVE, parentEARArchive);
- }
- }
- }
- } catch(ArchiveOpenFailureException e) {
- org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.logError(e);
- }
- }
- return openArchive(archiveOptions);
- } finally {
- if(parentEARArchive != null){
- archiveOptions.removeOption(ArchiveOptions.PARENT_ARCHIVE);
- closeArchive(parentEARArchive);
- }
- }
- }
- int type = J2EEVersionConstants.UNKNOWN;
- IArchiveLoadAdapter archiveLoadAdapter = null;
- if (J2EEProjectUtilities.isEARProject(virtualComponent.getProject())) {
- archiveLoadAdapter = new EARComponentArchiveLoadAdapter(virtualComponent);
- type = J2EEVersionConstants.APPLICATION_TYPE;
- } else if (J2EEProjectUtilities.isEJBComponent(virtualComponent)) {
- archiveLoadAdapter = new EJBComponentArchiveLoadAdapter(virtualComponent);
- type = J2EEVersionConstants.EJB_TYPE;
- } else if (J2EEProjectUtilities.isApplicationClientComponent(virtualComponent)) {
- archiveLoadAdapter = new AppClientComponentArchiveLoadAdapter(virtualComponent);
- type = J2EEVersionConstants.APPLICATION_CLIENT_TYPE;
- } else if (J2EEProjectUtilities.isJCAComponent(virtualComponent)) {
- archiveLoadAdapter = new ConnectorComponentArchiveLoadAdapter(virtualComponent);
- type = J2EEVersionConstants.CONNECTOR_TYPE;
- } else if (J2EEProjectUtilities.isDynamicWebComponent(virtualComponent)) {
- archiveLoadAdapter = new WebComponentArchiveLoadAdapter(virtualComponent);
- type = J2EEVersionConstants.WEB_TYPE;
- } else if (J2EEProjectUtilities.isUtilityProject(virtualComponent.getProject())) {
- archiveLoadAdapter = new JavaComponentArchiveLoadAdapter(virtualComponent);
- }
-
- if (archiveLoadAdapter != null) {
- ArchiveOptions options = new ArchiveOptions();
- options.setOption(ArchiveOptions.LOAD_ADAPTER, archiveLoadAdapter);
- IArchive archive = super.openArchive(options);
- if (type != J2EEVersionConstants.UNKNOWN) {
- int version = J2EEVersionConstants.UNKNOWN;
- String versionStr = JavaEEProjectUtilities.getJ2EEDDProjectVersion(virtualComponent.getProject());
- if(versionStr == null){
- versionStr = J2EEProjectUtilities.getJ2EEProjectVersion(virtualComponent.getProject());
- }
- switch (type) {
- case J2EEVersionConstants.APPLICATION_CLIENT_TYPE:
- case J2EEVersionConstants.APPLICATION_TYPE:
- if (versionStr.equals(J2EEVersionConstants.VERSION_1_2_TEXT)) {
- version = J2EEVersionConstants.J2EE_1_2_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_1_3_TEXT)) {
- version = J2EEVersionConstants.J2EE_1_3_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_1_4_TEXT)) {
- version = J2EEVersionConstants.J2EE_1_4_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
- version = J2EEVersionConstants.JEE_5_0_ID;
- }
- break;
- case J2EEVersionConstants.CONNECTOR_TYPE:
- if (versionStr.equals(J2EEVersionConstants.VERSION_1_0_TEXT)) {
- version = J2EEVersionConstants.JCA_1_0_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_1_5_TEXT)) {
- version = J2EEVersionConstants.JCA_1_5_ID;
- }
- break;
- case J2EEVersionConstants.EJB_TYPE:
- if (versionStr.equals(J2EEVersionConstants.VERSION_1_1_TEXT)) {
- version = J2EEVersionConstants.EJB_1_1_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_0_TEXT)) {
- version = J2EEVersionConstants.EJB_2_0_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_1_TEXT)) {
- version = J2EEVersionConstants.EJB_2_1_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_3_0_TEXT)) {
- version = J2EEVersionConstants.EJB_3_0_ID;
- }
- break;
- case J2EEVersionConstants.WEB_TYPE:
- if (versionStr.equals(J2EEVersionConstants.VERSION_2_2_TEXT)) {
- version = J2EEVersionConstants.WEB_2_2_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_3_TEXT)) {
- version = J2EEVersionConstants.WEB_2_3_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_4_TEXT)) {
- version = J2EEVersionConstants.WEB_2_4_ID;
- } else if (versionStr.equals(J2EEVersionConstants.VERSION_2_5_TEXT)) {
- version = J2EEVersionConstants.WEB_2_5_ID;
- }
- break;
- }
- if (version != J2EEVersionConstants.UNKNOWN) {
- archiveToJavaEEQuickPeek.put(archive, new JavaEEQuickPeek(type, version));
- }
- }
- return archive;
- }
- return null;
- }
-
- private Map<IArchive, JavaEEQuickPeek> archiveToJavaEEQuickPeek = new WeakHashMap<IArchive, JavaEEQuickPeek>();
-
- /**
- * Returns a utility for getting the type of Java EE archive, the Java EE
- * version, and the Module version
- *
- * @param archive
- * @return
- */
- public JavaEEQuickPeek getJavaEEQuickPeek(IArchive archive) {
- if (archiveToJavaEEQuickPeek.containsKey(archive)) {
- return archiveToJavaEEQuickPeek.get(archive);
- } else {
- String[] deploymentDescriptorsToCheck = new String[] { J2EEConstants.APPLICATION_DD_URI, J2EEConstants.APP_CLIENT_DD_URI, J2EEConstants.EJBJAR_DD_URI, J2EEConstants.WEBAPP_DD_URI,
- J2EEConstants.RAR_DD_URI };
- for (int i = 0; i < deploymentDescriptorsToCheck.length; i++) {
- final IPath deploymentDescriptorPath = new Path(deploymentDescriptorsToCheck[i]);
- if (archive.containsArchiveResource(deploymentDescriptorPath)) {
- InputStream in = null;
- IArchiveResource dd;
- try {
- dd = archive.getArchiveResource(deploymentDescriptorPath);
- in = dd.getInputStream();
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(in);
- archiveToJavaEEQuickPeek.put(archive, quickPeek);
- return quickPeek;
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(null);
- archiveToJavaEEQuickPeek.put(archive, quickPeek);
- return quickPeek;
- }
- }
-
- /**
- * Returns an IArchive. This method will attempt to discriminate the
- * specific Java EE archive type based on the following simple rules. Please
- * note that these rules do not adhere exactly to the Java EE specification
- * because they are written for a tooling environment rather than a runtime
- * environment. Thus these rules attempt to compensate for user error with
- * the understanding that other areas of the tooling environment will help
- * detect and correct these errors.
- *
- * <ol>
- * <li> An archive containing a deployment descriptor is considered to be of
- * that type </li>
- * <li> An archive whose name ends with '.ear' is considered an EAR </li>
- * <li> An archive whose name ends with '.war' is considered a WAR </li>
- * <li> An archive whose name ends with '.jar' and which contains a
- * META-INF/MANIFEST.MF file containing a Main-class attribute is considered
- * an Application Client </li>
- * <li> If the ArchiveOptions specify the
- * {@link #DISCRIMINATE_EJB_ANNOTATIONS} as Boolean.TRUE then if the archive
- * contains any .class file with EJB annotations it is considered an EJB
- * JAR. Be warned that this full check does have performance implications
- * and is not done by default.</li>
- * An archive whose name ends with '.jar' is considered a Utility </li>
- * </ol>
- */
- public IArchive openArchive(ArchiveOptions archiveOptions) throws ArchiveOpenFailureException {
- IArchive simpleArchive = super.openArchive(archiveOptions);
- Object discriminateJavaEE = archiveOptions.getOption(DISCRIMINATE_JAVA_EE);
- if (discriminateJavaEE != null && !((Boolean) discriminateJavaEE).booleanValue()) {
- return simpleArchive;
- }
- return refineForJavaEE(simpleArchive);
- }
-
- private static final String DOT_EAR = ".ear";//$NON-NLS-1$
-
- private static final String DOT_WAR = ".war";//$NON-NLS-1$
-
- private static final String DOT_JAR = ".jar";//$NON-NLS-1$
-
- private IArchive refineForJavaEE(final IArchive simpleArchive) {
- //Check to see if this archive is actually being opened as a nested archive from within an EAR
- //if it is then the EAR's DD needs to be checked to see exactly what type of archive this is.
- if (simpleArchive.getArchiveOptions().hasOption(ArchiveOptions.PARENT_ARCHIVE)) {
- IArchive parent = (IArchive) simpleArchive.getArchiveOptions().getOption(ArchiveOptions.PARENT_ARCHIVE);
- JavaEEQuickPeek qp = getJavaEEQuickPeek(parent);
-
- if (qp.getType() == JavaEEQuickPeek.APPLICATION_TYPE) {
- IPath ddPath = new Path(J2EEConstants.APPLICATION_DD_URI);
- if (parent.containsArchiveResource(ddPath)) {
- try {
- Object ddObj = parent.getModelObject(ddPath);
- IPath archivePath = simpleArchive.getPath();
- if (archivePath == null) {
- Object obj = simpleArchive.getArchiveOptions().getOption(ArchiveOptions.ARCHIVE_PATH);
- if (null != obj) {
- archivePath = (IPath) obj;
- }
- }
- int definedType = J2EEVersionConstants.UNKNOWN;
- if (qp.getVersion() == JavaEEQuickPeek.JEE_5_0_ID) {
- org.eclipse.jst.javaee.application.Application app = (org.eclipse.jst.javaee.application.Application) ddObj;
- org.eclipse.jst.javaee.application.Module module = app.getFirstModule(archivePath.toString());
- //if the archive isn't found, do a smart search for it
- if(module == null){
- IPath noDevicePath = archivePath.setDevice(null);
- for(int i=1; i<noDevicePath.segmentCount() && module == null; i++){
- String stringPath = noDevicePath.removeFirstSegments(i).toString();
- module = app.getFirstModule(stringPath);
- }
- }
- if (null != module) {
- if (module.getEjb() != null) {
- definedType = J2EEVersionConstants.EJB_TYPE;
- } else if (module.getConnector() != null) {
- definedType = J2EEVersionConstants.CONNECTOR_TYPE;
- } else if (module.getJava() != null) {
- definedType = J2EEVersionConstants.APPLICATION_CLIENT_TYPE;
- } else if (module.getWeb() != null) {
- definedType = J2EEVersionConstants.WEB_TYPE;
- }
- }
- } else { //J2EE 1.4 or below, rely solely on DD
- org.eclipse.jst.j2ee.application.Application app = (org.eclipse.jst.j2ee.application.Application) ddObj;
- org.eclipse.jst.j2ee.application.Module module = app.getFirstModule(archivePath.toString());
- //if the archive isn't found, do a smart search for it
- if(module == null){
- IPath noDevicePath = archivePath.setDevice(null);
- for(int i=1; i<noDevicePath.segmentCount() && module == null; i++){
- String stringPath = noDevicePath.removeFirstSegments(i).toString();
- module = app.getFirstModule(stringPath);
- }
- }
- if (null != module) {
- if (module.isEjbModule()) {
- definedType = J2EEVersionConstants.EJB_TYPE;
- } else if (module.isConnectorModule()) {
- definedType = J2EEVersionConstants.CONNECTOR_TYPE;
- } else if (module.isJavaModule()) {
- definedType = J2EEVersionConstants.APPLICATION_CLIENT_TYPE;
- } else if (module.isWebModule()) {
- definedType = J2EEVersionConstants.WEB_TYPE;
- }
- } else { //J2EE 1.4 or below, and not in DD, treat as utility
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(null);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- return simpleArchive;
- }
- }
- if (definedType != J2EEVersionConstants.UNKNOWN) {
- String ddToCheck = null;
- switch (definedType) {
- case J2EEVersionConstants.EJB_TYPE:
- ddToCheck = J2EEConstants.EJBJAR_DD_URI;
- break;
- case J2EEVersionConstants.CONNECTOR_TYPE:
- ddToCheck = J2EEConstants.RAR_DD_URI;
- break;
- case J2EEVersionConstants.APPLICATION_CLIENT_TYPE:
- ddToCheck = J2EEConstants.APP_CLIENT_DD_URI;
- break;
- case J2EEVersionConstants.WEB_TYPE:
- ddToCheck = J2EEConstants.WEBAPP_DD_URI;
- break;
- }
- IArchive wrappedForDD = wrapForDD(simpleArchive, definedType, new Path(ddToCheck));
- if (wrappedForDD != null) {
- return wrappedForDD;
- }
- // else there is no DD and we need to decide on a
- // version (letting RARs fall through)
- switch (definedType) {
- case J2EEVersionConstants.EJB_TYPE: {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.EJB_TYPE, JavaEEQuickPeek.EJB_3_0_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.EJBJAR_DD_URI));
- return simpleArchive;
- }
- case J2EEVersionConstants.APPLICATION_CLIENT_TYPE: {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.APPLICATION_CLIENT_TYPE, JavaEEQuickPeek.JEE_5_0_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.APPLICATION_DD_URI));
- return simpleArchive;
- }
- case J2EEVersionConstants.WEB_TYPE: {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.WEB_TYPE, JavaEEQuickPeek.WEB_2_5_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.WEBAPP_DD_URI));
- return simpleArchive;
- }
- }
- }
- } catch (ArchiveModelLoadException e) {
- org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin.logError(e);
- }
- }
- }
- }
-
-
- String[] deploymentDescriptorsToCheck = new String[] { J2EEConstants.APPLICATION_DD_URI, J2EEConstants.APP_CLIENT_DD_URI, J2EEConstants.EJBJAR_DD_URI, J2EEConstants.WEBAPP_DD_URI,
- J2EEConstants.RAR_DD_URI };
- int[] typeToVerify = new int[] { J2EEVersionConstants.APPLICATION_TYPE, J2EEVersionConstants.APPLICATION_CLIENT_TYPE, J2EEVersionConstants.EJB_TYPE, J2EEVersionConstants.WEB_TYPE,
- J2EEConstants.CONNECTOR_TYPE };
- for (int i = 0; i < deploymentDescriptorsToCheck.length; i++) {
- final int currentType = typeToVerify[i];
- final IPath deploymentDescriptorPath = new Path(deploymentDescriptorsToCheck[i]);
- IArchive wrappedForDD = wrapForDD(simpleArchive, currentType, deploymentDescriptorPath);
- if(wrappedForDD != null){
- return wrappedForDD;
- }
- }
- IPath archivePath = simpleArchive.getPath();
- if (archivePath == null) {
- Object obj = simpleArchive.getArchiveOptions().getOption(ArchiveOptions.ARCHIVE_PATH);
- if (null != obj) {
- archivePath = (IPath) obj;
- }
- }
-
- if (archivePath != null) {
- String lastSegment = archivePath.lastSegment().toLowerCase();
- if (lastSegment.endsWith(DOT_EAR)) {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.APPLICATION_TYPE, JavaEEQuickPeek.JEE_5_0_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.APPLICATION_DD_URI));
- return simpleArchive;
- } else if (lastSegment.endsWith(DOT_WAR)) {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.WEB_TYPE, JavaEEQuickPeek.WEB_2_5_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.WEBAPP_DD_URI));
- return simpleArchive;
- } else if (lastSegment.endsWith(DOT_JAR)) {
- IPath manifestPath = new Path(J2EEConstants.MANIFEST_URI);
- if (simpleArchive.containsArchiveResource(manifestPath)) {
- InputStream in = null;
- try {
- IArchiveResource manifestResource = simpleArchive.getArchiveResource(manifestPath);
- in = manifestResource.getInputStream();
- Manifest manifest = new Manifest(in);
- Attributes attributes = manifest.getMainAttributes();
- String mainClassName = attributes.getValue("Main-Class");
- if (mainClassName != null) {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.APPLICATION_CLIENT_TYPE, JavaEEQuickPeek.JEE_5_0_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.APPLICATION_DD_URI));
- return simpleArchive;
- }
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
- }
- Object discriminateEJB30 = simpleArchive.getArchiveOptions().getOption(DISCRIMINATE_EJB_ANNOTATIONS);
- if (null == discriminateEJB30 || ((Boolean) discriminateEJB30).booleanValue()) {
- if (isEJBArchive(simpleArchive)) {
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(JavaEEQuickPeek.EJB_TYPE, JavaEEQuickPeek.EJB_3_0_ID, JavaEEQuickPeek.JEE_5_0_ID);
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, new Path(J2EEConstants.EJBJAR_DD_URI));
- return simpleArchive;
- }
- }
-
- }
- }
-
- return simpleArchive;
- }
-
- private IArchive wrapForDD(final IArchive simpleArchive, final int currentType, final IPath deploymentDescriptorPath) {
- if (simpleArchive.containsArchiveResource(deploymentDescriptorPath)) {
- InputStream in = null;
- IArchiveResource dd;
- try {
- dd = simpleArchive.getArchiveResource(deploymentDescriptorPath);
- in = dd.getInputStream();
- JavaEEQuickPeek quickPeek = new JavaEEQuickPeek(in);
- if (quickPeek.getType() == currentType && quickPeek.getVersion() != JavaEEQuickPeek.UNKNOWN){
- if(isBinary(simpleArchive) || !simpleArchive.containsModelObject(deploymentDescriptorPath)){
- archiveToJavaEEQuickPeek.put(simpleArchive, quickPeek);
- wrapArchive(simpleArchive, deploymentDescriptorPath);
- return simpleArchive;
- }
- }
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
- }
- return null;
- }
-
- public static boolean isBinary(IArchive anArchive){
- IArchiveLoadAdapter loadAdapter = null;
- if(anArchive.getArchiveOptions().hasOption(WRAPPED_LOAD_ADAPTER)){
- loadAdapter = (IArchiveLoadAdapter)anArchive.getArchiveOptions().getOption(WRAPPED_LOAD_ADAPTER);
- } else {
- loadAdapter = (IArchiveLoadAdapter)anArchive.getArchiveOptions().getOption(ArchiveOptions.LOAD_ADAPTER);
- }
- if(loadAdapter instanceof JavaEEBinaryComponentLoadAdapter){
- return true;
- } else if(loadAdapter instanceof ZipFileArchiveLoadAdapterImpl){
- return true;
- }
- return false;
- }
-
- public static IArchive findArchive(Object modelObject){
- if(modelObject instanceof EObject){
- EObject eObject = (EObject)modelObject;
- return JavaEEEMFArchiveAdapterHelper.findArchive(eObject);
- }
- return null;
- }
-
- public static IVirtualComponent findComponent(IArchive anArchive){
- IArchiveLoadAdapter loadAdapter = null;
- if(anArchive.getArchiveOptions().hasOption(WRAPPED_LOAD_ADAPTER)){
- loadAdapter = (IArchiveLoadAdapter)anArchive.getArchiveOptions().getOption(WRAPPED_LOAD_ADAPTER);
- } else {
- loadAdapter = (IArchiveLoadAdapter)anArchive.getArchiveOptions().getOption(ArchiveOptions.LOAD_ADAPTER);
- }
- if(loadAdapter instanceof JavaEEBinaryComponentLoadAdapter){
- return ((JavaEEBinaryComponentLoadAdapter)loadAdapter).getArchiveComponent();
- }
- return null;
- }
-
-
- public static class JavaEEWrappingLoadAdapter implements IArchiveLoadAdapter {
-
- private IArchive simpleArchive;
- private IArchiveLoadAdapter simpleLoadAdapter;
- private IPath deploymentDescriptorPath;
- private JavaEEEMFArchiveAdapterHelper emfHelper;
-
- public JavaEEWrappingLoadAdapter(IArchive simpleArchive, IPath deploymentDescriptorPath) {
- this.simpleArchive = simpleArchive;
- this.simpleLoadAdapter = this.simpleArchive.getLoadAdapter();
- this.deploymentDescriptorPath = deploymentDescriptorPath;
- this.emfHelper = new JavaEEEMFArchiveAdapterHelper(this.simpleArchive);
- }
-
- public void close() {
- simpleLoadAdapter.close();
- }
-
- public boolean containsArchiveResource(IPath resourcePath) {
- return simpleLoadAdapter.containsArchiveResource(resourcePath);
- }
-
- public boolean containsModelObject(IPath modelObjectPath) {
- if (simpleLoadAdapter.containsArchiveResource(modelObjectPath)) {
- return true;
- }
- if (IArchive.EMPTY_MODEL_PATH == modelObjectPath) {
- modelObjectPath = deploymentDescriptorPath;
- }
- return emfHelper.containsModelObject(modelObjectPath);
- }
-
- public IArchiveResource getArchiveResource(IPath resourcePath) throws FileNotFoundException {
- return simpleLoadAdapter.getArchiveResource(resourcePath);
- }
-
- public List<IArchiveResource> getArchiveResources() {
- return simpleLoadAdapter.getArchiveResources();
- }
-
- public InputStream getInputStream(IArchiveResource archiveResource) throws IOException, FileNotFoundException {
- return simpleLoadAdapter.getInputStream(archiveResource);
- }
-
- public Object getModelObject(IPath modelObjectPath) throws ArchiveModelLoadException {
- if (simpleLoadAdapter.containsModelObject(modelObjectPath)) {
- return simpleLoadAdapter.getModelObject(modelObjectPath);
- }
- if (IArchive.EMPTY_MODEL_PATH == modelObjectPath) {
- modelObjectPath = deploymentDescriptorPath;
- }
- return emfHelper.getModelObject(modelObjectPath);
- }
-
- public IArchive getArchive() {
- return simpleLoadAdapter.getArchive();
- }
-
- public void setArchive(IArchive archive) {
- simpleLoadAdapter.setArchive(archive);
- }
-
- public IArchiveLoadAdapter getWrappedLoadAdatper() {
- return simpleLoadAdapter;
- }
-
- public String toString() {
- return simpleLoadAdapter.toString();
- }
-
- };
-
- private static void wrapArchive(final IArchive simpleArchive, final IPath deploymentDescriptorPath) {
- IArchiveLoadAdapter wrappingEMFLoadAdapter = new JavaEEWrappingLoadAdapter(simpleArchive, deploymentDescriptorPath);
- simpleArchive.getArchiveOptions().setOption(ArchiveOptions.LOAD_ADAPTER, wrappingEMFLoadAdapter);
- simpleArchive.getArchiveOptions().setOption(WRAPPED_LOAD_ADAPTER, simpleArchive.getLoadAdapter());
- ((ArchiveImpl) simpleArchive).setLoadAdapter(wrappingEMFLoadAdapter);
- }
-
- private static final char[] RUNTIME_VISIBLE = "RuntimeVisibleAnnotations".toCharArray(); //$NON-NLS-1$
-
- private static final char[] STATELESS = "Ljavax/ejb/Stateless;".toCharArray();//$NON-NLS-1$
-
- private static final char[] STATEFUL = "Ljavax/ejb/Stateful;".toCharArray();//$NON-NLS-1$
-
- private static final char[] MESSAGEDRIVEN = "Ljavax/ejb/MessageDriven;".toCharArray();//$NON-NLS-1$
-
- public boolean isEJBArchive(IArchive archive) {
- // first check for the deployment descriptor
- if (archiveToJavaEEQuickPeek.containsKey(archive)) {
- JavaEEQuickPeek qp = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archive);
- if (qp.getType() == JavaEEQuickPeek.EJB_TYPE) {
- return true;
- }
- }
-
- List<IArchiveResource> archiveResources = archive.getArchiveResources();
- for (IArchiveResource archiveResource : archiveResources) {
- if (archiveResource.getType() == IArchiveResource.FILE_TYPE) {
- if (archiveResource.getPath().lastSegment().endsWith(DOT_CLASS)) {
- InputStream ioStream = null;
- try {
- ioStream = archiveResource.getInputStream();
- IClassFileReader classFileReader = ToolFactory.createDefaultClassFileReader(ioStream, IClassFileReader.CLASSFILE_ATTRIBUTES);
- //classFileReader will be null if this is an invalid java .class file
- if(classFileReader != null){
- IClassFileAttribute[] attributes = classFileReader.getAttributes();
- for (IClassFileAttribute attribute : attributes) {
- char[] attributeName = attribute.getAttributeName();
- if (Arrays.equals(attributeName, RUNTIME_VISIBLE)) {
- IRuntimeVisibleAnnotationsAttribute annotationsAttribute = (IRuntimeVisibleAnnotationsAttribute) attribute;
- IAnnotation[] annotations = annotationsAttribute.getAnnotations();
- for (IAnnotation annotation : annotations) {
- char[] typedName = annotation.getTypeName();
- if (Arrays.equals(typedName, STATELESS) || Arrays.equals(typedName, STATEFUL) || Arrays.equals(typedName, MESSAGEDRIVEN)) {
- return true;
- }
- }
- }
- }
- }
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- } finally {
- if (null != ioStream) {
- try {
- ioStream.close();
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- ioStream = null;
- }
- }
- }
- }
- return false;
- }
-
- public Manifest getManifest(IArchive archive) {
- Manifest manifest = null;
- IPath manifestPath = new Path(J2EEConstants.MANIFEST_URI);
- if (archive.containsArchiveResource(manifestPath)) {
- InputStream in = null;
- try {
- IArchiveResource manifestResource = archive.getArchiveResource(manifestPath);
- in = manifestResource.getInputStream();
- manifest = new Manifest(in);
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
- }
- return manifest;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFArchiveAdapterHelper.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFArchiveAdapterHelper.java
deleted file mode 100644
index a8d125bd1..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFArchiveAdapterHelper.java
+++ /dev/null
@@ -1,298 +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.archive;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.ContentHandler;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.jst.jee.archive.internal.ArchiveURIConverter;
-import org.eclipse.jst.jee.archive.internal.ArchiveUtil;
-import org.eclipse.wst.common.componentcore.internal.impl.WTPResourceFactoryRegistry;
-import org.eclipse.wst.common.internal.emf.resource.EMF2SAXRendererFactory;
-import org.eclipse.wst.common.internal.emf.resource.IRootObjectResource;
-import org.eclipse.wst.common.internal.emf.resource.RendererFactory;
-import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceFactory;
-
-public class JavaEEEMFArchiveAdapterHelper {
-
- public static IArchive findArchive(EObject eObject){
- EList <Adapter> adapters = eObject.eResource().getResourceSet().eAdapters();
- for(Adapter adapter:adapters){
- if(adapter instanceof EMFAddapter){
- return ((EMFAddapter) adapter).getHelper().getArchive();
- }
- }
- return null;
- }
-
- private class EMFAddapter extends AdapterImpl {
- private JavaEEEMFArchiveAdapterHelper helper;
- public EMFAddapter(JavaEEEMFArchiveAdapterHelper helper){
- this.helper = helper;
- }
- public JavaEEEMFArchiveAdapterHelper getHelper() {
- return this.helper;
- }
- };
-
- protected ResourceSet resourceSet;
-
- private EMFAddapter adapter = null;
-
- private IArchive archive = null;
-
- public JavaEEEMFArchiveAdapterHelper() {
- }
-
- public JavaEEEMFArchiveAdapterHelper(IArchive anArchive) {
- setArchive(anArchive);
- }
-
- public void setArchive(IArchive anArchive) {
- this.archive = anArchive;
- }
-
- public IArchive getArchive() {
- return archive;
- }
-
- public boolean containsModelObject(IPath modelObjectPath) {
- IArchive archive = getArchive();
- if (archive.containsArchiveResource(modelObjectPath)) {
- URI uri = getArchiveURIConverter().getURI(modelObjectPath);
- return containsResource(uri);
- }
- return false;
- }
-
- protected boolean containsResource(URI uri) {
- // TODO figure out a way to figure this out without actually
- // loading the resource
- IRootObjectResource resource = (IRootObjectResource) getResourceSet().getResource(uri, true);
- if (resource != null && resource.getRootObject() != null) {
- return true;
- }
- return false;
- }
-
- protected ArchiveURIConverter archiveURIConverter;
-
- public void setArchiveURIConverter(ArchiveURIConverter archiveURIConverter) {
- this.archiveURIConverter = archiveURIConverter;
- }
-
- public ArchiveURIConverter getArchiveURIConverter() {
- if (archiveURIConverter == null) {
- archiveURIConverter = new ArchiveURIConverter(getArchive());
- }
- return archiveURIConverter;
- }
-
- public Resource getResource(IPath resourcePath) throws ArchiveModelLoadException {
- URI uri = getArchiveURIConverter().getURI(resourcePath);
- Resource resource = getResourceSet().getResource(uri, true);
- return resource;
- }
-
- public Object getModelObject(IPath modelObjectPath) throws ArchiveModelLoadException {
- IRootObjectResource resource = (IRootObjectResource) getResource(modelObjectPath);
- return resource.getRootObject();
- }
-
- public ResourceSet getResourceSet() {
- if (resourceSet == null) {
- initializeResourceSet();
- if (null == adapter) {
- adapter = new EMFAddapter(this);
- }
- resourceSet.eAdapters().add(adapter);
- }
- return resourceSet;
- }
-
- public void setResourceSet(org.eclipse.emf.ecore.resource.ResourceSet newResourceSet) {
- if (resourceSet != newResourceSet) {
- // remove adapter from old resource set
- if (resourceSet != null && adapter != null) {
- resourceSet.eAdapters().remove(adapter);
- }
- // add as adapter to new resource set if necessary
- if (newResourceSet != null && !newResourceSet.eAdapters().contains(adapter)) {
- if (adapter == null) {
- adapter = new EMFAddapter(this);
- }
- newResourceSet.eAdapters().add(adapter);
- }
- resourceSet = newResourceSet;
- } // no need to update if old set equals new set (by reference)
- }
-
- public void initializeResourceSet() {
- ResourceSet rs = new ResourceSetImpl() {
- final String JAVA_PROTOCOL_URI_SCHEME = "java";
- private IContentDescription getContentDescription(URI uri) {
- IArchiveResource archiveResource = null;
- InputStream ioStream = null;
- try {
- IPath path = getArchiveURIConverter().getPath(uri);
- archiveResource = getArchive().getArchiveResource(path);
- ioStream = archiveResource.getInputStream();
- IContentDescription description = Platform.getContentTypeManager().getDescriptionFor(ioStream, path.lastSegment(), IContentDescription.ALL);
- return description;
- } catch (FileNotFoundException e) {
- ArchiveUtil.warn(e);
- return null;
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- return null;
- } finally {
- if (ioStream != null) {
- try {
- ioStream.close();
- } catch (IOException e) {
- ArchiveUtil.warn(e);
- }
- }
- }
- }
-
- public Resource createResource(URI uri) {
- return createResource(uri, ContentHandler.UNSPECIFIED_CONTENT_TYPE);
- }
-
- public Resource createResource(URI uri, String contentType) {
- IContentDescription description = null;
- if (!isJavaURI(uri))
- description = getContentDescription(uri);
-
- Resource.Factory resourceFactory = null;
- if (null != description) {
- SAXFactoryKey key = new SAXFactoryKey(uri, description);
- resourceFactory = getSAXResourceFactory(key);
- if (null == resourceFactory) {
- resourceFactory = ((WTPResourceFactoryRegistry) getResourceFactoryRegistry()).getFactory(uri, description);
- Class clazz = resourceFactory.getClass();
- boolean isTranslator = false;
- while (!isTranslator && clazz != null) {
- if (clazz == TranslatorResourceFactory.class) {
- isTranslator = true;
- } else {
- clazz = clazz.getSuperclass();
- }
- }
- if (isTranslator) {
- try {
- Constructor constructor = resourceFactory.getClass().getConstructor(RendererFactory.class);
- EMF2SAXRendererFactory.INSTANCE.setValidating(false);
- resourceFactory = (Resource.Factory) constructor.newInstance(EMF2SAXRendererFactory.INSTANCE);
- } catch (SecurityException e) {
- ArchiveUtil.warn(e);
- } catch (NoSuchMethodException e) {
- ArchiveUtil.warn(e);
- } catch (IllegalArgumentException e) {
- ArchiveUtil.warn(e);
- } catch (InstantiationException e) {
- ArchiveUtil.warn(e);
- } catch (IllegalAccessException e) {
- ArchiveUtil.warn(e);
- } catch (InvocationTargetException e) {
- ArchiveUtil.warn(e);
- }
- }
- setSAXResourceFactory(key, resourceFactory);
- }
- } else {
- resourceFactory = getResourceFactoryRegistry().getFactory(uri);
- }
-
- if (resourceFactory != null) {
- Resource result = resourceFactory.createResource(uri);
- getResources().add(result);
- return result;
- } else {
- return null;
- }
- }
-
- private boolean isJavaURI(URI uri) {
- return JAVA_PROTOCOL_URI_SCHEME.equals(uri.scheme());
- }
- };
- rs.setResourceFactoryRegistry(WTPResourceFactoryRegistry.INSTANCE);
- rs.setURIConverter(getArchiveURIConverter());
- setResourceSet(rs);
- }
-
- private class SAXFactoryKey {
- private URI uri = null;
-
- private IContentDescription description = null;
-
- public SAXFactoryKey(URI uri, IContentDescription description) {
- this.uri = uri;
- this.description = description;
- if(uri == null){
- throw new NullPointerException();
- }
- if(description == null){
- throw new NullPointerException();
- }
- }
-
- @Override
- public boolean equals(Object obj){
- if(obj == null || !(obj instanceof SAXFactoryKey)){
- return false;
- }
- SAXFactoryKey other = (SAXFactoryKey)obj;
- return uri.equals(other.uri) && description.equals(other.description);
- }
-
- @Override
- public int hashCode() {
- return uri.hashCode() + description.hashCode();
- }
- }
-
- private static Map<SAXFactoryKey, Resource.Factory> localFactoryMap = new HashMap<SAXFactoryKey, Resource.Factory>();
-
- private static Resource.Factory getSAXResourceFactory(SAXFactoryKey key) {
- synchronized (localFactoryMap) {
- return localFactoryMap.get(key);
- }
- }
-
- private static void setSAXResourceFactory(SAXFactoryKey key, Resource.Factory resourceFactory) {
- synchronized (localFactoryMap) {
- localFactoryMap.put(key, resourceFactory);
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFZipFileLoadAdapterImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFZipFileLoadAdapterImpl.java
deleted file mode 100644
index 36aa52098..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/JavaEEEMFZipFileLoadAdapterImpl.java
+++ /dev/null
@@ -1,60 +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.archive;
-
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jst.jee.archive.ArchiveModelLoadException;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.internal.ZipFileArchiveLoadAdapterImpl;
-
-public class JavaEEEMFZipFileLoadAdapterImpl extends ZipFileArchiveLoadAdapterImpl {
-
- private JavaEEEMFArchiveAdapterHelper emfHelper = new JavaEEEMFArchiveAdapterHelper();
-
- public JavaEEEMFZipFileLoadAdapterImpl() {
- super();
- }
-
- public JavaEEEMFZipFileLoadAdapterImpl(ZipFile zipFile) {
- super(zipFile);
- }
-
- public void setArchive(IArchive archive) {
- super.setArchive(archive);
- emfHelper.setArchive(archive);
- }
-
- public Resource getResource(IPath resourcePath) throws ArchiveModelLoadException {
- return emfHelper.getResource(resourcePath);
- }
-
- public boolean containsModelObject(IPath modelObjectPath) {
- return emfHelper.containsModelObject(modelObjectPath);
- }
-
- public Object getModelObject(IPath modelObjectPath) throws ArchiveModelLoadException {
- return emfHelper.getModelObject(modelObjectPath);
- }
-
- @Override
- public void close() {
- super.close();
- WorkbenchResourceHelperBase.removeAndUnloadAll(emfHelper.getResourceSet().getResources(), emfHelper.getResourceSet());
- }
-
- protected JavaEEEMFArchiveAdapterHelper getEMFHelper() {
- return emfHelper;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveLoadAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveLoadAdapter.java
deleted file mode 100644
index 4d3431367..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveLoadAdapter.java
+++ /dev/null
@@ -1,152 +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.archive;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyVirtualComponent;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.jst.jee.archive.ArchiveOpenFailureException;
-import org.eclipse.jst.jee.archive.ArchiveOptions;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class WebComponentArchiveLoadAdapter extends ComponentArchiveLoadAdapter {
-
- public static IPath WEBLIB = new Path("/WEB-INF/lib"); //$NON-NLS-1$
-
- public WebComponentArchiveLoadAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public WebComponentArchiveLoadAdapter(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- public List <IArchiveResource> getArchiveResources() {
- super.getArchiveResources();
- addLooseLibJARsToFiles();
- if (includeClasspathComponents) {
- addMappedClassFolders(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_COMPONENT_PATH);
- }
- return filesHolder.getFiles();
- }
-
- public IVirtualReference[] getLibModules() {
- List <IVirtualReference> result = new ArrayList<IVirtualReference>();
- IVirtualReference[] refComponents = null;
- if (!vComponent.isBinary())
- refComponents = ((J2EEModuleVirtualComponent)vComponent).getNonManifestReferences();
- else
- refComponents = vComponent.getReferences();
- // Check the deployed path to make sure it has a lib parent folder and matchs the web.xml
- // base path
- for (int i = 0; i < refComponents.length; i++) {
- if (refComponents[i].getRuntimePath().equals(WEBLIB))
- result.add(refComponents[i]);
- }
-
- return (IVirtualReference[]) result.toArray(new IVirtualReference[result.size()]);
-
- }
-
- public void addLooseLibJARsToFiles() {
- IVirtualReference[] libModules = getLibModules();
- for (int i = 0; i < libModules.length; i++) {
- IVirtualReference iLibModule = libModules[i];
- IVirtualComponent looseComponent = iLibModule.getReferencedComponent();
- if (looseComponent.isBinary()) {
- VirtualArchiveComponent archiveComp = (VirtualArchiveComponent) looseComponent;
- java.io.File diskFile = archiveComp.getUnderlyingDiskFile();
- if (!diskFile.exists()) {
- IFile wbFile = archiveComp.getUnderlyingWorkbenchFile();
- diskFile = new File(wbFile.getLocation().toOSString());
- }
- IPath uri = iLibModule.getRuntimePath().makeRelative().append("/" + diskFile.getName()); //$NON-NLS-1$
- addExternalFile(uri, diskFile);
- } else {
- String name = null;
- String archiveName = iLibModule.getArchiveName();
- if (archiveName != null && archiveName.length() > 0) {
- name = archiveName;
- } else {
- name = looseComponent.getName() + ".jar"; //$NON-NLS-1$
- }
- String prefix = iLibModule.getRuntimePath().makeRelative().toString();
- if (prefix.length() > 0 && prefix.charAt(prefix.length() - 1)!= '/') {
- prefix += "/"; //$NON-NLS-1$
- }
-
- addClasspathComponentDependencies(looseComponent);
- String uri = prefix + name;
-
- try {
- JavaComponentArchiveLoadAdapter archiveLoadAdapter = new JavaComponentArchiveLoadAdapter(looseComponent);
- archiveLoadAdapter.setExportSource(isExportSource());
- ArchiveOptions webLibOptions = new ArchiveOptions();
- webLibOptions.setOption(ArchiveOptions.LOAD_ADAPTER, archiveLoadAdapter);
- IArchive webLibArchive;
- webLibArchive = JavaEEArchiveUtilities.INSTANCE.openArchive(webLibOptions);
- webLibArchive.setPath(new Path(uri));
- webLibArchive.setArchive(archive);
- //this is in case there is a jar in the WEB-INF/lib folder which is also
- //mapped as a project. If it is not removed here, then export will include
- //the jar version instead of the project version.
- filesHolder.remove(webLibArchive.getPath());
- filesHolder.addFile(webLibArchive);
- } catch (ArchiveOpenFailureException e) {
- String message = ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.UNABLE_TO_LOAD_MODULE_ERROR_, new Object[]{uri, getComponent().getProject().getName(), e.getMessage()});
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logTrace(message);
- }
- }
- }
- }
-
- private void addClasspathComponentDependencies(final IVirtualComponent referencedComponent) {
- // retrieve all Java classpath component dependencies
- if (includeClasspathComponents && referencedComponent instanceof J2EEModuleVirtualComponent) {
- final IVirtualReference[] cpRefs = ((J2EEModuleVirtualComponent) referencedComponent).getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- final IPath runtimePath = ref.getRuntimePath();
-
- // only process ../ mappings
- if (ref.getReferencedComponent() instanceof ClasspathDependencyVirtualComponent
- && runtimePath.equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- final ClasspathDependencyVirtualComponent comp = (ClasspathDependencyVirtualComponent) ref.getReferencedComponent();
- File cpEntryFile = comp.getUnderlyingDiskFile();
- if (!cpEntryFile.exists()) {
- final IFile wbFile = comp.getUnderlyingWorkbenchFile();
- cpEntryFile = new File(wbFile.getLocation().toOSString());
- }
- addExternalFile(new Path("WEB-INF/lib/" + ref.getArchiveName()), cpEntryFile);
- }
- }
- }
- }
-
- @Override
- protected IPath getDefaultModelObjectPath() {
- return new Path(J2EEConstants.WEBAPP_DD_URI);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveSaveAdapter.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveSaveAdapter.java
deleted file mode 100644
index c1531f57e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveSaveAdapter.java
+++ /dev/null
@@ -1,132 +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.archive;
-
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.jee.archive.IArchiveResource;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-
-public class WebComponentArchiveSaveAdapter extends J2EEComponentArchiveSaveAdapter {
-
- private IPath IMPORTED_CLASSES_PATH = new Path("/" + ArchiveConstants.WEBAPP_CLASSES_URI);
-
- public WebComponentArchiveSaveAdapter(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- protected boolean shouldAddImportedClassesToClasspath() {
- return false; // never add to classpath because the web app container will pick this up.
- }
-
- protected IPath getImportedClassesURI(IArchiveResource aFile){
- return aFile.getPath().makeRelative().removeFirstSegments(IMPORTED_CLASSES_PATH.segmentCount());
- }
-
- protected IPath getImportedClassesRuntimePath() {
- return IMPORTED_CLASSES_PATH;
- }
-
- protected IPath getProjectRelativePath(IArchiveResource aFile) {
- if (null != nonStandardSourceFiles && nonStandardSourceFiles.containsKey(aFile)) {
- IPath path = nonStandardSourceFiles.get(aFile);
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile(path);
- IFile iFile = vFile.getUnderlyingFile();
- return iFile.getProjectRelativePath();
- }
- return super.getProjectRelativePath(aFile);
- }
-
- /**
- * This map handles the case when a java source file is not in the same place as the .class
- * file. For example if all the source files were contained in WEB-INF/source
- */
- protected Map<IArchiveResource, IPath> nonStandardSourceFiles;
-
- protected boolean isClassWithoutSource(IArchiveResource aFile) {
- String javaUri = ArchiveUtil.classUriToJavaUri(aFile.getPath().toString());
- if (javaUri == null)
- return true;
- IPath javaPath = new Path(javaUri);
- if (archive.containsArchiveResource(javaPath)) {
- return false;
- }
- // see if it is a JSP
- String jspUri = javaUri.substring(0, javaUri.indexOf(ArchiveUtil.DOT_JAVA));
- int lastSlash = jspUri.lastIndexOf('/');
- int _index = lastSlash == -1 ? ArchiveConstants.WEBAPP_CLASSES_URI.length() : lastSlash + 1;
- if (jspUri.charAt(_index) == '_') {
- jspUri = jspUri.substring(ArchiveConstants.WEBAPP_CLASSES_URI.length(), _index) + jspUri.substring(_index + 1) + ArchiveUtil.DOT_JSP;
- IPath jspPath = new Path(jspUri);
- if (archive.containsArchiveResource(jspPath)) {
- return false;
- }
- }
-
- //This is to handle archives created by an earlier version
- //The format was to include the source files in a directory called source in WEB-INF
- //Example: class is in WEB-INF/classes/test/Foo.class
- // source is in WEB-INF/source/test/Foo.java
- if(javaPath.segmentCount() > 2 && javaPath.segment(0).equals("WEB-INF") && javaPath.segment(1).equals("classes")){
- String alternateJavaUri = javaUri.replaceFirst("classes", "source");
- IPath alternateJavaPath = new Path(alternateJavaUri);
- if (archive.containsArchiveResource(alternateJavaPath)){
- IArchiveResource sourceFile;
- try {
- sourceFile = archive.getArchiveResource(alternateJavaPath);
- if(sourceFile != null){
- if (nonStandardSourceFiles == null) {
- nonStandardSourceFiles = new HashMap<IArchiveResource, IPath>();
- }
- if (!nonStandardSourceFiles.containsKey(sourceFile)) {
- nonStandardSourceFiles.put(sourceFile, javaPath);
- }
- return false;
- }
- } catch (FileNotFoundException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
- }
-
- return true;
- }
-
- @Override
- protected List<IArchiveResource> getArchiveResourcesForSave() {
- List <IArchiveResource> sortedFiles = new ArrayList <IArchiveResource>();
- int classIndex = 0;
- for(IArchiveResource resource : super.getArchiveResourcesForSave()){
- if(resource.getPath().lastSegment().endsWith(DOT_CLASS)){
- sortedFiles.add(classIndex++, resource);
- }
- else {
- sortedFiles.add(resource);
- }
- }
- return sortedFiles;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveTypeHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveTypeHandler.java
deleted file mode 100644
index 5a239dc08..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/WebComponentArchiveTypeHandler.java
+++ /dev/null
@@ -1,31 +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.archive;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.archive.IArchiveHandler;
-
-public class WebComponentArchiveTypeHandler implements IArchiveHandler {
-
- public boolean handlesArchive(IArchive archive) {
- if (archive.getLoadAdapter() instanceof WebComponentArchiveLoadAdapter) {
- return true;
- } else if (archive.containsArchiveResource(new Path(J2EEConstants.WEBAPP_DD_URI))) {
- return true;
- } else {
- // TODO handle the no DD case
- return false;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java
deleted file mode 100644
index 8111e913d..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientArchiveOpsResourceHandler.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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.archive.operations;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class AppClientArchiveOpsResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "appclientarchiveops";//$NON-NLS-1$
-
- private AppClientArchiveOpsResourceHandler() {
- // Do not instantiate
- }
-
- public static String ARCHIVE_OPERATION_SaveFile;
- public static String ARCHIVE_OPERATION_ProjectNature;
- public static String ARCHIVE_OPERATION_SaveManifest;
- public static String ARCHIVE_OPERATION_FileNotFound;
- public static String ARCHIVE_OPERATION_OpeningArchive;
- public static String ARCHIVE_OPERATION_ImportOperation;
- public static String IMPORT_MOFRESOURCE_STRING;
- public static String APPCLIENT_IMPORT_OPERATION_STRING;
- public static String APPCLIENT_IMPORT_FILE_STRING;
- public static String APPCLIENT_IMPORT_ERROR;
- public static String ARCHIVE_OPERATION_ErrorOccured;
- public static String Application_Client_File_UI_;
- public static String _c__Copyright_IBM_Corporation_2001_1;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, AppClientArchiveOpsResourceHandler.class);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java
deleted file mode 100644
index 571c5f745..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentExportOperation.java
+++ /dev/null
@@ -1,65 +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.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities;
-import org.eclipse.jst.jee.archive.IArchive;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentExportOperation extends J2EEArtifactExportOperation {
-
- public AppClientComponentExportOperation(IDataModel model) {
- super(model);
- }
-
- public void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
- IProgressMonitor subMonitor = new SubProgressMonitor(progressMonitor, EXPORT_WORK);
- IArchive archiveFromComponent = null;
- try {
- archiveFromComponent = JavaEEArchiveUtilities.INSTANCE.openArchive(getComponent());
- JavaEEQuickPeek quickPeek = JavaEEArchiveUtilities.INSTANCE.getJavaEEQuickPeek(archiveFromComponent);
- if (quickPeek.getJavaEEVersion() == J2EEConstants.JEE_5_0_ID) {
- saveArchive(archiveFromComponent, getDestinationPath().toOSString(), subMonitor);
- } else {
- CommonarchiveFactory caf = ((CommonarchivePackage) EPackage.Registry.INSTANCE.getEPackage(CommonarchivePackage.eNS_URI)).getCommonarchiveFactory();
- AppClientComponentLoadStrategyImpl ls = new AppClientComponentLoadStrategyImpl(getComponent());
- ls.setExportSource(isExportSource());
- setModuleFile(caf.openApplicationClientFile(ls, getDestinationPath().toOSString()));
- ls.setProgressMonitor(subMonitor);
- getModuleFile().saveAsNoReopen(getDestinationPath().toOSString());
- }
- } catch (SaveFailureException ex) {
- throw ex;
- } catch (Exception e) {
- throw new SaveFailureException(AppClientArchiveOpsResourceHandler.ARCHIVE_OPERATION_OpeningArchive, e);
- } finally {
- if (archiveFromComponent != null)
- JavaEEArchiveUtilities.INSTANCE.closeArchive(archiveFromComponent);
- subMonitor.done();
- }
- }
-
- protected String archiveString() {
- return AppClientArchiveOpsResourceHandler.Application_Client_File_UI_;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java
deleted file mode 100644
index 47c226fd7..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentImportOperation.java
+++ /dev/null
@@ -1,34 +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.archive.operations;
-
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.internal.archive.AppClientComponentArchiveSaveAdapter;
-import org.eclipse.jst.j2ee.internal.archive.ComponentArchiveSaveAdapter;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AppClientComponentImportOperation extends J2EEArtifactImportOperation {
-
- public AppClientComponentImportOperation(IDataModel model) {
- super(model);
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent virtualComponent) {
- AppClientComponentSaveStrategyImpl saveStrat = new AppClientComponentSaveStrategyImpl(virtualComponent);
- return saveStrat;
- }
-
- protected ComponentArchiveSaveAdapter getArchiveSaveAdapter(IVirtualComponent virtualComponent) {
- return new AppClientComponentArchiveSaveAdapter(virtualComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.java
deleted file mode 100644
index 1b3c78b0e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentLoadStrategyImpl.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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.archive.operations;
-
-import org.eclipse.jst.j2ee.applicationclient.componentcore.util.AppClientArtifactEdit;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- public AppClientComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- protected synchronized ArtifactEdit getArtifactEditForRead() {
- if(artifactEdit == null){
- artifactEdit = AppClientArtifactEdit.getAppClientArtifactEditForRead(vComponent);
- }
- return artifactEdit;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java
deleted file mode 100644
index 7c769bd1e..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/AppClientComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +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.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class AppClientComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public AppClientComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java
deleted file mode 100644
index 1dbc63dec..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,692 +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.archive.operations;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.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.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.ResourceLoadException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.FileIterator;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.FileIteratorImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.impl.ContainerImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.LoadStrategyImpl;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyManifestUtil;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyVirtualComponent;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-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.IVirtualContainer;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-
-public abstract class ComponentLoadStrategyImpl extends LoadStrategyImpl {
-
- protected static final String DOT_PROJECT = ".project"; //$NON-NLS-1$
- protected static final String DOT_CLASSPATH = ".classpath"; //$NON-NLS-1$
- protected static final String DOT_SETTINGS = ".settings"; //$NON-NLS-1$
- protected static final String DOT_CVS_IGORE = ".cvsignore"; //$NON-NLS-1$
-
- protected IVirtualComponent vComponent;
- protected boolean exportSource;
- protected ArtifactEdit artifactEdit;
- private List zipFiles = new ArrayList();
- private List javaClasspathURIs = new ArrayList();
- protected boolean includeClasspathComponents = true;
-
- protected class FilesHolder {
-
- private Map urisToFiles = new HashMap();
- private Map urisToResources = new HashMap();
- private Map resourcesToURI = new HashMap();
- private Map urisToDiskFiles;
- private Map urisToZipEntry = new HashMap();
-
- public void removeIFile(IFile file) {
- String uri = (String) resourcesToURI.get(file);
- remove(uri);
- }
-
- public void remove(String uri) {
- urisToFiles.remove(uri);
- Object resource = urisToResources.remove(uri);
- if (resource != null) {
- resourcesToURI.remove(resource);
- }
- if (urisToDiskFiles != null) {
- urisToDiskFiles.remove(uri);
- }
- }
-
- public void addDirectory(File directory) {
- String uri = directory.getURI();
- urisToFiles.put(uri, directory);
- }
-
- public void addFile(File file) {
- String uri = file.getURI();
- urisToFiles.put(uri, file);
- }
-
- public void addFile(File file, java.io.File externalDiskFile) {
- String uri = file.getURI();
- urisToFiles.put(uri, file);
- if (null == urisToDiskFiles) {
- urisToDiskFiles = new HashMap();
- }
- urisToDiskFiles.put(uri, externalDiskFile);
- }
-
- public void addFile(File file, IResource resource) {
- String uri = file.getURI();
- urisToFiles.put(uri, file);
- urisToResources.put(uri, resource);
- }
-
- public InputStream getInputStream(String uri) throws IOException, FileNotFoundException {
- java.io.File diskFile = null;
-
- if (urisToDiskFiles != null && urisToDiskFiles.containsKey(uri)) {
- diskFile = (java.io.File) urisToDiskFiles.get(uri);
- } else if (urisToResources != null && urisToResources.containsKey(uri)) {
- IResource resource = (IResource) urisToResources.get(uri);
- diskFile = new java.io.File(resource.getLocation().toOSString());
- } else {
- Map fileURIMap = (Map) urisToZipEntry.get(uri);
- Iterator it = fileURIMap.keySet().iterator();
-
- String sourceFileUri = ""; //$NON-NLS-1$
- ZipFile zipFile = null;
-
- // there is only one key, pair
- while (it.hasNext()) {
- sourceFileUri = (String) it.next();
- zipFile = (ZipFile) fileURIMap.get(sourceFileUri);
- }
- ZipEntry entry = zipFile.getEntry(sourceFileUri);
- InputStream in = zipFile.getInputStream(entry);
- return in;
- }
- return new FileInputStream(diskFile);
- }
-
- public List getFiles() {
- return new ArrayList(urisToFiles.values());
- }
-
- public boolean contains(String uri) {
- return urisToFiles.containsKey(uri);
- }
-
- public void addEntry(ZipEntry entry, ZipFile zipFile, IPath runtimePath) {
- String uri = runtimePath == null ? null : runtimePath.toString();
- String fileURI = ""; //$NON-NLS-1$
- if (uri != null) {
- if (!uri.equals("/")) //$NON-NLS-1$
- fileURI = uri + entry.getName();
- else
- fileURI = entry.getName();
- } else {
- fileURI = entry.getName();
- }
-
- File file = createFile(fileURI);
-
- Map fileURIMap = new HashMap();
- fileURIMap.put(entry.getName(), zipFile);
-
- urisToZipEntry.put(file.getURI(), fileURIMap);
- urisToFiles.put(file.getURI(), file);
- }
- }
-
- protected FilesHolder filesHolder;
-
- private Exception exception; //TEMP TODO REMOVE
-
- private IVirtualFile manifestFile = null;
-
- public ComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- this(vComponent, true);
- }
-
- public ComponentLoadStrategyImpl(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- this.vComponent = vComponent;
- filesHolder = new FilesHolder();
- exception = new Exception();
- this.includeClasspathComponents = includeClasspathComponents;
- if (includeClasspathComponents) {
- this.manifestFile = vComponent.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- saveJavaClasspathReferences();
- }
- }
-
- public boolean contains(String uri) {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- return rootFolder.getFile(new Path(uri)).exists();
- }
-
- protected void initializeResourceSet() {
- resourceSet = WorkbenchResourceHelperBase.getResourceSet(vComponent.getProject());
- }
-
- protected boolean primContains(String uri) {
- return false;
- }
-
- public List getFiles() {
- aggregateSourceFiles();
- aggregateClassFiles();
- addUtilities();
- return filesHolder.getFiles();
- }
-
- /**
- * Adds library cp entries that point to class folders and have been tagged with the publish/export attribute.
- */
- protected void addMappedClassFolders(final IPath targetRuntimePath) {
- // retrieve all mapped class folders
- if (vComponent instanceof J2EEModuleVirtualComponent) {
- try {
- final J2EEModuleVirtualComponent j2eeComponent = (J2EEModuleVirtualComponent) vComponent;
- final IVirtualReference[] cpRefs = j2eeComponent.getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- final IPath runtimePath = ref.getRuntimePath();
- // only process mappings with the specified runtime path
- if (ref.getReferencedComponent() instanceof ClasspathDependencyVirtualComponent
- && runtimePath.equals(targetRuntimePath)) {
- final ClasspathDependencyVirtualComponent comp = (ClasspathDependencyVirtualComponent) ref.getReferencedComponent();
- if (comp.isClassFolder()) {
- final IContainer classFolder = comp.getClassFolder();
- if (classFolder != null && classFolder.exists()) {
- aggregateOutputFiles(new IResource[]{classFolder}, runtimePath.makeRelative(), classFolder.getProjectRelativePath().segmentCount());
- }
- }
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
- protected void saveJavaClasspathReferences() {
- if (vComponent instanceof J2EEModuleVirtualComponent) {
- final J2EEModuleVirtualComponent j2eeComp = (J2EEModuleVirtualComponent) vComponent;
- final IVirtualReference[] refs = j2eeComp.getJavaClasspathReferences();
- if (refs == null) {
- return;
- }
- for (int i = 0; i < refs.length; i++) {
- if (refs[i].getRuntimePath().equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- javaClasspathURIs.add(refs[i].getArchiveName());
- }
- }
- }
- }
-
- protected void addUtilities() {
- IVirtualReference[] components = vComponent.getReferences();
- for (int i = 0; i < components.length; i++) {
- IVirtualReference reference = components[i];
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
- if (referencedComponent.isBinary() && reference.getDependencyType() == DependencyType.CONSUMES) {
- java.io.File diskFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingDiskFile();
- ZipFile zipFile;
- IPath path = reference.getRuntimePath();
- try {
- zipFile = org.eclipse.jst.jee.archive.internal.ArchiveUtil.newZipFile(diskFile);
- zipFiles.add(zipFile);
- Enumeration enumeration = zipFile.entries();
- while (enumeration.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) enumeration.nextElement();
- filesHolder.addEntry(entry, zipFile, path);
- }
- } catch (ZipException e) {
- Logger.getLogger().logError(e);
- } catch (IOException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
- }
-
- /**
- * This is a cache of the IResource roots for all java source folders and is used by
- * {@link #inJavaSrc(IVirtualResource)}.
- */
- private IResource[] sourceRoots = null;
-
- protected void aggregateSourceFiles() {
- try {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource[] members = rootFolder.members();
- IPackageFragmentRoot[] srcPkgs = J2EEProjectUtilities.getSourceContainers(vComponent.getProject());
- sourceRoots = new IResource[srcPkgs.length];
- for (int i = 0; i < srcPkgs.length; i++) {
- sourceRoots[i] = srcPkgs[i].getCorrespondingResource();
- }
- inJavaSrc = false;
- aggregateFiles(members);
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- protected void aggregateClassFiles() {
- StructureEdit se = null;
- try {
- IPackageFragmentRoot[] sourceRoots = J2EEProjectUtilities.getSourceContainers(vComponent.getProject());
- se = StructureEdit.getStructureEditForRead(vComponent.getProject());
- for (int i = 0; i < sourceRoots.length; i++) {
- IPath outputPath = sourceRoots[i].getRawClasspathEntry().getOutputLocation();
- if (outputPath == null) {
- IProject project = vComponent.getProject();
- if (project.hasNature(JavaCore.NATURE_ID)) {
- IJavaProject javaProject = JavaCore.create(project);
- outputPath = javaProject.getOutputLocation();
- }
- }
- if (outputPath != null) {
- IContainer javaOutputContainer = outputPath.segmentCount() > 1 ? (IContainer) ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath) : (IContainer) ResourcesPlugin.getWorkspace().getRoot().getProject(outputPath.lastSegment());
- IPath runtimePath = null;
- try {
- ComponentResource[] componentResources = se.findResourcesBySourcePath(sourceRoots[i].getResource().getProjectRelativePath());
- if (componentResources.length > 0) {
- IPath tmpRuntimePath = componentResources[0].getRuntimePath();
- IPath tmpSourcePath = componentResources[0].getSourcePath();
- if (!tmpRuntimePath.equals(tmpSourcePath)) {
- while (tmpSourcePath.segmentCount() > 0 && tmpRuntimePath.segmentCount() > 0 && tmpRuntimePath.lastSegment().equals(tmpSourcePath.lastSegment())) {
- tmpRuntimePath = tmpRuntimePath.removeLastSegments(1);
- tmpSourcePath = tmpSourcePath.removeLastSegments(1);
- }
- if (tmpRuntimePath.segmentCount() != 0) {
- runtimePath = tmpRuntimePath.makeRelative();
- }
- }
- }
- } catch (UnresolveableURIException e) {
- Logger.getLogger().logError(e);
- }
- if (null == runtimePath) {
- runtimePath = new Path(""); //$NON-NLS-1$
- }
- aggregateOutputFiles(new IResource[]{javaOutputContainer}, runtimePath, javaOutputContainer.getProjectRelativePath().segmentCount());
- }
- }
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- } finally {
- if (se != null) {
- se.dispose();
- }
- }
- }
-
- protected boolean aggregateOutputFiles(IResource[] resources, final IPath runtimePathPrefix, int outputFolderSegmentCount) throws CoreException {
- boolean fileAdded = false;
- for (int i = 0; i < resources.length; i++) {
- File cFile = null;
- if (!resources[i].exists()) {
- continue;
- }
- // We have to avoid duplicates between the source and output folders (non-java
- // resources)
- IPath runtimePath = runtimePathPrefix.append(resources[i].getProjectRelativePath().removeFirstSegments(outputFolderSegmentCount));
- String uri = runtimePath == null ? null : runtimePath.toString();
- if (uri == null)
- continue;
- if (resources[i].getType() == IResource.FILE) {
- if (!shouldInclude(uri))
- continue;
- cFile = createFile(uri);
- cFile.setLastModified(getLastModified(resources[i]));
- filesHolder.addFile(cFile, resources[i]);
- fileAdded = true;
- } else if (shouldInclude((IContainer) resources[i])) {
- IResource[] nestedResources = ((IContainer) resources[i]).members();
- aggregateOutputFiles(nestedResources, runtimePathPrefix, outputFolderSegmentCount);
- if(!filesHolder.contains(uri)){
- if (!shouldInclude(uri))
- continue;
- cFile = createDirectory(uri);
- cFile.setLastModified(getLastModified(resources[i]));
- filesHolder.addDirectory(cFile);
- fileAdded = true;
- }
- }
- }
- return fileAdded;
- }
-
- /**
- * This is used to track whether {@link #aggregateFiles(IVirtualResource[])} is currently within a Java Source folder.
- */
- private boolean inJavaSrc = false;
-
- protected boolean aggregateFiles(IVirtualResource[] virtualResources) throws CoreException {
- boolean fileAdded = false;
- for (int i = 0; i < virtualResources.length; i++) {
- File cFile = null;
- if (!virtualResources[i].exists()) {
- continue;
- }
- // We have to avoid duplicates between the source and output folders (non-java
- // resources)
- IPath runtimePath = virtualResources[i].getRuntimePath();
- String uri = runtimePath == null ? null : runtimePath.toString();
- if (uri == null)
- continue;
- if (uri.charAt(0) == IPath.SEPARATOR) {
- uri = uri.substring(1);
- }
- if (filesHolder.contains(uri))
- continue;
-
- if (virtualResources[i].getType() == IVirtualResource.FILE) {
- if (!shouldInclude(uri))
- continue;
- IResource resource = virtualResources[i].getUnderlyingResource();
- // want to ignore derived resources nested within Java src directories; this covers the case where
- // a user has nested a Java output directory within a Java src directory (note: should ideally be
- // respecting Java src path exclusion filters)
- if (inJavaSrc && resource.isDerived()) {
- continue;
- }
- cFile = createFile(uri);
- cFile.setLastModified(getLastModified(resource));
- filesHolder.addFile(cFile, resource);
- fileAdded = true;
- } else if (shouldInclude((IVirtualContainer) virtualResources[i])) {
- boolean inJavaSrcAtThisLevel = inJavaSrc;
- try {
- if (!inJavaSrc) {
- // if not already inside a Java src dir, check again
- inJavaSrc = inJavaSrc(virtualResources[i]);
- }
- IVirtualResource[] nestedVirtualResources = ((IVirtualContainer) virtualResources[i]).members();
- aggregateFiles(nestedVirtualResources);
- if(!filesHolder.contains(uri)){
- if (!shouldInclude(uri))
- continue;
- IResource resource = virtualResources[i].getUnderlyingResource();
- if (inJavaSrc && resource.isDerived()) {
- continue;
- }
- cFile = createDirectory(uri);
- cFile.setLastModified(getLastModified(resource));
- filesHolder.addDirectory(cFile);
- fileAdded = true;
- }
- } finally {
- inJavaSrc = inJavaSrcAtThisLevel;
- }
- }
- }
- return fileAdded;
- }
-
- /**
- * Determines if the specified IVirtualResource maps to a IResource that is contained within a Java src root.
- * @param virtualResource IVirtualResource to check.
- * @param sourceRoots Current Java src roots.
- * @return True if contained in a Java src root, false otherwise.
- */
- protected boolean inJavaSrc(final IVirtualResource virtualResource) {
- if (sourceRoots.length == 0) {
- return false;
- }
- // all mapped resources must be associated with Java src for the resource to be considered in Java src
- final IResource[] resources = virtualResource.getUnderlyingResources();
- boolean inJavaSrc = false;
- for (int i = 0; i < resources.length; i++) {
- inJavaSrc = false;
- for (int j = 0; j < sourceRoots.length; j++) {
- if (sourceRoots[j].getFullPath().isPrefixOf(resources[i].getFullPath())) {
- inJavaSrc = true;
- break;
- }
- }
- // if this one was not in Java src, can break
- if (!inJavaSrc) {
- break;
- }
- }
-
- return inJavaSrc;
- }
-
- protected long getLastModified(IResource aResource) {
- return aResource.getLocation().toFile().lastModified();
- }
-
- public void setExportSource(boolean newExportSource) {
- exportSource = newExportSource;
- }
-
- public boolean isExportSource() {
- return exportSource;
- }
-
- protected boolean shouldInclude(IContainer aContainer) {
- return true;
- }
-
- protected boolean shouldInclude(IVirtualContainer vContainer) {
- IContainer iContainer = (IContainer) vContainer.getUnderlyingResource();
- return shouldInclude(iContainer);
- }
-
- protected boolean shouldInclude(String uri) {
- if (uri.length() == 0 || DOT_PROJECT.equals(uri) || DOT_CLASSPATH.equals(uri) || uri.endsWith(DOT_CVS_IGORE) || uri.startsWith(DOT_SETTINGS)){
- return false;
- }
- return isExportSource() || !isSource(uri);
- }
-
- protected boolean isSource(String uri) {
- if (uri == null)
- return false;
- return uri.endsWith(ArchiveUtil.DOT_JAVA) || uri.endsWith(ArchiveUtil.DOT_SQLJ);
- }
-
- protected void addExternalFile(String uri, java.io.File externalDiskFile) {
- File aFile = createFile(uri);
- filesHolder.addFile(aFile, externalDiskFile);
- }
-
- public InputStream getInputStream(String uri) throws IOException, FileNotFoundException {
- // If the MANIFEST.MF of a module component is being requested and that module component references
- // Java build path-based components, need to dynamically update the manifest classpath to reflect the resolved
- // contributions from the build path
- if (includeClasspathComponents &&
- uri.equals(J2EEConstants.MANIFEST_URI) && !javaClasspathURIs.isEmpty() &&
- manifestFile != null && manifestFile.getUnderlyingFile() != null &&
- manifestFile.getUnderlyingFile().exists()) {
- //update the manifest classpath for the component
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ClasspathDependencyManifestUtil.updateManifestClasspath(manifestFile.getUnderlyingFile(), javaClasspathURIs, baos);
- return new ByteArrayInputStream(baos.toByteArray());
- }
-
- if (filesHolder.contains(uri)) {
- return filesHolder.getInputStream(uri);
- }
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualResource vResource = rootFolder.findMember(uri);
- String filePath = null;
- if (null != vResource && vResource.exists()) {
- filePath = vResource.getUnderlyingResource().getLocation().toOSString();
- java.io.File file = new java.io.File(filePath);
- return new FileInputStream(file);
- }
- String eString = EARArchiveOpsResourceHandler.ARCHIVE_OPERATION_FileNotFound;
- throw new FileNotFoundException(eString);
- }
-
- public Collection getLoadedMofResources() {
- Collection resources = super.getLoadedMofResources();
- Collection resourcesToRemove = new ArrayList();
- Iterator iterator = resources.iterator();
- while (iterator.hasNext()) {
- Resource res = (Resource) iterator.next();
- //only remove component files that are in the settings directory
- if (res.getURI().toString().endsWith(IModuleConstants.COMPONENT_FILE_NAME) && res.getURI().segmentsList().contains(IModuleConstants.DOT_SETTINGS))
- resourcesToRemove.add(res);
- }
- if (null != resourcesToRemove) {
- resources.removeAll(resourcesToRemove);
- }
-
- return resources;
- }
-
- protected synchronized ArtifactEdit getArtifactEditForRead() {
- if(artifactEdit == null){
- artifactEdit = ArtifactEdit.getArtifactEditForRead(vComponent);
- }
- return artifactEdit;
- }
-
- public Resource getMofResource(String uri) throws FileNotFoundException, ResourceLoadException {
- return getArtifactEditForRead().getResource(URI.createURI(uri));
- }
-
- public boolean isClassLoaderNeeded() {
- return false;
- }
-
- public IVirtualComponent getComponent() {
- return vComponent;
- }
-
- protected IProgressMonitor monitor = null;
-
- public void setProgressMonitor(IProgressMonitor monitor){
- this.monitor = monitor;
- }
-
- protected final int FILE_SAVE_WORK = 100;
-
- public FileIterator getFileIterator() throws IOException {
- return new FileIteratorImpl(getContainer().getFiles()){
- protected SubProgressMonitor lastSubMon = null;
- boolean firstVisit = true;
-
- public File next() {
- if(firstVisit){
- firstVisit = false;
- if(monitor != null){
- monitor.beginTask(ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Exporting_archive, new Object [] { getContainer().getURI() }), files.size() * FILE_SAVE_WORK);
- }
- }
- if(lastSubMon != null){
- lastSubMon.done();
- lastSubMon = null;
- } else if(monitor != null){
- monitor.worked(FILE_SAVE_WORK);
- }
- File file = super.next();
- if(monitor != null){
- if(file.isContainer() && ComponentLoadStrategyImpl.class.isInstance(((ContainerImpl)file).getLoadStrategy())){
- ComponentLoadStrategyImpl ls = (ComponentLoadStrategyImpl)((ContainerImpl)file).getLoadStrategy();
- lastSubMon = new SubProgressMonitor(monitor, FILE_SAVE_WORK, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
- ls.setProgressMonitor(lastSubMon);
- } else {
- monitor.subTask(file.getURI());
- }
- }
- return file;
- }
- };
-
- }
-
- public void close() {
- if(Thread.currentThread().toString().toLowerCase().indexOf("finalizer") != -1){
- System.err.println("Opener of Archive didn't close! "+this);
- exception.printStackTrace(System.err);
- }
-
- try{
- Iterator it = zipFiles.iterator();
- while (it.hasNext()) {
- ZipFile file = (ZipFile) it.next();
- try {
- file.close();
- } catch (IOException e) {
- Logger.getLogger().logError(e);
- }
- }
- } finally{
- try{
- synchronized(this) {
- if(artifactEdit != null){
- ArtifactEditModel editModel = (ArtifactEditModel)artifactEdit.getAdapter(ArtifactEditModel.class);
- if(editModel != null && !editModel.isDisposed()){
- artifactEdit.dispose();
- }
- artifactEdit = null;
- }
- }
- } finally {
- super.close();
- }
- }
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java
deleted file mode 100644
index 117c4d673..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,283 +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.archive.operations;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategyImpl;
-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.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.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.DoNotUseMeThisWillBeDeletedPost15;
-
-public abstract class ComponentSaveStrategyImpl extends SaveStrategyImpl {
-
- protected IDataModel dataModel;
- protected IVirtualComponent vComponent;
- protected IOverwriteHandler overwriteHandler;
- protected IProgressMonitor progressMonitor;
-
- private String archiveComponentsDeployPath;
- private List archiveComponents;
- private Map archiveComponentURIMap;
- private Map archiveComponentDeployPathMap;
-
- public ComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super();
- if (null == vComponent) {
- throw new NullPointerException();
- }
- this.vComponent = vComponent;
- }
-
- public void setDataModel(IDataModel dataModel) {
- this.dataModel = dataModel;
- }
-
- public void setOverwriteHandler(IOverwriteHandler newOverwriteHandler) {
- overwriteHandler = newOverwriteHandler;
- }
-
- public void setProgressMonitor(IProgressMonitor newProgressMonitor) {
- progressMonitor = newProgressMonitor;
- }
-
- protected void validateEdit(IFile aFile) {
- if (overwriteHandler == null)
- return;
- if (!(aFile.exists() && aFile.isReadOnly()))
- return;
-
- overwriteHandler.validateEdit(aFile);
- }
-
- protected boolean shouldOverwrite(String uri) {
- if (overwriteHandler.isOverwriteNone())
- return false;
- return (overwriteHandler.isOverwriteResources() || overwriteHandler.isOverwriteAll() || overwriteHandler.shouldOverwrite(uri));
- }
-
- protected SaveStrategy createNestedSaveStrategy(Archive anArchive) throws IOException {
- return null;
- }
-
- protected OutputStream getOutputStreamForResource(Resource aResource) throws IOException {
- // this method has no references in the hirarchy
- return null;
- }
-
- protected void saveFiles() throws SaveFailureException {
- super.saveFiles();
- linkArchiveComponents();
- }
-
- public void save(File aFile, InputStream in) throws SaveFailureException {
- try {
- progressMonitor.subTask(aFile.getURI());
-
- IPath projectRelativePath = getOutputPathForFile(aFile);
- if (aFile.isArchive()) {
- saveAsArchiveComponent((Archive) aFile, projectRelativePath, in);
- } else if (!aFile.isDirectoryEntry()) {
- saveToOutputPath(projectRelativePath, in);
- } else {
- createDirectory(projectRelativePath);
- }
- } catch (OverwriteHandlerException ohe) {
- throw ohe;
- } catch (Exception e) {
- String errorString = EJBArchiveOpsResourceHandler.ARCHIVE_OPERATION_SaveFile + aFile.getName();
- throw new SaveFailureException(errorString, e);
- } finally {
- progressMonitor.worked(1);
- }
- }
-
- //TODO this should be renamed to getProjectRelativePath
- /**
- * Returns the project relative path for where the specified file should be
- * saved.
- *
- * @param aFile
- * @return
- */
- protected IPath getOutputPathForFile(File aFile) {
- String uri = aFile.getURI();
- IFile iFile = null;
- if(uri.startsWith(IModuleConstants.DOT_SETTINGS)){
- iFile = vComponent.getProject().getFile(new Path(uri));
- }else {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile(aFile.getURI());
- iFile = vFile.getUnderlyingFile();
- }
- return iFile.getProjectRelativePath();
- }
-
- //TODO This isn't referenced in WTP it should be deleted.
- /**
- * @deprecated
- */
- protected void saveToWorkbenchPath(IPath workbenchPath, InputStream in) throws Exception {
- IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFile(workbenchPath);
- saveToIFile(iFile, in);
- }
-
- /**
- * Creates the IFolder specified by the project relative path.
- *
- * @param projectRelativePath
- * @throws CoreException
- */
- protected void createDirectory(IPath projectRelativePath) throws CoreException {
- IFolder iFolder = vComponent.getProject().getFolder(projectRelativePath);
- if (!iFolder.exists()) {
- mkdirs(iFolder);
- }
- }
-
- /**
- * Creates the specified IFolder
- *
- * @param folder
- * @throws CoreException
- */
- protected void mkdirs(IFolder folder) throws CoreException {
- IContainer container = folder.getParent();
- if (!container.exists()) {
- mkdirs((IFolder) container);
- }
- folder.create(true, true, null);
- }
-
- /**
- * Save the specified Archive to the specified project relative path
- * using the passed input stream.
- *
- * @param archive
- * @param projectRelativePath
- * @param in
- * @throws Exception
- */
- protected void saveAsArchiveComponent(Archive archive, IPath projectRelativePath, InputStream in) throws Exception {
- IFile iFile = saveToOutputPathIFile(projectRelativePath, in);
- //TODO investigate removing this block and related variables and linkArchiveComponents(); see bugzilla 159160
- if (shouldLinkAsComponentRef(archive)) {
- IVirtualComponent archiveComponent = ComponentCore.createArchiveComponent(vComponent.getProject(), VirtualArchiveComponent.LIBARCHIVETYPE + iFile.getFullPath().toString());
- if (archiveComponents == null) {
- archiveComponents = new ArrayList();
- archiveComponentURIMap = new HashMap();
- archiveComponentDeployPathMap = new HashMap();
- archiveComponentsDeployPath = IPath.SEPARATOR + (new Path(archive.getURI())).removeLastSegments(1).toString();
- }
- archiveComponents.add(archiveComponent);
- archiveComponentURIMap.put(archiveComponent, iFile.getName());
- archiveComponentDeployPathMap.put(archiveComponent, IPath.SEPARATOR + (new Path(archive.getURI())).removeLastSegments(1).toString());
- }
- }
-
- protected boolean shouldLinkAsComponentRef(Archive archive) {
- return false;
- }
-
- protected void linkArchiveComponents() {
- if (archiveComponents != null && archiveComponents.size() > 0) {
- IDataModel createReferencesDataModel = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, vComponent);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, archiveComponentsDeployPath);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH_MAP, archiveComponentDeployPathMap);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, archiveComponents);
- createReferencesDataModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, archiveComponentURIMap);
- try {
- createReferencesDataModel.getDefaultOperation().execute(null, null);
- } catch (ExecutionException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- /**
- * Saves to the specified project relative output path. Warning this method
- * will be changed post 1.5 to return an IFile
- *
- * @param projectRelativePath
- * @param in
- * @throws Exception
- */
- protected void saveToOutputPath(IPath projectRelativePath, InputStream in) throws Exception {
- saveToOutputPathIFile(projectRelativePath, in);
- }
-
- /**
- * TODO refactor change the method above to return IFile
- * {@link DoNotUseMeThisWillBeDeletedPost15}
- */
- protected IFile saveToOutputPathIFile(IPath projectRelativePath, InputStream in) throws Exception {
- IFile iFile = vComponent.getProject().getFile(projectRelativePath);
- saveToIFile(iFile, in);
- return iFile;
- }
-
-
- protected void saveToIFile(IFile iFile, InputStream in) throws Exception {
- validateEdit(iFile);
- if (iFile.exists())
- iFile.setContents(in, true, true, null);
- else {
- mkdirs(iFile.getFullPath().removeLastSegments(1), ResourcesPlugin.getWorkspace().getRoot());
- iFile.create(in, true, null);
- }
- }
-
-
- protected void mkdirs(IPath path, IWorkspaceRoot root) throws CoreException {
- if (path.segmentCount() <= 1)
- return;
- IFolder folder = root.getFolder(path);
- if (!folder.exists()) {
- mkdirs(path.removeLastSegments(1), root);
- folder.create(true, true, null);
- }
- }
-
- public void save(ArchiveManifest aManifest) throws SaveFailureException {
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java
deleted file mode 100644
index f0c4e7ae0..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/ConnectorComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,21 +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.archive.operations;
-
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class ConnectorComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public ConnectorComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java
deleted file mode 100644
index 6c5e888eb..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/DependentJarExportMerger.java
+++ /dev/null
@@ -1,129 +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.archive.operations;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.jar.Attributes;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchiveFactory;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonarchivePackage;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.DuplicateObjectException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-
-public class DependentJarExportMerger {
- protected Archive outgoingArchive;
- protected IProject project;
- protected List dependentArchives;
- protected boolean includeSource;
-
- /**
- * DependentJarExportMerger constructor comment.
- */
- public DependentJarExportMerger(Archive archive, IProject aProject, boolean includeSourceFiles) {
- super();
- outgoingArchive = archive;
- project = aProject;
- includeSource = includeSourceFiles;
- }
-
- protected void finalize() throws Throwable {
- release();
- }
-
- public CommonarchiveFactory getArchiveFactory() {
- return CommonarchivePackage.eINSTANCE.getCommonarchiveFactory();
- }
-
- public void merge() {
- String[] cp = outgoingArchive.getManifest().getClassPathTokenized();
- dependentArchives = new ArrayList(cp.length);
- List keepClassPaths = new ArrayList();
- for (int i = 0; i < cp.length; i++) {
- Archive dependentJar = null;
- IFile file = null;
- try {
- file = project.getFile(cp[i]);
- } catch (IllegalArgumentException e) {
- continue;
- }
- if (file.exists() && cp[i].endsWith(J2EEImportConstants.IMPORTED_JAR_SUFFIX)) {
- try {
- dependentJar = getArchiveFactory().primOpenArchive(file.getLocation().toOSString());
- } catch (OpenFailureException ex) {
- // Need to write this to the log file
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ex);
- continue;
- }
- dependentArchives.add(dependentJar);
- mergeFiles(dependentJar);
- } else
- keepClassPaths.add(cp[i]);
- }
- resetClassPath(keepClassPaths);
- }
-
- protected void mergeFiles(Archive dependentJar) {
- List files = dependentJar.getFiles();
- List filesToAdd = new java.util.ArrayList();
- for (int i = 0; i < files.size(); i++) {
- File aFile = (File) files.get(i);
- if (shouldMerge(aFile))
- filesToAdd.add(aFile);
- }
- try {
- outgoingArchive.addCopyFiles(filesToAdd);
- } catch (DuplicateObjectException ignore) {
- // Shouldn't happen because we just checked for dups
- }
- }
-
- /**
- * Clients must call this when done to close the archives
- */
- public void release() {
- if (dependentArchives == null)
- return;
- for (int i = 0; i < dependentArchives.size(); i++) {
- Archive anArchive = (Archive) dependentArchives.get(i);
- if (anArchive.isOpen())
- anArchive.close();
- }
- }
-
- protected void resetClassPath(List cp) {
- ArchiveManifest mf = outgoingArchive.getManifest();
- if (cp.isEmpty())
- mf.getMainAttributes().remove(Attributes.Name.CLASS_PATH);
- else {
- mf.setClassPath("");//$NON-NLS-1$
- for (int i = 0; i < cp.size(); i++) {
- mf.appendClassPath((String) cp.get(i));
- }
- }
- }
-
- protected boolean shouldMerge(File aFile) {
-
- String uri = aFile.getURI();
- if (!(uri.endsWith(".java") || uri.endsWith(".class")))//$NON-NLS-2$//$NON-NLS-1$
- return false;
- if (!includeSource && uri.endsWith(".java"))//$NON-NLS-1$
- return false;
- return !outgoingArchive.containsFile(uri) && !ArchiveConstants.MANIFEST_URI.equals(uri);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java
deleted file mode 100644
index e7403e03a..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARArchiveOpsResourceHandler.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 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.archive.operations;
-
-import org.eclipse.osgi.util.NLS;
-
-public final class EARArchiveOpsResourceHandler extends NLS {
-
- private static final String BUNDLE_NAME = "eararchiveops";//$NON-NLS-1$
-
- private EARArchiveOpsResourceHandler() {
- // Do not instantiate
- }
-
- public static String ARCHIVE_OPERATION_SaveMofResources;
- public static String ARCHIVE_OPERATION_SaveFile;
- public static String ARCHIVE_OPERATION_ProjectNature;
- public static String ARCHIVE_OPERATION_SaveManifest;
- public static String ARCHIVE_OPERATION_FileNotFound;
- public static String ARCHIVE_OPERATION_FileContents;
- public static String ARCHIVE_OPERATION_ErroOccured;
- public static String ARCHIVE_OPERATION_FilesFromProject;
- public static String ARCHIVE_OPERATION_OpeningArchive;
- public static String ARCHIVE_OPERATION_ImportOperation;
- public static String IMPORT_MOFRESOURCE_STRING;
- public static String EAR_IMPORT_FILE_STRING;
- public static String ERROR_IMPORTING_EAR_FILE;
- public static String ERROR_EXPORTING_EAR_FILE;
- public static String IMPORTING_EAR_FILE_UI_;
- public static String Updating_project_classpath_UI_;
- public static String UNABLE_TO_LOAD_MODULE_ERROR_;
- public static String _jar_UI_;
- public static String Updating_manifest_Class_Path__attributes_UI_;
- public static String _preDeploy_ERROR_;
- public static String noRuntimeSelectedLabel;
- public static String MISSING_CLIENT_JAR;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, EARArchiveOpsResourceHandler.class);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java
deleted file mode 100644
index 2a1bd2290..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentExportOperation.java
+++ /dev/null
@@ -1,93 +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.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.archive.JavaEEArchiveUtilities;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.jee.archive.IArchive;
-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;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentExportOperation extends J2EEArtifactExportOperation {
-
- public EARComponentExportOperation(IDataModel model) {
- super(model);
- }
-
- protected void export() throws SaveFailureException, CoreException, InvocationTargetException, InterruptedException {
- IProgressMonitor subMonitor = new SubProgressMonitor(progressMonitor, EXPORT_WORK);
- IArchive archiveFromComponent = null;
- try {
- //[Bug 244049] need to use ProjectFacet version to determine how to export the EAR
- String versionStr = J2EEProjectUtilities.getJ2EEProjectVersion(getComponent().getProject());
- if (versionStr.equals(J2EEVersionConstants.VERSION_5_0_TEXT)) {
- archiveFromComponent = JavaEEArchiveUtilities.INSTANCE.openArchive(getComponent());
- saveArchive(archiveFromComponent, getDestinationPath().toOSString(), subMonitor);
- } else {
- EnterpriseArtifactEdit artifactEdit = null;
- try {
- artifactEdit = (EnterpriseArtifactEdit) ComponentUtilities.getArtifactEditForRead(getComponent());
- EARFile archive = (EARFile) artifactEdit.asArchive(isExportSource());
- String destination = getDestinationPath().toOSString();
- archive.setURI(destination);
- setModuleFile(archive);
- ComponentLoadStrategyImpl ls = (ComponentLoadStrategyImpl) archive.getLoadStrategy();
- ls.setProgressMonitor(subMonitor);
- archive.saveAsNoReopen(destination);
- } catch (SaveFailureException ex) {
- throw ex;
- } catch (Exception e) {
- throw new SaveFailureException(AppClientArchiveOpsResourceHandler.ARCHIVE_OPERATION_OpeningArchive, e);
- } finally {
- if (null != artifactEdit) {
- artifactEdit.dispose();
- }
- }
- }
- } catch (Exception e) {
- throw new SaveFailureException(AppClientArchiveOpsResourceHandler.ARCHIVE_OPERATION_OpeningArchive, e);
- } finally {
- if (archiveFromComponent != null)
- JavaEEArchiveUtilities.INSTANCE.closeArchive(archiveFromComponent);
- subMonitor.done();
- }
- }
-
- protected void runNecessaryBuilders(IVirtualComponent component, IProgressMonitor monitor) throws CoreException {
- try {
- IVirtualReference[] refs = component.getReferences();
- int work = (JAVA_BUILDER_WORK + LIB_BUILDER_WORK) / (refs.length + 1);
- super.runNecessaryBuilders(component, new SubProgressMonitor(monitor, work));
- for (int i = 0; i < refs.length; i++) {
- IVirtualComponent refComp = refs[i].getReferencedComponent();
- super.runNecessaryBuilders(refComp, new SubProgressMonitor(monitor, work));
- }
- } finally {
- monitor.done();
- }
- }
-
- protected String archiveString() {
- return "EAR";
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java
deleted file mode 100644
index 81ed616dc..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentImportOperation.java
+++ /dev/null
@@ -1,216 +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.archive.operations;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-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.SubProgressMonitor;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveWrapper;
-import org.eclipse.jst.j2ee.internal.archive.ComponentArchiveSaveAdapter;
-import org.eclipse.jst.j2ee.internal.archive.EARComponentArchiveSaveAdapter;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentImportOperation extends J2EEArtifactImportOperation {
-
- protected EnterpriseArtifactEdit artifactEdit = null;
-
- protected final int LINK_COMPONENTS_WORK = 10;
- protected final int WEB_LIB_WORK = 10;
- protected final int DISPOSE_WORK = 10;
-
- public EARComponentImportOperation(IDataModel model) {
- super(model);
- }
-
-
- protected ComponentArchiveSaveAdapter getArchiveSaveAdapter(IVirtualComponent virtualComponent){
- return new EARComponentArchiveSaveAdapter(virtualComponent);
- }
-
- protected int computeTotalWork() {
- int baseWork = super.computeTotalWork() + WEB_LIB_WORK + DISPOSE_WORK;
- List modelsToImport = (List) model.getProperty(IEARComponentImportDataModelProperties.HANDLED_PROJECT_MODELS_LIST);
- IDataModel importModel = null;
- for (int i = 0; i < modelsToImport.size(); i++) {
- importModel = (IDataModel) modelsToImport.get(i);
- ArchiveWrapper nestedArchive = (ArchiveWrapper) importModel.getProperty(IEARComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- baseWork += LINK_COMPONENTS_WORK + PROJECT_CREATION_WORK + nestedArchive.getSize();
- }
- return baseWork;
- }
-
- /**
- * Subclasses must override to performs the workbench modification steps
- * that are to be contained within a single logical workbench change.
- *
- * @param monitor
- * the progress monitor to use to display progress
- */
- protected void doExecute(IProgressMonitor monitor) throws ExecutionException {
- super.doExecute(monitor);
- ExecutionException firstNestedException = null;
- List modelsToImport = (List) model.getProperty(IEARComponentImportDataModelProperties.HANDLED_PROJECT_MODELS_LIST);
- try {
- IDataModel importModel = null;
- // make sure the wars handle importing their own web libs
- for (int i = modelsToImport.size() - 1; i > 0; i--) {
- importModel = (IDataModel) modelsToImport.get(i);
- ArchiveWrapper nestedArchive = (ArchiveWrapper) importModel.getProperty(IEARComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- if (nestedArchive.getPath().toString().startsWith(ArchiveConstants.WEBAPP_LIB_URI)) {
- ArchiveWrapper owningWar = (ArchiveWrapper) nestedArchive.getParent();
- modelsToImport.remove(importModel);
- for (int j = 0; j < modelsToImport.size(); j++) {
- IDataModel warModel = (IDataModel) modelsToImport.get(j);
- if (((ArchiveWrapper) (warModel.getProperty(IEARComponentImportDataModelProperties.ARCHIVE_WRAPPER))).getUnderLyingArchive() == owningWar.getUnderLyingArchive()) {
- // TODO this is bad, but don't have access to the
- // plugin where these
- // constants are defined.
- String archivesSelected = "WARImportDataModel.WEB_LIB_ARCHIVES_SELECTED"; //$NON-NLS-1$
- String libModels = "WARImportDataModel.WEB_LIB_MODELS"; //$NON-NLS-1$
- List warHandledArchives = (List) warModel.getProperty(archivesSelected);
- if (warHandledArchives == Collections.EMPTY_LIST) {
- warHandledArchives = new ArrayList();
- warModel.setProperty(archivesSelected, warHandledArchives);
- }
- warHandledArchives.add(nestedArchive);
- List warLibModels = (List) warModel.getProperty(libModels);
- for (int k = 0; k < warLibModels.size(); k++) {
- IDataModel libModel = (IDataModel) warLibModels.get(k);
- if (((ArchiveWrapper)libModel.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER)).getUnderLyingArchive() == nestedArchive.getUnderLyingArchive()) {
- libModel.setProperty(IJ2EEComponentImportDataModelProperties.PROJECT_NAME, importModel.getProperty(IJ2EEComponentImportDataModelProperties.PROJECT_NAME));
- libModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, importModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME));
- }
- }
- }
- }
- }
- }
- monitor.worked(WEB_LIB_WORK);
-
- List <String> ddSpecifiedURIs = ((ArchiveWrapper) model.getProperty(IEARComponentImportDataModelProperties.ARCHIVE_WRAPPER)).getDDMappedModuleURIs();
- List componentToAddAsModules = new ArrayList();
- Map componentToURIMapAsModules = new HashMap();
- List componentToAddAsComponents = new ArrayList();
- Map componentToURIMapAsComponents = new HashMap();
-
- for (int i = 0; i < modelsToImport.size(); i++) {
- importModel = (IDataModel) modelsToImport.get(i);
- ArchiveWrapper nestedArchive = (ArchiveWrapper) importModel.getProperty(IEARComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- importModel.setProperty(IJ2EEComponentImportDataModelProperties.CLOSE_ARCHIVE_ON_DISPOSE, Boolean.FALSE);
- IDataModel compCreationModel = importModel.getNestedModel(IJ2EEComponentImportDataModelProperties.NESTED_MODEL_J2EE_COMPONENT_CREATION);
- if (compCreationModel.isProperty(IJ2EEFacetProjectCreationDataModelProperties.MODULE_URI)){
- compCreationModel.setProperty(IJ2EEFacetProjectCreationDataModelProperties.MODULE_URI, nestedArchive.getPath().toString());
- }
- compCreationModel.setBooleanProperty(IJ2EEFacetProjectCreationDataModelProperties.ADD_TO_EAR, false);
- try {
- IStatus nestedImportStatus = importModel.getDefaultOperation().execute(new SubProgressMonitor(monitor, PROJECT_CREATION_WORK + nestedArchive.getSize()), info);
- if (!nestedImportStatus.isOK() && nestedImportStatus.getSeverity() == IStatus.ERROR) {
- throw new ExecutionException(nestedImportStatus.getMessage(), nestedImportStatus.getException());
- }
- } catch (ExecutionException e) {
- if (firstNestedException == null) {
- firstNestedException = e;
- }
- Logger.getLogger().logError(e);
- }
- IVirtualComponent component = (IVirtualComponent) importModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT);
- String uri = nestedArchive.getPath().toString();
- if(ddSpecifiedURIs.contains(uri)){
- componentToAddAsModules.add(component);
- componentToURIMapAsModules.put(component, uri);
- } else {
- componentToAddAsComponents.add(component);
- componentToURIMapAsComponents.put(component, uri);
- }
- }
-
- if (componentToAddAsModules.size() > 0) {
- //this block adds the component references to the component file and the EAR DD
- //this should only be called if the EAR DD already contains the module
- //and is necessary to update the id attribute (for the dependency object)
- IDataModel addComponentsDM = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider());
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, virtualComponent);
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, componentToAddAsModules);
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, componentToURIMapAsModules);
- addComponentsDM.getDefaultOperation().execute(new SubProgressMonitor(monitor, LINK_COMPONENTS_WORK/2), info);
- }
- if (componentToAddAsComponents.size() > 0){
- //this block only adds the component references to the component file
- //this should only be called when they are not already linked into the EAR DD
- IDataModel addComponentsDM = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, virtualComponent);
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, componentToAddAsComponents);
- addComponentsDM.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, componentToURIMapAsComponents);
- addComponentsDM.getDefaultOperation().execute(new SubProgressMonitor(monitor, LINK_COMPONENTS_WORK/2), info);
- }
-
- } finally {
- if (null != artifactEdit) {
- artifactEdit.dispose();
- artifactEdit = null;
- }
- resetDisposeImportModels();
- monitor.worked(DISPOSE_WORK);
- }
- if (firstNestedException != null) {
- throw firstNestedException;
- }
- }
-
- /**
- * @param modelsToImport
- */
- private void resetDisposeImportModels() {
- resetDisposeImportModels((List) model.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST));
- }
-
- private void resetDisposeImportModels(List models) {
- IDataModel model;
- for (int i = 0; i < models.size(); i++) {
- model = (IDataModel) models.get(i);
- model.setProperty(IJ2EEComponentImportDataModelProperties.CLOSE_ARCHIVE_ON_DISPOSE, Boolean.TRUE);
- }
- }
-
- protected SaveStrategy createSaveStrategy(IProject project) { // NOOP
- return null;
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent virtualComponent) {
- return new EARComponentSaveStrategyImpl(virtualComponent);
- }
-
- protected EARFile getEarFile() {
- return (EARFile) model.getProperty(IEARComponentImportDataModelProperties.FILE);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java
deleted file mode 100644
index 03d1791bb..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,215 +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.archive.operations;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-
-import org.eclipse.jst.j2ee.applicationclient.componentcore.util.AppClientArtifactEdit;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.CommonArchiveResourceHandler;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.ZipFileLoadStrategyImpl;
-import org.eclipse.jst.j2ee.componentcore.EnterpriseArtifactEdit;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyVirtualComponent;
-import org.eclipse.jst.j2ee.internal.componentcore.JavaEEBinaryComponentHelper;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.jee.util.internal.JavaEEQuickPeek;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
-import org.eclipse.wst.common.componentcore.internal.util.ArtifactEditRegistryReader;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class EARComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- private List artifactEditsToDispose = new ArrayList();
- private Map binaryComponentURIsToDiskFileMap = new HashMap();
-
- public EARComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public EARComponentLoadStrategyImpl(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- public List getFiles() {
- aggregateSourceFiles();
- addModulesAndUtilities();
- return filesHolder.getFiles();
- }
- protected synchronized ArtifactEdit getArtifactEditForRead() {
- if(artifactEdit == null){
- artifactEdit = EARArtifactEdit.getEARArtifactEditForRead(vComponent);
- }
- return artifactEdit;
- }
-
- public InputStream getInputStream(String uri) throws IOException, FileNotFoundException {
- if (binaryComponentURIsToDiskFileMap.containsKey(uri)) {
- java.io.File diskFile = (java.io.File) binaryComponentURIsToDiskFileMap.get(uri);
- return new FileInputStream(diskFile);
- }
- return super.getInputStream(uri);
- }
-
- public void addModulesAndUtilities() {
- EARArtifactEdit earArtifactEdit = null;
- try {
- earArtifactEdit = EARArtifactEdit.getEARArtifactEditForRead(vComponent);
- IVirtualReference[] components = earArtifactEdit.getComponentReferences();
- for (int i = 0; i < components.length; i++) {
- IVirtualReference reference = components[i];
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
-
- java.io.File diskFile = null;
- boolean forceUtility = false;
- if (referencedComponent.isBinary()) {
- JavaEEQuickPeek qp = JavaEEBinaryComponentHelper.getJavaEEQuickPeek(referencedComponent);
- int jeeVersion = qp.getJavaEEVersion();
- if(jeeVersion == J2EEVersionConstants.JEE_5_0_ID){
- forceUtility = true;
- }
- diskFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingDiskFile();
- if (!diskFile.exists()) {
- IFile wbFile = ((VirtualArchiveComponent) referencedComponent).getUnderlyingWorkbenchFile();
- diskFile = new File(wbFile.getLocation().toOSString());
- }
- }
- boolean isModule = false;
- if(!forceUtility){
- boolean addClasspathComponentDependencies = false;
- ArtifactEdit componentArtifactEdit = null;
- try {
- if (J2EEProjectUtilities.isApplicationClientComponent(referencedComponent)) {
- componentArtifactEdit = AppClientArtifactEdit.getAppClientArtifactEditForRead(referencedComponent);
- } else if (J2EEProjectUtilities.isEJBComponent(referencedComponent)) {
- addClasspathComponentDependencies = true;
- componentArtifactEdit = ArtifactEditRegistryReader.instance().getArtifactEdit(J2EEProjectUtilities.EJB).createArtifactEditForRead(referencedComponent);
- } else if (J2EEProjectUtilities.isDynamicWebComponent(referencedComponent)) {
- addClasspathComponentDependencies = true;
- componentArtifactEdit = ArtifactEditRegistryReader.instance().getArtifactEdit(J2EEProjectUtilities.DYNAMIC_WEB).createArtifactEditForRead(referencedComponent);
- } else if (J2EEProjectUtilities.isJCAComponent(referencedComponent)) {
- addClasspathComponentDependencies = true;
- componentArtifactEdit = ArtifactEditRegistryReader.instance().getArtifactEdit(J2EEProjectUtilities.JCA).createArtifactEditForRead(referencedComponent);
- }
- if (null != componentArtifactEdit) {
- Archive archive = ((EnterpriseArtifactEdit) componentArtifactEdit).asArchive(exportSource, includeClasspathComponents);
- if (referencedComponent.isBinary()) {
- artifactEditsToDispose.add(componentArtifactEdit);
- archive.setLoadingContainer(getContainer());
- binaryComponentURIsToDiskFileMap.put(archive.getOriginalURI(), diskFile);
- }
- archive.setURI(earArtifactEdit.getModuleURI(referencedComponent));
- filesHolder.addFile(archive);
- isModule = true;
- if (addClasspathComponentDependencies) {
- addClasspathComponentDependencies(referencedComponent);
- }
- }
- } catch (OpenFailureException oe) {
- J2EEPlugin.logError(oe);
- } finally {
- if (!referencedComponent.isBinary() && componentArtifactEdit != null) {
- componentArtifactEdit.dispose();
- }
- }
- }
- if (!isModule) {
- if (referencedComponent.isBinary()) {
- String uri = reference.getArchiveName();
- addExternalFile(uri, diskFile);
- } else if (J2EEProjectUtilities.isUtilityProject(referencedComponent.getProject())) {
- try {
- if (!referencedComponent.isBinary()) {
- String uri = earArtifactEdit.getModuleURI(referencedComponent);
- Archive archive = J2EEProjectUtilities.asArchive(uri, referencedComponent.getProject(), exportSource, includeClasspathComponents);
- archive.setURI(uri);
- filesHolder.addFile(archive);
- addClasspathComponentDependencies(referencedComponent);
- } else {
-
-
- }
- } catch (OpenFailureException e) {
- J2EEPlugin.logError(e);
- }
- }
- }
- }
-
- } finally {
- if (null != earArtifactEdit) {
- earArtifactEdit.dispose();
- }
- }
- }
-
- private void addClasspathComponentDependencies(final IVirtualComponent referencedComponent) {
- // retrieve all Java classpath component dependencies
- if (includeClasspathComponents && referencedComponent instanceof J2EEModuleVirtualComponent) {
- final IVirtualReference[] cpRefs = ((J2EEModuleVirtualComponent) referencedComponent).getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- // only ../ runtime paths contribute to the EAR
- if (ref.getRuntimePath().equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- if (ref.getReferencedComponent() instanceof ClasspathDependencyVirtualComponent) {
- final ClasspathDependencyVirtualComponent comp = (ClasspathDependencyVirtualComponent) ref.getReferencedComponent();
- File cpEntryFile = comp.getUnderlyingDiskFile();
- if (!cpEntryFile.exists()) {
- final IFile wbFile = comp.getUnderlyingWorkbenchFile();
- cpEntryFile = new File(wbFile.getLocation().toOSString());
- }
- addExternalFile(ref.getArchiveName(), cpEntryFile);
- }
- }
- }
- }
- }
-
- public void close() {
- super.close();
- Iterator it = artifactEditsToDispose.iterator();
- while (it.hasNext()) {
- ArtifactEdit edit = (ArtifactEdit) it.next();
- edit.dispose();
- }
- artifactEditsToDispose.clear();
- }
-
- public ZipFileLoadStrategyImpl createLoadStrategy(String uri) throws FileNotFoundException, IOException {
- String filename = uri.replace('/', java.io.File.separatorChar);
- java.io.File file = new java.io.File(filename);
- if (!file.exists()) {
- throw new FileNotFoundException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.file_not_found_EXC_, (new Object[]{uri, file.getAbsolutePath()}))); // =
- }
- if (file.isDirectory()) {
- throw new FileNotFoundException(CommonArchiveResourceHandler.getString(CommonArchiveResourceHandler.file_not_found_EXC_, (new Object[]{uri, file.getAbsolutePath()}))); // =
- }
- return new org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.ZipFileLoadStrategyImpl(file);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.java
deleted file mode 100644
index 786a5f71c..000000000
--- a/plugins/org.eclipse.jst.j2ee/archiveops/org/eclipse/jst/j2ee/internal/archive/operations/EARComponentSaveStrategyImpl.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.archive.operations;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jem.util.emf.workbench.WorkbenchByteArrayOutputStream;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.EARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
-import org.eclipse.jst.j2ee.datamodel.properties.IEARComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class EARComponentSaveStrategyImpl extends ComponentSaveStrategyImpl {
-
-// protected Map createdComponentsMap;
-
- public EARComponentSaveStrategyImpl(IVirtualComponent component) {
- super(component);
- }
-
- public void setDataModel(IDataModel dataModel) {
- super.setDataModel(dataModel);
-
- setArchive((Archive) dataModel.getProperty(IEARComponentImportDataModelProperties.FILE));
- overwriteHandler = (IOverwriteHandler) dataModel.getProperty(IEARComponentImportDataModelProperties.OVERWRITE_HANDLER);
- if (null != overwriteHandler) {
- overwriteHandler.setEarSaveStrategy(this);
- }
-// buildProjectsMap();
- }
-
-
-
-// /**
-// * Creates a Map mapping archive uris to projects for all archives in the ear that imported as
-// * projects.
-// */
-// private void buildProjectsMap() {
-// createdComponentsMap = new HashMap();
-// List createdProjectsList = (List) dataModel.getProperty(IEARComponentImportDataModelProperties.ALL_PROJECT_MODELS_LIST);
-// IDataModel importDM = null;
-// Archive anArchive = null;
-// for (int i = 0; i < createdProjectsList.size(); i++) {
-// importDM = (IDataModel) createdProjectsList.get(i);
-// anArchive = (Archive) importDM.getProperty(IJ2EEComponentImportDataModelProperties.FILE);
-// createdComponentsMap.put(anArchive.getURI(), importDM.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT));
-// }
-// }
-
-// protected void addFileToClasspath(IProject p, IFile file, List cp) {
-// if (!file.exists())
-// return;
-//
-// // Assume the file also contains the source
-// IPath path = file.getFullPath();
-// IClasspathEntry entry = JavaCore.newLibraryEntry(path, path, null, true);
-// if (!cp.contains(entry))
-// cp.add(entry);
-// }
-
-// protected void addProjectToClasspath(IProject dependent, IProject prereq, List cp) {
-// IClasspathEntry entry = JavaCore.newProjectEntry(prereq.getFullPath(), true);
-// if (!cp.contains(entry))
-// cp.add(entry);
-// }
-
- protected EARFile getEARFile() {
- return (EARFile) getArchive();
- }
-
-
- protected java.io.OutputStream getOutputStreamForResource(org.eclipse.emf.ecore.resource.Resource aResource) throws java.io.IOException {
- return null;
- }
-
- public void save() throws SaveFailureException {
-
- saveFiles();
- saveManifest();
- saveMofResources();
- progressMonitor.subTask(EARArchiveOpsResourceHandler.Updating_project_classpath_UI_);
- //updateComponentClasspaths();
-
- }
-
- public void save(Archive anArchive) throws SaveFailureException {
- progressMonitor.subTask(anArchive.getURI());
- saveArchiveAsJARInEAR(anArchive);
- }
-
- protected void saveArchiveAsJARInEAR(Archive anArchive) throws SaveFailureException {
- try {
- anArchive.save(createNestedSaveStrategy(anArchive));
- progressMonitor.worked(1);
- } catch (IOException e) {
- throw new SaveFailureException(anArchive.getURI(), e);
- }
- }