Skip to main content

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

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcbridgha2008-10-29 18:48:39 +0000
committercbridgha2008-10-29 18:48:39 +0000
commit061156a80acd41c0f300295ae43e784d9a79458f (patch)
tree293f8ae6508e00c2a4a5433b4688f5d511b8d8fc /plugins/org.eclipse.jst.j2ee.web
parent8885f699e9ab09d943c5594b1c00fc29987ca947 (diff)
downloadwebtools.javaee-200810291849.tar.gz
webtools.javaee-200810291849.tar.xz
webtools.javaee-200810291849.zip
This commit was manufactured by cvs2svn to create tag 'v200810291849'.v200810291849
Diffstat (limited to 'plugins/org.eclipse.jst.j2ee.web')
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/.classpath11
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/.cvsignore7
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/.jetproperties4
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/.project34
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/.settings/org.eclipse.jdt.core.prefs62
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF52
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/about.html34
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/build.properties26
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/component.xml1
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/ServletCreateInitParam.gifbin300 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/WebAppCreateContextParam.gifbin300 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/WebResourceCollectionCreateURLPatternType.gifbin300 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/authority_constraint.gifbin587 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/error_co.gifbin82 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/error_page.gifbin624 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/errorcode_errorpage.gifbin624 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/exception_type_errorpage.gifbin205 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/export_wiz.gifbin3207 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/field.gifbin605 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/filter.gifbin546 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/filter_mapping.gifbin215 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/form_banner.gifbin5600 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/form_login_config.gifbin613 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowDown.gifbin53 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowUp.gifbin53 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_Description.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_DescriptionType.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayName.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayNameType.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_icons_IconType.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_propertyGroups_JSPPropertyGroup.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_tagLibs_TagLibRefType.gifbin171 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/add_column.gifbin193 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/connection.gifbin200 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/convertlinks_wiz.gifbin230 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/default.gifbin359 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportftp_wiz.gifbin108 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportwar_wiz.gifbin581 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importftp_wiz.gifbin106 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importhttp_wiz.gifbin570 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importwar_wiz.gifbin580 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/method.gifbin577 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/methodreturn.gifbin351 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebex_wiz.gifbin609 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebprj_wiz.gifbin607 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/warFile_obj.gifbin1014 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_application.gifbin996 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_ovr.gifbin276 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/linksview16/mailto_view.gifbin335 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPConfig.gifbin129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPPropertyGroup.gifbin129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/TagLibRefType.gifbin129 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/ascii.gifbin577 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/binary.gifbin616 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/environment_entity.gifbin206 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/jarproject_deploy.gifbin622 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/java_properties.gifbin351 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/method_return.gifbin351 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/projlib_obj.gifbin608 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/servlet.gifbin588 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web12_deploy.gifbin628 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web13_deploy.gifbin627 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/webstatic_deploy.gifbin364 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/sample16/folder.gifbin216 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFile.gifbin577 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFolder.gifbin216 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/view16/colourpal_view.gifbin234 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/view16/gallery_view.gifbin625 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/view16/links_view.gifbin218 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/view16/sample.gifbin599 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/view16/thumbnail_view.gifbin609 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftpimport_wiz.gifbin2568 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftppub_wiz.gifbin2535 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/httpimport_wiz.gifbin3160 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwebex_wiz.gifbin3380 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwprj_wiz.gifbin3151 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warexport_wiz.gifbin3574 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warimport_wiz.gifbin3644 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/getstart_a.GIFbin173 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter.gifbin337 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter_context.gifbin337 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/jsp_library_reference.gifbin614 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/jsp_type.gifbin600 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/key.gifbin324 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/key_interf_ov.gifbin81 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/methElement_obj.gifbin374 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/mime_mapping.gifbin578 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz.gifbin347 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz_32.gifbin2881 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/newservlet_wiz.gifbin599 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/newwprj_wiz.gifbin607 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/security_constraint.gifbin251 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/server_ovr.gifbin162 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/servlet.gifbin588 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/servlet_mapping.gifbin582 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/servlet_type.gifbin587 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/showerr_tsk.gifbin339 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/showwarn_tsk.gifbin338 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/url_mapping.gifbin136 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/url_type.gifbin180 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/user_data_constraint.gifbin572 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/user_ovr.gifbin169 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/war.gifbin1014 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/warn_tsk.gifbin597 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/web_resource_collection.gifbin615 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/web_type.gifbin996 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_12.gifbin604 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_13.gifbin603 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_14.gifbin590 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_22.gifbin601 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_23.gifbin600 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webapp_24.gifbin600 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/webgroup_obj.gifbin573 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/welcome_file.gifbin569 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/welcome_list.gifbin609 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/icons/xml_image.gifbin357 -> 0 bytes
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/plugin.properties14
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/plugin.xml450
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/prepareforpii.xml38
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/property_files/warvalidation.properties262
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/property_files/web.properties95
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/property_files/webedit.properties949
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/schema/fileURL.exsd118
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_class.template40
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_constructors.template31
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_flags.template3
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_imports.template9
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_methods.template23
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/_package.template8
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/filter.javajet45
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/filter_classHeader.template62
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/listener.javajet14
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/listener_classHeader.template11
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/servlet.javajet140
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/templates/servlet_classHeader.template48
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarHelper.java26
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarValidator.java287
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/WarHelper.java141
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/ModuleAdapter.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebDeployableArtifactUtil.java353
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebModuleArtifact.java24
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURL.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtension.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtensionReader.java116
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AbstractSupertypesValidator.java87
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddFilterOperation.java345
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddListenerOperation.java121
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddServletOperation.java328
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddWebClassOperation.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java125
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java290
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java40
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterMappingItem.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java31
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterTemplate.java306
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/IFilterMappingItem.java30
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewFilterClassDataModelProperties.java43
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewListenerClassDataModelProperties.java15
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewServletClassDataModelProperties.java109
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewWebClassDataModelProperties.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ListenerTemplate.java217
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java361
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassOperation.java95
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java139
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassOperation.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java552
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassOperation.java105
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java404
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassOperation.java240
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java65
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletTemplate.java330
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/WebMessages.java124
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebModuleExtensionImpl.java196
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java289
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java78
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/validation/UrlPattern.java60
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/AuthConstraintItemProvider.java225
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ContextParamItemProvider.java190
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorCodeErrorPageItemProvider.java125
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorPageItemProvider.java140
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ExceptionTypeErrorPageItemProvider.java123
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterItemProvider.java263
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterMappingItemProvider.java196
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FormLoginConfigItemProvider.java178
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/HTTPMethodTypeItemProvider.java149
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/InitParamItemProvider.java223
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ItemHolder.java83
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPConfigItemProvider.java154
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPPropertyGroupItemProvider.java218
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPTypeItemProvider.java123
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java232
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingItemProvider.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingListItemProvider.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LoginConfigItemProvider.java224
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/MimeMappingItemProvider.java171
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/RoleNameTypeItemProvider.java136
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SecurityConstraintItemProvider.java242
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletItemProvider.java297
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletMappingItemProvider.java177
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletTypeItemProvider.java123
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SessionConfigItemProvider.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefItemProvider.java170
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefTypeItemProvider.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/URLPatternTypeItemProvider.java148
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/UserDataConstraintItemProvider.java189
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppEditResourceHandler.java97
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppItemProvider.java349
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebResourceCollectionItemProvider.java294
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebToolingItemPropertyDescriptor.java142
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebTypeItemProvider.java104
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapter.java118
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java686
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileItemProvider.java145
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileListItemProvider.java161
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WTProjectStrategyUtils.java90
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportDataModelProvider.java86
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportOperation.java73
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportDataModelProvider.java190
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportOperation.java134
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentLoadStrategyImpl.java127
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentSaveStrategyImpl.java106
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebFacetProjectCreationDataModelProvider.java75
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.java112
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.properties12
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainerInitializer.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ClasspathUtilities.java68
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicDataModelProvider.java39
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicOperation.java114
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebProjectWizardInfo.java63
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingConstants.java34
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingCoreConstants.java29
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/MasterCSS.java33
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/RelationData.java994
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ServerTargetUtil.java133
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/TemplateData.java94
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebPropertiesUtil.java585
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingException.java99
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingTemplate.java19
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebArtifactEditUtilities.java42
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebEditAdapterFactory.java51
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/WebArtifactEdit.java688
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/package.xml19
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IConvertStaticWebToDyamnicDataModelProperties.java25
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentExportDataModelProperties.java37
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentImportDataModelProperties.java58
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/package.xml19
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/IWebFacetInstallDataModelProperties.java27
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java168
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java341
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetPostInstallDelegate.java72
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetRuntimeChangedDelegate.java67
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java45
-rw-r--r--plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetVersionChangeDelegate.java108
254 files changed, 0 insertions, 21561 deletions
diff --git a/plugins/org.eclipse.jst.j2ee.web/.classpath b/plugins/org.eclipse.jst.j2ee.web/.classpath
deleted file mode 100644
index ee4f41263..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/.classpath
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="web/"/>
- <classpathentry kind="src" path="war-validation/"/>
- <classpathentry kind="src" path="webedit/"/>
- <classpathentry kind="src" path="webproject/"/>
- <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.web/.cvsignore b/plugins/org.eclipse.jst.j2ee.web/.cvsignore
deleted file mode 100644
index 9b9b366cd..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-bin
-build.xml
-runtime
-temp.folder
-@dot
-src.zip
-javaCompiler...args
diff --git a/plugins/org.eclipse.jst.j2ee.web/.jetproperties b/plugins/org.eclipse.jst.j2ee.web/.jetproperties
deleted file mode 100644
index 6116937f6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/.jetproperties
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<jet-settings>
- <template-container>templates</template-container> <source-container>web</source-container>
-</jet-settings> \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/.project b/plugins/org.eclipse.jst.j2ee.web/.project
deleted file mode 100644
index a7cf375a7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.j2ee.web</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.emf.codegen.JETBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <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.emf.codegen.jet.IJETNature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/org.eclipse.jst.j2ee.web/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.jst.j2ee.web/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 579a81769..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/.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.web/META-INF/MANIFEST.MF b/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF
deleted file mode 100644
index d8f0cd0ce..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,52 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Web Plug-in
-Bundle-SymbolicName: org.eclipse.jst.j2ee.web; singleton:=true
-Bundle-Version: 1.1.202.qualifier
-Bundle-Activator: org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.j2ee.internal.web.archive.operations;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.classpath;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.deployables;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.jfaces.extension;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.operations;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.plugin;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.providers;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.util;x-internal:=true,
- org.eclipse.jst.j2ee.internal.web.validation;x-internal:=true,
- org.eclipse.jst.j2ee.web,
- org.eclipse.jst.j2ee.web.componentcore.util,
- org.eclipse.jst.j2ee.web.datamodel.properties,
- org.eclipse.jst.j2ee.web.project.facet,
- org.eclipse.jst.j2ee.web.validation
-Require-Bundle: org.eclipse.jst.j2ee;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.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.frameworks;bundle-version="[1.1.0,1.2.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.jst.j2ee.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.0,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.emf.edit;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.jem.workbench;bundle-version="[2.0.0,3.0.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.jdt.core;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.emf.codegen;bundle-version="[2.2.0,3.0.0)",
- org.eclipse.wst.web;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.jst.common.annotations.controller;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)",
- org.eclipse.jem.util;bundle-version="[2.0.0,3.0.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)",
- 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.jst.jee;bundle-version="[1.0.100,1.1.0)",
- org.eclipse.core.commands;bundle-version="[3.4.0,4.0.0)"
-Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/org.eclipse.jst.j2ee.web/about.html b/plugins/org.eclipse.jst.j2ee.web/about.html
deleted file mode 100644
index 2199df3f0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/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.web/build.properties b/plugins/org.eclipse.jst.j2ee.web/build.properties
deleted file mode 100644
index a6a23c610..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/build.properties
+++ /dev/null
@@ -1,26 +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,\
- templates/,\
- .,\
- META-INF/,\
- about.html,\
- schema/
-jars.compile.order = .
-source.. = web/,\
- war-validation/,\
- webedit/,\
- webproject/,\
- property_files/
-output.. = bin/
-src.includes = component.xml
diff --git a/plugins/org.eclipse.jst.j2ee.web/component.xml b/plugins/org.eclipse.jst.j2ee.web/component.xml
deleted file mode 100644
index e08c4bd6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/component.xml
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.jst.j2ee.web"><component-depends unrestricted="true"></component-depends><plugin id="org.eclipse.jst.j2ee.web" fragment="false"/><plugin id="org.eclipse.jst.servlet.ui" fragment="false"/></component> \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/ServletCreateInitParam.gif b/plugins/org.eclipse.jst.j2ee.web/icons/ServletCreateInitParam.gif
deleted file mode 100644
index e12289b3c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/ServletCreateInitParam.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/WebAppCreateContextParam.gif b/plugins/org.eclipse.jst.j2ee.web/icons/WebAppCreateContextParam.gif
deleted file mode 100644
index 8450a6f0e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/WebAppCreateContextParam.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/WebResourceCollectionCreateURLPatternType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/WebResourceCollectionCreateURLPatternType.gif
deleted file mode 100644
index 9f75eb094..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/WebResourceCollectionCreateURLPatternType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/authority_constraint.gif b/plugins/org.eclipse.jst.j2ee.web/icons/authority_constraint.gif
deleted file mode 100644
index 5b64c4d75..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/authority_constraint.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/error_co.gif b/plugins/org.eclipse.jst.j2ee.web/icons/error_co.gif
deleted file mode 100644
index 119dcccd5..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/error_co.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/error_page.gif b/plugins/org.eclipse.jst.j2ee.web/icons/error_page.gif
deleted file mode 100644
index 811b21bbb..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/error_page.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/errorcode_errorpage.gif b/plugins/org.eclipse.jst.j2ee.web/icons/errorcode_errorpage.gif
deleted file mode 100644
index 811b21bbb..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/errorcode_errorpage.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/exception_type_errorpage.gif b/plugins/org.eclipse.jst.j2ee.web/icons/exception_type_errorpage.gif
deleted file mode 100644
index 184556359..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/exception_type_errorpage.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/export_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/export_wiz.gif
deleted file mode 100644
index 3c8a0ba87..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/export_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/field.gif b/plugins/org.eclipse.jst.j2ee.web/icons/field.gif
deleted file mode 100644
index 06d38f5c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/field.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/filter.gif b/plugins/org.eclipse.jst.j2ee.web/icons/filter.gif
deleted file mode 100644
index 0712d1ed9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/filter.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/filter_mapping.gif b/plugins/org.eclipse.jst.j2ee.web/icons/filter_mapping.gif
deleted file mode 100644
index 8f2e36ba6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/filter_mapping.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/form_banner.gif b/plugins/org.eclipse.jst.j2ee.web/icons/form_banner.gif
deleted file mode 100644
index aebc0b2a3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/form_banner.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/form_login_config.gif b/plugins/org.eclipse.jst.j2ee.web/icons/form_login_config.gif
deleted file mode 100644
index e3fcbb1e6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/form_login_config.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowDown.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowDown.gif
deleted file mode 100644
index 5f2f2d958..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowDown.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowUp.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowUp.gif
deleted file mode 100644
index 7a479e8eb..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/ArrowUp.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_Description.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_Description.gif
deleted file mode 100644
index 225e8136c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_Description.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_DescriptionType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_DescriptionType.gif
deleted file mode 100644
index 45ca1829c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_descriptions_DescriptionType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayName.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayName.gif
deleted file mode 100644
index 346fc4980..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayName.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayNameType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayNameType.gif
deleted file mode 100644
index 1df6f5fc3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_displayNames_DisplayNameType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_icons_IconType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_icons_IconType.gif
deleted file mode 100644
index 518124160..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateDescriptionGroup_icons_IconType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_propertyGroups_JSPPropertyGroup.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_propertyGroups_JSPPropertyGroup.gif
deleted file mode 100644
index 5397c660f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_propertyGroups_JSPPropertyGroup.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_tagLibs_TagLibRefType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_tagLibs_TagLibRefType.gif
deleted file mode 100644
index 34229a790..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/CreateJSPConfig_tagLibs_TagLibRefType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/add_column.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/add_column.gif
deleted file mode 100644
index 256e5a0a3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/add_column.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/connection.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/connection.gif
deleted file mode 100644
index e8efe69dc..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/connection.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/convertlinks_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/convertlinks_wiz.gif
deleted file mode 100644
index 3d75cb53a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/convertlinks_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/default.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/default.gif
deleted file mode 100644
index 52bac3646..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/default.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportftp_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportftp_wiz.gif
deleted file mode 100644
index fc66e9ea7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportftp_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportwar_wiz.gif
deleted file mode 100644
index ced859dd4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/exportwar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importftp_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importftp_wiz.gif
deleted file mode 100644
index 400e049ed..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importftp_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importhttp_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importhttp_wiz.gif
deleted file mode 100644
index 41768717c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importhttp_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importwar_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importwar_wiz.gif
deleted file mode 100644
index 432c06679..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/importwar_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/method.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/method.gif
deleted file mode 100644
index e33651358..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/method.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/methodreturn.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/methodreturn.gif
deleted file mode 100644
index d528595b4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/methodreturn.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebex_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebex_wiz.gif
deleted file mode 100644
index 43e86dbfd..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebex_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebprj_wiz.gif
deleted file mode 100644
index 8956b3d1c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/newwebprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/warFile_obj.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/warFile_obj.gif
deleted file mode 100644
index 31ecb7aee..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/warFile_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_application.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_application.gif
deleted file mode 100644
index 09f609d6c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_application.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_ovr.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_ovr.gif
deleted file mode 100644
index e0dd2d85c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/ctool16/web_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/linksview16/mailto_view.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/linksview16/mailto_view.gif
deleted file mode 100644
index 23f12fa33..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/linksview16/mailto_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPConfig.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPConfig.gif
deleted file mode 100644
index 30f0c48da..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPConfig.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPPropertyGroup.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPPropertyGroup.gif
deleted file mode 100644
index 591559182..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/JSPPropertyGroup.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/TagLibRefType.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/TagLibRefType.gif
deleted file mode 100644
index 53500daf9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/TagLibRefType.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/ascii.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/ascii.gif
deleted file mode 100644
index ef3028807..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/ascii.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/binary.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/binary.gif
deleted file mode 100644
index 17633ae45..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/binary.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/environment_entity.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/environment_entity.gif
deleted file mode 100644
index bf043f959..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/environment_entity.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/jarproject_deploy.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/jarproject_deploy.gif
deleted file mode 100644
index 4c54bf16c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/jarproject_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/java_properties.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/java_properties.gif
deleted file mode 100644
index 49873f49e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/java_properties.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/method_return.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/method_return.gif
deleted file mode 100644
index d528595b4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/method_return.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/projlib_obj.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/projlib_obj.gif
deleted file mode 100644
index 6912defa4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/projlib_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/servlet.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/servlet.gif
deleted file mode 100644
index fc1bece72..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/servlet.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web12_deploy.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web12_deploy.gif
deleted file mode 100644
index f5077423b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web12_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web13_deploy.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web13_deploy.gif
deleted file mode 100644
index e3539d455..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/web13_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/webstatic_deploy.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/webstatic_deploy.gif
deleted file mode 100644
index 80531e39b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/obj16/webstatic_deploy.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/sample16/folder.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/sample16/folder.gif
deleted file mode 100644
index c91b26723..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/sample16/folder.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFile.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFile.gif
deleted file mode 100644
index ef3028807..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFile.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFolder.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFolder.gif
deleted file mode 100644
index c91b26723..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/thumbnail16/defaultFolder.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/colourpal_view.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/colourpal_view.gif
deleted file mode 100644
index 3764249fa..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/colourpal_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/gallery_view.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/gallery_view.gif
deleted file mode 100644
index 9f779e421..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/gallery_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/links_view.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/links_view.gif
deleted file mode 100644
index 5fd9c9494..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/links_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/sample.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/sample.gif
deleted file mode 100644
index bda81f7da..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/sample.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/thumbnail_view.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/thumbnail_view.gif
deleted file mode 100644
index ababbcafe..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/view16/thumbnail_view.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftpimport_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftpimport_wiz.gif
deleted file mode 100644
index 56c8c3bb9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftpimport_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftppub_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftppub_wiz.gif
deleted file mode 100644
index efb2bd4ec..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/ftppub_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/httpimport_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/httpimport_wiz.gif
deleted file mode 100644
index 71c8182d7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/httpimport_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwebex_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwebex_wiz.gif
deleted file mode 100644
index ff7c242bf..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwebex_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwprj_wiz.gif
deleted file mode 100644
index 72944e924..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/newwprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warexport_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warexport_wiz.gif
deleted file mode 100644
index d25124251..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warexport_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warimport_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warimport_wiz.gif
deleted file mode 100644
index 0bbebe947..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/full/wizban/warimport_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/getstart_a.GIF b/plugins/org.eclipse.jst.j2ee.web/icons/getstart_a.GIF
deleted file mode 100644
index 6331e65e8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/getstart_a.GIF
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter.gif b/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter.gif
deleted file mode 100644
index 162a57805..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter_context.gif b/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter_context.gif
deleted file mode 100644
index 162a57805..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/initializ_parameter_context.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/jsp_library_reference.gif b/plugins/org.eclipse.jst.j2ee.web/icons/jsp_library_reference.gif
deleted file mode 100644
index 997b50c69..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/jsp_library_reference.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/jsp_type.gif b/plugins/org.eclipse.jst.j2ee.web/icons/jsp_type.gif
deleted file mode 100644
index 8a6367542..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/jsp_type.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/key.gif b/plugins/org.eclipse.jst.j2ee.web/icons/key.gif
deleted file mode 100644
index 03af38b6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/key.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/key_interf_ov.gif b/plugins/org.eclipse.jst.j2ee.web/icons/key_interf_ov.gif
deleted file mode 100644
index 307044047..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/key_interf_ov.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/methElement_obj.gif b/plugins/org.eclipse.jst.j2ee.web/icons/methElement_obj.gif
deleted file mode 100644
index c3e27cdec..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/methElement_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/mime_mapping.gif b/plugins/org.eclipse.jst.j2ee.web/icons/mime_mapping.gif
deleted file mode 100644
index b64775883..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/mime_mapping.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz.gif
deleted file mode 100644
index 6d137cd38..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz_32.gif b/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz_32.gif
deleted file mode 100644
index 8435ec70d..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/newjprj_wiz_32.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/newservlet_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/newservlet_wiz.gif
deleted file mode 100644
index f45eadca8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/newservlet_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/newwprj_wiz.gif b/plugins/org.eclipse.jst.j2ee.web/icons/newwprj_wiz.gif
deleted file mode 100644
index 8956b3d1c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/newwprj_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/security_constraint.gif b/plugins/org.eclipse.jst.j2ee.web/icons/security_constraint.gif
deleted file mode 100644
index d155408e8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/security_constraint.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/server_ovr.gif b/plugins/org.eclipse.jst.j2ee.web/icons/server_ovr.gif
deleted file mode 100644
index b5e8b3f9b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/server_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/servlet.gif b/plugins/org.eclipse.jst.j2ee.web/icons/servlet.gif
deleted file mode 100644
index fc1bece72..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/servlet.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/servlet_mapping.gif b/plugins/org.eclipse.jst.j2ee.web/icons/servlet_mapping.gif
deleted file mode 100644
index c495ac8c4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/servlet_mapping.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/servlet_type.gif b/plugins/org.eclipse.jst.j2ee.web/icons/servlet_type.gif
deleted file mode 100644
index c4a9d210b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/servlet_type.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/showerr_tsk.gif b/plugins/org.eclipse.jst.j2ee.web/icons/showerr_tsk.gif
deleted file mode 100644
index 0bc60689c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/showerr_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/showwarn_tsk.gif b/plugins/org.eclipse.jst.j2ee.web/icons/showwarn_tsk.gif
deleted file mode 100644
index 14009e997..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/showwarn_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/url_mapping.gif b/plugins/org.eclipse.jst.j2ee.web/icons/url_mapping.gif
deleted file mode 100644
index 5b5f008f2..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/url_mapping.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/url_type.gif b/plugins/org.eclipse.jst.j2ee.web/icons/url_type.gif
deleted file mode 100644
index b26c71d2e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/url_type.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/user_data_constraint.gif b/plugins/org.eclipse.jst.j2ee.web/icons/user_data_constraint.gif
deleted file mode 100644
index 25dc9c892..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/user_data_constraint.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/user_ovr.gif b/plugins/org.eclipse.jst.j2ee.web/icons/user_ovr.gif
deleted file mode 100644
index b8797f34f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/user_ovr.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/war.gif b/plugins/org.eclipse.jst.j2ee.web/icons/war.gif
deleted file mode 100644
index 31ecb7aee..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/war.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/warn_tsk.gif b/plugins/org.eclipse.jst.j2ee.web/icons/warn_tsk.gif
deleted file mode 100644
index e2b751dff..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/warn_tsk.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/web_resource_collection.gif b/plugins/org.eclipse.jst.j2ee.web/icons/web_resource_collection.gif
deleted file mode 100644
index acba7cb36..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/web_resource_collection.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/web_type.gif b/plugins/org.eclipse.jst.j2ee.web/icons/web_type.gif
deleted file mode 100644
index 09f609d6c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/web_type.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_12.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_12.gif
deleted file mode 100644
index 7646c44a4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_12.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_13.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_13.gif
deleted file mode 100644
index fec24d632..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_13.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_14.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_14.gif
deleted file mode 100644
index 83f916563..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_14.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_22.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_22.gif
deleted file mode 100644
index 71bf43c76..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_22.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_23.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_23.gif
deleted file mode 100644
index 9fbce0568..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_23.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_24.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webapp_24.gif
deleted file mode 100644
index a9045c131..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webapp_24.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/webgroup_obj.gif b/plugins/org.eclipse.jst.j2ee.web/icons/webgroup_obj.gif
deleted file mode 100644
index 274d361ca..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/webgroup_obj.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/welcome_file.gif b/plugins/org.eclipse.jst.j2ee.web/icons/welcome_file.gif
deleted file mode 100644
index d7dab830d..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/welcome_file.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/welcome_list.gif b/plugins/org.eclipse.jst.j2ee.web/icons/welcome_list.gif
deleted file mode 100644
index f4c713273..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/welcome_list.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/icons/xml_image.gif b/plugins/org.eclipse.jst.j2ee.web/icons/xml_image.gif
deleted file mode 100644
index 1496cba65..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/icons/xml_image.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/org.eclipse.jst.j2ee.web/plugin.properties b/plugins/org.eclipse.jst.j2ee.web/plugin.properties
deleted file mode 100644
index d2f8f1f60..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/plugin.properties
+++ /dev/null
@@ -1,14 +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
-###############################################################################
-war_validator_UI_=War Validator
-WEB_FACET_LABEL=Dynamic Web Module
-WEB_FACET_DESCRIPTION=Adds support for the Java Servlet API, for generation of dynamic Web page content.
-WEB_FACET_TEMPLATE_LABEL=Dynamic Web Project
diff --git a/plugins/org.eclipse.jst.j2ee.web/plugin.xml b/plugins/org.eclipse.jst.j2ee.web/plugin.xml
deleted file mode 100644
index a089547e4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/plugin.xml
+++ /dev/null
@@ -1,450 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
-
-
-<!--============================-->
-<!-- Web JSFaces File URL extension -->
-<!--============================-->
-
- <extension-point id="fileURL" name="FileURL" schema="schema/fileURL.exsd"/>
-
-
-<!--============================-->
-<!-- Web Validator -->
-<!--============================-->
- <extension
- id="WarValidator"
- name="%war_validator_UI_"
- point="org.eclipse.wst.validation.validator">
- <validator>
- <enablement>
- <and>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.web"/>
- <test property="org.eclipse.wst.common.project.facet.core.projectFacet" value="jst.web:2.4]"/>
- </and>
- </enablement>
- <contentTypeBinding
- contentTypeId="org.eclipse.jst.j2ee.webDD">
- </contentTypeBinding>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jar">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter=".websettings">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="org.eclipse.wst.common.component">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter=".classpath">
- </filter>
- <helper
- class="org.eclipse.jst.j2ee.internal.web.validation.UIWarHelper">
- </helper>
- <dependentValidator
- depValValue="true">
- </dependentValidator>
- <run
- class="org.eclipse.jst.j2ee.internal.web.validation.UIWarValidator">
- </run>
- </validator>
- </extension>
-
- <extension
- id="WebModuleExtension"
- name="WebModuleExtension"
- point="org.eclipse.jst.j2ee.EARModuleExtension">
- <earModuleExtension
- extensionClass="org.eclipse.jst.j2ee.internal.web.plugin.WebModuleExtensionImpl">
- </earModuleExtension>
- </extension>
- <extension
- point="org.eclipse.wst.common.emfworkbench.integration.adapterFactory">
- <adapterFactory
- functionGroupID="org.eclipse.jst.j2ee"
- className="org.eclipse.jst.j2ee.internal.web.providers.WebapplicationItemProviderAdapterFactory"
- packageURI="webapplication.xmi"
- id="org.eclipse.jst.j2ee.webapplication.provider.WebapplicationItemProviderAdapterFactory">
- </adapterFactory>
- </extension>
- <extension
- point="org.eclipse.wst.common.emfworkbench.integration.adapterFactory">
- <adapterFactory
- functionGroupID="org.eclipse.jst.j2ee"
- className="org.eclipse.jst.j2ee.internal.web.providers.JspItemProviderAdapterFactory"
- packageURI="jsp.xmi"
- id="org.eclipse.jst.j2ee.internal.jsp.provider.JspItemProviderAdapterFactory">
- </adapterFactory>
- </extension>
-
-<!-- =========================================================== -->
-<!-- Web Tag set definitions for XDoclet -->
-<!-- =========================================================== -->
-
- <extension
- id="WebTagSets"
- point="org.eclipse.jst.common.annotations.controller.AnnotationTagSet">
- <AnnotationTagSet
- name="web">
- </AnnotationTagSet>
- </extension>
-
- <extension
- id="WebAnnotationInfo"
- point="org.eclipse.jst.common.annotations.controller.AnnotationTagInfo">
- <AnnotationTagInfo
- tagSet="web"
- tagName="filter"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- name="description">
- </attrib>
- <attrib
- name="display-name">
- </attrib>
- <attrib
- name="small-icon">
- </attrib>
- <attrib
- name="large-icon">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="filter-init-param"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- name="value">
- </attrib>
- <attrib
- name="description">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="filter-mapping"
- scope="type">
- <attrib
- name="url-pattern">
- </attrib>
- <attrib
- name="servlet-name">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="servlet"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- name="display-name">
- </attrib>
- <attrib
- name="icon">
- </attrib>
- <attrib
- name="description">
- </attrib>
- <attrib
- name="load-on-startup">
- </attrib>
- <attrib
- name="run-as">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="servlet-init-param"
- multiplicity="*"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- name="value">
- </attrib>
- <attrib
- name="description">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="servlet-mapping"
- multiplicity="*"
- scope="type">
- <attrib
- use="required"
- name="url-pattern">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="listener"
- scope="type">
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="security-role-ref"
- scope="type">
- <attrib
- use="required"
- name="role-name">
- </attrib>
- <attrib
- use="required"
- name="role-link">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="resource-env-ref"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- use="required"
- name="type">
- </attrib>
- <attrib
- name="description">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="resource-ref"
- scope="type">
- <attrib
- use="required"
- name="name">
- </attrib>
- <attrib
- use="required"
- name="type">
- </attrib>
- <attrib
- use="required"
- name="auth">
- </attrib>
- <attrib
- name="description">
- </attrib>
- <attrib
- name="scope">
- </attrib>
- <attrib
- name="jndi-name">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="security-role"
- scope="type">
- <attrib
- use="required"
- name="role-name">
- </attrib>
- <attrib
- name="description">
- </attrib>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="env-entry"
- scope="type">
- <attrib name="name" use="required">
- </attrib>
- <attrib name="description"/>
- <attrib name="type" type="enum">
- <enumValues value="java.lang.Boolean"/>
- <enumValues value="java.lang.Byte"/>
- <enumValues value="java.lang.Character"/>
- <enumValues value="java.lang.String"/>
- <enumValues value="java.lang.Short"/>
- <enumValues value="java.lang.Integer"/>
- <enumValues value="java.lang.Long"/>
- <enumValues value="java.lang.Float"/>
- <enumValues value="java.lang.Double"/>
- </attrib>
- <attrib name="value"/>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="ejb-ref"
- scope="type">
- <attrib name="name" use="required"/>
- <attrib name="type" type="enum" use="required">
- <enumValues value="Entity"/>
- <enumValues value="Session"/>
- </attrib>
- <attrib name="home" use="required"/>
- <attrib name="remote" use="required"/>
- <attrib name="link"/>
- <attrib name="description"/>
- </AnnotationTagInfo>
- <AnnotationTagInfo
- tagSet="web"
- tagName="ejb-local-ref"
- scope="type">
- <attrib name="name" use="required"/>
- <attrib name="type" type="enum" use="required">
- <enumValues value="Entity"/>
- <enumValues value="Session"/>
- </attrib>
- <attrib name="home" use="required"/>
- <attrib name="local" use="required"/>
- <attrib name="link"/>
- <attrib name="description"/>
- </AnnotationTagInfo>
- </extension>
-
-
- <extension
- point="org.eclipse.wst.common.emfworkbench.integration.editModel">
- <editModel
- editModelID="jst.web"
- factoryClass="org.eclipse.jst.common.jdt.internal.integration.JavaArtifactEditModelFactory">
- <editModelResource
- autoload="false"
- URI="WEB-INF/web.xml"/>
- </editModel>
- </extension>
-
- <extension
- point="org.eclipse.wst.common.modulecore.artifactedit">
- <artifactedit
- typeID="jst.web"
- class="org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit">
- </artifactedit>
- </extension>
-
- <!--============================-->
- <!-- Builder Provider registrations-->
- <!--============================-->
- <extension
- point="org.eclipse.wst.common.frameworks.DataModelProviderExtension">
- <ProviderDefinesType
- providerType="jst.web.builder"
- providerID="org.eclipse.jst.j2ee.internal.deployables.JavaComponentBuilderDataModelProvider"/>
- <DataModelProvider
- class="org.eclipse.jst.j2ee.internal.web.operations.NewServletClassDataModelProvider"
- id="org.eclipse.jst.j2ee.internal.web.operations.NewServletClassDataModelProvider"/>
- </extension>
- <extension
- point="org.eclipse.wst.common.frameworks.DataModelProviderExtension">
- <DataModelProvider
- class="org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassDataModelProvider"
- id="org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassDataModelProvider">
- </DataModelProvider>
- </extension>
- <extension
- point="org.eclipse.wst.common.frameworks.DataModelProviderExtension">
- <DataModelProvider
- class="org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassDataModelProvider"
- id="org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassDataModelProvider">
- </DataModelProvider>
- </extension>
-
- <extension point="org.eclipse.jdt.core.classpathContainerInitializer">
- <classpathContainerInitializer
- class="org.eclipse.jst.j2ee.internal.web.classpath.WebAppLibrariesContainerInitializer"
- id="org.eclipse.jst.j2ee.internal.web.container"/>
- </extension>
-
- <!-- Project Facets -->
-
- <extension point="org.eclipse.wst.common.project.facet.core.facets">
-
- <project-facet id="jst.web">
- <label>%WEB_FACET_LABEL</label>
- <description>%WEB_FACET_DESCRIPTION</description>
- <default-version version="2.4"/>
- </project-facet>
-
- <project-facet-version facet="jst.web" version="2.2">
- <constraint>
- <and>
- <requires facet="jst.java" version="[1.3"/>
- <conflicts group="modules"/>
- </and>
- </constraint>
- <group-member id="modules"/>
- </project-facet-version>
-
- <project-facet-version facet="jst.web" version="2.3">
- <constraint>
- <and>
- <requires facet="jst.java" version="[1.3"/>
- <conflicts group="modules"/>
- </and>
- </constraint>
- <group-member id="modules"/>
- </project-facet-version>
-
- <project-facet-version facet="jst.web" version="2.4">
- <constraint>
- <and>
- <requires facet="jst.java" version="[1.3"/>
- <conflicts group="modules"/>
- </and>
- </constraint>
- <group-member id="modules"/>
- </project-facet-version>
-
- <project-facet-version facet="jst.web" version="2.5">
- <constraint>
- <and>
- <requires facet="jst.java" version="[5.0"/>
- <conflicts group="modules"/>
- </and>
- </constraint>
- <group-member id="modules"/>
- </project-facet-version>
-
- <action facet="jst.web" version="[2.2-2.5]" type="INSTALL" id="jst.web.install">
- <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDelegate"/>
- <config-factory class="org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider"/>
- </action>
-
- <event-handler facet="jst.web" version="[2.2-2.5]" type="RUNTIME_CHANGED">
- <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetRuntimeChangedDelegate"/>
- </event-handler>
-
- <event-handler type="POST_INSTALL" facet="jst.web" version="[2.2-2.5]">
- <delegate class="org.eclipse.jst.j2ee.web.project.facet.WebFacetPostInstallDelegate"/>
- </event-handler>
-
- <template id="template.jst.web">
- <label>%WEB_FACET_TEMPLATE_LABEL</label>
- <fixed facet="jst.java"/>
- <fixed facet="jst.web"/>
- </template>
-
- </extension>
-
- <extension
- point="org.eclipse.jst.j2ee.J2EEModelProvider">
- <provider>
- <modelProvider factoryClass="org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit"/>
- <facet id="jst.web" versions="2.2,2.3,2.4"/>
- </provider>
- </extension>
-</plugin>
diff --git a/plugins/org.eclipse.jst.j2ee.web/prepareforpii.xml b/plugins/org.eclipse.jst.j2ee.web/prepareforpii.xml
deleted file mode 100644
index 4978da741..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/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.web"/>
- <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.web/property_files/warvalidation.properties b/plugins/org.eclipse.jst.j2ee.web/property_files/warvalidation.properties
deleted file mode 100644
index fe88a7e35..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/property_files/warvalidation.properties
+++ /dev/null
@@ -1,262 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 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
-###############################################################################
-#This properties file hold all the externalised strings for eTools WAR Validation project
-# Validation project
-#
-# Messages should be according to the format at:
-# http://hany.austin.ibm.com/messages/index.html
-#
-# Briefly:
-# MESSAGE_ID=<ComponentPrefix><MessageNumber><TypeCode>: <MessageText>
-#
-# The prefix for this component is:
-# CHKJ (IBM WebSphere Validation)
-#
-# Note the ": " that appears between the type code and the message text.
-#
-# :Begin: WebSphere Quality Validation Information :Begin:
-#COMPONENTPREFIX CHKJ
-#COMPONENTNAMEFOR CHKJ IBM WebSphere Validation
-#CMVCPATHNAME ncf/src/java/com/ibm/websphere/validation/warvalidation.properties
-# :End: WebSphere Quality Validation Information :End:
-#
-
-# 2-July-2001:
-# This file has been tested using the ProcessMsgFile tool, written by
-# Hany Salem and owned by Dennis Hebert. Any future changes should
-# also be verified using this tool. Please contact Dennis
-# (hebert@us.ibm.com or T/L 543-2520) for more information.
-#
-
-# --------------------------------
-ERROR_WAR_VALIDATION_FAILED=CHKJ3000E: WAR Validation Failed: {0}
-#EXPLANATION None.
-#USERACTION None.
-
-
-# --------------------------------
-ERROR_EAR_DUPLICATE_ROLES=CHKJ1002E: Duplicate security role named {0}.
-MESSAGE_WAR_VALIDATION_MISSING_JSP=CHKJ3001E: The JSP file, {0}, for the servlet \"{1}\" is missing.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_SMALL_ICON=CHKJ3002E: The <small-icon> file, {0}, is missing.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_LARGE_ICON=CHKJ3003E: The <large-icon> file, {0}, is missing.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_BROKEN_SERVLET_MAPPING=CHKJ3004W: The servlet mapping \"{0}\" refers to a servlet that is not defined.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_NO_WELCOME_FILE=CHKJ3005E: Empty welcome file list entry.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_MISSING_WELCOME_FILE=CHKJ3006E: Welcome file {0} is missing.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_MISSING_TLD=CHKJ3007E: The Tag Library Descriptor File, {0}, is missing.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-ERROR_INVALID_WAR_FILE=CHKJ3008E: Missing or invalid WAR file.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_BROKEN_FILTER_MAPPING=CHKJ3009E: The filter mapping \"{0}\" refers to a filter that is not defined.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_WELCOME_FILE=CHKJ3010W: Welcome Files cannot begin or end with a /.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-WAR_DD_PARSE_LINECOL=CHKJ1009E: Parsing Error: {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-WAR_DD_PARSE_LINE=CHKJ1010E: Deployment Descriptor Parsing error.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-WAR_DD_PARSE_NOINFO=CHKJ1011E: Deployment Descriptor Parsing error.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-WAR_DD_CANNOT_OPEN_DD=CHKJ1012E: Cannot open the deployment descriptor. Validation cannot complete.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_URL=CHKJ3013E: The URL Mapping \"{0}\" is invalid.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_SEC_ROLE=CHKJ3014E: Invalid Security role-link: {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_HTTP_CMD=CHKJ3015E: Invalid HTTP method: {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_TRANSPORT=CHKJ3016E: Invalid Transport Gurarantee. Valid values are \"NONE\", \"INTEGRAL\", or \"CONFIDENTIAL\".
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_JSPFILE_REF=CHKJ3018E: The jsp-file \"{0}\" referenced by servlet {1} must be a full absolute path.
-
-
-# --------------------------------
-ERROR_EAR_INVALID_CONTEXT_ROOT=CHKJ3017E: Web Project: {0} is mapped to an invalid Context root: {1} in EAR Project: {2}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_ERROR_PAGE=IWAE0001E CHKJ3019E: The Location of the Error Page Must Begin with a /.
-#EXPLANATION None.
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_INVALID_SEC_ROLE_NAME=CHKJ3020E: Invalid Security role-name: {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_INVALID_AUTH_METHOD=CHKJ3021E: Invalid auth method. Valid values are: \"BASIC\", \"DIGEST\", \"FORM\", or \"CLIENT-CERT\".
-#EXPLANATION None.
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_IGNORE_FORM_LOGIN=CHKJ3022E: Authentication method is {0}. The form-login-config values will be ignored unless using FORM authentication method.
-#EXPLANATION None.
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_RES_AUTH_REQUIRED_22=CHKJ3023E: Resource ref {0} must contain res-auth of "SERVLET" or "CONTAINER".
-MESSAGE_WAR_VALIDATION_RES_AUTH_REQUIRED_23=CHKJ3024E: Resource ref {0} must contain res-auth of "Application" or "Container".
-MESSAGE_WAR_VALIDATION_RES_AUTH_INVALID_22=CHKJ3025E: \"Application\" is not a valid value for.res-auth in a 2.2 level deployment descriptor. Use \"SERVLET\" instead.
-MESSAGE_WAR_VALIDATION_RES_AUTH_INVALID_23=CHKJ3026E: \"SERVLET\" is not a valid value for.res-auth in a 2.2 level deployment descriptor. Use \"Application\" instead.
-
-MESSAGE_WAR_VALIDATION_INVALID_EXCEPTION_TYPE=CHKJ3027E: Invalid Exception Type {0}. The exception type must contain a fully qualified class name of a Java exception type.
-#EXPLANATION None.
-#USERACTION None.
-
-
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_DUPLICATE_MAPPING=CHKJ4010W: Duplicate URL mapping {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_DUPLICATE_SERVLET=CHKJ4011W: Duplicate Servlet Entry {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_SESSION_TIMEOUT=CHKJ4012W: Session Timeout is not valid.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_DUPLICATE_ENTRY=CHKJ4013W: Duplicate Entry {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_EMPTY_ENTRY=CHKJ4014W: Empty Entry {0}.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_DUPLICATE_FILTER=CHKJ4015W: Duplicate Filter Entry {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_DUPLICATE_EJB_REF=CHKJ4016W: Duplicate ejb-ref element named {0}.
-#EXPLANATION None.
-#USERACTION None.
-
-# This was missing. It's defined in constants...
-ERROR_EAR_UNCONTAINED_MODULE_FILE_EXCEPTION=CHKJ4017W: ERROR EAR UNCONTAINED MODULE FILE EXCEPTION
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_ERROR_CODE=IWAE0036E CHKJ4018W: Unknown Error Code: {0}. error-code must contain a valid HTTP status code.
-#EXPLANATION None.
-#USERACTION None.
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_RES_SHARING_SCOPE=CHKJ4019W: Invalid res-sharing-scope; valid values are \"Shareable\" or \"Unshareable\".
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_INVALID_ENV_ENTRY=CHKJ4020W: Invalid Environment Entry Type. Valid values are \"java.lang.TYPE\", where TYPE is one of the following: Boolean, Byte, Character, String, Short, Integer, Long, Float, or Double."
-#USERACTION None.
-
-MESSAGE_WAR_VALIDATION_MISSING_WLP_PROJECT=CHKJ4021W: Missing Web Library Project ({0}). Check the properties of this project to fix this problem.
-MESSAGE_WAR_VALIDATION_CONFLICTING_WLP_PROJECT=CHKJ4022W: The Web Library Project JAR ({0}) conflicts with an actual JAR in the WEB-INF/lib directory.
-MSG_SERVER_TARGET_MISMATCH=CHKJ4023W: The target server of the Web Library Project ({1}) does not match that of this Web Project ({0}). Run validation on the Web Project if you think that is not the case.
-MESSAGE_URL_PATTERN_END_WITH_CARRAIGE_RETURN=The URL pattern string "{0}" ends with a invalid carraige return for servlet {1}
-
-# --------------------------------
-MESSAGE_WAR_VALIDATION_INVALID_EJB_REF_TYPE=CHKJ4023W: ejb-ref-type must be 'Entity' or 'Session'.
-#EXPLANATION None.
-#USERACTION None.
-
-ERROR_DUPLICATE_WEB_INF_LIB_OTHER_PROJECT=Web library project archive {0} from project {1} conflicts with another archive also mapped to the WEB-INF/lib folder.
-ERROR_DUPLICATE_WEB_INF_LIB=Web library project archive {0} conflicts with another archive also mapped to the WEB-INF/lib folder.
-ERROR_DUPLICATE_CLASSPATH_COMPONENT_URI=Web library URI {0} for classpath dependency from project {1} maps to a different file system path as another classpath dependency with the same URI.
-
-# --------------------------------
-ERROR_EAR_MISSING_EJB_ROLE=CHKJ2827W: ''security-role-ref'' element {0} defines the ''role-link'' element but no ''security-role'' elements in the application descriptor.
-#EXPLANATION None.
-#USERACTION None.
-
-of_Type_Security_Role_Name_6=of Type Security Role Name
-Web_Archive_Validator_8=Web Archive Validator
-of_Type_Role_Name_19=of Type Role Name
-of_Type_Parameter_Name_25=of Type Parameter Name
-of_Type_Parameter_Value_26=of Type Parameter Value
-of_Type_Parameter_Name_32=of Type Parameter Name
-of_Type_Parameter_Value_33=of Type Parameter Value
-of_Type_Parameter_Name_39=of Type Parameter Name
-of_Type_Parameter_Value_40=of Type Parameter Value
-of_Type_ejb_ref_name_44=of Type ejb-ref-name
-of_Type_Error_Location_47=of Type Error Location
-of_Type_Error_Location_49=of Type Error Location
-of_Type_Mime_Extension_54=of Type Mime Extension
-of_Type_Mime_Type_55=of Type Mime Type
-of_Type_Mime_Extension___56=of Type Mime Extension:
-of_Type_Web_Resource_Collection_64=of Type Web Resource Collection
-of_Type_Filter_Name_66=of Type Filter Name
-Invalid_URL_70=Invalid URL
-Invalid_URL_75=Invalid URL
-of_Type_Servlet_Name_77=of Type Servlet Name
-of_Type_Taglib_80=of Type Taglib
-of_Type_TagLib___81=of Type TagLib:
-of_Type_Web_Resource_Name_84=of Type Web Resource Name
-of_Type_Welcome_File_Name__87=of Type Welcome File Name
-of_Type_Env_Entry_Name___88=of Type Environment Entry Name
diff --git a/plugins/org.eclipse.jst.j2ee.web/property_files/web.properties b/plugins/org.eclipse.jst.j2ee.web/property_files/web.properties
deleted file mode 100644
index 23e250a10..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/property_files/web.properties
+++ /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
-###############################################################################
-ERR_JAR_NAME_EMPTY=The JAR name cannot be empty.
-ERR_JAR_NAME_EXIST=The JAR name already exists.
-ERR_JAVA_PROJECT_NAME_EMPTY=The Java project name cannot be empty.
-ERR_JAVA_PROJECT_NAME_EXIST=The Java project name already exists.
-ERR_SERVLET_MAPPING_URL_PATTERN_EMPTY=The servlet mapping url pattern cannot be empty.
-
-KEY_3=The filter mapping url pattern cannot be empty.
-KEY_4=The filter mapping url pattern "{0}" already exists.
-KEY_5=The filter mapping servlet cannot be empty.
-KEY_6=The filter init param name cannot be empty.
-ERR_FILTER_PARAMETER_NAME_EXIST=The filter initialization parameter name already exists.
-ERR_FILTER_MAPPING_SERVLET_EXIST=The filter mapping servlet "{0}" already exists.
-ERR_FILTER_MAPPING_SERVLET_DISPATCHER_TYPES_EMPTY=The dispatcher types cannot be empty.
-ERR_DISPLAY_NAME_EMPTY=The name cannot be empty.
-ERR_SERVLET_NAME_EXIST=The servlet name already exists.
-ERR_SERVLET_DISPLAY_NAME_EXIST=The servlet display name already exists.
-ERR_SERVLET_CLASS_NAME_USED=The class is already associated with other servlet.
-ERR_SERVLET_JAVA_CLASS_NAME_INVALID=Cannot use Servlet as the servlet class name.
-ERR_SERVLET_MAPPING_URL_PATTERN_EXIST=The servlet URL mapping pattern already exists.
-ERR_SERVLET_MAPPING_SERVLET_NOT_EXIST=The servlet does not exist.
-ERR_SERVLET_PARAMETER_NAME_EMPTY=The servlet initialization parameter name cannot be empty.
-ERR_SERVLET_PARAMETER_NAME_EXIST=The servlet initialization parameter name already exists.
-ERR_SERVLET_PARAMETER_VALUE_EMPTY=The servlet initialization parameter value cannot be empty.
-ERR_SERVLET_PARAMETER_VALUE_EXIST=The servlet initialization parameter value already exists.
-
-ERR_FILTER_DISPLAY_NAME_EXIST=The filter name already exists.
-ERR_FILTER_NAME_EXIST=The filter name already exists.
-ERR_FILTER_CLASS_NAME_USED=The class is already associated with other filter.
-ERR_FILTER_CLASS_NAME_INVALID=Cannot use Filter as the filter class name.
-
-ERR_LISTENER_DISPLAY_NAME_EXIST=The listener name already exists.
-ERR_LISTENER_CLASS_NAME_USED=The class is already associated with other listener.
-ERR_LISTENER_CLASS_NAME_INVALID=Cannot use Listener as the listener class name.
-
-ERR_DUPLICATED_INIT_PARAMETER=Duplicated initialization parameters.
-ERR_DUPLICATED_URL_MAPPING=Duplicated URL mappings.
-
-ERR_URL_MAPPING_LIST_EMPTY=The URL Mappings list cannot be empty.
-ERR_URL_PATTERN_INVALID="{0}" is unresolvable URL pattern. URL patterns should start with "/" or "*.".
-ERR_FILTER_MAPPING_EMPTY=The Filter Mappings list cannot be empty.
-
-ERR_SERVLET_ROLE_REF_NAME_EMPTY=The servlet security role reference name cannot be empty.
-ERR_SERVLET_ROLE_REF_NAME_EXIST=The servlet security role reference name already exists.
-ERR_SERVLET_ROLE_LINK_EMPTY=The servlet security role reference link cannot be empty.
-ERR_SERVLET_INTERFACE=The Servlet class or its superclass must implement the javax.servlet.Servlet interface.
-
-ERR_PAGE_ENCODING_EMPTY=The page encoding cannot be empty.
-ERR_PAGE_ENCODING_EXIST=The page encoding already exists.
-ERR_URL_PATTERN_EXIST=The URL pattern exists.
-ERR_INCLUDE_PRELUDES_EXIST=The include preludes exists.
-ERR_INCLUDE_CODAS_EXIST=The include Codas exists.
-ERR_SECURITY_CONSTRAINT_NAME_EMPTY=The security constraint name cannot be empty.
-ERR_SECURITY_CONSTRAINT_NAME_EXIST=The security constraint name already exists.
-ERR_CONTEXT_PARAMETER_NAME_EMPTY=The context parameter name cannot be empty.
-ERR_CONTEXT_PARAMETER_NAME_EXIST=The context parameter name already exists.
-ERR_RESOURCE_NAME_EMPTY=The web resource name cannot be empty.
-ERR_RESOURCE_NAME_EXIST=The web resource name already exists.
-ERR_URL_PATTERNS_EMPTY=The URL patterns cannot be empty.
-ERR_MIME_MAPPING_EXTENSION_EMPTY=The Mime mapping extension cannot be empty.
-ERR_MIME_MAPPING_EXTENSION_EXIST=The Mime mapping extension already exists.
-ERR_WELCOME_PAGE_EMPTY=The Welcome file name cannot be empty.
-ERR_WELCOME_PAGE_EXIST=The Welcome file name already exists in Welcome File List.
-ERR_ENV_ENTRY_NAME_EMPTY=The environment entry name cannot be empty.
-ERR_ENV_ENTRY_NAME_EXIST=The environment entry name already exists.
-ERR_ERROR_CODE_EMPTY=The error code cannot be empty.
-ERR_ERROR_CODE_MUST_BE_3_DIGITS=The error code must be three digits.
-ERR_ERROR_PAGE_LOCATION_EMPTY=The error page location cannot be empty.
-ERR_ERROR_PAGE_LOCATION_EXIST=The error page location already exists.
-ERR_ERROR_PAGE_LOCATION_MUST_START_WITH_SLASH=The error page location must start with /.
-ERR_EXCEPTION_TYPE_EMPTY=The exception type cannot be empty.
-ERR_EXCEPTION_SECURITY_ID_NO_BEANS=The bean selection can not be empty.
-ERR_EXCEPTION_ROLE_NAME_EMPTY=The role name can not be empty.
-ERR_LOCALE_NAME_EMPTY=The locale cannot be empty.
-ERR_LOCALE_NAME_EXIST=The locale already exists.
-ERR_TAGLIBREF_URL_EMPTY=The tag lib ref URL cannot be empty.
-ERR_TAGLIBREF_URL_EXIST=The tag lib ref URL already exists.
-ERR_MESSAGE_DESTINATION_NAME_EMPTY=The message destination name cannot be empty.
-ERR_MESSAGE_DESTINATION_NAME_EXIST=The message destination name already exists.
-ERR_EXCEPTION_ROLE_NAME_EMPTY=The security role names cannot be empty.
-ERR_EXCEPTION_METHOD_ELEMENT_EMPTY=The method elements cannot be empty.
-ERR_EXCEPTION_METHOD_TRANSACTION_ATTRIBUTES_EMPTY=The method transaction attributes can not be empty.
-ERR_SERVLET_LIST_EMPTY=The list of servlets to be removed cannot be empty.
-ERR_FILTER_LIST_EMPTY=The list of filters to be removed cannot be empty.
-ERR_LISTENER_LIST_EMPTY=The list of listeners to be removed cannot be empty.
-ERR_NO_LISTENER_SELECTED=At least one of the application lifecycle listeners must be selected.
diff --git a/plugins/org.eclipse.jst.j2ee.web/property_files/webedit.properties b/plugins/org.eclipse.jst.j2ee.web/property_files/webedit.properties
deleted file mode 100644
index 5476f2046..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/property_files/webedit.properties
+++ /dev/null
@@ -1,949 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-Add_Filter_Mapping_Title_UI_=Add Filter Mapping
-Edit_Filter_Mapping_Title_UI_=Edit Filter Mapping
-FILTER_MAPPING=Filter Mapping
-DISPATCHER_R=R
-DISPATCHER_F=F
-DISPATCHER_I=I
-DISPATCHER_E=E
-LISTENER=Listener
-Select_Dispatchers_UI_=Select Dispatchers
-Container_Selection_UI_=Folder Selection
-Choose_a_Container__UI_=Choose a Folder:
-Container__UI_=Folder:
-Browse..._UI_=Browse...
-Superclass_selection_UI_=Superclass selection
-Choose_a_superclass_UI_=Choose a superclass
-Add..._UI_=Add...
-Remove_UI_=Remove
-No_packages_to_choose_from_UI_=No packages to choose from.
-Error_EXC_=IWAE0015E Error
-Specify_a_name_and_package_UI_=Create a new Servlet class.
-Which_method_stubs_would_y_UI_=Which method stubs would you like to create?
-__Add_to_web.xml?_UI_=Add to web.xml?
-__Add...___UI_=Add
-__Delete___UI_=Delete
-Cancel_UI_=Cancel
-New_UI_=New
-None_UI_=None
-Create_the_Servlet_Class_UI_=Create the Servlet Class
-Define_the_Servlet_in_the__UI_=Define the Servlet in the Deployment Descriptor (web.xml) File
-Identify_any_information_t_UI_=Identify any information that should be inserted into the Deployment Descriptor (web.xml) file for the servlet.
-Create_Two_Children_UI_=Create Two Children
-Create_Child_UI_=Create Child
-Description_UI_=Description
-2concat_UI_=Create a new child for the selected {0}.
-4concat_UI_=Create a child of type {0} for the selected {1}.
-6concat_UI_=Create {0}
-7concat_UI_=Create two new children for the selected {0}.
-8concat_UI_=Create two new children of type {0} for the selected {1}.
-9concat_UI_=Create Two {0}s
-11concat_UI_=AuthConstraint {0}
-12concat_UI_=ContextParam {0}
-13concat_UI_=ErrorPage {0}
-14concat_UI_=Error Code: {0}
-15concat_UI_=Exception: {0}
-52concat_UI_=FormLoginConfig {0}
-16concat_UI_=FormLoginConfig {0}
-17concat_UI_=HTTPMethodType {0}
-18concat_UI_={0} = {1}
-21concat_UI_=LoginConfig {0}
-22concat_UI_=MimeMapping {0}
-23concat_UI_=RoleNameType {0}
-24concat=Create a child of type WebResourceCollection for the selected {0}.
-26concat_UI_=Create a child of type InitParam for the selected {0}.
-28concat_UI_={0} -> {1}
-31concat_UI_=SessionConfig {0}
-32concat_UI_=TagLibRef {0}
-33concat_UI_=URLPatternType {0}
-34concat_UI_=UserDataConstraint {0}
-35concat_UI_=Create a child of type ContextParam for the selected {0}.
-37concat_UI_=Create a child of type URLPatternType for the selected {0}.
-38concat_UI_=WebResourceCollection {0}
-40concat_UI_=JSPType {0}
-41concat_UI_=ServletType {0}
-42concat_UI_=Create a child of type WelcomeFile for the selected {0}.
-45concat_ERROR_=IWAE0016E Error writing to web.xml:{0}
-50concat_UI_={0} Change
-New_param_UI_=New param
-value_UI_=value
-New_init_param_UI_=New init param
-(New_Security_Role)_UI_=(New Security Role)
-New_security_role_UI_=New security role
-(New_Servlet)_UI_=(New Servlet)
-packagename.classname_UI_=packagename.classname
-New_servlet_UI_=New servlet
-/url/*_UI_=/url/*
-New_servlet_mapping_UI_=New servlet mapping
-(New_filename)_UI_=(New filename)
-New_welcome_file_UI_=New welcome file
-New_welcome_file_list_UI_=New welcome file list
-Problems_Opening_Editor_ERROR_=IWAE0017E Problems Opening Editor
-Large_Icon_Chooser_Dialog_UI_=Large Icon Chooser Dialog
-Small_Icon_Chooser_Dialog_UI_=Small Icon Chooser Dialog
-Browse..._UI__UI_=Browse...
-Value__UI_=Value:
-Description_UI__UI_=Description
-Error_EXC__ERROR_=IWAE0018E Error
-root_undef_ERROR_=IWAE0019E root undef
-Package__UI_=Package:
-(default)_UI_=(default)
-Servlet_Name__UI_=Servlet Name:
-Superclass__UI_=Superclass:
-Interfaces__UI_=Interfaces:
-Modifiers__UI_=Modifiers:
-Use_Single_Thread_Model_UI_=Use Single Thread Model
-Options__UI_=Options:
-Package_Selection_UI_=Package Selection
-Choose_a_package__UI_=Choose a package:
-Superinterfaces_Selection_UI_=Superinterfaces Selection
-Choose_interfaces_UI_=Choose interfaces
-Create_the_Servlet_Class_UI__UI_=Create the Servlet Class
-Inherited_abstract_methods_UI_=Inherited abstract methods
-Constructors_from_supercla_UI_=Constructors from superclass
-Mappings__UI_=Mappings:
-URL_UI_=URL
-URL__UI_=URL:
-Add_Mapping_UI_=Add Mapping
-Display_Name__UI_=Display name:
-Init_Parameters__UI_=Init Parameters:
-Initialization_parameter_UI_=Initialization parameter
-Value_UI_=Value
-Parameter_Name__UI_=Parameter Name:
-Parameter_Value__UI_=Parameter Value:
-Add_Initialization_Paramet_UI_=Add Initialization Parameter
-OK_UI_=OK
-(default_package)_UI_=(default package)
-Authorized_Roles_UI_=Authorized roles
-Edit..._UI_=Edit...
-(New_web_resource_collecti_UI_=(New web resource collection)
-New_web_resource_collectio_UI_=New web resource collection
-Delete_web_resource_collec_UI_=Delete web resource collection
-Web_Resource_Collection_UI_=Web resource collection
-Web_Resource_Collections_UI_=Web Resource Collections
-New_UI__UI_=Add
-Delete_UI_=Remove
-User_Data_Constraint_UI_=User data constraint
-New_security_constraint_UI_=New security constraint
-Transport_guarentee_change_UI_=Transport guarentee change
-Delete_security_constraint_UI_=Delete security constraint
-Security_constraints_UI_=Security constraints
-Name_UI_=Name
-(New_Web_Resource_Collecti_UI_=(New Web Resource Collection)
-Choose_a_JSP_UI_=Choose a JSP
-Select_a_JSP_file_UI_=Select a JSP file
-Choose_a_servlet_UI_=Choose a servlet
-Select_a_servlet_class_UI_=Select a servlet class
-(New_URL)_UI_=(New URL)
-Icon_change_UI_=Icon change
-Authorized_Roles__UI_=Authorized roles:
-Delete_servlet_mappings_UI_=Delete servlet mappings
-Type__UI_=Type:
-Servlet_class_UI_=Servlet class
-JSP_file_UI_=JSP file
-Display_name__UI_=Display name:
-Description__UI_=Description:
-Initialization__UI_=Initialization...
-Icons__UI_=Icons...
-Display_name_change_UI_=Display name change
-Description_change_UI_=Description change
-Web_type_change_UI_=Web type change
-URL_Mappings__UI_=URL mappings:
-New..._UI_=New...
-Add_UI_=Add
-Delete_servlets_UI_=Delete servlets
-Servlets_UI_=Servlets
-(New_URI)_UI_=(New URI)
-/WEB-INF/tlds/(taglib.tld)_UI_=/WEB-INF/tlds/(taglib.tld)
-New_taglib_UI_=New taglib
-Delete_taglibs_UI_=Delete taglibs
-URI_UI_=URI
-Location_UI_=Location
-(New_ContextParameter)_UI_=(New ContextParameter)
-New_context_parameter_UI_=New context parameter
-Context_parameters__UI_=Context parameters:
-Context_Parameter_Name_UI_=Context Parameter Name
-(New_Extension)_UI_=(New Extension)
-New_mime_mapping_UI_=New mime mapping
-Delete_mime_mappings_UI_=Delete mime mappings
-Session_time_out__UI_=Session time out:
-Distributable_UI_=Distributable
-Display_Name_UI_=Display Name
-Session_Config_UI_=Session Config
-Session_Timeout_UI_=Session Timeout
-Mime_mappings__UI_=Mime mappings:
-File_Extension_UI_=File Extension
-Mime_Type_UI_=Mime Type
-Delete_context_parameters_UI_=Delete context parameters
-Welcome_file_name_change_UI_=Welcome file name change
-(New_Welcome_File)_UI_=(New Welcome File)
-Choose_an_Error_Page_UI_=Choose an Error Page
-Select_an_Error_Page_UI_=Select an Error Page
-Delete_welcome_files_UI_=Delete welcome files
-Delete_error_pages_UI_=Delete error pages
-Welcome_files_UI_=Welcome files
-Choose_a_Login_Page_UI_=Choose a Login Page
-Select_a_Login_Page_UI_=Select a Login Page
-Error_mapping__UI_=Error mapping:
-Error/Exception_UI_=Error/Exception
-Login_UI_=Login
-Realm_name__UI_=Realm name:
-Authentication_method__UI_=Authentication method:
-Login_page__UI_=Login page:
-Error_page__UI_=Error page:
-New_login_config_UI_=New login config
-New_auth_method_ERROR_=IWAE0020E New auth method
-New_auth_method_UI_=New auth method
-New_realm_name_UI_=New realm name
-New_form_login_config_UI_=New form login config
-New_form_error_page_UI_=New form error page
-(New_Error_Code)_UI_=(New Error Code)
-New_error_page_UI_=New error page
-Role_Name_UI_=Role Name
-Select_all_UI_=Select all
-Deselect_all_UI_=Deselect all
-Authority_constraint_chang_UI_=Authority constraint change
-Select_Auth_Constraints_UI_=Select Auth Constraints
-Load_on_startup_UI_=Load on startup
-Load_order__UI_=Load order:
-New_parameter_UI_=New parameter
-Initialization_Parameter_UI_=Initialization Parameter
-Load_on_startup_change_UI_=Load on startup change
-Delete_parameter_UI_=Delete parameter
-Initialization_Parameters_UI_=Initialization Parameters
-Security_role_changes_UI_=Security role changes
-New_security_role_referenc_UI_=New security role reference
-remove_security_role_refer_UI_=remove security role reference
-Select_Authorized_Roles_UI_=Select Authorized Roles
-Name__UI_=Name:
-Delete_URL_Patterns_UI_=Delete URL Patterns
-URL_Patterns_UI_=URL Patterns
-HTTP_Methods_UI_=HTTP Methods
-(New_URL_pattern)_UI_=(New URL pattern)
-New_URL_pattern_UI_=New URL pattern
-Web_resource_collection_na_UI_=Web resource collection name change
-Web_resource_collection_de_UI_=Web resource collection description change
-Add_http_method_type_UI_=Add http method type
-Remove_http_method_type_UI_=Remove http method type
-EJB_references_UI_=EJB references
-Resource_factory_reference_UI_=Resource references
-JSP_tag_libraries_UI_=JSP tag libraries
-References_UI_=References
-Environment_UI_=Environment
-Source_UI_=Source
-Error_creating_nested_text_ERROR_=IWAE0021E Error creating nested text editor
-Pages_UI_=Pages
-Security_UI_=Security
-General_UI_=General
-The_description_property_UI_=The description property
-Roles_UI_=Roles
-The_roles_property_UI_=The roles property
-SecConstraint_UI_=SecConstraint
-The_secConstraint_property_UI_=The secConstraint property
-ParamName_UI_=ParamName
-The_paramName_property_UI_=The paramName property
-ParamValue_UI_=ParamValue
-The_paramValue_property_UI_=The paramValue property
-WebApp_UI_=WebApp
-The_webApp_property_UI_=The webApp property
-The_location_property_UI_=The location property
-ErrorCode_UI_=ErrorCode
-The_errorCode_property_UI_=The errorCode property
-ExceptionType_UI_=ExceptionType
-The_exceptionType_property_UI_=The exceptionType property
-FormLoginPage_UI_=FormLoginPage
-The_formLoginPage_property_UI_=The formLoginPage property
-FormErrorPage_UI_=FormErrorPage
-The_formErrorPage_property_UI_=The formErrorPage property
-LoginConfig_UI_=LoginConfig
-The_loginConfig_property_UI_=The loginConfig property
-HttpMethod_UI_=HttpMethod
-The_httpMethod_property_UI_=The httpMethod property
-ResCollection_UI_=ResCollection
-The_resCollection_property_UI_=The resCollection property
-AuthMethod_UI_=AuthMethod
-The_authMethod_property_UI_=The authMethod property
-RealmName_UI_=RealmName
-The_realmName_property_UI_=The realmName property
-FormLoginConfig_UI_=FormLoginConfig
-The_formLoginConfig_proper_UI_=The formLoginConfig property
-Extension_UI_=Extension
-The_extension_property_UI_=The extension property
-MimeType_UI_=MimeType
-The_mimeType_property_UI_=The mimeType property
-RoleName_UI_=RoleName
-The_roleName_property_UI_=The roleName property
-AuthConstraint_UI_=AuthConstraint
-The_authConstraint_propert_UI_=The authConstraint property
-UserDataConstraint_UI_=UserDataConstraint
-The_userDataConstraint_pro_UI_=The userDataConstraint property
-Create_WebResourceCollecti_UI_=Create WebResourceCollection
-SecurityConstraint_UI_=SecurityConstraint
-SmallIcon_UI_=SmallIcon
-Small_Icon_UI_=Small Icon
-LargeIcon_UI_=LargeIcon
-Large_Icon_UI_=Large Icon
-ServletName_UI_=ServletName
-The_servletName_property_UI_=The servletName property
-DisplayName_UI_=DisplayName
-The_displayName_property_UI_=The displayName property
-LoadOnStartup_UI_=LoadOnStartup
-The_loadOnStartup_property_UI_=The loadOnStartup property
-Create_InitParam_UI_=Create InitParam
-<servlet>_UI_=<servlet>
-UrlPattern_UI_=UrlPattern
-The_urlPattern_property_UI_=The urlPattern property
-Servlet_UI_=Servlet
-The_servlet_property_UI_=The servlet property
-URL_pattern_UI_=URL Pattern
-?_UI_=?
-SessionTimeout_UI_=SessionTimeout
-The_sessionTimeout_propert_UI_=The sessionTimeout property
-TaglibURI_UI_=TaglibURI
-The_taglibURI_property_UI_=The taglibURI property
-TaglibLocation_UI_=TaglibLocation
-The_taglibLocation_propert_UI_=The taglibLocation property
-TransportGuarantee_UI_=TransportGuarantee
-The_transportGuarantee_pro_UI_=The transportGuarantee property
-The_distributable_property_UI_=The distributable property
-FileList_UI_=FileList
-The_fileList_property_UI_=The fileList property
-Create_ContextParam_UI_=Create ContextParam
-<web_app>_UI_=<web app>
-WebResourceName_UI_=WebResourceName
-The_webResourceName_proper_UI_=The webResourceName property
-Create_URLPatternType_UI_=Create URLPatternType
-WebType_UI_=WebType
-JspFile_UI_=JspFile
-The_jspFile_property_UI_=The jspFile property
-ClassName_UI_=ClassName
-The_className_property_UI_=The className property
-WelcomeFile_UI_=WelcomeFile
-The_welcomeFile_property_UI_=The welcomeFile property
-<welcome-file>_UI_=<welcome-file>
-Create_WelcomeFile_UI_=Create WelcomeFile
-Welcome_File_List_UI_=Welcome File List
-Error_Message_No_WRC_Entries_UI_=At least one web resource collection is required for a security constraint. If you want to delete this web resource collection, you must delete the entire security constraint.
-Error_Title_No_WRC_Entries_UI_=Web resource collection
-required1concat=Create a child of type #CHILD_CLASS_NAME# for the selected {0}.
-(New_URL)_UI__UI_=(New URL)
-New_param_UI__UI_=New param
-value_UI__UI_=value
-Select_Servlet_or_JSP_UI_=Select Servlet or JSP
-Select_JSP_UI_=Select JSP
-Add_Servlet_or_JSP_UI_=Add Servlet or JSP
-Add_JSP_UI_=Add JSP
-New_ErrorPage_UI_=New ErrorPage
-New_ExceptionType_UI_=New ExceptionType
-Add_Servlet_UI_=Add Servlet
-Web_Nature_Runtime_does_no_EXC_=IWAE0022E Web Nature Runtime does not exist.
-Editor_Redirection_UI_=Editor Redirection
-The_selected_web.xml_file__ERROR_=IWAE0023E The selected web.xml file is not contained within a WAR Project. Therefore, this web.xml file is not a Deployment Descriptor for a Web Archive, hence the XML editor will be opened.
-Problems_Opening_Editor_UI_=Problems Opening Editor
-Create_#CHILD_CLASS_NAME#_UI_=Create #CHILD_CLASS_NAME#
-Move_Welcome_Files_Down_UI_=Move Welcome Files Down
-Move_Welcome_Files_Up_UI_=Move Welcome Files Up
-Error_occurred_getting_web=Error occurred getting web.xml: {0}
-Select_Class_UI_=Select Class
-Could_not_uniquely_map_the_ERROR_=IWAE0024E Could not uniquely map the class name to a class.
-Information_UI_=Information
-The_chosen_operation_is_no_INFO_=IWAE0025I The chosen operation is not currently available.
-JNDI_Name_UI_=JNDI Name
-New_Servlet_UI_=New Servlet
-
-
-(New_Filter)_1=(New Filter)
-New_filter_2=New filter
-New_filter_mapping_1=New filter mapping
-New_listener_1=New listener
-The_name_property_2=The name property
-The_value_property_4=The value property
-The_target_property_2=The target property
-The_type_property_4=The type property
-The_ExternalCacheGroups_property_2=The ExternalCacheGroups property
-The_IdGenerator_property_4=The IdGenerator property
-The_InvalidateOnly_property_6=The InvalidateOnly property
-The_MetadataGenerator_property_8=The MetadataGenerator property
-The_Priority_property_10=The Priority property
-The_PropertiesGroupName_property_12=The PropertiesGroupName property
-The_Timeout_property_14=The Timeout property
-Small__1=Small:
-Large__3=Large:
-Choose_Small_Icon_5=Choose Small Icon
-Select_the_Small_Icon_6=Select the Small Icon
-Choose_Large_Icon_7=Choose Large Icon
-Select_the_Large_Icon_8=Select the Large Icon
-Caching_group_name__1=Caching group name:
-Priority__2=Priority:
-Timeout__3=Timeout:
-second(s)_4=second(s)
-Invalidate_only_5=Invalidate only
-Caching_group_members__6=Caching group members:
-_Servlet/JSP_7=\ Servlet/JSP
-Remove_9=Remove
-Use_URIs_for_cache_ID_building_1=Use URIs for cache ID building
-Use_specified_string__2=Use specified string:
-Variables__3=Variables:
-_ID_4=\ ID
-_Type_5=\ Type
-_Required_6=\ Required
-External_Cache_groups__1=External Cache groups:
-_Group_Name_2=\ Group Name
-ID_generator__3=ID generator:
-Meta_data_generator__4=Meta data generator:
-Remove_6=Remove
-Add_Servlet_Caching_Configuration_1=Add Servlet Caching Configuration
-Edit_Servlet_Caching_Configuration_2=Edit Servlet Caching Configuration
-Add_1=Add
-Remove_2=Remove
-UP_5=UP
-DOWN_6=DOWN
-Add_or_Remove_Servlet_or_JSP_1=Add or Remove Servlet or JSP
-Add_or_Remove_Security_Role_2=Add or Remove Security Role
-Add_or_Remove_Security_Constraint_3=Add or Remove Security Constraint
-Add_or_Remove_Environment_Variable_4=Add or Remove Environment Variable
-Add_or_Remove_EJB_Reference_5=Add or Remove EJB Reference
-Add_or_Remove_Resource_Reference_6=Add or Remove Resource Reference
-Add_or_Remove_JSP_Tag_Library_7=Add or Remove JSP Tag Library
-Add_or_Remove_Error_Page_8=Add or Remove Error Page
-Add_or_Remove_Exception_Page_9=Add or Remove Exception Page
-Add_or_Remove_Welcome_Page_10=Add or Remove Welcome Page
-Add_or_Remove_Context_Parameter_11=Add or Remove Context Parameter
-Add_or_Remove_Mime_Mapping_12=Add or Remove Mime Mapping
-Add_or_Remove_Filter_13=Add or Remove Filter
-Add_or_Remove_Listener_14=Add or Remove Listener
-Add_or_Remove_Mime_Filter_15=Add or Remove Mime Filter
-Add_or_Remove_File_Serving_Attribute_16=Add or Remove File Serving Attribute
-Add_or_Remove_Invoker_Attribute_17=Add or Remove Invoker Attribute
-Add_or_Remove_JSP_Attribute_18=Add or Remove JSP Attribute
-Add_or_Remove_Servlet_Caching_Configuration_19=Add or Remove Servlet Caching Configuration
-Filter_Mappings_1=Filter Mappings
-Read_Only_22=Read Only
-Writable_23=Writable
-Read_only_files____25=Read only files:
-Web_Deployment_Descriptor_28=Web Deployment Descriptor
-Environment_1=Environment
-Environment_Variables_2=Environment Variables
-Extensions_1=Extensions
-Filters_1=Filters
-Listeners_1=Listeners
-Mime_1=Mime
-Mime_Mappings_2=Mime Mappings
-Overview_1=Overview
-Pages_1=Pages
-Parameters_1=Parameters
-Context_Parameters_2=Context Parameters
-References_1=References
-References_2=References
-EJB_references_3=EJB references
-Resource_references_4=Resource references
-JSP_tag_libraries_5=JSP tag libraries
-Security_1=Security roles
-Security_Roles_3=Security Roles
-Security_Constraints_4=Security Constraints
-Servlets_1=Servlets
-Servlets_and_JSPs_2=Servlets and JSPs
-Details_1=Details
-Details_of_the_selected_environment_variable__2=Details of the selected environment variable:
-Type__3=Type:
-Value__13=Value:
-Mime_Type_change_14=Mime Type change
-Variables_1=Variables
-The_following_environment_variables_are_relevant_to_this_web_application__2=The following environment variables are relevant to this web application:
-(New_Variable)_3=(New Variable)
-File_Serving_Attributes_1=File Serving Attributes
-_Name_2=\ Name
-_Value_3=\ Value
-(name)_4=(name)
-(value)_5=(value)
-General_1=General
-Reloading_enabled_2=Reloading enabled
-Reload_interval__3=Reload interval:
-Default_error_page__5=Default error page:
-Additional_class_path__7=Additional class path:
-File_serving_enabled_9=File serving enabled
-Directory_browsing_enabled_10=Directory browsing enabled
-Serve_servlets_by_classname_11=Serve servlets by classname
-Precompile_JSPs_12=Precompile JSPs
-Automatic_Request_Encoding_enabled_13=Automatic Request Encoding enabled
-Automatic_Response_Encoding_enabled_14=Automatic Response Encoding enabled
-Choose_a_Default_Error_Page_15=Choose a Default Error Page
-Reload_Enabled_Changed_16=Reload Enabled Changed
-File_Serving_Enabled_Changed_17=File Serving Enabled Changed
-Directory_Browsing_Enabled_Changed_18=Directory Browsing Enabled Changed
-Serve_Servlets_by_classname_Enabled_Changed_19=Serve Servlets by classname Enabled Changed
-Precompile_JSPs_Enabled_Changed_20=Precompile JSPs Enabled Changed
-Automatic_Request_Encoding_Enabled_Changed_21=Automatic Request Encoding Enabled Changed
-Automatic_Response_Encoding_Enabled_Changed_22=Automatic Response Encoding Enabled Changed
-Reload_Interval_25=Reload Interval
-Default_Error_Page_26=Default Error Page
-Additional_Classpath_27=Additional Classpath
-Invoker_Attributes_1=Invoker Attributes
-JSP_Attributes_1=JSP Attributes
-MIME_Filters__1=MIME Filters
-_Target_2=\ Target
-_Type_3=\ Type
-(target)_4=(target)
-(type)_5=(type)
-Servlet_Caching_Configurations_1=Servlet Caching Configurations
-Details_of_the_selected_filter_2=Details of the selected filter
-Filter_class__3=Filter class:
-Display_name__5=Display name:
-Filter_Type_Selection_7=Filter Type Selection
-FilterItemProvider_UI_0=FilterName
-Choose_a_Filter_Type_8=Choose a Filter Type
-The_following_Filters_are_included_in_this_web_application__2=The following Filters are included in this web application:
-Icons_1=Icons
-The_following_icons_represent_the_selected_filter__2=The following icons represent the selected filter:
-Initialization_1=Initialization
-The_following_Filters_will_be_started_when_the_web_application_is_started__2=The following Filters will be started when the web application is started:
-_Name_3=\ Name
-_Value_4=\ Value
-Delete_Filter_Init_Param_5=Delete Filter Init Param
-(name)_6=(name)
-(value)_7=(value)
-New_Initialization_Parameter_8=New Initialization Parameter
-Servlet_Mappings_2=Servlet Mappings
-The_following_servlets_are_mapped_to_this_filter__3=The following servlets are mapped to this filter:
-Delete_filter_mappings_4=Delete filter mappings
-New_filter_mapping_5=New filter mapping
-URL_Mappings_1=URL Mappings
-The_following_URLs_are_mapped_to_this_filter__2=The following URLs are mapped to this filter:
-Delete_filter_mappings_3=Delete filter mappings
-New_filter_mapping_4=New filter mapping
-Details_of_the_selected_listener_2=Details of the selected listener
-Package__3=Package:
-(default_package)_5=(default package)
-Listeners_5=Listeners
-The_following_Listeners_are_included_in_this_web_application__6=The following Listeners are included in this web application:
-Listener_Type_Selection_10=Listener Type Selection
-Choose_a_Listener_Type_11=Choose a Listener Type
-Details_of_the_selected_file_extension__2=Details of the selected file extension:
-Mime_type__3=Mime type:
-Mime_Type_change_4=Mime Type change
-File_Extensions_1=File Extensions
-The_following_file_extensions_are_mapped_to_Mime_types__2=The following file extensions are mapped to Mime types:
-Context_Parameters_1=Context Parameters
-The_following_context_initialization_parameters_apply_to_all_servlets_in_this_web_application__2=The following context initialization parameters apply to all servlets in this web application:
-Environment_Variables_1=Environment Variables
-The_following_filters_are_used_in_this_application__2=The following filters are used in this application:
-General_Information_1=General Information
-Display_name__2=Display name:
-Description__3=Description:
-Session_time_out__4=Session time out:
-Distributable_5=Distributable
-Display_Name_6=Display Name
-Description_7=Description
-Icons_2=Icons
-The_following_icons_represent_this_web_application__3=The following icons represent this web application:
-The_following_listeners_are_used_in_this_application__2=The following listeners are used in this application:
-Mime_Type_1=Mime Type
-The_following_file_extensions_are_mapped_to_mime_types__2=The following file extensions are mapped to mime types:
-This_web_application_uses_the_following_welcome_and_error_pages__2=This web application uses the following welcome and error pages:
-This_web_application_references_the_following_resources__2=This web application references the following resources:
-The_following_security_roles_and_constraints_are_defined_for_this_web_application__2=The following security roles and constraints are defined for this web application:
-Servlets_and_JSPs_1=Servlets and JSPs
-The_following_servlets_and_JSPs_are_used_in_this_application__2=The following servlets and JSPs are used in this application:
-Usage_1=Usage
-The_following_Enterprise_Applications_use_this_web_module__2=The following Enterprise Applications use this web module:
-Error_Pages_1=Error Pages
-Resources_in_the_following_URLs_will_be_accessed_in_response_to_HTTP_error_codes__2=Resources in the following URLs will be accessed in response to HTTP error codes:
-_Error_Code_3=\ Error Code
-_URL_4=\ URL
-Java_Exception_Types_2=Java Exception Types
-Resources_in_the_following_URLs_will_be_accessed_in_response_to_Java_exception_types__3=Resources in the following URLs will be accessed in response to Java exception types:
-_Exception_Type_4=\ Exception Type
-_URL_5=\ URL
-Exception_Type_Selection_9=Exception Type Selection
-Choose_an_Exception_Type_10=Choose an Exception Type
-Login_1=Login
-The_following_Login_configuration_values_are_used_for_this_web_application__2=The following Login configuration values are used for this web application:
-Realm_name__3=Realm name:
-Authentication_method__4=Authentication method:
-Login_page__5=Login page:
-Error_page__8=Error page:
-Welcome_Pages_1=Welcome Pages
-The_server_will_search_for_the_following_pages,_in_this_order,_when_the_web_application_is_referenced__2=The server will search for the following pages, in this order, when the web application is referenced:
-The_following_context_parameters_are_included_in_this_web_application__2=The following context parameters are included in this web application:
-Details_of_the_selected_context_parameter__2=Details of the selected context parameter:
-Value__3=Value:
-Context_Param_Value_change_4=Context Param Value change
-WebSphere_Bindings_1=WebSphere Bindings
-JNDI_Name__2=JNDI Name:
-Ejb_Ref_JNDI_Name_change_3=Ejb Ref JNDI Name change
-Details_of_the_selected_EJB_reference_2=Details of the selected EJB reference
-Home__6=Home:
-Remote__7=Remote:
-Ejb_Ref_Home_change_8=Ejb Ref Home change
-Ejb_Ref_Remote_change_9=Ejb Ref Remote change
-EJB_Reference_Type_change_10=EJB Reference Type change
-EJB_References_1=EJB References
-The_following_EJB_references_are_used_in_this_web_application__2=The following EJB references are used in this web application:
-JNDI_Name_3=JNDI Name
-Details_of_the_selected_JSP_tag_library_2=Details of the selected JSP tag library
-URI__3=URI:
-Location__4=Location:
-JSP_tag_library_location_change_5=JSP tag library location change
-JSP_tag_library_URI_change_6=JSP tag library URI change
-JSP_tag_libraries_1=JSP tag libraries
-The_following_JSP_tag_libraries_are_used_in_this_web_application__2=The following JSP tag libraries are used in this web application:
-Resource_Ref_JNDI_Name_change_3=Resource Ref JNDI Name change
-Details_of_the_selected_resource_reference_2=Details of the selected resource reference
-Authentication__4=Authentication:
-Resource_Reference_Type_change_7=Resource Reference Type change
-Resource_Reference_Authentication_change_10=Resource Reference Authentication change
-Resource_References_1=Resource References
-The_following_resource_references_are_used_in_this_web_application__2=The following resource references are used in this web application:
-(New_ResourceRef)_3=(New ResourceRef)
-JNDI_Name_4=JNDI Name
-Authorized_Roles_2=Authorized Roles
-The_following_roles_are_authorized_to_access_the_web_resource_collections_in_this_security_constraint__3=The following roles are authorized to access the web resource collections in this security constraint:
-Security_Constraints_1=Security Constraints
-These_constraints_prescribe_access_policies_for_specific_web_resources_2=These constraints prescribe access policies for specific web resources
-User_Data_Constraint_1=User Data Constraint
-The_following_are_the_transport_guarantees_required_between_client_and_server_for_the_security_constraint__2=The following are the transport guarantees required between client and server for the security constraint:
-Web_Resource_Collections_1=Web Resource Collections
-The_following_define_web_resources_and_their_HTTP_method_for_this_web_application__2=The following define web resources and their HTTP method for this web application:
-Details_of_the_selected_security_role__2=Details of the selected security role:
-Security_Roles_Description_change_5=Security Roles Description change
-Security_Roles_1=Security Roles
-The_following_security_roles_are_defined_for_this_web_application__2=The following security roles are defined for this web application:
-Authorized_roles_2=Authorized roles
-The_following_roles_are_authorized_to_access_this_servlet__3=The following roles are authorized to access this servlet:
-Details_of_the_selected_servlet_or_JSP_2=Details of the selected servlet or JSP
-Servlet_class__3=Servlet class:
-WebSphere_Extensions_3=WebSphere Extensions
-Optional_WebSphere_specific_extensions_to_the_Web_Deployment_Descriptor_4=Optional WebSphere specific extensions to the Web Deployment Descriptor
-Unresolved_action__5=Unresolved action:
-Servlet_Extension_Change_6=Servlet Extension Change
-The_following_icons_represent_the_selected_servlet_or_JSP__3=The following icons represent the selected servlet or JSP:
-The_following_URLs_are_mapped_to_this_servlet__2=The following URLs are mapped to this servlet:
-The_following_servlets_and_JSPs_are_included_in_this_web_application__2=The following servlets and JSPs are included in this web application:
-The_filterName_property_3=The filterName property
-The_filter_property_2=The filter property
-The_ListenerClass_property_2=The ListenerClass property
-Details...=Details...
-Load_on_startup_5=Load on startup
-Load_order__6=Load order:
-Delete_Servlet_Init_Param_7=Delete Servlet Init Param
-(name)_8=(name)
-(value)_9=(value)
-New_Initialization_Parameter_10=New Initialization Parameter
-Filter_mapping___1=Filter mapping:
-SecurityConstraint_1=SecurityConstraint
-The_following_initialization_parameters_are_configured_for_this_servlet__1=The following initialization parameters are configured for this servlet:
-Filter_mapping_text={0} -> {1}
-Add_or_Remove_Resource_Environment_Reference_1=Add or Remove Resource Environment Reference
-MIME_1=MIME
-MIME_Mappings_2=MIME Mappings
-Resource_Environment_1=Resource Environment
-Automatic_Filter_Loading_enabled_1=Automatic Filter Loading enabled
-Automatic_Filter_Loading_Enabled_Changed_4=Automatic Filter Loading Enabled Changed
-The_following_servlets_have_this_filter_mapped_to_them_1=The following servlets have this filter mapped to them
-The_following_URLs_have_this_filter_mapped_to_them_1=The following URLs have this filter mapped to them
-MIME_type__1=MIME type:
-MIME_Type_change_2=MIME Type change
-The_following_file_extensions_are_mapped_to_MIME_types_1=The following file extensions are mapped to MIME types
-Location_1=\ Location
-Link__1=Link:
-Ejb_Ref_Link_change_2=Ejb Ref Link change
-Resource_Env_Ref_JNDI_Name_change_1=Resource Env Ref JNDI Name change
-Details_of_the_selected_resource_environment_reference_1=Details of the selected resource environment reference
-Type_Selection_2=Type Selection
-Choose_a_type_3=Choose a type
-Resource_Environment_References_1=Resource Environment References
-The_following_resource_environment_references_are_used_in_this_web_application_2=The following resource environment references are used in this web application
-New_ResourceEnvRef_3=New ResourceEnvRef
-Add_Servlet_Extension_1=Add Servlet Extension
-_ERROR_Problems_opening_editor_3=IWAE0026E Problems opening editor
-_ERROR_JSP_file_does_not_exist_4=IWAE0027E JSP file does not exist
-_ERROR_Problems_opening_editor_5=IWAE0028E Problems opening editor
-_ERROR_Could_not_find_type_within_project_6=IWAE0029E Could not find type within project
-_ERROR_Problems_opening_editor_7=IWAE0030E Problems opening editor
-_ERROR_Problems_opening_editor_8=IWAE0031E Problems opening editor
-Add_Variable_1=Add Variable
-Edit_Variable_2=Edit Variable
-Define_a_new_variable_in_this_servlet_caching_configuration_1=Define a new variable in this servlet caching configuration
-Variable_2=Variable
-ID__3=ID:
-Type__4=Type:
-Method__5=Method:
-Data_ID__6=Data ID:
-Invalid_ID__7=Invalid ID:
-Required_8=Required
-Add_External_Cache_Group_1=Add External Cache Group
-Add_an_external_cache_group_to_this_servlet_caching_configuration_1=Add an external cache group to this servlet caching configuration
-External_Cache_Group_2=External Cache Group
-Group_Name__3=Group Name:
-Group_Name_is_empty_5=Group Name is empty
-Caching_group_name_is_empty_2=Caching group name is empty
-Priority_must_be_an_integer_3=Priority must be an integer
-Timeout_must_be_an_integer_4=Timeout must be an integer
-Define_a_new_servlet_caching_configuration_1=Define a new servlet caching configuration
-Servlet_Caching_Configuration_2=Servlet Caching Configuration
-The_DefaultPage_property_2=The DefaultPage property
-The_ErrorPage_property_4=The ErrorPage property
-The_MimeType_property_6=The MimeType property
-The_Name_property_8=The Name property
-The_Pages_property_10=The Pages property
-The_ExtendedServlet_property_2=The ExtendedServlet property
-The_LocalTransaction_property_4=The LocalTransaction property
-The_MarkupLanguage_property_6=The MarkupLanguage property
-Define_Authorization_Constraint_1=Define Authorization Constraint
-Choose_a_servlet__1=Choose a servlet:
-Choose_a_servlet__2=Choose a Servlet:
-Matching_servlets__2=Matching servlets:
-Choose_a_filter__1=Choose a filter:
-Matching_filters__2=Matching filters:
-Qualifier__3=Qualifier:
-Add_or_Remove_EJB_Local_Reference_1=Add or Remove EJB Local Reference
-Add_or_Remove_Markup_Language_2=Add or Remove Markup Language
-Close_editor_3=Close editor
-File_has_been_deleted_from_the_file_system._nWhat_would_you_like_to_do__4=File has been deleted from the file system.\nWhat would you like to do?
-Save_and_close_editor_5=Save and close editor
-Close_editor_6=Close editor
-This_web.xml_file_is_not_a_valid_Deployment_Descriptor_for_a_Web_Archive,_hence_the_XML_editor_will_be_opened_7=This web.xml file is not a valid Deployment Descriptor for a Web Archive, hence the XML editor will be opened.
-EJB_1=EJB
-EJB_Local_2=EJB Local
-Resource_3=Resource
-Resource_Environment_1_4=Resource_Environment_1
-JSP_tag_libraries_5_5=JSP_tag_libraries_5
-Choose_a_filter__1=Choose a filter:
-Matching_filters__2=Matching filters:
-Choose_a_listener__1=Choose a listener:
-Matching_listener__2=Matching listener:
-Problems_opening_editor_2=Problems opening editor
-application.xml_does_not_exist_3=application.xml does not exist
-Refresh_4=Refresh
-Details_of_the_selected_EJB_Local_reference_1=Details of the selected EJB Local reference
-Local_home__2=Local home:
-Local__3=Local:
-EJB_Local_References_1=EJB Local References
-The_following_EJB_local_references_are_used_in_this_web_application_2=The following EJB local references are used in this web application
-(New_EJB_Local_Ref)_3=(New EJB Local Ref)
-(New_ResourceEnvRef)_1=(New ResourceEnvRef)
-Description__2=Description:
-Description_change_3=Description change
-Details_of_the_Servlet_Extension_of_the_selected_servlet_1=Details of the Servlet Extension of the selected servlet
-Markup_Languages_2=Markup Languages
-Local_Transaction_3=Local Transaction
-Delete_Filter_Mapping_1=Delete Filter Mapping
-Add_Filter_Mappings_2=Add Filter Mappings
-Choose_a_JSP__1=Choose a JSP:
-Name__2=Name:
-MIME_type__3=MIME type:
-Error_page__4=Error page:
-Browse_5=Browse
-Default_page__6=Default page:
-Browse_7=Browse
-Pages__8=Pages:
-_Name_9=\ Name
-_URI_10=\ URI
-(Name)_11=(Name)
-(URI)_12=(URI)
-Name_is_empty_13=Name is empty
-MIME_is_empty_14=MIME is empty
-Define_a_new_markup_language_entry_1=Define a new markup language entry
-Markup_Language_2=Markup Language
-Choose_a_Page_1=Choose a Page
-Description__1=Description:
-Environment_variable_value_change_1=Environment variable value change
-Environment_variable_description_change_2=Environment variable description change
-Description_name_change_2=Description name change
-Context_Param_Description_change_1=Context Param Description change
-Ejb_Ref_Description_change_1=Ejb Ref Description change
-Resource_Environment_Ref_Description_change_1=Resource Environment Ref Description change
-Resource_Ref_Description_change_1=Resource Ref Description change
-Details_of_the_selected_security_constraint_1=Details of the selected security constraint
-Display_Name__2=Display Name:
-Security_Constraint_DisplayName_change_3=Security Constraint DisplayName change
-Empty_List_2=Empty List
-_UI_Select_a_tag_library_to_add_to_the_deployment_descriptor_1=Select a tag library to add to the deployment descriptor
-_UI_Add_a_Tag_Library_2=Add a Tag Library
-_UI_Tag_Libraries__3=Tag Libraries:
-_UI_Available_Custom_Tags__4=Available Custom Tags:
-_UI__Tag_5=\ Tag
-_UI__Description_6=\ Description
-_UI_URI__7=URI:
-_UI_Select_a_Tag_Library_8=Select a Tag Library
-_UI_URI_cannot_be_empty_10=URI cannot be empty
-Browse..._1=Browse...
-Browse..._3=Browse...
-Browse..._4=Browse...
-Remove_Link_7=Remove Link
-Home_interface_selection_8=Home interface selection
-Local_interface_selection_13=Local interface selection
-Choose_an_interface_16=Choose an interface
-Matching_interfaces__17=Matching interfaces:
-Set_EJB_Local_Ref_Link_18=Set EJB Local Ref Link
-Remove_EJB_Local_Ref_Link_19=Remove EJB Local Ref Link
-EJB_selection_3=EJB selection
-Choose_an_EJB_4=Choose an EJB
-Matching_EJBs__5=Matching EJBs:
-Location__6=Location:
-Empty_List_11=Empty List
-Set_EJB_Ref_Link_8=Set EJB Ref Link
-Remove_EJB_Ref_Link_9=Remove EJB Ref Link
-Home_interface_selection_11=Home interface selection
-Remote_interface_selection_14=Remote interface selection
-Choose_an_interface_17=Choose an interface
-Matching_interfaces__18=Matching interfaces:
-Specify_an_Error_Code_and_Location_1=Specify an Error Code and Location
-Specify_an_Exception_Type_and_Location_2=Specify an Exception Type and Location
-Add_an_Error_Page_3=Add an Error Page
-Error_Code__4=Error Code:
-Exception_Type__5=Exception Type:
-Select..._6=Select...
-Browse..._7=Browse...
-Location__8=Location:
-Browse..._9=Browse...
-Error_Code_is_empty_13=Error Code is empty
-Exception_Type_is_empty_14=Exception Type is empty
-Location_is_empty_16=Location is empty
-Location_18=Location
-Select_a_Page_19=Select a Page
-Add_a_page_to_this_markup_language_1=Add a page to this markup language
-Page_2=Page
-Name__3=Name:
-URI__4=URI:
-Name_is_empty_8=Name is empty
-URI_is_empty_10=URI is empty
-Details_of_the_Servlet_Extension_for_the_selected_servlet_1=Details of the Servlet Extension for the selected servlet
-Delete_Markup_Language_7=Delete Markup Language
-Add_Markup_Language_entry_8=Add Markup Language entry
-Edit_Markup_Language_entry_9=Edit Markup Language entry
-The_name_property_1=The name property
-The_URI_property_2=The URI property
-Empty_List_1=Empty List
-Web_Library_Projects_1=Web Library Projects
-The_following_JARs_are_mapped_to_Java_projects__2=The following JARs are mapped to Java projects:
-_JAR_Name_3=\ JAR Name
-_Java_Project_4=\ Java Project
-Error_5=Error
-Add_Page_1=Add Page
-Up_1=Up
-Down_2=Down
-Resource_Reference_Shareable_change_3=Resource Reference Shareable change
-Environment_variable_type_change_1=Environment variable type change
-WebSphere_Extensions_1=WebSphere Extensions
-Browse..._2=Browse...
-Remove_Page_3=Remove Page
-Tag_Library_1=Tag Library
-Create_Page_1=Create Page
-Create_MarkupLanguage_1=Create MarkupLanguage
-Add_or_Remove_Servlet_Extension_1=Add or Remove Servlet Extension
-_INFO_No_security_roles_exist._1=IWAE0032I No security roles exist.
-_INFO_No_Enterprise_Beans_which_implement_the_remote_interface_exist._1=IWAE0033I No Enterprise Beans which implement the remote interface exist.
-_INFO_No_Enterprise_Beans_which_implement_the_local_interface_exist._2=IWAE0034I No Enterprise Beans which implement the local interface exist.
-_INFO_No_servlets_exist_to_add._1=IWAE0035I No servlets exist to add.
-_INFO_No_classes_which_implement_javax.servlet.Filter_exist._1=IWAE0037I No classes which implement javax.servlet.Filter exist.
-_INFO_No_filters_exist_to_add._1=IWAE0038I No filters exist to add.
-_INFO_No_listeners_exist_to_add._1=IWAE0039I No listeners exist to add.
-_ERROR_Error_updating_Web_Properties_1=IWAE0040E Error updating Web Properties
-_INFO_No_home_interfaces_exist._1=IWAE0041I No home interfaces exist.
-_INFO_No_local_interfaces_exist._2=IWAE0042I No local interfaces exist.
-_INFO_No_remote_interfaces_exist._2=IWAE0043I No remote interfaces exist.
-_INFO_No_tag_libraries_exist_to_add._1=IWAE0044I No tag libraries exist to add.
-_INFO_No_exceptions_exist_to_add._1=IWAE0045I No exceptions exist to add.
-Add_Resource_Reference_Extension_3=Add Resource Reference Extension
-Virtual_Host_Name__1=Virtual Host Name:
-Connection_management__1=Connection management:
-Isolation_level__2=Isolation level:
-_Markup_Language_1=\ Markup Language
-_Mime_Type_2=\ Mime Type
-Boundary__3=Boundary:
-Resolver__4=Resolver:
-Unresolved_Action__5=Unresolved Action:
-Select_an_Error_Code_1=Select an Error Code
-Code_2=Code
-Description_3=Description
-*_denotes_error_code_new_to_HTTP_1.1_4=* denotes error code new to HTTP 1.1
-Continue*_6=Continue*
-Switching_Protocols*_8=Switching Protocols*
-OK_10=OK
-Created_12=Created
-Accepted_14=Accepted
-Non-Authoritative_Information*_16=Non-Authoritative Information*
-No_Content_18=No Content
-Reset_Content*_20=Reset Content*
-Partial_Content*_22=Partial Content*
-Multiple_Choices_24=Multiple Choices
-Moved_Permanently_26=Moved Permanently
-Found_28=Found
-See_Other*_30=See Other*
-Not_Modified_32=Not Modified
-Use_Proxy*_34=Use Proxy*
-Temporary_Redirect*_36=Temporary Redirect*
-Bad_Request_38=Bad Request
-Unauthorized_40=Unauthorized
-Forbidden_42=Forbidden
-Not_Found_44=Not Found
-Method_Not_Allowed*_46=Method Not Allowed*
-Not_Acceptable*_48=Not Acceptable*
-Proxy_Authentication_Required*_50=Proxy Authentication Required*
-Request_Timeout*_52=Request Timeout*
-Conflict*_54=Conflict*
-Gone*_56=Gone*
-Length_Required*_58=Length Required*
-Precondition_Failed*_60=Precondition Failed*
-Request_Entity_Too_Large*_62=Request Entity Too Large*
-Request_URI_Too_Long*_64=Request URI Too Long*
-Unsupported_Media_Type*_66=Unsupported Media Type*
-Requested_Range_Not_Satisfiable*_68=Requested Range Not Satisfiable*
-Expectation_Failed*_70=Expectation Failed*
-Internal_Server_Error_72=Internal Server Error
-Not_Implemented_74=Not Implemented
-Bad_Gateway_76=Bad Gateway
-Service_Unavailable_78=Service Unavailable
-Gateway_Timeout*_80=Gateway Timeout*
-HTTP_Version_Not_Supported*_82=HTTP Version Not Supported*
-Choose_a_Servlet_1=Choose a Servlet
-Unspecified_1=Unspecified
-Sharing__1=Sharing:
-Error_Page_1=Error Page
-New_EJB_Ref=(New EJB Ref)
-selectSR=Select a Security Role
-Role_name=Role name
-NoSR=No Security Roles exist.
-RemoveUDC=Remove User Data Constraint
-UDC_desc_change=User Data Constraint description changed
-Run_As=Run As
-detRunAs=Details of the selected servlet's run-as element
-SR=Security role:
-Select=Select...
-Remove=Remove
-RemoveRA=Remove run-as
-SetRA=Set run-as
-SetRN=Set role-name
-SecurityRoleRefDialog.Security_Role_Ref=Security Role Ref
-SecurityRoleRefDialog.Role_name=Role name:
-SecurityRoleRefDialog.Role_link=Role link:
-SecurityRoleRefDialog.Description=Description:
-WebapplicationEditor.Add_or_Remove_Security_Role_Ref=Add or Remove Security Role Ref
-Ser_AuthSection._Link=\ Link
-Ser_AuthSection.Edit_Security_Role_Ref=Edit Security Role Ref
-srr_header=Security Role References
-srr_description=The following security role references are defined for this servlet:
-Local_encoding_mapping_list_UI_=Locale Encoding Mapping List
-local_encoding_mapping_UI_=Locale Encoding Mapping
-_UI_JSPConfig_type=JSP Config
-_UI_TagLibRefType_type=TagLibRefType
-_UI_JSPPropertyGroup_type=JSPPropertyGroup
-_UI_JSPPropertyGroup_urlPattern_feature=URL Pattern
-_UI_JSPPropertyGroup_elIgnored_feature=El Ignored
-_UI_JSPPropertyGroup_pageEncoding_feature=Page Encoding
-_UI_JSPPropertyGroup_scriptingInvalid_feature=Scripting Invalid
-_UI_JSPPropertyGroup_isXML_feature=Is XML
-_UI_JSPPropertyGroup_includePreludes_feature=Include Preludes
-_UI_JSPPropertyGroup_includeCodas_feature=Include Codas
-
-
diff --git a/plugins/org.eclipse.jst.j2ee.web/schema/fileURL.exsd b/plugins/org.eclipse.jst.j2ee.web/schema/fileURL.exsd
deleted file mode 100644
index 252f46a9e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/schema/fileURL.exsd
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.j2ee.web">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.j2ee.web" id="fileURL" name="File URL"/>
- </appInfo>
- <documentation>
- This is for the Web JSFaces File URL extension.
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="fileURL"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="fileURL">
- <complexType>
- <sequence>
- <element ref="run"/>
- </sequence>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier for this extension instance
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="run">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- the qualified name of the class to run
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- &lt;b&gt;This extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.&lt;/b&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
-
- </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 IBM Corporation 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.web/templates/_class.template b/plugins/org.eclipse.jst.j2ee.web/templates/_class.template
deleted file mode 100644
index 42488101a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_class.template
+++ /dev/null
@@ -1,40 +0,0 @@
-<%
- if (model.isPublic()) {
-%>
-public
-<%
- }
-
- if (model.isAbstract()) {
-%>abstract
-<%
- }
-
- if (model.isFinal()) {
-%>final
-<%
- }
-%>class <%= model.getClassName() %>
-<%
- String superClass = model.getSuperclassName();
- if (superClass != null && superClass.length() > 0) {
-%> extends <%= superClass %>
-<%
- }
-
- List<String> interfaces = model.getInterfaces();
- if ( interfaces.size() > 0) {
-%> implements
-<%
- }
-
- for (int i = 0; i < interfaces.size(); i++) {
- String INTERFACE = (String) interfaces.get(i);
- if (i > 0) {
-%>,
-<%
- }
-%><%= INTERFACE %>
-<%
- }
-%> {
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/_constructors.template b/plugins/org.eclipse.jst.j2ee.web/templates/_constructors.template
deleted file mode 100644
index 1b938b916..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_constructors.template
+++ /dev/null
@@ -1,31 +0,0 @@
-<%
- if (!model.hasEmptySuperclassConstructor()) {
-%>
-
- /**
- * Default constructor.
- */
- public <%= model.getClassName() %>() {
- // TODO Auto-generated constructor stub
- }
-<%
- }
-
- if (model.shouldGenSuperclassConstructors()) {
- List<Constructor> constructors = model.getConstructors();
- for (Constructor constructor : constructors) {
- if (constructor.isPublic() || constructor.isProtected()) {
-%>
-
- /**
- * @see <%= model.getSuperclassName() %>#<%= model.getSuperclassName() %>(<%= constructor.getParamsForJavadoc() %>)
- */
- public <%= model.getClassName() %>(<%= constructor.getParamsForDeclaration() %>) {
- super(<%= constructor.getParamsForCall() %>);
- // TODO Auto-generated constructor stub
- }
-<%
- }
- }
- }
-%> \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/_flags.template b/plugins/org.eclipse.jst.j2ee.web/templates/_flags.template
deleted file mode 100644
index 7e6afd4ab..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_flags.template
+++ /dev/null
@@ -1,3 +0,0 @@
-<%
- model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
-%> \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/_imports.template b/plugins/org.eclipse.jst.j2ee.web/templates/_imports.template
deleted file mode 100644
index fde7b4b61..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_imports.template
+++ /dev/null
@@ -1,9 +0,0 @@
-<%
- Collection<String> imports = model.getImports();
- for (String anImport : imports) {
-%>
-import <%= anImport %>;
-<%
- }
-%>
-
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/_methods.template b/plugins/org.eclipse.jst.j2ee.web/templates/_methods.template
deleted file mode 100644
index 5fe3d10d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_methods.template
+++ /dev/null
@@ -1,23 +0,0 @@
-<%
- if (model.shouldImplementAbstractMethods()) {
- for (Method method : model.getUnimplementedMethods()) {
-%>
-
- /**
- * @see <%= method.getContainingJavaClass() %>#<%= method.getName() %>(<%= method.getParamsForJavadoc() %>)
- */
- public <%= method.getReturnType() %> <%= method.getName() %>(<%= method.getParamsForDeclaration() %>) {
- // TODO Auto-generated method stub
-<%
- String defaultReturnValue = method.getDefaultReturnValue();
- if (defaultReturnValue != null) {
-%>
- return <%= defaultReturnValue %>;
-<%
- }
-%>
- }
-<%
- }
- }
-%> \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/_package.template b/plugins/org.eclipse.jst.j2ee.web/templates/_package.template
deleted file mode 100644
index f279df77b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/_package.template
+++ /dev/null
@@ -1,8 +0,0 @@
-<%
- if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
-%>
-package <%= model.getJavaPackageName() %>;
-<%
- }
-%>
-
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/filter.javajet b/plugins/org.eclipse.jst.j2ee.web/templates/filter.javajet
deleted file mode 100644
index 881fb0b9f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/filter.javajet
+++ /dev/null
@@ -1,45 +0,0 @@
-<%@ jet package="org.eclipse.jst.j2ee.internal.web.operations"
- imports="java.util.* org.eclipse.jst.j2ee.internal.common.operations.*"
- class="FilterTemplate"
-%>
-<% CreateFilterTemplateModel model = (CreateFilterTemplateModel) argument; %>
-<%@ include file="_flags.template" %>
-<%@ include file="_package.template" %>
-<%@ include file="_imports.template" %>
-<%@ include file="filter_classHeader.template" %>
-<%@ include file="_class.template" %>
-<%@ include file="_constructors.template" %>
-<%@ include file="_methods.template" %>
-<% if (model.shouldGenDestroy()) { %>
-
- /**
- * @see Filter#destroy()
- */
- public void destroy() {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoFilter()) { %>
-
- /**
- * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)
- */
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- // TODO Auto-generated method stub
- // place your code here
-
- // pass the request along the filter chain
- chain.doFilter(request, response);
- }
-<% } %>
-<% if (model.shouldGenInit()) { %>
-
- /**
- * @see Filter#init(FilterConfig)
- */
- public void init(FilterConfig fConfig) throws ServletException {
- // TODO Auto-generated method stub
- }
-<% } %>
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/filter_classHeader.template b/plugins/org.eclipse.jst.j2ee.web/templates/filter_classHeader.template
deleted file mode 100644
index 443461bd1..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/filter_classHeader.template
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Servlet Filter implementation class <%= model.getClassName() %>
-<%
- if (model.isAnnotated()) {
-%>
- *
- * @web.filter
- * name="<%= model.getFilterName() %>"
- * display-name="<%= model.getFilterName() %>"
-<%
- if (model.getDescription() != null && model.getDescription().length() > 0) {
-%>
- * description="<%= model.getDescription() %>"
-<%
- }
-
- List<IFilterMappingItem> mappings = model.getFilterMappings();
- for (IFilterMappingItem mapping : mappings) {
-%>
- *
- * @web.filter-mapping
-<%
- if (mapping.isUrlPatternType()) {
-%>
- * url-pattern="<%= mapping.getName() %>"
-<%
- } else if (mapping.isServletNameType()) {
-%>
- * servlet-name="<%= mapping.getName() %>"
-<%
- }
-
- String dispatcher = model.getDispatcherList(mapping);
- if (dispatcher.length() > 0) {
-%>
- * dispatcher="<%= dispatcher %>"
-<%
- }
- }
-
- List<String[]> initParams = model.getInitParams();
- if (initParams != null && initParams.size() > 0) {
- for (int i = 0; i < initParams.size(); i++) {
- String name = model.getInitParam(i, CreateFilterTemplateModel.NAME);
- String value = model.getInitParam(i, CreateFilterTemplateModel.VALUE);
- String description = model.getInitParam(i, CreateFilterTemplateModel.DESCRIPTION);
-%>
- *
- * @web.filter-init-param
- * name="<%= name %>"
- * value="<%= value %>"
-<%
- if (description != null && description.length() > 0) {
-%>
- * description="<%= description %>"
-<%
- }
- }
- }
- }
-%>
- */ \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/listener.javajet b/plugins/org.eclipse.jst.j2ee.web/templates/listener.javajet
deleted file mode 100644
index 1cc851096..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/listener.javajet
+++ /dev/null
@@ -1,14 +0,0 @@
-<%@ jet package="org.eclipse.jst.j2ee.internal.web.operations"
- imports="java.util.* org.eclipse.jst.j2ee.internal.common.operations.*"
- class="ListenerTemplate"
-%>
-<% CreateListenerTemplateModel model = (CreateListenerTemplateModel) argument; %>
-<%@ include file="_flags.template" %>
-<%@ include file="_package.template" %>
-<%@ include file="_imports.template" %>
-<%@ include file="listener_classHeader.template" %>
-<%@ include file="_class.template" %>
-<%@ include file="_constructors.template" %>
-<%@ include file="_methods.template" %>
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/listener_classHeader.template b/plugins/org.eclipse.jst.j2ee.web/templates/listener_classHeader.template
deleted file mode 100644
index 30c28e078..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/listener_classHeader.template
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Application Lifecycle Listener implementation class <%= model.getClassName() %>
- *
-<%
- if (model.isAnnotated()) {
-%>
- * @web.listener
-<%
- }
-%>
- */ \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/servlet.javajet b/plugins/org.eclipse.jst.j2ee.web/templates/servlet.javajet
deleted file mode 100644
index 3f8f6f5a3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/servlet.javajet
+++ /dev/null
@@ -1,140 +0,0 @@
-<%@ jet package="org.eclipse.jst.j2ee.internal.web.operations"
- imports="java.util.* org.eclipse.jst.j2ee.internal.common.operations.*"
- class="ServletTemplate"
-%>
-<% CreateServletTemplateModel model = (CreateServletTemplateModel) argument; %>
-<%@ include file="_flags.template" %>
-<%@ include file="_package.template" %>
-<%@ include file="_imports.template" %>
-<%@ include file="servlet_classHeader.template" %>
-<%@ include file="_class.template" %>
-<%
- if (model.isGenericServletSuperclass()) {
-%>
- private static final long serialVersionUID = 1L;
-<%
- }
-%>
-<%@ include file="_constructors.template" %>
-<%@ include file="_methods.template" %>
-<% if (model.shouldGenInit()) { %>
-
- /**
- * @see Servlet#init(ServletConfig)
- */
- public void init(ServletConfig config) throws ServletException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDestroy()) { %>
-
- /**
- * @see Servlet#destroy()
- */
- public void destroy() {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenGetServletConfig()) { %>
-
- /**
- * @see Servlet#getServletConfig()
- */
- public ServletConfig getServletConfig() {
- // TODO Auto-generated method stub
- return null;
- }
-<% } %>
-<% if (model.shouldGenGetServletInfo()) { %>
-
- /**
- * @see Servlet#getServletInfo()
- */
- public String getServletInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-<% } %>
-<% if (model.shouldGenService() && !model.isHttpServletSuperclass()) { %>
-
- /**
- * @see Servlet#service(ServletRequest request, ServletResponse response)
- */
- public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenService() && model.isHttpServletSuperclass()) { %>
-
- /**
- * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
- */
- protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoGet()) { %>
-
- /**
- * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
- */
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoPost()) { %>
-
- /**
- * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
- */
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoPut()) { %>
-
- /**
- * @see HttpServlet#doPut(HttpServletRequest, HttpServletResponse)
- */
- protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoDelete()) { %>
-
- /**
- * @see HttpServlet#doDelete(HttpServletRequest, HttpServletResponse)
- */
- protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoHead()) { %>
-
- /**
- * @see HttpServlet#doHead(HttpServletRequest, HttpServletResponse)
- */
- protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoOptions()) { %>
-
- /**
- * @see HttpServlet#doOptions(HttpServletRequest, HttpServletResponse)
- */
- protected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-<% if (model.shouldGenDoTrace()) { %>
-
- /**
- * @see HttpServlet#doTrace(HttpServletRequest, HttpServletResponse)
- */
- protected void doTrace(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- }
-<% } %>
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/templates/servlet_classHeader.template b/plugins/org.eclipse.jst.j2ee.web/templates/servlet_classHeader.template
deleted file mode 100644
index 4fd07074a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/templates/servlet_classHeader.template
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Servlet implementation class <%= model.getClassName() %>
-<%
- if (model.isAnnotated()) {
-%>
- *
- * @web.servlet
- * name="<%= model.getServletName() %>"
- * display-name="<%= model.getServletName() %>"
-<%
- if (model.getDescription() != null && model.getDescription().length() > 0) {
-%>
- * description="<%= model.getDescription() %>"
-<%
- }
-
- List<String[]> mappings = model.getServletMappings();
- if (mappings != null && mappings.size() > 0) {
- for (int i = 0; i < mappings.size(); i++) {
- String map = model.getServletMapping(i); %>
- *
- * @web.servlet-mapping
- * url-pattern="<%= map %>"
-<%
- }
- }
- List<String[]> initParams = model.getInitParams();
- if (initParams != null && initParams.size() > 0) {
- for (int i = 0; i < initParams.size(); i++) {
- String name = model.getInitParam(i, CreateServletTemplateModel.NAME);
- String value = model.getInitParam(i, CreateServletTemplateModel.VALUE);
- String description = model.getInitParam(i, CreateServletTemplateModel.DESCRIPTION);
-%>
- *
- * @web.servlet-init-param
- * name="<%= name %>"
- * value="<%= value %>"
-<%
- if (description != null && description.length() > 0) {
-%>
- * description="<%= description %>"
-<%
- }
- }
- }
- }
-%>
- */ \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarHelper.java b/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarHelper.java
deleted file mode 100644
index e53381822..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarHelper.java
+++ /dev/null
@@ -1,26 +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.web.validation;
-
-/**
- * Insert the type's description here. Creation date: (10/2/2001 7:06:43 PM)
- *
- * @author: Administrator
- */
-public class UIWarHelper extends WarHelper {
-
- /**
- * UIWarHelper constructor comment.
- */
- public UIWarHelper() {
- super();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarValidator.java b/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarValidator.java
deleted file mode 100644
index 15b2b7ca8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/UIWarValidator.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.web.validation;
-
-
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.jst.j2ee.classpathdep.ClasspathDependencyUtil;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.model.internal.validation.WarValidator;
-import org.eclipse.jst.j2ee.project.WebUtilities;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-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.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-import org.eclipse.wst.validation.internal.core.Message;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.operations.IWorkbenchContext;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-
-
-/**
- * Insert the type's description here. Creation date: (10/2/2001 6:46:56 PM)
- *
- * @author: Administrator
- */
-public class UIWarValidator extends WarValidator {
-
- protected org.eclipse.jst.j2ee.internal.web.validation.UIWarHelper warHelper;
-
-
-
-
- /**
- * UIWarValidator constructor comment.
- */
- public UIWarValidator() {
- super();
- }
-
- /**
- * Insert the method's description here. Creation date: (10/2/2001 8:01:45 PM)
- *
- * @return org.eclipse.wst.validation.internal.core.core.war.workbenchimpl.UIWarHelper
- */
- public org.eclipse.jst.j2ee.internal.web.validation.UIWarHelper getWarHelper() {
- return warHelper;
- }
-
- /**
- * Insert the method's description here. Creation date: (10/2/2001 8:01:45 PM)
- *
- * @param newWarHelper
- * org.eclipse.wst.validation.internal.core.core.war.workbenchimpl.UIWarHelper
- */
- public void setWarHelper(org.eclipse.jst.j2ee.internal.web.validation.UIWarHelper newWarHelper) {
- warHelper = newWarHelper;
- }
-
- /**
- * Insert the method's description here. Creation date: (10/2/2001 6:49:26 PM)
- */
- public void validate() throws ValidationException {
- // First remove all previous msg. for this project
- // _reporter.removeAllMessages(this,null);
- super.validate();
- validateEARForContextRoot();
- }
-
- /**
- * Insert the method's description here. Creation date: (10/2/2001 6:49:26 PM)
- */
- public IStatus validateInJob(IValidationContext inHelper, IReporter inReporter)
- throws org.eclipse.wst.validation.internal.core.ValidationException {
-
- setWarHelper((UIWarHelper) inHelper);
- IProject proj = ((IWorkbenchContext) warHelper).getProject();
- IVirtualComponent wbModule = ComponentCore.createComponent(proj);
- if( wbModule != null && J2EEProjectUtilities.isDynamicWebProject(proj)) {
- IVirtualFile webFile = wbModule.getRootFolder().getFile(J2EEConstants.WEBAPP_DD_URI);
- if( webFile.exists()) {
- status = super.validateInJob(inHelper, inReporter);
- validateWebInfLibs(wbModule);
- }
- }
- return status;
- }
-
- /*
- * For web projects, need to validate that the classpath component dependencies (both
- * from this project's classpath and from the exported classpath entries of referenced
- * utility projects) do not conflict.
- */
- private void validateWebInfLibs(final IVirtualComponent component) {
-
- final Set webLibMappings = new HashSet();
-
- // get the libs currently in the WEB-INF/lib folder
- final IVirtualFolder folder = component.getRootFolder().getFolder(WebArtifactEdit.WEBLIB);
- try {
- IVirtualResource[] resources = folder.members();
- for (int i = 0; i < resources.length; i++) {
- if (resources[i] instanceof IVirtualFile) {
- IResource[] underlyingResources = resources[i].getUnderlyingResources();
- for (int j = 0; j < underlyingResources.length; j++) {
- webLibMappings.add(underlyingResources[j].getName());
- }
- }
- }
- } catch (CoreException ce) {
- // swallow
- }
- final Map archiveToPath = new HashMap();
- final IVirtualReference[] webLibs = WebUtilities.getLibModules(component);
- for (int i = 0; i < webLibs.length; i++) {
- IVirtualComponent comp = webLibs[i].getReferencedComponent();
- String name = null;
- if (comp.isBinary()) {
- VirtualArchiveComponent archiveComp = (VirtualArchiveComponent) comp;
- java.io.File diskFile = archiveComp.getUnderlyingDiskFile();
- if (!diskFile.exists()) {
- IFile wbFile = archiveComp.getUnderlyingWorkbenchFile();
- diskFile = new File(wbFile.getLocation().toOSString());
- }
- checkLibName(diskFile.getName(), null, webLibMappings, true);
- } else {
- String archiveName = webLibs[i].getArchiveName();
- if (archiveName != null && archiveName.length() > 0) {
- name = archiveName;
- } else {
- name = comp.getName() + ".jar"; //$NON-NLS-1$
- }
- checkLibName(name, comp.getProject(), webLibMappings, true);
- if (comp instanceof J2EEModuleVirtualComponent) {
- final IVirtualReference[] cpRefs = ((J2EEModuleVirtualComponent) comp).getJavaClasspathReferences();
- for (int j = 0; j < cpRefs.length; j++) {
- final IVirtualReference ref = cpRefs[j];
- if (ref.getReferencedComponent() instanceof VirtualArchiveComponent) {
- final String cpCompName = ref.getArchiveName();
- checkLibName(cpCompName, comp.getProject(), webLibMappings, false);
- IPath cpEntryPath= ClasspathDependencyUtil.getClasspathVirtualReferenceLocation(ref);
- if (cpEntryPath != null) {
- IPath existingPath = (IPath) archiveToPath.get(cpCompName);
- if (existingPath != null && !existingPath.equals(cpEntryPath)) {
- _reporter.addMessage(this, new Message(getBaseName(), IMessage.HIGH_SEVERITY, ERROR_DUPLICATE_CLASSPATH_COMPONENT_URI, new String[]{cpCompName, comp.getProject().getName()}));
- } else {
- archiveToPath.put(cpCompName, cpEntryPath);
- }
- }
- }
- }
- }
- }
- }
- }
-
- private void checkLibName(final String name, final IProject project, final Set webLibNames, final boolean addName) {
- if (webLibNames.contains(name)) {
- if (project != null) {
- //ignore this because of WAR import brings in the lib jars along with projects
- //_reporter.addMessage(this, new Message(getBaseName(), IMessage.HIGH_SEVERITY, ERROR_DUPLICATE_WEB_INF_LIB_OTHER_PROJECT, new String[]{name, project.getName()}));
- } else {
- _reporter.addMessage(this, new Message(getBaseName(), IMessage.HIGH_SEVERITY, ERROR_DUPLICATE_WEB_INF_LIB, new String[]{name}));
- }
- } else if (addName) {
- webLibNames.add(name);
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (10/2/2001 6:49:26 PM)
- */
- public void validateEARForContextRoot() {
-
-// IProject project = getWarHelper().getProject();
-// J2EEWebNatureRuntime webNature = J2EEWebNatureRuntime.getRuntime(project);
-// String contextRoot = webNature.getContextRoot();
-//
-// if (webNature == null)
-// return;
-//
-// EARNatureRuntime earRuntimeNature[] = webNature.getReferencingEARProjects();
-
-// for (int i = 0; i < earRuntimeNature.length; i++) {
-// // for each Ear Project that contains this web project update the context root.
-// // hold the model and validate the context root & release the model
-// org.eclipse.jst.j2ee.internal.earcreation.EAREditModel editModel = null;
-// try {
-// editModel = earRuntimeNature[i].getEarEditModelForRead(this);
-// if (editModel != null) {
-// Module module = null;
-// if ((module = earRuntimeNature[i].getModule(project)) != null) {
-// String webModcontextRoot = ((WebModule) module).getContextRoot();
-// if (webModcontextRoot != null && !webModcontextRoot.equals(contextRoot)) {
-// String[] params = new String[3];
-// params[0] = project.getName();
-// params[1] = ((WebModule) module).getContextRoot();
-// params[2] = earRuntimeNature[i].getProject().getName();
-// addError(WAR_CATEGORY, ERROR_EAR_INVALID_CONTEXT_ROOT, params);
-// }
-// }
-// }
-// } finally {
-// if (editModel != null) {
-// editModel.releaseAccess(this);
-// editModel = null;
-// }
-// }
-//
-// }
-
- }
-
- /**
- * Method validateLibModules.
- *
- *
- */
-
- //TODO create validation for modules
-/* protected void validateLibModules(J2EEWebNatureRuntime webNature) {
- if (webNature != null) {
- ILibModule[] libModules = webNature.getLibModules();
- IProject project = webNature.getProject();
-
- for (int i = 0; i < libModules.length; i++) {
- ILibModule lib = libModules[i];
- IProject tProject = lib.getProject();
- if (tProject != null) { // Project could be null if JavaProject is deleted, for
- // example
- if (!tProject.exists() || !tProject.isOpen()) {
- addWarning(WAR_CATEGORY, MESSAGE_WAR_VALIDATION_MISSING_WLP_PROJECT, new String[]{tProject.getName()}, webNature.getProject());
- }
- }
-
- String jarName = lib.getJarName();
- IPath jarPath = webNature.getLibraryFolder().getFullPath().append(jarName);
- if (((Resource) project).findExistingResourceVariant(jarPath) != null)
- addWarning(WAR_CATEGORY, MESSAGE_WAR_VALIDATION_CONFLICTING_WLP_PROJECT, new String[]{jarName}, webNature.getProject());
- }
- }
- }*/
-
- public ISchedulingRule getSchedulingRule(IValidationContext helper) {
-
- IProject project = ((IWorkbenchContext) helper).getProject();
- IVirtualComponent comp = ComponentCore.createComponent( project );
- IFile webDeploymentDescriptor = null;
- if( comp != null ){
- IVirtualFile vf = comp.getRootFolder().getFile(new Path(J2EEConstants.WEBAPP_DD_URI));
- if( vf!= null ){
- webDeploymentDescriptor = vf.getUnderlyingFile();
- }
- }
- return webDeploymentDescriptor;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/WarHelper.java b/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/WarHelper.java
deleted file mode 100644
index 1de63d34f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/war-validation/org/eclipse/jst/j2ee/internal/web/validation/WarHelper.java
+++ /dev/null
@@ -1,141 +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.web.validation;
-
-
-
-import java.util.Hashtable;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.validation.J2EEValidationHelper;
-import org.eclipse.jst.j2ee.model.internal.validation.WARMessageConstants;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.validation.internal.operations.WorkbenchReporter;
-
-
-
-public class WarHelper extends J2EEValidationHelper {
- Hashtable warFileMap = new Hashtable();
- ArtifactEdit edit = null;
- WARFile warFile = null;
- final static String HelperID = "org.eclipse.wst.validation.internal.core.war.workbenchimpl.WarHelper"; //$NON-NLS-1$
-
-
- /**
- * WarHelper constructor comment.
- */
-
- public WarHelper() {
- super();
-
- registerModel(WARMessageConstants.WAR_MODEL_NAME, "loadWarFile"); //$NON-NLS-1$
- }
-
- /**
- * This method will be invoked indirectly from the WarValidator (via. the WorkbenchReporter). It
- * will expect the coming object to be a EObject for the node who generated this message. Note:
- * This methods may need to be implemented higher up in the class stack.
- */
- public int getLineNo(Object object) {
-
-
- if (object instanceof Integer) { // Error discovered using the XML parser
- return ((Integer) object).intValue();
- }
-
- return super.getLineNo(object);
- }
-
- /**
- * Given a resource, return its non-eclipse-specific location. If this resource, or type of
- * resource, isn't handled by this helper, return null.
- */
- public String getPortableName(IResource resource) {
- if (!(resource instanceof IFile)) {
- return null;
- }
-
- IPath resourcePath = resource.getFullPath();
- if (resourcePath != null)
- return resourcePath.toString();
-
- return null;
- }
-
- /**
- * Similar to the getFile() method, we know that we are talking about web.xml, but need a unique
- * ID.
- *
- * @return java.lang.String
- * @param object
- * Object
- */
- public String getTargetObjectName(Object object) {
-
- if( object != null && object instanceof WARFile ){
- return J2EEConstants.WEBAPP_ID;
- }
- return null;
-// String ret = null;
-// if (object != null) {
-// IFile warFile = (IFile) warFileMap.get(getProject().toString());// validator framework
-// // will call getFile()
-// // first.
-// if (warFile != null) {
-// ret = (warFile.toString() + HelperID);
-// }
-// }
-// return ret;
- }
-
-
- //public EObject loadWarFile(ComponentHandle handle) {
- public EObject loadWarFile() {
- IVirtualComponent comp = ComponentCore.createComponent(getProject());
- edit = ComponentUtilities.getArtifactEditForRead(comp);
-
- try {
- warFile = (WARFile)((WebArtifactEdit) edit).asArchive(false);
- return warFile;
- } catch (OpenFailureException e1) {
- Logger.getLogger().log(e1);
- }
-// finally {
-// if (edit != null) {
-// edit.dispose();
-// }
-// }
- return null;
- }
-
- public void cleanup(WorkbenchReporter reporter) {
- if (edit != null) {
- edit.dispose();
- edit = null;
- }
- if(warFile != null){
- warFile.close();
- warFile = null;
- }
- super.cleanup(reporter);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/ModuleAdapter.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/ModuleAdapter.java
deleted file mode 100644
index 27ab2ee71..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/ModuleAdapter.java
+++ /dev/null
@@ -1,39 +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 8, 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.web.deployables;
-
-import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.jst.j2ee.internal.deployables.J2EEFlexProjDeployable;
-
-/**
- * @author blancett
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class ModuleAdapter extends AdapterImpl {
-
- J2EEFlexProjDeployable delegate;
-
- public void setModuleDelegate(J2EEFlexProjDeployable moduleDelegate) {
- delegate = moduleDelegate;
- }
-
- public J2EEFlexProjDeployable getDelegate() {
- return delegate;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebDeployableArtifactUtil.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebDeployableArtifactUtil.java
deleted file mode 100644
index b8b315dd6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebDeployableArtifactUtil.java
+++ /dev/null
@@ -1,353 +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.web.deployables;
-
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.web.jfaces.extension.FileURL;
-import org.eclipse.jst.j2ee.internal.web.jfaces.extension.FileURLExtensionReader;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.jst.j2ee.webapplication.JSPType;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.ServletMapping;
-import org.eclipse.jst.j2ee.webapplication.ServletType;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebType;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.util.WebResource;
-
-/**
- * @version 1.0
- * @author
- */
-public class WebDeployableArtifactUtil {
-
- private final static String GENERIC_SERVLET_CLASS_TYPE = "javax.servlet.GenericServlet"; //$NON-NLS-1$
- private final static String CACTUS_SERVLET_CLASS_TYPE = "org.apache.cactus.server.ServletTestRedirector"; //$NON-NLS-1$
-
- public WebDeployableArtifactUtil() {
- super();
- }
-
- public static IModuleArtifact getModuleObject(Object obj) {
- IResource resource = null;
- if (obj instanceof IResource)
- resource = (IResource) obj;
- if (obj instanceof IModuleArtifact)
- resource = ((IModuleArtifact) obj).getModule().getProject();
- else if (obj instanceof IAdaptable)
- resource = (IResource) ((IAdaptable) obj).getAdapter(IResource.class);
- else if (obj instanceof EObject) {
- resource = ProjectUtilities.getProject((EObject) obj);
- if (obj instanceof Servlet) {
- Servlet servlet = ((Servlet) obj);
- Resource servResource = servlet.eResource();
- IVirtualResource[] resources = null;
- try {
- IResource eclipeServResoruce = WorkbenchResourceHelper.getFile(servResource);
- resources = ComponentCore.createResources(eclipeServResoruce);
- } catch (Exception e) {
- e.printStackTrace();
- }
- IVirtualComponent component = null;
- if (resources[0] != null)
- component = resources[0].getComponent();
- String mapping = null;
- java.util.List mappings = ((Servlet) obj).getMappings();
- if (mappings != null && !mappings.isEmpty()) {
- ServletMapping map = (ServletMapping) mappings.get(0);
- mapping = map.getUrlPattern();
- }
- if (mapping != null) {
- return new WebResource(getModule(resource.getProject(), component), new Path(mapping));
- }
- WebType webType = ((Servlet) obj).getWebType();
- if (webType.isJspType()) {
- resource = ((IProject) resource).getFile(((JSPType) webType).getJspFile()); //$NON-NLS-1$
- } else if (webType.isServletType()) {
- return new WebResource(getModule(resource.getProject(), component), new Path("servlet/" + ((ServletType) webType).getClassName())); //$NON-NLS-1$
- }
- }
- }
- if (resource == null)
- return null;
-
- if (resource instanceof IProject) {
- IProject project = (IProject) resource;
- if (hasInterestedComponents(project))
- return new WebResource(getModule(project, null), project.getProjectRelativePath());
- }
-
- if (!hasInterestedComponents(resource.getProject()))
- return null;
- if (isCactusJunitTest(resource))
- return null;
-
- IPath resourcePath = resource.getFullPath();
- IVirtualResource[] resources = ComponentCore.createResources(resource);
- IVirtualComponent component = null;
- if (resources.length <= 0 || resources[0] == null )
- return null;
- component = resources[0].getComponent();
- String className = getServletClassName(resource);
- if (className != null && component != null) {
- String mapping = getServletMapping(resource, true, className, component.getName());
- if (mapping != null) {
- return new WebResource(getModule(resource.getProject(), component), new Path(mapping));
- }
- // if there is no servlet mapping, provide direct access to the servlet
- // through the fully qualified class name
- return new WebResource(getModule(resource.getProject(), component), new Path("servlet/" + className)); //$NON-NLS-1$
-
- }
- if (className == null) {
- WebArtifactEdit webEdit = null;
- try {
- webEdit = WebArtifactEdit.getWebArtifactEditForRead(component);
- List servlets = webEdit.getWebApp().getServlets();
- for (int i=0; i<servlets.size(); i++) {
- Servlet servlet = (Servlet) servlets.get(i);
- WebType type = servlet.getWebType();
- if (type.isJspType()) {
- JSPType jsp = (JSPType)type;
- String jspPath = resource.getProjectRelativePath().removeFirstSegments(1).toString();
- if (jsp.getJspFile().equals(jspPath)) {
- List mappings = servlet.getMappings();
- String mapping = null;
- if (mappings != null && !mappings.isEmpty()) {
- ServletMapping map = (ServletMapping) mappings.get(0);
- mapping = map.getUrlPattern();
- if (mapping != null)
- return new WebResource(getModule(resource.getProject(), component), new Path(mapping));
- }
- }
- }
- }
- } finally {
- if (webEdit != null)
- webEdit.dispose();
- }
- }
- resourcePath = resources[0].getRuntimePath();
-
- // Extension read to get the correct URL for Java Server Faces file if
- // the jsp is of type jsfaces.
- FileURL jspURL = FileURLExtensionReader.getInstance().getFilesURL();
- if (jspURL != null) {
- IPath correctJSPPath = jspURL.getFileURL(resource, resourcePath);
- if (correctJSPPath != null && correctJSPPath.toString().length() > 0)
- return new WebResource(getModule(resource.getProject(), component), correctJSPPath);
- }
- // return Web resource type
-
- return new WebResource(getModule(resource.getProject(), component), resourcePath);
- }
-
- protected static IModule getModule(IProject project, IVirtualComponent component) {
- IModule deployable = null;
- Iterator iterator = Arrays.asList(ServerUtil.getModules(J2EEProjectUtilities.DYNAMIC_WEB)).iterator(); //$NON-NLS-1$
- String componentName = null;
- if (component != null)
- componentName = component.getName();
- else
- return getModuleProject(project, iterator);
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof IModule) {
- deployable = (IModule) next;
- if (deployable.getName().equals(componentName)) {
- return deployable;
- }
- }
- }
- return null;
- }
-
- protected static IModule getModuleProject(IProject project, Iterator iterator) {
- IModule deployable = null;
- while (iterator.hasNext()) {
- Object next = iterator.next();
- if (next instanceof IModule) {
- deployable = (IModule) next;
- if (deployable.getProject().equals(project))
- return deployable;
- }
- }
- return null;
- }
-
- /**
- *
- * Very temporary api - TODO - rip this out by 1.0
- */
- private static boolean isCactusJunitTest(IResource resource) {
- return getClassNameForType(resource, CACTUS_SERVLET_CLASS_TYPE) != null;
- }
-
-
-
- private static IType[] getTypes(IJavaElement element) {
- try {
- if (element.getElementType() != IJavaElement.COMPILATION_UNIT)
- return null;
-
- return ((ICompilationUnit) element).getAllTypes();
- } catch (Exception e) {
- return null;
- }
- }
-
- public static String getServletClassName(IResource resource) {
- return getClassNameForType(resource, GENERIC_SERVLET_CLASS_TYPE);
- }
-
- public static String getClassNameForType(IResource resource, String superType) {
- if (resource == null)
- return null;
-
- try {
- IProject project = resource.getProject();
- IPath path = resource.getFullPath();
- if (!project.hasNature(JavaCore.NATURE_ID) || path == null)
- return null;
-
- IJavaProject javaProject = (IJavaProject) project.getNature(JavaCore.NATURE_ID);
- if (!javaProject.isOpen())
- javaProject.open(new NullProgressMonitor());
-
- // output location may not be on classpath
- IPath outputPath = javaProject.getOutputLocation();
- if (outputPath != null && "class".equals(path.getFileExtension()) && outputPath.isPrefixOf(path)) { //$NON-NLS-1$
- int count = outputPath.segmentCount();
- path = path.removeFirstSegments(count);
- }
-
- // remove initial part of classpath
- IClasspathEntry[] classPathEntry = javaProject.getResolvedClasspath(true);
- if (classPathEntry != null) {
- int size = classPathEntry.length;
- for (int i = 0; i < size; i++) {
- IPath classPath = classPathEntry[i].getPath();
- if (classPath.isPrefixOf(path)) {
- int count = classPath.segmentCount();
- path = path.removeFirstSegments(count);
- i += size;
- }
- }
- }
-
- // get java element
- IJavaElement javaElement = javaProject.findElement(path);
-
- IType[] types = getTypes(javaElement);
- if (types != null) {
- int size2 = types.length;
- for (int i = 0; i < size2; i++) {
- if (hasSuperclass(types[i], superType))
- return types[i].getFullyQualifiedName();
- }
- }
- return null;
- } catch (Exception e) {
- return null;
- }
- }
-
- public static boolean hasSuperclass(IType type, String superClassName) {
- try {
- ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
- IType[] superClasses = hierarchy.getAllSuperclasses(type);
-
- int size = superClasses.length;
- for (int i = 0; i < size; i++) {
- if (superClassName.equals(superClasses[i].getFullyQualifiedName())) //$NON-NLS-1$
- return true;
- }
- return false;
- } catch (Exception e) {
- return false;
- }
- }
-
- public static String getServletMapping(IResource resource, boolean isServlet, String typeName, String componentName) {
- if (typeName == null || typeName.equals("")) //$NON-NLS-1$
- return null;
-
- IProject project = resource.getProject();
- WebArtifactEdit edit = null;
- WebApp webApp = null;
- try {
- edit = WebArtifactEdit.getWebArtifactEditForRead(project);
- edit.getDeploymentDescriptorRoot();
- webApp = edit.getWebApp();
- if (webApp == null)
- return null;
- Iterator iterator = webApp.getServlets().iterator();
- while (iterator.hasNext()) {
- Servlet servlet = (Servlet) iterator.next();
- boolean valid = false;
-
- WebType webType = servlet.getWebType();
- if (webType.isServletType() && isServlet) {
- ServletType type = (ServletType) webType;
- if (typeName.equals(type.getClassName()))
- valid = true;
- } else if (webType.isJspType() && !isServlet) {
- JSPType type = (JSPType) webType;
- if (typeName.equals(type.getJspFile()))
- valid = true;
- }
- if (valid) {
- java.util.List mappings = servlet.getMappings();
- if (mappings != null && !mappings.isEmpty()) {
- ServletMapping map = (ServletMapping) mappings.get(0);
- return map.getUrlPattern();
- }
- }
- }
- return null;
- } finally {
- if (edit != null) {
- edit.dispose();
- }
- }
- }
-
- protected static boolean hasInterestedComponents(IProject project) {
- return J2EEProjectUtilities.isDynamicWebProject(project);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebModuleArtifact.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebModuleArtifact.java
deleted file mode 100644
index 9f213a95d..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/deployables/WebModuleArtifact.java
+++ /dev/null
@@ -1,24 +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.web.deployables;
-
-/**
- * Key Class for adapter manager
- */
-public class WebModuleArtifact {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURL.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURL.java
deleted file mode 100644
index 777e92514..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURL.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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 13, 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.web.jfaces.extension;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-
-
-/**
- * @author vijayb
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public interface FileURL {
- public IPath getFileURL(IResource resource, IPath existingURL);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtension.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtension.java
deleted file mode 100644
index 53e2075da..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtension.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Jun 13, 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.web.jfaces.extension;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.logger.proxy.Logger;
-
-/**
- * @author vijayb
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class FileURLExtension {
- private String id = null;
- private FileURL instance;
- private boolean errorCondition = false;
- private IConfigurationElement element;
- public static final String FILE_URL_EXTENSION = "fileURL"; //$NON-NLS-1$
- public static final String RUN = "run"; //$NON-NLS-1$
- public static final String ATT_ID = "id"; //$NON-NLS-1$
- public static final String ATT_CLASS = "class"; //$NON-NLS-1$
-
-
- /**
- *
- */
- public FileURLExtension() {
- super();
- }
-
- public FileURL getInstance() {
- try {
- if (this.instance == null && !this.errorCondition)
- this.instance = (FileURL) this.element.createExecutableExtension("run"); //$NON-NLS-1$
- } catch (Throwable e) {
- Logger.getLogger().logError(e);
- this.errorCondition = true;
- }
- return this.instance;
- }
-
- public FileURLExtension(IConfigurationElement element) {
- if (!FILE_URL_EXTENSION.equals(element.getName()))
- throw new IllegalArgumentException("Extensions must be of the type \"" + FILE_URL_EXTENSION + "\"."); //$NON-NLS-1$ //$NON-NLS-2$
- this.element = element;
- init();
- }
-
- private void init() {
- this.id = this.element.getAttribute(ATT_ID);
-
- }
-
- /**
- * @return Returns the id.
- */
- public String getId() {
- return this.id;
- }
-
- /**
- * @param id
- * The id to set.
- */
- public void setId(String id) {
- this.id = id;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtensionReader.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtensionReader.java
deleted file mode 100644
index c188cc3d2..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/jfaces/extension/FileURLExtensionReader.java
+++ /dev/null
@@ -1,116 +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 13, 2004
- */
-package org.eclipse.jst.j2ee.internal.web.jfaces.extension;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.jem.util.RegistryReader;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-
-/**
- * @author vijayb
- *
- * This class loads all the extensions that define the correct URL string for the Java Server Faces
- * file
- *
- */
-public class FileURLExtensionReader extends RegistryReader {
- static FileURLExtensionReader instance = null;
- protected List fileURLExtensions;
-
- /**
- * @param registry
- * @param pluginID
- * @param extensionPoint
- */
- public FileURLExtensionReader() {
- super(WebPlugin.PLUGIN_ID, "fileURL"); //$NON-NLS-1$
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.RegistryReader#readElement(org.eclipse.core.runtime.IConfigurationElement)
- */
- public boolean readElement(IConfigurationElement element) {
- if (FileURLExtension.FILE_URL_EXTENSION.equals(element.getName())) {
- addExtension(element);
- return true;
- }
- return false;
- }
-
- /**
- * Sets the extension point.
- *
- * @param extensions
- * The extensions to set
- */
- protected void addExtension(IConfigurationElement newExtension) {
- getFileURLExtensions().add(new FileURLExtension(newExtension));
- }
-
- /**
- * Sets the extension point.
- *
- * @param extensions
- * The extensions to set
- */
- protected void addExtensionPoint(FileURLExtensionReader newExtension) {
- if (this.fileURLExtensions == null)
- this.fileURLExtensions = new ArrayList();
- this.fileURLExtensions.add(newExtension);
- }
-
- /**
- * @return the appropriate handler for the project based on priorities of those which are
- * available and enabled
- */
- public FileURL getFilesURL() {
- FileURLExtension fileURLExt;
- for (Iterator fileURLExtItr = getFileURLExtensions().iterator(); fileURLExtItr.hasNext();) {
- fileURLExt = (FileURLExtension) fileURLExtItr.next();
- return fileURLExt.getInstance();
- }
- return null;
- }
-
- /**
- * Gets the instance.
- *
- * @return Returns a FileURLExtensionReader
- */
- public static FileURLExtensionReader getInstance() {
- if (instance == null) {
- instance = new FileURLExtensionReader();
- instance.readRegistry();
- }
- return instance;
- }
-
- /**
- * @return Returns the handlerExtensions.
- */
- protected List getFileURLExtensions() {
- if (this.fileURLExtensions == null)
- this.fileURLExtensions = new ArrayList();
- return this.fileURLExtensions;
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AbstractSupertypesValidator.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AbstractSupertypesValidator.java
deleted file mode 100644
index 6f1cce40f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AbstractSupertypesValidator.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.PROJECT;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SUPERCLASS;
-
-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.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class AbstractSupertypesValidator {
-
- private static ITypeHierarchy typeHierarchyCache = null;
-
- protected static String getSuperclass(IDataModel dataModel) {
- return dataModel.getStringProperty(SUPERCLASS);
- }
-
- protected static List getInterfaces(IDataModel dataModel) {
- return (List) dataModel.getProperty(INTERFACES);
- }
-
- protected static IJavaProject getJavaProject(IDataModel dataModel) {
- return JavaCore.create((IProject) dataModel.getProperty(PROJECT));
- }
-
- protected static boolean hasSuperclass(IDataModel dataModel,
- String typeName, String superTypeName) {
- try {
- IType type = getJavaProject(dataModel).findType(typeName);
- if (type != null) {
- ITypeHierarchy typeHierarchy = getTypeHierarchy(type);
- for (IType superType : typeHierarchy.getAllSuperclasses(type)) {
- if (superTypeName.equals(superType.getFullyQualifiedName()))
- return true;
- }
- }
- } catch (JavaModelException e) {
- WebPlugin.log(e);
- }
-
- return false;
- }
-
- protected static boolean hasSuperInterface(IDataModel dataModel,
- String typeName, String superTypeName) {
- try {
- IType type = getJavaProject(dataModel).findType(typeName);
- if (type != null) {
- ITypeHierarchy typeHierarchy = getTypeHierarchy(type);
- for (IType superType : typeHierarchy.getAllSuperInterfaces(type)) {
- if (superTypeName.equals(superType.getFullyQualifiedName()))
- return true;
- }
- }
- } catch (JavaModelException e) {
- WebPlugin.log(e);
- }
-
- return false;
- }
-
- private static ITypeHierarchy getTypeHierarchy(IType type) throws JavaModelException {
- if (typeHierarchyCache == null || !type.equals(typeHierarchyCache.getType())) {
- typeHierarchyCache = type.newTypeHierarchy(null);
- }
- return typeHierarchyCache;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddFilterOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddFilterOperation.java
deleted file mode 100644
index 300a3456d..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddFilterOperation.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.FILTER_MAPPINGS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DESCRIPTION;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-
-import java.util.List;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation;
-import org.eclipse.jst.j2ee.webapplication.DispatcherType;
-import org.eclipse.jst.j2ee.webapplication.Filter;
-import org.eclipse.jst.j2ee.webapplication.FilterMapping;
-import org.eclipse.jst.j2ee.webapplication.InitParam;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.jst.javaee.core.UrlPatternType;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * This class, AddFilter Operation is a IDataModelOperation following the
- * IDataModel wizard and operation framework.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * This operation subclasses the ArtifactEditProviderOperation so the changes
- * made to the deployment descriptor models are saved to the artifact edit
- * model.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * It is the operation which should be used when adding a new filter to a web
- * app. This uses the NewFilterClassDataModelProvider to retrieve properties set by the
- * user in order to create the custom filter.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassDataModelProvider
- *
- * This operation will add the metadata necessary into the web deployment descriptor.
- * To actually create the java class for the filter, the operation uses the NewFilterClassOperation.
- * The NewFilterClassOperation shares the same data model provider.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassOperation
- *
- * Clients may subclass this operation to provide their own behavior on filter
- * creation. The execute method can be extended to do so. Also,
- * generateFilterMetaData and creteFilterClass are exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class AddFilterOperation extends AddWebClassOperation {
-
- /**
- * This is the constructor which should be used when creating the operation.
- * It will not accept null parameter. It will not return null.
- *
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- *
- * @param dataModel
- * @return AddFilterOperation
- */
- public AddFilterOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- @Override
- protected NewJavaEEArtifactClassOperation getNewClassOperation() {
- return new NewFilterClassOperation(getDataModel());
- }
-
- /**
- * Subclasses may extend this method to add their own generation steps for
- * the creation of the metadata for the web deployment descriptor. This
- * implementation uses the J2EE models to create the Filter model instance,
- * any init params specified, and any filter mappings. It then adds these
- * to the web application model. This will then be written out to the
- * deployment descriptor file. This method does not accept null parameters.
- *
- * @see Filter
- * @see AddFilterOperation#createFilter(String)
- * @see AddFilterOperation#setUpInitParams(List, Filter)
- * @see AddFilterOperation#setUpURLMappings(List, Filter)
- *
- * @param aModel
- * @param qualifiedClassName
- */
- @Override
- protected void generateMetaData(IDataModel aModel, String qualifiedClassName) {
- // Set up the filter modelled object
- Object filter = createFilter(qualifiedClassName);
-
- // Set up the InitParams if any
- List initParamList =
- (List) aModel.getProperty(INIT_PARAM);
- if (initParamList != null)
- setUpInitParams(initParamList, filter);
-
- // Set up the filter mappings if any
- List filterMappingsList =
- (List) aModel.getProperty(FILTER_MAPPINGS);
-
- if (filterMappingsList != null && !filterMappingsList.isEmpty())
- setUpMappings(filterMappingsList, filter);
- }
-
- /**
- * This method is intended for private use only. This method is used to
- * create the filter modeled object, to set any parameters specified in
- * the data model, and then to add the filter instance to the web
- * application model. This method does not accept null parameters. It will
- * not return null.
- *
- * @see AddFilterOperation#generateFilterMetaData(NewFilterClassDataModel,
- * String)
- * @see WebapplicationFactory#createFilter()
- * @see Filter
- *
- * @param qualifiedClassName
- * @return Filter instance
- */
- /**
- * @param qualifiedClassName
- * @return
- */
- private Object createFilter(String qualifiedClassName) {
- // Get values from data model
- String displayName =
- model.getStringProperty(DISPLAY_NAME);
- String description =
- model.getStringProperty(DESCRIPTION);
-
- // Create the filter instance and set up the parameters from data model
- Object modelObject = provider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- Filter filter = WebapplicationFactory.eINSTANCE.createFilter();
- filter.setName(displayName);
- filter.setDisplayName(displayName);
- filter.setDescription(description);
- filter.setFilterClassName(qualifiedClassName);
-
- // Add the filter to the web application model
- WebApp webApp = (WebApp) modelObject;
- webApp.getFilters().add(filter);
- return filter;
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- org.eclipse.jst.javaee.web.Filter filter = WebFactory.eINSTANCE.createFilter();
- DisplayName displayNameObj = JavaeeFactory.eINSTANCE.createDisplayName();
- displayNameObj.setValue(displayName);
- filter.getDisplayNames().add(displayNameObj);
- filter.setFilterName(displayName);
- filter.setFilterClass(qualifiedClassName);
- if (webApp != null) {
- webApp.getFilters().add(filter);
- }
- // Should be return Filter's instance
- return filter;
- }
- // Return the filter instance
- return null;
- }
-
- /**
- * This method is intended for internal use only. This is used to create any
- * init params for the new filter metadata. It will not accept null
- * parameters. The init params are set on the filter modeled object.
- *
- * @see AddFilterOperation#generateFilterMetaData(NewFilterClassDataModel,
- * String)
- * @see WebapplicationFactory#createInitParam()
- *
- * @param initParamList
- * @param filter
- */
- private void setUpInitParams(List initParamList, Object filterObj) {
- // Get the web app instance from the data model
- Object modelObject = provider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- WebApp webApp = (WebApp) modelObject;
- Filter filter = (Filter) filterObj;
-
- // If J2EE 1.4, add the param value and description info instances
- // to the filter init params
- if (webApp.getJ2EEVersionID() >= J2EEVersionConstants.J2EE_1_4_ID) {
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create 1.4 common param value
- InitParam param = WebapplicationFactory.eINSTANCE.createInitParam();
- param.setParamName(stringArray[0]);
- param.setParamValue(stringArray[1]);
- param.setDescription(stringArray[2]);
- // Set the param to the filter model list of init params
- filter.getInitParams().add(param);
- }
- }
- // If J2EE 1.2 or 1.3, use the filter specific init param instances
- else {
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create the web init param
- InitParam ip = WebapplicationFactory.eINSTANCE.createInitParam();
- // Set the param name
- ip.setParamName(stringArray[0]);
- // Set the param value
- ip.setParamValue(stringArray[1]);
- // Set the param description
- ip.setDescription(stringArray[2]);
- // Add the init param to the filter model list of params
- filter.getInitParams().add(ip);
- }
- }
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.Filter filter = (org.eclipse.jst.javaee.web.Filter) filterObj;
-
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create 1.4 common param value
- org.eclipse.jst.javaee.core.ParamValue param =
- JavaeeFactory.eINSTANCE.createParamValue();
- param.setParamName(stringArray[0]);
- param.setParamValue(stringArray[1]);
-
- org.eclipse.jst.javaee.core.Description descriptionObj =
- JavaeeFactory.eINSTANCE.createDescription();
- descriptionObj.setValue(stringArray[2]);
- // Set the description on the param
- param.getDescriptions().add(descriptionObj);
- // Add the param to the filter model list of init params
- filter.getInitParams().add(param);
- }
- }
- }
-
- /**
- * This method is intended for internal use only. This method is used to
- * create the filter mapping modelled objects so the metadata for the
- * filter mappings is store in the web deployment descriptor. This method
- * will not accept null parameters. The filter mappings are added to the
- * web application modeled object.
- *
- * @see AddFilterOperation#generateFilterMetaData(NewFilterClassDataModel,
- * String)
- * @see WebapplicationFactory#createFilterMapping()
- *
- * @param urlMappingList
- * @param filter
- */
- private void setUpMappings(List filterMappingsList, Object filterObj) {
- // Get the web app modelled object from the data model
- // WebApp webApp = (WebApp) artifactEdit.getContentModelRoot();
- Object modelObject = provider.getModelObject();
-
- // Create the filter mappings if any
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- WebApp webApp = (WebApp) modelObject;
- Filter filter = (Filter) filterObj;
- if (filterMappingsList != null)
- for (int iM = 0; iM < filterMappingsList.size(); iM++) {
- IFilterMappingItem filterMapping = (IFilterMappingItem) filterMappingsList.get(iM);
- // Create the filter mapping instance from the web factory
- FilterMapping mapping = WebapplicationFactory.eINSTANCE.createFilterMapping();
- // Set the filter
- mapping.setFilter(filter);
- if (filterMapping.isUrlPatternType()) {
- // Set the URL pattern to map the filter to
- mapping.setUrlPattern(filterMapping.getName());
- } else {
- // Set the Servlet Name to map the filter to
- Servlet servlet = webApp.getServletNamed(filterMapping.getName());
- mapping.setServlet(servlet);
- }
- //Set dispatcher options for the filter mapping if any.
- int dispatchers = filterMapping.getDispatchers();
- EList dispatcherTypes = mapping.getDispatcherType();
- if ((dispatchers & IFilterMappingItem.REQUEST) > 0) {
- dispatcherTypes.add(DispatcherType.REQUEST_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.FORWARD) > 0) {
- dispatcherTypes.add(DispatcherType.FORWARD_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.INCLUDE) > 0) {
- dispatcherTypes.add(DispatcherType.INCLUDE_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.ERROR) > 0) {
- dispatcherTypes.add(DispatcherType.ERROR_LITERAL);
- }
- // Add the filter mapping to the web application modelled list
- webApp.getFilterMappings().add(mapping);
- }
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- org.eclipse.jst.javaee.web.Filter filter = (org.eclipse.jst.javaee.web.Filter) filterObj;
-
- // Create the filter mapping instance from the web factory
- org.eclipse.jst.javaee.web.FilterMapping mapping = null;
- // Create the filter mappings if any
- if (filterMappingsList != null) {
- for (int i = 0; i < filterMappingsList.size(); i++) {
- mapping = WebFactory.eINSTANCE.createFilterMapping();
- mapping.setFilterName(filter.getFilterName());
- IFilterMappingItem filterMapping = (IFilterMappingItem) filterMappingsList.get(i);
- if (filterMapping.getMappingType() == IFilterMappingItem.URL_PATTERN) {
- // Set the URL pattern to map the filter to
- UrlPatternType url = JavaeeFactory.eINSTANCE.createUrlPatternType();
- url.setValue(filterMapping.getName());
- mapping.getUrlPatterns().add(url);
- } else {
- mapping.getServletNames().add(filterMapping.getName());
- }
- //Set dispatcher options for the filter mapping if any.
- int dispatchers = filterMapping.getDispatchers();
- if ((dispatchers & IFilterMappingItem.REQUEST) > 0) {
- mapping.getDispatchers().add(org.eclipse.jst.javaee.web.DispatcherType.REQUEST_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.FORWARD) > 0) {
- mapping.getDispatchers().add(org.eclipse.jst.javaee.web.DispatcherType.FORWARD_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.INCLUDE) > 0) {
- mapping.getDispatchers().add(org.eclipse.jst.javaee.web.DispatcherType.INCLUDE_LITERAL);
- }
- if ((dispatchers & IFilterMappingItem.ERROR) > 0) {
- mapping.getDispatchers().add(org.eclipse.jst.javaee.web.DispatcherType.ERROR_LITERAL);
- }
- // Add the filter mapping to the web application model list
- webApp.getFilterMappings().add(mapping);
- }
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddListenerOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddListenerOperation.java
deleted file mode 100644
index 2cb81c4b6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddListenerOperation.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.jst.j2ee.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.Listener;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * This class, AddListenerOperation is a IDataModelOperation following the IDataModel wizard and
- * operation framework.
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * This operation subclasses the ArtifactEditProviderOperation so the changes made to the deployment descriptor
- * models are saved to the artifact edit model.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * It is the operation which should be used when adding a new application lifecycle listener to
- * a web app, whether that be an annotated listener or a non annotated listener. This uses the
- * NewListenerClassDataModelProvider to retrieve properties set by the user in order to create the custom
- * listener class.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassDataModelProvider
- *
- * In the non annotated case, this operation will add the metadata necessary into the web deployment
- * descriptor. In the annotated case, it will not, it will leave this up to the parsing of the
- * annotations to build the deployment descriptor artifacts. To actually create the java class for
- * the listener, the operation uses the NewListenerClassOperation. The NewListenerClassOperation
- * shares the same data model provider.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassOperation
- *
- * Clients may subclass this operation to provide their own behavior on listener creation. The execute
- * method can be extended to do so. Also, generateListenerMetaData and creteListenerClass are exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class AddListenerOperation extends AddWebClassOperation {
-
- /**
- * This is the constructor which should be used when creating the operation.
- * It will not accept null parameter. It will not return null.
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- *
- * @param dataModel
- * @return AddListenerOperation
- */
- public AddListenerOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- @Override
- protected NewJavaEEArtifactClassOperation getNewClassOperation() {
- return new NewListenerClassOperation(getDataModel());
- }
-
- /**
- * Subclasses may extend this method to add their own generation steps for the creation of the
- * metadata for the web deployment descriptor. This implementation uses the J2EE models to create
- * the Listener model instance. It then adds these to the web application model. This will then be
- * written out to the deployment descriptor file. This method does not accept null parameters.
- * @see Listener
- * @see AddListenerOperation#createListener(String)
- *
- * @param aModel
- * @param qualifiedClassName
- */
- protected void generateMetaData(IDataModel aModel, String qualifiedClassName) {
- // Set up the listener modeled object
- createListener(qualifiedClassName);
- }
-
- /**
- * This method is intended for private use only. This method is used to create the listener
- * modeled object, to set any parameters specified in the data model, and then to add the
- * listener instance to the web application model. This method does not accept null parameters.
- * It will not return null.
- * @see AddListenerOperation#generateListenerMetaData(IDataModel, String)
- * @see CommonFactory#createListener()
- * @see Listener
- *
- * @param qualifiedClassName
- * @return Listener instance
- */
- private Object createListener(String qualifiedClassName) {
- Object modelObject = provider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp ){
- // Create the listener instance and set up the parameters from data model
- Listener listener = CommonFactory.eINSTANCE.createListener();
- listener.setListenerClassName(qualifiedClassName);
-
- // Add the listener to the web application model
- WebApp webApp = (WebApp) modelObject;
- webApp.getListeners().add(listener);
- return listener;
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp ){
- // Create the listener instance and set up the parameters from data model
- org.eclipse.jst.javaee.core.Listener listener = JavaeeFactory.eINSTANCE.createListener();
- listener.setListenerClass(qualifiedClassName);
-
- // Add the listener to the web application model
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- webApp.getListeners().add(listener);
- return listener;
- }
-
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddServletOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddServletOperation.java
deleted file mode 100644
index ea5c6c8a7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddServletOperation.java
+++ /dev/null
@@ -1,328 +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
- * Kaloyan Raev, kaloyan.raev@sap.com
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.IS_SERVLET_TYPE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.URL_MAPPINGS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DESCRIPTION;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-
-import java.util.List;
-
-import org.eclipse.jst.j2ee.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.common.ParamValue;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation;
-import org.eclipse.jst.j2ee.webapplication.InitParam;
-import org.eclipse.jst.j2ee.webapplication.JSPType;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.ServletMapping;
-import org.eclipse.jst.j2ee.webapplication.ServletType;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.jst.javaee.core.UrlPatternType;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * This class, AddServlet Operation is a IDataModelOperation following the IDataModel wizard and
- * operation framework.
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * This operation subclasses the ArtifactEditProviderOperation so the changes made to the deployment descriptor
- * models are saved to the artifact edit model.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * It is the operation which should be used when adding a new servlet to
- * a web app, whether that be an annotated servlet or a non annotated servlet. This uses the
- * NewServletClassDataModelProvider to retrieve properties set by the user in order to create the custom
- * servet.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewServletClassDataModelProvider
- *
- * In the non annotated case, this operation will add the metadata necessary into the web deployment
- * descriptor. In the annotated case, it will not, it will leave this up to the parsing of the
- * annotations to build the deployment descriptor artifacts. To actually create the java class for
- * the servlet, the operation uses the NewServletClassOperation. The NewServletClassOperation
- * shares the same data model provider.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewServletClassOperation
- *
- * Clients may subclass this operation to provide their own behaviour on servlet creation. The execute
- * method can be extended to do so. Also, generateServletMetaData and creteServletClass are exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class AddServletOperation extends AddWebClassOperation {
-
- /**
- * This is the constructor which should be used when creating the operation.
- * It will not accept null parameter. It will not return null.
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- *
- * @param dataModel
- * @return AddServletOperation
- */
- public AddServletOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- @Override
- protected NewJavaEEArtifactClassOperation getNewClassOperation() {
- return new NewServletClassOperation(getDataModel());
- }
-
- @Override
- protected void generateMetaData(IDataModel model, String qualifiedClassName) {
- boolean isServletType = model.getBooleanProperty(IS_SERVLET_TYPE);
- generateMetaData(model, qualifiedClassName, isServletType);
- }
-
- /**
- * Subclasses may extend this method to add their own generation steps for the creation of the
- * metadata for the web deployment descriptor. This implementation uses the J2EE models to create
- * the Servlet model instance, any init params specified, and any servlet mappings. It then adds
- * these to the web application model. This will then be written out to the deployment descriptor
- * file. This method does not accept null parameters.
- * @see Servlet
- * @see AddServletOperation#createServlet(String, boolean)
- * @see AddServletOperation#setUpInitParams(List, Servlet)
- * @see AddServletOperation#setUpURLMappings(List, Servlet)
- *
- * @param aModel
- * @param qualifiedClassName
- * @param isServletType
- */
- protected void generateMetaData(IDataModel aModel, String qualifiedClassName, boolean isServletType) {
- // Set up the servlet modelled object
- Object servlet = createServlet(qualifiedClassName, isServletType);
-
- // Set up the InitParams if any
- List initParamList = (List) aModel.getProperty(INIT_PARAM);
- if (initParamList != null)
- setUpInitParams(initParamList, servlet);
-
- // Set up the servlet URL mappings if any
- List urlMappingList = (List) aModel.getProperty(URL_MAPPINGS);
- if (urlMappingList != null)
- setUpURLMappings(urlMappingList, servlet);
- }
-
- /**
- * This method is intended for private use only. This method is used to create the servlet
- * modelled object, to set any parameters specified in the data model, and then to add the
- * servlet instance to the web application model. This method does not accpet null parameters.
- * It will not return null.
- * @see AddServletOperation#generateServletMetaData(NewServletClassDataModel, String, boolean)
- * @see WebapplicationFactory#createServlet()
- * @see Servlet
- *
- * @param qualifiedClassName
- * @param isServletType
- * @return Servlet instance
- */
- private Object createServlet(String qualifiedClassName, boolean isServletType) {
- // Get values from data model
- String displayName = model.getStringProperty(DISPLAY_NAME);
- String description = model.getStringProperty(DESCRIPTION);
-
- // Create the servlet instance and set up the parameters from data model
- Object modelObject = provider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
-
- Servlet servlet = WebapplicationFactory.eINSTANCE.createServlet();
- servlet.setDisplayName(displayName);
- servlet.setServletName(displayName);
- servlet.setDescription(description);
- // Handle servlet case
- if (isServletType) {
- ServletType servletType = WebapplicationFactory.eINSTANCE.createServletType();
- servletType.setClassName(qualifiedClassName);
- servlet.setWebType(servletType);
- }
- // Handle JSP case
- else {
- JSPType jspType = WebapplicationFactory.eINSTANCE.createJSPType();
- jspType.setJspFile(qualifiedClassName);
- servlet.setWebType(jspType);
- }
- // Add the servlet to the web application model
-
- //WebApp webApp = (WebApp) artifactEdit.getContentModelRoot();
- WebApp webApp = (WebApp) modelObject;
- webApp.getServlets().add(servlet);
- return servlet;
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
-
- org.eclipse.jst.javaee.web.Servlet servlet = WebFactory.eINSTANCE.createServlet();
-
- DisplayName displayNameObj = JavaeeFactory.eINSTANCE.createDisplayName();
- displayNameObj.setValue(displayName);
- servlet.getDisplayNames().add(displayNameObj);
-
- servlet.setServletName(displayName);
-
- org.eclipse.jst.javaee.core.Description descriptionObj = JavaeeFactory.eINSTANCE.createDescription();
- descriptionObj.setValue(description);
- servlet.getDescriptions().add(descriptionObj);
-
- // Handle servlet case
- if (isServletType) {
- servlet.setServletClass(qualifiedClassName);
- }
- // Handle JSP case
- else {
- servlet.setJspFile(qualifiedClassName);
- }
- // Add the servlet to the web application model
-
- //WebApp webApp = (WebApp) artifactEdit.getContentModelRoot();
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- webApp.getServlets().add(servlet);
- return servlet;
- }
- // Return the servlet instance
- return null;
- }
-
- /**
- * This method is intended for internal use only. This is used to create any init params
- * for the new servlet metadata. It will not accept null parameters. The init params are
- * set on the servlet modelled object.
- * @see AddServletOperation#generateServletMetaData(NewServletClassDataModel, String, boolean)
- * @see WebapplicationFactory#createInitParam()
- *
- * @param initParamList
- * @param servlet
- */
- private void setUpInitParams(List initParamList, Object servletObj) {
- // Get the web app instance from the data model
- Object modelObject = provider.getModelObject();
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- WebApp webApp = (WebApp) modelObject;
- Servlet servlet = (Servlet) servletObj;
-
- // If J2EE 1.4, add the param value and description info instances to the servlet init params
- if (webApp.getJ2EEVersionID() >= J2EEVersionConstants.J2EE_1_4_ID) {
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create 1.4 common param value
- ParamValue param = CommonFactory.eINSTANCE.createParamValue();
- param.setName(stringArray[0]);
- param.setValue(stringArray[1]);
- // Create 1.4 common descripton value
- Description descriptionObj = CommonFactory.eINSTANCE.createDescription();
- descriptionObj.setValue(stringArray[2]);
- // Set the description on the param
- param.getDescriptions().add(descriptionObj);
- param.setDescription(stringArray[2]);
- // Add the param to the servlet model list of init params
- servlet.getInitParams().add(param);
- }
- }
- // If J2EE 1.2 or 1.3, use the servlet specific init param instances
- else {
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create the web init param
- InitParam ip = WebapplicationFactory.eINSTANCE.createInitParam();
- // Set the param name
- ip.setParamName(stringArray[0]);
- // Set the param value
- ip.setParamValue(stringArray[1]);
- // Set the param description
- ip.setDescription(stringArray[2]);
- // Add the init param to the servlet model list of params
- servlet.getParams().add(ip);
- }
- }
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- org.eclipse.jst.javaee.web.Servlet servlet = (org.eclipse.jst.javaee.web.Servlet) servletObj;
-
- for (int iP = 0; iP < initParamList.size(); iP++) {
- String[] stringArray = (String[]) initParamList.get(iP);
- // Create 1.4 common param value
- org.eclipse.jst.javaee.core.ParamValue param= JavaeeFactory.eINSTANCE.createParamValue();
- param.setParamName(stringArray[0]);
- param.setParamValue(stringArray[1]);
-
- org.eclipse.jst.javaee.core.Description descriptionObj = JavaeeFactory.eINSTANCE.createDescription();
- descriptionObj.setValue(stringArray[2]);
- // Set the description on the param
- param.getDescriptions().add(descriptionObj);
- // Add the param to the servlet model list of init params
- servlet.getInitParams().add(param);
- }
- }
- }
-
- /**
- * This method is intended for internal use only. This method is used to create the servlet
- * mapping modelled objects so the metadata for the servlet mappings is store in the web
- * deployment descriptor. This method will not accept null parameters. The servlet mappings
- * are added to the web application modelled object.
- * @see AddServletOperation#generateServletMetaData(NewServletClassDataModel, String, boolean)
- * @see WebapplicationFactory#createServletMapping()
- *
- * @param urlMappingList
- * @param servlet
- */
- private void setUpURLMappings(List urlMappingList, Object servletObj) {
- // Get the web app modelled object from the data model
- //WebApp webApp = (WebApp) artifactEdit.getContentModelRoot();
- Object modelObject = provider.getModelObject();
-
- // Create the servlet mappings if any
- if (modelObject instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- WebApp webApp = (WebApp) modelObject;
- Servlet servlet = (Servlet) servletObj;
- for (int iM = 0; iM < urlMappingList.size(); iM++) {
- String[] stringArray = (String[]) urlMappingList.get(iM);
- // Create the servlet mapping instance from the web factory
- ServletMapping mapping = WebapplicationFactory.eINSTANCE.createServletMapping();
- // Set the servlet and servlet name
- mapping.setServlet(servlet);
- mapping.setName(servlet.getServletName());
- // Set the URL pattern to map the servlet to
- mapping.setUrlPattern(stringArray[0]);
- // Add the servlet mapping to the web application modelled list
- webApp.getServletMappings().add(mapping);
- }
- } else if (modelObject instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) modelObject;
- org.eclipse.jst.javaee.web.Servlet servlet = (org.eclipse.jst.javaee.web.Servlet) servletObj;
-
- // Create the servlet mappings if any
- if (urlMappingList.size() > 0) {
- // Create the servlet mapping instance from the web factory
- org.eclipse.jst.javaee.web.ServletMapping mapping = WebFactory.eINSTANCE.createServletMapping();
-
- mapping.setServletName(servlet.getServletName());
- for (int i = 0; i < urlMappingList.size(); i++) {
- String[] stringArray = (String[]) urlMappingList.get(i);
- // Set the URL pattern to map the servlet to
- UrlPatternType url = JavaeeFactory.eINSTANCE.createUrlPatternType();
- url.setValue(stringArray[0]);
- mapping.getUrlPatterns().add(url);
- }
- // Add the servlet mapping to the web application model list
- webApp.getServletMappings().add(mapping);
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddWebClassOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddWebClassOperation.java
deleted file mode 100644
index 6270f239c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/AddWebClassOperation.java
+++ /dev/null
@@ -1,86 +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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel.USE_ANNOTATIONS;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CLASS_NAME;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.GENERATE_DD;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.USE_EXISTING_CLASS;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.internal.common.operations.AddJavaEEArtifactOperation;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.jst.jee.project.facet.IWebCreateDeploymentFilesDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public abstract class AddWebClassOperation extends AddJavaEEArtifactOperation {
-
- public AddWebClassOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- /**
- * Subclasses may extend this method to add their own actions during
- * execution. The implementation of the execute method drives the running of
- * the operation. This implementation will create the filter class, and
- * then it will create the filter metadata for the web deployment descriptor.
- * This method will accept null as a parameter.
- *
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor,
- * org.eclipse.core.runtime.IAdaptable)
- * @see AddFilterOperation#createFilterClass()
- * @see AddFilterOperation#generateFilterMetaData(NewFilterClassDataModel,
- * String)
- *
- * @param monitor
- * IProgressMonitor
- * @param info
- * IAdaptable
- * @throws CoreException
- * @throws InterruptedException
- * @throws InvocationTargetException
- */
- @Override
- public IStatus doExecute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
-
- boolean useExisting = model.getBooleanProperty(USE_EXISTING_CLASS);
- String qualifiedClassName = model.getStringProperty(CLASS_NAME);
-
- // create the java class
- if (!useExisting)
- qualifiedClassName = createClass();
-
- // If the filter is not annotated, generate the filter metadata for the DD
- if (!model.getBooleanProperty(USE_ANNOTATIONS))
- {
- if (model.getBooleanProperty(GENERATE_DD))
- {
- IDataModel ddModel = DataModelFactory.createDataModel(IWebCreateDeploymentFilesDataModelProperties.class);
- ddModel.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, getTargetProject());
- ddModel.getDefaultOperation().execute(monitor, info);
- }
- generateMetaData(model, qualifiedClassName);
- }
-
- return OK_STATUS;
- }
-
- protected abstract void generateMetaData(IDataModel aModel, String qualifiedClassName);
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java
deleted file mode 100644
index 1023fc33d..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateFilterTemplateModel.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.ABSTRACT_METHODS;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CLASS_NAME;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.DESTROY;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.DO_FILTER;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.FILTER_MAPPINGS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.INIT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DESTROY_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_FILTER_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.FILTER_INIT_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DESTROY;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_FILTER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_INIT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER_CHAIN;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER_CONFIG;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_IO_EXCEPTION;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_EXCEPTION;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_RESPONSE;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.internal.common.operations.Method;
-import org.eclipse.jst.j2ee.webapplication.DispatcherType;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class CreateFilterTemplateModel extends CreateWebClassTemplateModel {
-
- public static final int NAME = 0;
- public static final int VALUE = 1;
- public static final int DESCRIPTION = 2;
-
- public CreateFilterTemplateModel(IDataModel dataModel) {
- super(dataModel);
- }
-
- public Collection<String> getImports() {
- Collection<String> collection = super.getImports();
-
- if (shouldGenInit()) {
- collection.add(QUALIFIED_FILTER_CONFIG);
- collection.add(QUALIFIED_SERVLET_EXCEPTION);
- }
-
- if (shouldGenDoFilter()) {
- collection.add(QUALIFIED_SERVLET_REQUEST);
- collection.add(QUALIFIED_SERVLET_RESPONSE);
- collection.add(QUALIFIED_FILTER_CHAIN);
- collection.add(QUALIFIED_IO_EXCEPTION);
- collection.add(QUALIFIED_SERVLET_EXCEPTION);
- }
-
- return collection;
- }
-
- public String getFilterName() {
- return getProperty(CLASS_NAME).trim();
- }
-
- public boolean shouldGenInit() {
- return implementImplementedMethod(METHOD_INIT);
- }
-
- public boolean shouldGenDoFilter() {
- return implementImplementedMethod(METHOD_DO_FILTER);
- }
-
- public boolean shouldGenDestroy() {
- return implementImplementedMethod(METHOD_DESTROY);
- }
-
- public List<String[]> getInitParams() {
- return (List) dataModel.getProperty(INIT_PARAM);
- }
-
- public String getInitParam(int index, int type) {
- List<String[]> params = getInitParams();
- if (index < params.size()) {
- String[] stringArray = params.get(index);
- return stringArray[type];
- }
- return null;
- }
-
- public List<IFilterMappingItem> getFilterMappings() {
- return (List<IFilterMappingItem>) dataModel.getProperty(FILTER_MAPPINGS);
- }
-
- public IFilterMappingItem getFilterMapping(int index) {
- List<IFilterMappingItem> mappings = getFilterMappings();
- if (index < mappings.size()) {
- return mappings.get(index);
- }
- return null;
- }
-
- public String getDispatcherList(IFilterMappingItem mapping) {
- List<String> list = new ArrayList<String>();
-
- int dispatchers = mapping.getDispatchers();
- if ((dispatchers & IFilterMappingItem.REQUEST) > 0) {
- list.add(DispatcherType.REQUEST_LITERAL.getLiteral());
- }
- if ((dispatchers & IFilterMappingItem.FORWARD) > 0) {
- list.add(DispatcherType.FORWARD_LITERAL.getLiteral());
- }
- if ((dispatchers & IFilterMappingItem.INCLUDE) > 0) {
- list.add(DispatcherType.INCLUDE_LITERAL.getLiteral());
- }
- if ((dispatchers & IFilterMappingItem.ERROR) > 0) {
- list.add(DispatcherType.ERROR_LITERAL.getLiteral());
- }
-
- StringBuilder builder = new StringBuilder();
- Iterator<String> iterator = list.iterator();
- while (iterator.hasNext()) {
- builder.append(iterator.next());
- if (iterator.hasNext()) {
- builder.append(",");
- }
- }
-
- return builder.toString();
- }
-
- protected boolean implementImplementedMethod(String methodName) {
- if (dataModel.getBooleanProperty(ABSTRACT_METHODS)) {
- if (methodName.equals(METHOD_INIT))
- return dataModel.getBooleanProperty(INIT);
- else if (methodName.equals(METHOD_DO_FILTER))
- return dataModel.getBooleanProperty(DO_FILTER);
- else if (methodName.equals(METHOD_DESTROY))
- return dataModel.getBooleanProperty(DESTROY);
- }
- return false;
- }
-
- @Override
- public Collection<Method> getUnimplementedMethods() {
- Collection<Method> unimplementedMethods = super.getUnimplementedMethods();
- Iterator<Method> iterator = unimplementedMethods.iterator();
-
- while (iterator.hasNext()) {
- Method method = iterator.next();
- if ((METHOD_INIT.equals(method.getName()) && FILTER_INIT_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DESTROY.equals(method.getName()) && DESTROY_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_FILTER.equals(method.getName()) && DO_FILTER_SIGNATURE.equals(method.getSignature()))) {
- iterator.remove();
- }
- }
-
- return unimplementedMethods;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java
deleted file mode 100644
index dd3dd4ad8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateListenerTemplateModel.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_BINDING_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_BINDING_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_EVENT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_LISTENER;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class CreateListenerTemplateModel extends CreateWebClassTemplateModel {
-
- public Collection<String> getImports() {
- Collection<String> collection = super.getImports();
-
- if (implementServletContextListener()) {
- collection.add(QUALIFIED_SERVLET_CONTEXT_LISTENER);
- collection.add(QUALIFIED_SERVLET_CONTEXT_EVENT);
- }
-
- if (implementServletContextAttributeListener()) {
- collection.add(QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER);
- collection.add(QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_EVENT);
- }
-
- if (implementHttpSessionListener()) {
- collection.add(QUALIFIED_HTTP_SESSION_LISTENER);
- collection.add(QUALIFIED_HTTP_SESSION_EVENT);
- }
-
- if (implementHttpSessionAttributeListener()) {
- collection.add(QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER);
- collection.add(QUALIFIED_HTTP_SESSION_BINDING_EVENT);
- }
-
- if (implementHttpSessionActivationListener()) {
- collection.add(QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER);
- collection.add(QUALIFIED_HTTP_SESSION_EVENT);
- }
-
- if (implementHttpSessionBindingListener()) {
- collection.add(QUALIFIED_HTTP_SESSION_BINDING_LISTENER);
- collection.add(QUALIFIED_HTTP_SESSION_BINDING_EVENT);
- }
-
- if (implementServletRequestListener()) {
- collection.add(QUALIFIED_SERVLET_REQUEST_LISTENER);
- collection.add(QUALIFIED_SERVLET_REQUEST_EVENT);
- }
-
- if (implementServletRequestAttributeListener()) {
- collection.add(QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER);
- collection.add(QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_EVENT);
- }
-
- return collection;
- }
-
- public CreateListenerTemplateModel(IDataModel dataModel) {
- super(dataModel);
- }
-
- public boolean implementServletContextListener() {
- return implementInterface(QUALIFIED_SERVLET_CONTEXT_LISTENER);
- }
-
- public boolean implementServletContextAttributeListener() {
- return implementInterface(QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER);
- }
-
- public boolean implementHttpSessionListener() {
- return implementInterface(QUALIFIED_HTTP_SESSION_LISTENER);
- }
-
- public boolean implementHttpSessionAttributeListener() {
- return implementInterface(QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER);
- }
-
- public boolean implementHttpSessionActivationListener() {
- return implementInterface(QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER);
- }
-
- public boolean implementHttpSessionBindingListener() {
- return implementInterface(QUALIFIED_HTTP_SESSION_BINDING_LISTENER);
- }
-
- public boolean implementServletRequestListener() {
- return implementInterface(QUALIFIED_SERVLET_REQUEST_LISTENER);
- }
-
- public boolean implementServletRequestAttributeListener() {
- return implementInterface(QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER);
- }
-
- private boolean implementInterface(String iface) {
- List<String> interfaces = getQualifiedInterfaces();
- if (interfaces != null) {
- return interfaces.contains(iface);
- }
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java
deleted file mode 100644
index 1c0d4958c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateServletTemplateModel.java
+++ /dev/null
@@ -1,290 +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
- * Kiril Mitov, k.mitov@sap.com - bug 204160
- * Kaloyan Raev, kaloyan.raev@sap.com
- *******************************************************************************/
-/*
- * Created on Aug 6, 2004
- */
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.ABSTRACT_METHODS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DESTROY;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_DELETE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_GET;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_HEAD;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_OPTIONS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_POST;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_PUT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_TRACE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.GET_SERVLET_CONFIG;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.GET_SERVLET_INFO;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.INIT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.SERVICE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.URL_MAPPINGS;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DESTROY_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_DELETE_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_GET_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_HEAD_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_POST_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_PUT_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.DO_TRACE_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.GET_SERVLET_CONFIG_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.GET_SERVLET_INFO_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.HTTP_SERVICE_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DESTROY;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_DELETE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_GET;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_HEAD;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_OPTIONS;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_POST;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_PUT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_DO_TRACE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_GET_SERVLET_CONFIG;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_GET_SERVLET_INFO;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_INIT;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_SERVICE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.METHOD_TO_STRING;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET_REQUEST;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET_RESPONSE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_IO_EXCEPTION;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONFIG;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_EXCEPTION;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_RESPONSE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.SERVICE_SIGNATURE;
-import static org.eclipse.jst.j2ee.web.IServletConstants.SERVLET_INIT_SIGNATURE;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.j2ee.internal.common.operations.Method;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * @author jlanuti
- */
-public class CreateServletTemplateModel extends CreateWebClassTemplateModel {
-
- public static final int NAME = 0;
- public static final int VALUE = 1;
- public static final int DESCRIPTION = 2;
-
- public CreateServletTemplateModel(IDataModel dataModel) {
- super(dataModel);
- }
-
- public Collection<String> getImports() {
- Collection<String> collection = super.getImports();
-
- if (shouldGenInit()) {
- collection.add(QUALIFIED_SERVLET_CONFIG);
- collection.add(QUALIFIED_SERVLET_EXCEPTION);
- }
-
- if (shouldGenGetServletConfig()) {
- collection.add(QUALIFIED_SERVLET_CONFIG);
- }
-
- if (shouldGenService()) {
- if (isHttpServletSuperclass()) {
- collection.add(QUALIFIED_HTTP_SERVLET_REQUEST);
- collection.add(QUALIFIED_HTTP_SERVLET_RESPONSE);
- } else {
- collection.add(QUALIFIED_SERVLET_REQUEST);
- collection.add(QUALIFIED_SERVLET_RESPONSE);
- }
-
- collection.add(QUALIFIED_SERVLET_EXCEPTION);
- collection.add(QUALIFIED_IO_EXCEPTION);
- }
-
- if (shouldGenDoGet() || shouldGenDoPost() || shouldGenDoPut() ||
- shouldGenDoDelete() || shouldGenDoHead() ||
- shouldGenDoOptions() || shouldGenDoTrace()) {
- collection.add(QUALIFIED_HTTP_SERVLET_REQUEST);
- collection.add(QUALIFIED_HTTP_SERVLET_RESPONSE);
- collection.add(QUALIFIED_SERVLET_EXCEPTION);
- collection.add(QUALIFIED_IO_EXCEPTION);
- }
-
- return collection;
- }
-
- public String getServletName() {
- return super.getDisplayName();
- }
-
- /**
- * @deprecated Use {@link #getClassName()} instead. Will be removed post WTP
- * 3.0.
- *
- * @see CreateWebClassTemplateModel#getClassName()
- */
- public String getServletClassName() {
- return super.getClassName();
- }
-
- public boolean shouldGenInit() {
- return implementImplementedMethod(METHOD_INIT);
- }
-
- public boolean shouldGenDestroy() {
- return implementImplementedMethod(METHOD_DESTROY);
- }
-
- public boolean shouldGenGetServletConfig() {
- return implementImplementedMethod(METHOD_GET_SERVLET_CONFIG);
- }
-
- public boolean shouldGenGetServletInfo() {
- return implementImplementedMethod(METHOD_GET_SERVLET_INFO);
- }
-
- public boolean shouldGenService() {
- return implementImplementedMethod(METHOD_SERVICE);
- }
-
- public boolean shouldGenDoGet() {
- return implementImplementedMethod(METHOD_DO_GET);
- }
-
- public boolean shouldGenDoPost() {
- return implementImplementedMethod(METHOD_DO_POST);
- }
-
- public boolean shouldGenDoPut() {
- return implementImplementedMethod(METHOD_DO_PUT);
- }
-
- public boolean shouldGenDoDelete() {
- return implementImplementedMethod(METHOD_DO_DELETE);
- }
-
- public boolean shouldGenDoHead() {
- return implementImplementedMethod(METHOD_DO_HEAD);
- }
-
- public boolean shouldGenDoOptions() {
- return implementImplementedMethod(METHOD_DO_OPTIONS);
- }
-
- public boolean shouldGenDoTrace() {
- return implementImplementedMethod(METHOD_DO_TRACE);
- }
-
- public boolean shouldGenToString() {
- return implementImplementedMethod(METHOD_TO_STRING);
- }
-
- public boolean isGenericServletSuperclass() {
- return ServletSupertypesValidator.isGenericServletSuperclass(dataModel);
- }
-
- public boolean isHttpServletSuperclass() {
- return ServletSupertypesValidator.isHttpServletSuperclass(dataModel);
- }
-
- public List<String[]> getInitParams() {
- return (List) dataModel.getProperty(INIT_PARAM);
- }
-
- public String getInitParam(int index, int type) {
- List<String[]> params = getInitParams();
- if (index < params.size()) {
- String[] stringArray = params.get(index);
- return stringArray[type];
- }
- return null;
- }
-
- public List<String[]> getServletMappings() {
- return (List) dataModel.getProperty(URL_MAPPINGS);
- }
-
- public String getServletMapping(int index) {
- List<String[]> mappings = getServletMappings();
- if (index < mappings.size()) {
- String[] map = mappings.get(index);
- return map[0];
- }
- return null;
- }
-
- /**
- * @deprecated Use {@link #getDescription()} instead. Will be removed post
- * WTP 3.0.
- *
- * @see CreateWebClassTemplateModel#getDescription()
- */
- public String getServletDescription() {
- return super.getDescription();
- }
-
- protected boolean implementImplementedMethod(String methodName) {
- if (dataModel.getBooleanProperty(ABSTRACT_METHODS)) {
- if (methodName.equals(METHOD_INIT))
- return dataModel.getBooleanProperty(INIT);
- else if (methodName.equals(METHOD_DESTROY))
- return dataModel.getBooleanProperty(DESTROY);
- else if (methodName.equals(METHOD_GET_SERVLET_CONFIG))
- return dataModel.getBooleanProperty(GET_SERVLET_CONFIG);
- else if (methodName.equals(METHOD_GET_SERVLET_INFO))
- return dataModel.getBooleanProperty(GET_SERVLET_INFO);
- else if (methodName.equals(METHOD_SERVICE))
- return dataModel.getBooleanProperty(SERVICE);
- else if (methodName.equals(METHOD_DO_GET))
- return dataModel.getBooleanProperty(DO_GET);
- else if (methodName.equals(METHOD_DO_POST))
- return dataModel.getBooleanProperty(DO_POST);
- else if (methodName.equals(METHOD_DO_PUT))
- return dataModel.getBooleanProperty(DO_PUT);
- else if (methodName.equals(METHOD_DO_DELETE))
- return dataModel.getBooleanProperty(DO_DELETE);
- else if (methodName.equals(METHOD_DO_HEAD))
- return dataModel.getBooleanProperty(DO_HEAD);
- else if (methodName.equals(METHOD_DO_OPTIONS))
- return dataModel.getBooleanProperty(DO_OPTIONS);
- else if (methodName.equals(METHOD_DO_TRACE))
- return dataModel.getBooleanProperty(DO_TRACE);
- }
- return false;
- }
-
- @Override
- public Collection<Method> getUnimplementedMethods() {
- Collection<Method> unimplementedMethods = super.getUnimplementedMethods();
- Iterator<Method> iterator = unimplementedMethods.iterator();
-
- while (iterator.hasNext()) {
- Method method = iterator.next();
- if ((METHOD_INIT.equals(method.getName()) && SERVLET_INIT_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DESTROY.equals(method.getName()) && DESTROY_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_GET_SERVLET_CONFIG.equals(method.getName()) && GET_SERVLET_CONFIG_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_GET_SERVLET_INFO.equals(method.getName()) && GET_SERVLET_INFO_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_SERVICE.equals(method.getName()) && SERVICE_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_SERVICE.equals(method.getName()) && HTTP_SERVICE_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_GET.equals(method.getName()) && DO_GET_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_POST.equals(method.getName()) && DO_POST_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_PUT.equals(method.getName()) && DO_PUT_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_DELETE.equals(method.getName()) && DO_DELETE_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_HEAD.equals(method.getName()) && DO_HEAD_SIGNATURE.equals(method.getSignature())) ||
- (METHOD_DO_OPTIONS.equals(method.getName()) && METHOD_DO_OPTIONS.equals(method.getSignature())) ||
- (METHOD_DO_TRACE.equals(method.getName()) && DO_TRACE_SIGNATURE.equals(method.getSignature()))) {
- iterator.remove();
- }
- }
-
- return unimplementedMethods;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java
deleted file mode 100644
index aaa08c32e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/CreateWebClassTemplateModel.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- * Carl Anderson, ccc@us.ibm.com - handle null superclass (no runtime) (bug 214950)
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel.USE_ANNOTATIONS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DESCRIPTION;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-
-import org.eclipse.jst.j2ee.internal.common.operations.CreateJavaEEArtifactTemplateModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class CreateWebClassTemplateModel extends
- CreateJavaEEArtifactTemplateModel {
-
- public CreateWebClassTemplateModel(IDataModel dataModel) {
- super(dataModel);
- }
-
- public String getDisplayName() {
- return dataModel.getStringProperty(DISPLAY_NAME);
- }
-
- public String getDescription() {
- return dataModel.getStringProperty(DESCRIPTION);
- }
-
- public boolean isAnnotated() {
- return dataModel.getBooleanProperty(USE_ANNOTATIONS);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterMappingItem.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterMappingItem.java
deleted file mode 100644
index 0531a050e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterMappingItem.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.jst.j2ee.internal.web.providers.WebAppEditResourceHandler;
-
-public class FilterMappingItem implements IFilterMappingItem {
-
- private int mappingType;
- private int dispatchers;
- private String mapping;
-
- public FilterMappingItem(int type, String mapping) {
- mappingType = type;
- this.mapping = mapping;
- }
-
- public FilterMappingItem(int type, String mapping, int dispatchers) {
- this(type, mapping);
- this.dispatchers = dispatchers;
- }
-
- public int getMappingType() {
- return mappingType;
- }
-
- public boolean isUrlPatternType() {
- return mappingType == IFilterMappingItem.URL_PATTERN;
- }
-
- public boolean isServletNameType() {
- return mappingType == IFilterMappingItem.SERVLET_NAME;
- }
-
- public int getDispatchers() {
- return dispatchers;
- }
-
- public String getDispatchersAsString() {
- String result = "";
- if ((dispatchers & REQUEST) > 0) {
- result += WebAppEditResourceHandler.getString("DISPATCHER_R") + " ";
- }
- if ((dispatchers & FORWARD) > 0) {
- result += WebAppEditResourceHandler.getString("DISPATCHER_F") + " ";
- }
- if ((dispatchers & INCLUDE) > 0) {
- result += WebAppEditResourceHandler.getString("DISPATCHER_I") + " ";
- }
- if ((dispatchers & ERROR) > 0) {
- result += WebAppEditResourceHandler.getString("DISPATCHER_E") + " ";
- }
- return result.trim();
- }
-
- public String getName() {
- return mapping;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java
deleted file mode 100644
index fb7c510fe..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterSupertypesValidator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class FilterSupertypesValidator extends AbstractSupertypesValidator {
-
- public static boolean isFilterSuperclass(IDataModel dataModel) {
- if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_FILTER))
- return true;
-
- for (Object iface : getInterfaces(dataModel)) {
- if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_FILTER))
- return true;
- }
-
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterTemplate.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterTemplate.java
deleted file mode 100644
index 6ee53ab45..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/FilterTemplate.java
+++ /dev/null
@@ -1,306 +0,0 @@
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import java.util.*;
-import org.eclipse.jst.j2ee.internal.common.operations.*;
-
-public class FilterTemplate
-{
- protected static String nl;
- public static synchronized FilterTemplate create(String lineSeparator)
- {
- nl = lineSeparator;
- FilterTemplate result = new FilterTemplate();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "package ";
- protected final String TEXT_2 = ";";
- protected final String TEXT_3 = NL;
- protected final String TEXT_4 = NL + "import ";
- protected final String TEXT_5 = ";";
- protected final String TEXT_6 = NL;
- protected final String TEXT_7 = NL;
- protected final String TEXT_8 = "/**" + NL + " * Servlet Filter implementation class ";
- protected final String TEXT_9 = NL + " *" + NL + " * @web.filter" + NL + " * name=\"";
- protected final String TEXT_10 = "\"" + NL + " * display-name=\"";
- protected final String TEXT_11 = "\"";
- protected final String TEXT_12 = NL + " * description=\"";
- protected final String TEXT_13 = "\"";
- protected final String TEXT_14 = NL + " *" + NL + " * @web.filter-mapping";
- protected final String TEXT_15 = NL + " * url-pattern=\"";
- protected final String TEXT_16 = "\"";
- protected final String TEXT_17 = NL + " * servlet-name=\"";
- protected final String TEXT_18 = "\"";
- protected final String TEXT_19 = NL + " * dispatcher=\"";
- protected final String TEXT_20 = "\"";
- protected final String TEXT_21 = NL + " *" + NL + " * @web.filter-init-param" + NL + " * name=\"";
- protected final String TEXT_22 = "\"" + NL + " * value=\"";
- protected final String TEXT_23 = "\"";
- protected final String TEXT_24 = NL + " * description=\"";
- protected final String TEXT_25 = "\"";
- protected final String TEXT_26 = NL + " */";
- protected final String TEXT_27 = NL + "public ";
- protected final String TEXT_28 = "abstract ";
- protected final String TEXT_29 = "final ";
- protected final String TEXT_30 = "class ";
- protected final String TEXT_31 = " extends ";
- protected final String TEXT_32 = " implements ";
- protected final String TEXT_33 = ", ";
- protected final String TEXT_34 = " {";
- protected final String TEXT_35 = NL + NL + " /**" + NL + " * Default constructor. " + NL + " */" + NL + " public ";
- protected final String TEXT_36 = "() {" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_37 = NL + " " + NL + " /**" + NL + " * @see ";
- protected final String TEXT_38 = "#";
- protected final String TEXT_39 = "(";
- protected final String TEXT_40 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_41 = "(";
- protected final String TEXT_42 = ") {" + NL + " super(";
- protected final String TEXT_43 = ");" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_44 = NL + NL + "\t/**" + NL + " * @see ";
- protected final String TEXT_45 = "#";
- protected final String TEXT_46 = "(";
- protected final String TEXT_47 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_48 = " ";
- protected final String TEXT_49 = "(";
- protected final String TEXT_50 = ") {" + NL + " // TODO Auto-generated method stub";
- protected final String TEXT_51 = NL + "\t\t\treturn ";
- protected final String TEXT_52 = ";";
- protected final String TEXT_53 = NL + " }";
- protected final String TEXT_54 = NL + NL + "\t/**" + NL + "\t * @see Filter#destroy()" + NL + "\t */" + NL + "\tpublic void destroy() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_55 = NL + NL + "\t/**" + NL + "\t * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain)" + NL + "\t */" + NL + "\tpublic void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t\t// place your code here" + NL + "" + NL + "\t\t// pass the request along the filter chain" + NL + "\t\tchain.doFilter(request, response);" + NL + "\t}";
- protected final String TEXT_56 = NL + NL + "\t/**" + NL + "\t * @see Filter#init(FilterConfig)" + NL + "\t */" + NL + "\tpublic void init(FilterConfig fConfig) throws ServletException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_57 = NL + NL + "}";
- protected final String TEXT_58 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
- CreateFilterTemplateModel model = (CreateFilterTemplateModel) argument;
-
- model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
-
-
- if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
-
- stringBuffer.append(TEXT_1);
- stringBuffer.append( model.getJavaPackageName() );
- stringBuffer.append(TEXT_2);
-
- }
-
- stringBuffer.append(TEXT_3);
-
- Collection<String> imports = model.getImports();
- for (String anImport : imports) {
-
- stringBuffer.append(TEXT_4);
- stringBuffer.append( anImport );
- stringBuffer.append(TEXT_5);
-
- }
-
- stringBuffer.append(TEXT_6);
- stringBuffer.append(TEXT_7);
- stringBuffer.append(TEXT_8);
- stringBuffer.append( model.getClassName() );
-
- if (model.isAnnotated()) {
-
- stringBuffer.append(TEXT_9);
- stringBuffer.append( model.getFilterName() );
- stringBuffer.append(TEXT_10);
- stringBuffer.append( model.getFilterName() );
- stringBuffer.append(TEXT_11);
-
- if (model.getDescription() != null && model.getDescription().length() > 0) {
-
- stringBuffer.append(TEXT_12);
- stringBuffer.append( model.getDescription() );
- stringBuffer.append(TEXT_13);
-
- }
-
- List<IFilterMappingItem> mappings = model.getFilterMappings();
- for (IFilterMappingItem mapping : mappings) {
-
- stringBuffer.append(TEXT_14);
-
- if (mapping.isUrlPatternType()) {
-
- stringBuffer.append(TEXT_15);
- stringBuffer.append( mapping.getName() );
- stringBuffer.append(TEXT_16);
-
- } else if (mapping.isServletNameType()) {
-
- stringBuffer.append(TEXT_17);
- stringBuffer.append( mapping.getName() );
- stringBuffer.append(TEXT_18);
-
- }
-
- String dispatcher = model.getDispatcherList(mapping);
- if (dispatcher.length() > 0) {
-
- stringBuffer.append(TEXT_19);
- stringBuffer.append( dispatcher );
- stringBuffer.append(TEXT_20);
-
- }
- }
-
- List<String[]> initParams = model.getInitParams();
- if (initParams != null && initParams.size() > 0) {
- for (int i = 0; i < initParams.size(); i++) {
- String name = model.getInitParam(i, CreateFilterTemplateModel.NAME);
- String value = model.getInitParam(i, CreateFilterTemplateModel.VALUE);
- String description = model.getInitParam(i, CreateFilterTemplateModel.DESCRIPTION);
-
- stringBuffer.append(TEXT_21);
- stringBuffer.append( name );
- stringBuffer.append(TEXT_22);
- stringBuffer.append( value );
- stringBuffer.append(TEXT_23);
-
- if (description != null && description.length() > 0) {
-
- stringBuffer.append(TEXT_24);
- stringBuffer.append( description );
- stringBuffer.append(TEXT_25);
-
- }
- }
- }
- }
-
- stringBuffer.append(TEXT_26);
-
- if (model.isPublic()) {
-
- stringBuffer.append(TEXT_27);
-
- }
-
- if (model.isAbstract()) {
-
- stringBuffer.append(TEXT_28);
-
- }
-
- if (model.isFinal()) {
-
- stringBuffer.append(TEXT_29);
-
- }
-
- stringBuffer.append(TEXT_30);
- stringBuffer.append( model.getClassName() );
-
- String superClass = model.getSuperclassName();
- if (superClass != null && superClass.length() > 0) {
-
- stringBuffer.append(TEXT_31);
- stringBuffer.append( superClass );
-
- }
-
- List<String> interfaces = model.getInterfaces();
- if ( interfaces.size() > 0) {
-
- stringBuffer.append(TEXT_32);
-
- }
-
- for (int i = 0; i < interfaces.size(); i++) {
- String INTERFACE = (String) interfaces.get(i);
- if (i > 0) {
-
- stringBuffer.append(TEXT_33);
-
- }
-
- stringBuffer.append( INTERFACE );
-
- }
-
- stringBuffer.append(TEXT_34);
-
- if (!model.hasEmptySuperclassConstructor()) {
-
- stringBuffer.append(TEXT_35);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_36);
-
- }
-
- if (model.shouldGenSuperclassConstructors()) {
- List<Constructor> constructors = model.getConstructors();
- for (Constructor constructor : constructors) {
- if (constructor.isPublic() || constructor.isProtected()) {
-
- stringBuffer.append(TEXT_37);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_38);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_39);
- stringBuffer.append( constructor.getParamsForJavadoc() );
- stringBuffer.append(TEXT_40);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_41);
- stringBuffer.append( constructor.getParamsForDeclaration() );
- stringBuffer.append(TEXT_42);
- stringBuffer.append( constructor.getParamsForCall() );
- stringBuffer.append(TEXT_43);
-
- }
- }
- }
-
-
- if (model.shouldImplementAbstractMethods()) {
- for (Method method : model.getUnimplementedMethods()) {
-
- stringBuffer.append(TEXT_44);
- stringBuffer.append( method.getContainingJavaClass() );
- stringBuffer.append(TEXT_45);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_46);
- stringBuffer.append( method.getParamsForJavadoc() );
- stringBuffer.append(TEXT_47);
- stringBuffer.append( method.getReturnType() );
- stringBuffer.append(TEXT_48);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_49);
- stringBuffer.append( method.getParamsForDeclaration() );
- stringBuffer.append(TEXT_50);
-
- String defaultReturnValue = method.getDefaultReturnValue();
- if (defaultReturnValue != null) {
-
- stringBuffer.append(TEXT_51);
- stringBuffer.append( defaultReturnValue );
- stringBuffer.append(TEXT_52);
-
- }
-
- stringBuffer.append(TEXT_53);
-
- }
- }
-
- if (model.shouldGenDestroy()) {
- stringBuffer.append(TEXT_54);
- }
- if (model.shouldGenDoFilter()) {
- stringBuffer.append(TEXT_55);
- }
- if (model.shouldGenInit()) {
- stringBuffer.append(TEXT_56);
- }
- stringBuffer.append(TEXT_57);
- stringBuffer.append(TEXT_58);
- return stringBuffer.toString();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/IFilterMappingItem.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/IFilterMappingItem.java
deleted file mode 100644
index 4fd6f9271..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/IFilterMappingItem.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-public interface IFilterMappingItem {
-
- public static int URL_PATTERN = 0;
- public static int SERVLET_NAME = 1;
-
- public static int REQUEST = 1 << 1;
- public static int FORWARD = 1 << 2;
- public static int INCLUDE = 1 << 3;
- public static int ERROR = 1 << 4;
-
- public String getName();
- public int getMappingType();
- public boolean isUrlPatternType();
- public boolean isServletNameType();
- public int getDispatchers();
- public String getDispatchersAsString();
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewFilterClassDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewFilterClassDataModelProperties.java
deleted file mode 100644
index 029c7c550..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewFilterClassDataModelProperties.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-public interface INewFilterClassDataModelProperties extends INewWebClassDataModelProperties {
-
- /**
- * Optional, boolean property used to specify whether to generate the init method.
- * The default is false.
- */
- public static final String INIT = "NewFilterClassDataModel.INIT"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the destroy method.
- * The default is false.
- */
- public static final String DESTROY = "NewFilterClassDataModel.DESTROY"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doFilter method.
- * The default is true.
- */
- public static final String DO_FILTER = "NewFilterClassDataModel.DO_FILTER"; //$NON-NLS-1$
-
- /**
- * Optional, List property used to cache all the init params defined on the filter.
- */
- public static final String INIT_PARAM = "NewFilterClassDataModel.INIT_PARAM"; //$NON-NLS-1$
-
- /**
- * Optional, List propety used to cache all the filter mappings for this filter on the web application.
- */
- public static final String FILTER_MAPPINGS = "NewFilterClassDataModel.FILTER_MAPPINGS"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewListenerClassDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewListenerClassDataModelProperties.java
deleted file mode 100644
index d408e9c77..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewListenerClassDataModelProperties.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-public interface INewListenerClassDataModelProperties extends INewWebClassDataModelProperties {
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewServletClassDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewServletClassDataModelProperties.java
deleted file mode 100644
index 583f9a547..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewServletClassDataModelProperties.java
+++ /dev/null
@@ -1,109 +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
- * Kiril Mitov, k.mitov@sap.com - bug 204160
- * Kaloyan Raev, kaloyan.raev@sap.com
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-public interface INewServletClassDataModelProperties extends INewWebClassDataModelProperties {
- /**
- * Optional, boolean property used to specify whether to generate the init method.
- * The default is false.
- */
- public static final String INIT = "NewServletClassDataModel.INIT"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the destroy method. The default is false.
- */
- public static final String DESTROY = "NewServletClassDataModel.DESTROY"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the getServletInfo method. The default is false.
- */
- public static final String GET_SERVLET_INFO = "NewServletClassDataModel.GET_SERVLET_INFO"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the getServletConfig method. The default is false.
- */
- public static final String GET_SERVLET_CONFIG = "NewServletClassDataModel.GET_SERVLET_CONFIG"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the service method. The default is false.
- */
- public static final String SERVICE = "NewServletClassDataModel.SERVICE"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doGet method. The default is true.
- */
- public static final String DO_GET = "NewServletClassDataModel.DO_GET"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doPost method.
- * The default is true.
- */
- public static final String DO_POST = "NewServletClassDataModel.DO_POST"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doPut method. The default is false.
- */
- public static final String DO_PUT = "NewServletClassDataModel.DO_PUT"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doDelete method. The default is false.
- */
- public static final String DO_DELETE = "NewServletClassDataModel.DO_DELETE"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doHead method. The default is false.
- */
- public static final String DO_HEAD = "NewServletClassDataModel.DO_HEAD"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doOptions method. The default is false.
- */
- public static final String DO_OPTIONS = "NewServletClassDataModel.DO_OPTIONS"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doTrace method. The default is false.
- */
- public static final String DO_TRACE = "NewServletClassDataModel.DO_TRACE"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether to generate the doTrace method. The default is false.
- */
- public static final String TO_STRING = "NewServletClassDataModel.TO_STRING"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to determine if building JSP or servlet.
- * The default is true.
- */
- public static final String IS_SERVLET_TYPE = "NewServletClassDataModel.IS_SERVLET_TYPE"; //$NON-NLS-1$
-
- /**
- * Optional, List property used to cache all the init params defined on the servlet.
- */
- public static final String INIT_PARAM = "NewServletClassDataModel.INIT_PARAM"; //$NON-NLS-1$
-
- /**
- * Optional, List propety used to cache all the servlet mappings for this servlet on the web application.
- */
- public static final String URL_MAPPINGS = "NewServletClassDataModel.URL_MAPPINGS"; //$NON-NLS-1$
-
- /**
- * Do not set! The javajet template file used in creating the annotated servlet template class
- */
- public static final String TEMPLATE_FILE = "NewServletClassDataModel.TEMPLATE_FILE"; //$NON-NLS-1$
-
- /**
- * Do not set! The javajet template file used in creating the non-annotated servlet template class
- */
- public static final String NON_ANNOTATED_TEMPLATE_FILE = "NewServletClassDataModel.NON_ANNOTATED_TEMPLATE_FILE"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewWebClassDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewWebClassDataModelProperties.java
deleted file mode 100644
index c40d48624..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/INewWebClassDataModelProperties.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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
-
-public interface INewWebClassDataModelProperties extends INewJavaClassDataModelProperties, IAnnotationsDataModel {
-
- /**
- * Required, String property of the display name for the filter
- */
- public static final String DISPLAY_NAME = "NewServletClassDataModel.DISPLAY_NAME"; //$NON-NLS-1$
-
- /**
- * Optional, String property of the description info for the filter
- */
- public static final String DESCRIPTION = "NewServletClassDataModel.DESCRIPTION"; //$NON-NLS-1$
-
- /**
- * Optional, boolean property used to specify whether or not to generate a new java class.
- * The default is false.
- */
- public static final String USE_EXISTING_CLASS = "NewServletClassDataModel.USE_EXISTING_CLASS"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ListenerTemplate.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ListenerTemplate.java
deleted file mode 100644
index dca429f96..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ListenerTemplate.java
+++ /dev/null
@@ -1,217 +0,0 @@
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import java.util.*;
-import org.eclipse.jst.j2ee.internal.common.operations.*;
-
-public class ListenerTemplate
-{
- protected static String nl;
- public static synchronized ListenerTemplate create(String lineSeparator)
- {
- nl = lineSeparator;
- ListenerTemplate result = new ListenerTemplate();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "package ";
- protected final String TEXT_2 = ";";
- protected final String TEXT_3 = NL;
- protected final String TEXT_4 = NL + "import ";
- protected final String TEXT_5 = ";";
- protected final String TEXT_6 = NL;
- protected final String TEXT_7 = NL;
- protected final String TEXT_8 = "/**" + NL + " * Application Lifecycle Listener implementation class ";
- protected final String TEXT_9 = NL + " *";
- protected final String TEXT_10 = NL + " * @web.listener";
- protected final String TEXT_11 = NL + " */";
- protected final String TEXT_12 = NL + "public ";
- protected final String TEXT_13 = "abstract ";
- protected final String TEXT_14 = "final ";
- protected final String TEXT_15 = "class ";
- protected final String TEXT_16 = " extends ";
- protected final String TEXT_17 = " implements ";
- protected final String TEXT_18 = ", ";
- protected final String TEXT_19 = " {";
- protected final String TEXT_20 = NL + NL + " /**" + NL + " * Default constructor. " + NL + " */" + NL + " public ";
- protected final String TEXT_21 = "() {" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_22 = NL + " " + NL + " /**" + NL + " * @see ";
- protected final String TEXT_23 = "#";
- protected final String TEXT_24 = "(";
- protected final String TEXT_25 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_26 = "(";
- protected final String TEXT_27 = ") {" + NL + " super(";
- protected final String TEXT_28 = ");" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_29 = NL + NL + "\t/**" + NL + " * @see ";
- protected final String TEXT_30 = "#";
- protected final String TEXT_31 = "(";
- protected final String TEXT_32 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_33 = " ";
- protected final String TEXT_34 = "(";
- protected final String TEXT_35 = ") {" + NL + " // TODO Auto-generated method stub";
- protected final String TEXT_36 = NL + "\t\t\treturn ";
- protected final String TEXT_37 = ";";
- protected final String TEXT_38 = NL + " }";
- protected final String TEXT_39 = NL + "\t" + NL + "}";
- protected final String TEXT_40 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
- CreateListenerTemplateModel model = (CreateListenerTemplateModel) argument;
-
- model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
-
-
- if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
-
- stringBuffer.append(TEXT_1);
- stringBuffer.append( model.getJavaPackageName() );
- stringBuffer.append(TEXT_2);
-
- }
-
- stringBuffer.append(TEXT_3);
-
- Collection<String> imports = model.getImports();
- for (String anImport : imports) {
-
- stringBuffer.append(TEXT_4);
- stringBuffer.append( anImport );
- stringBuffer.append(TEXT_5);
-
- }
-
- stringBuffer.append(TEXT_6);
- stringBuffer.append(TEXT_7);
- stringBuffer.append(TEXT_8);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_9);
-
- if (model.isAnnotated()) {
-
- stringBuffer.append(TEXT_10);
-
- }
-
- stringBuffer.append(TEXT_11);
-
- if (model.isPublic()) {
-
- stringBuffer.append(TEXT_12);
-
- }
-
- if (model.isAbstract()) {
-
- stringBuffer.append(TEXT_13);
-
- }
-
- if (model.isFinal()) {
-
- stringBuffer.append(TEXT_14);
-
- }
-
- stringBuffer.append(TEXT_15);
- stringBuffer.append( model.getClassName() );
-
- String superClass = model.getSuperclassName();
- if (superClass != null && superClass.length() > 0) {
-
- stringBuffer.append(TEXT_16);
- stringBuffer.append( superClass );
-
- }
-
- List<String> interfaces = model.getInterfaces();
- if ( interfaces.size() > 0) {
-
- stringBuffer.append(TEXT_17);
-
- }
-
- for (int i = 0; i < interfaces.size(); i++) {
- String INTERFACE = (String) interfaces.get(i);
- if (i > 0) {
-
- stringBuffer.append(TEXT_18);
-
- }
-
- stringBuffer.append( INTERFACE );
-
- }
-
- stringBuffer.append(TEXT_19);
-
- if (!model.hasEmptySuperclassConstructor()) {
-
- stringBuffer.append(TEXT_20);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_21);
-
- }
-
- if (model.shouldGenSuperclassConstructors()) {
- List<Constructor> constructors = model.getConstructors();
- for (Constructor constructor : constructors) {
- if (constructor.isPublic() || constructor.isProtected()) {
-
- stringBuffer.append(TEXT_22);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_23);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_24);
- stringBuffer.append( constructor.getParamsForJavadoc() );
- stringBuffer.append(TEXT_25);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_26);
- stringBuffer.append( constructor.getParamsForDeclaration() );
- stringBuffer.append(TEXT_27);
- stringBuffer.append( constructor.getParamsForCall() );
- stringBuffer.append(TEXT_28);
-
- }
- }
- }
-
-
- if (model.shouldImplementAbstractMethods()) {
- for (Method method : model.getUnimplementedMethods()) {
-
- stringBuffer.append(TEXT_29);
- stringBuffer.append( method.getContainingJavaClass() );
- stringBuffer.append(TEXT_30);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_31);
- stringBuffer.append( method.getParamsForJavadoc() );
- stringBuffer.append(TEXT_32);
- stringBuffer.append( method.getReturnType() );
- stringBuffer.append(TEXT_33);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_34);
- stringBuffer.append( method.getParamsForDeclaration() );
- stringBuffer.append(TEXT_35);
-
- String defaultReturnValue = method.getDefaultReturnValue();
- if (defaultReturnValue != null) {
-
- stringBuffer.append(TEXT_36);
- stringBuffer.append( defaultReturnValue );
- stringBuffer.append(TEXT_37);
-
- }
-
- stringBuffer.append(TEXT_38);
-
- }
- }
-
- stringBuffer.append(TEXT_39);
- stringBuffer.append(TEXT_40);
- return stringBuffer.toString();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java
deleted file mode 100644
index 6521747e9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassDataModelProvider.java
+++ /dev/null
@@ -1,361 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.ABSTRACT_METHODS;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SUPERCLASS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.DESTROY;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.DO_FILTER;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.FILTER_MAPPINGS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.INIT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewFilterClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_FILTER;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.web.validation.UrlPattern;
-import org.eclipse.osgi.util.NLS;
-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.plugin.WTPCommonPlugin;
-
-public class NewFilterClassDataModelProvider extends
- NewWebClassDataModelProvider {
-
- /**
- * String array of the default, minimum required fully qualified Filter
- * interfaces
- */
- private final static String[] FILTER_INTERFACES = { QUALIFIED_FILTER };
-
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- if (ABSTRACT_METHODS.equals(propertyName)) {
- return false;
- } else if (INIT.equals(propertyName)) {
- return false;
- } else if (DESTROY.equals(propertyName)) {
- return false;
- } else if (DO_FILTER.equals(propertyName)) {
- return false;
- }
- // Otherwise return super implementation
- return super.isPropertyEnabled(propertyName);
- }
-
- /**
- * Subclasses may extend this method to provide their own default operation
- * for this data model provider. This implementation uses the
- * AddFilterOperation to drive the filter creation. It will not return null.
- *
- * @see IDataModel#getDefaultOperation()
- *
- * @return IDataModelOperation AddFilterOperation
- */
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new AddFilterOperation(getDataModel());
- }
-
- /**
- * Subclasses may extend this method to add their own data model's
- * properties as valid base properties.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#getPropertyNames()
- */
- @Override
- public Set getPropertyNames() {
- // Add filter specific properties defined in this data model
- Set propertyNames = super.getPropertyNames();
-
- propertyNames.add(INIT);
- propertyNames.add(DESTROY);
- propertyNames.add(DO_FILTER);
- propertyNames.add(INIT_PARAM);
- propertyNames.add(FILTER_MAPPINGS);
-
- return propertyNames;
- }
-
- /**
- * Subclasses may extend this method to provide their own default values for
- * any of the properties in the data model hierarchy. This method does not
- * accept a null parameter. It may return null. This implementation sets
- * annotation use to be true, and to generate a filter with doFilter.
- *
- * @see NewJavaClassDataModelProvider#getDefaultProperty(String)
- * @see IDataModelProvider#getDefaultProperty(String)
- *
- * @param propertyName
- * @return Object default value of property
- */
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(DESTROY))
- return Boolean.TRUE;
- else if (propertyName.equals(DO_FILTER))
- return Boolean.TRUE;
- else if (propertyName.equals(INIT))
- return Boolean.TRUE;
- else if (propertyName.equals(FILTER_MAPPINGS))
- return getDefaultFilterMapping();
- else if (propertyName.equals(INTERFACES))
- return getFilterInterfaces();
-
- // Otherwise check super for default value for property
- return super.getDefaultProperty(propertyName);
- }
-
- /**
- * Returns the default Url Mapping depending upon the display name of the
- * Filter
- *
- * @return List containting the default Url Mapping
- */
- private Object getDefaultFilterMapping() {
- List filterMappings = null;
- String text = (String) getProperty(DISPLAY_NAME);
- if (text != null) {
- filterMappings = new ArrayList();
- filterMappings.add(new FilterMappingItem(FilterMappingItem.URL_PATTERN, "/" + text)); //$NON-NLS-1$
- }
- return filterMappings;
- }
-
- /**
- * Subclasses may extend this method to provide their own validation on any
- * of the valid data model properties in the hierarchy. This implementation
- * adds validation for the init params, filter mappings, display name, and
- * existing class fields specific to the filter java class creation. It does
- * not accept a null parameter. This method will not return null.
- *
- * @see NewJavaClassDataModelProvider#validate(String)
- *
- * @param propertyName
- * @return IStatus is property value valid?
- */
- @Override
- public IStatus validate(String propertyName) {
- // If our default is the superclass, we know it is ok
- if (propertyName.equals(SUPERCLASS) && "".equals(getStringProperty(propertyName)))
- return WTPCommonPlugin.OK_STATUS;
- // Validate init params
- if (propertyName.equals(INIT_PARAM))
- return validateInitParamList((List) getProperty(propertyName));
- // Validate url pattern and servlet name mappings
- if (propertyName.equals(FILTER_MAPPINGS))
- return validateFilterMappingList((List) getProperty(FILTER_MAPPINGS));
- // Validate the filter name in DD
- if (propertyName.equals(DISPLAY_NAME))
- return validateDisplayName(getStringProperty(propertyName));
-
- // Otherwise defer to super to validate the property
- return super.validate(propertyName);
- }
-
- /**
- * This method is intended for internal use only. It will be used to
- * validate the init params list to ensure there are not any duplicates.
- * This method will accept a null paramter. It will not return null.
- *
- * @see NewFilterClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is init params list valid?
- */
- private IStatus validateInitParamList(List prop) {
- if (prop != null && !prop.isEmpty()) {
- // Ensure there are not duplicate entries in the list
- boolean dup = hasDuplicatesInStringArrayList(prop);
- if (dup) {
- String msg = WebMessages.ERR_DUPLICATED_INIT_PARAMETER;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
- // Return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
- /**
- * This method is intended for internal use only. This will validate the
- * filter mappings list and ensure there are not duplicate entries. It will
- * accept a null parameter. It will not return null.
- *
- * @see NewFilterClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is filter mapping list valid?
- */
- private IStatus validateFilterMappingList(List prop) {
- if (prop != null && !prop.isEmpty()) {
- // Ensure there are not duplicates in the mapping list
- boolean dup = hasDuplicatesInFilterMappingItemList(prop);
- if (dup) {
- String msg = WebMessages.ERR_DUPLICATED_URL_MAPPING;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- String isValidValue = validateValue(prop);
- if (isValidValue != null && isValidValue.length() > 0) {
- NLS.bind(WebMessages.ERR_URL_PATTERN_INVALID, isValidValue);
- String resourceString = WebMessages.getResourceString(WebMessages.ERR_URL_PATTERN_INVALID, new String[]{isValidValue});
- return WTPCommonPlugin.createErrorStatus(resourceString);
- }
- } else {
- String msg = WebMessages.ERR_FILTER_MAPPING_EMPTY;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- // Return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
- private boolean hasDuplicatesInFilterMappingItemList(List<IFilterMappingItem> input) {
- // If list is null or empty return false
- if (input == null) return false;
- int n = input.size();
- boolean dup = false;
- // nested for loops to check each element to see if other elements are the same
- for (int i = 0; i < n; i++) {
- IFilterMappingItem item = input.get(i);
- for (int j = i + 1; j < n; j++) {
- IFilterMappingItem item2 = (IFilterMappingItem) input.get(j);
- if (item.getName().equals(item2.getName()) &&
- item.getMappingType() == item2.getMappingType()) {
- dup = true;
- break;
- }
- }
- if (dup) break;
- }
- // Return boolean status for duplicates
- return dup;
- }
-
- /**
- * This method is intended for internal use only. It provides a simple
- * algorithm for detecting if there are invalid pattern's value in a list.
- * It will accept a null parameter.
- *
- * @see NewFilterClassDataModelProvider#validateFilterMappingList(List)
- *
- * @param input
- * @return String first invalid pattern's value
- */
- private String validateValue(List prop) {
- if (prop == null) {
- return "";
- }
- int size = prop.size();
- for (int i = 0; i < size; i++) {
- IFilterMappingItem filterMappingValue = (IFilterMappingItem) prop.get(i);
- if (filterMappingValue.isUrlPatternType() &&
- !UrlPattern.isValid(filterMappingValue.getName()))
- return filterMappingValue.getName();
- }
- return "";
- }
-
- /**
- * This method will return the list of filter interfaces to be implemented
- * for the new servlet java class. It will intialize the list using lazy
- * initialization to the minimum interfaces required by the data model
- * FILTER_INTERFACES. This method will not return null.
- *
- * @see #FILTER_INTERFACES
- *
- * @return List of servlet interfaces to be implemented
- */
- private List getFilterInterfaces() {
- if (interfaceList == null) {
- interfaceList = new ArrayList();
- // Add minimum required list of servlet interfaces to be implemented
- for (int i = 0; i < FILTER_INTERFACES.length; i++) {
- interfaceList.add(FILTER_INTERFACES[i]);
- }
- }
- // Return interface list
- return interfaceList;
- }
-
- /**
- * This method is intended for internal use only. This will validate whether
- * the display name selected is a valid display name for the filter in the
- * specified web application. It will make sure the name is not empty and
- * that it doesn't already exist in the web app. This method will accept
- * null as a parameter. It will not return null.
- *
- * @see NewFilterClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is filter display name valid?
- */
- private IStatus validateDisplayName(String prop) {
- // Ensure the filter display name is not null or empty
- if (prop == null || prop.trim().length() == 0) {
- String msg = WebMessages.ERR_DISPLAY_NAME_EMPTY;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- if (getTargetProject() == null || getTargetComponent() == null)
- return WTPCommonPlugin.OK_STATUS;
-
- IModelProvider provider = ModelProviderManager.getModelProvider(getTargetProject());
- Object mObj = provider.getModelObject();
- if (mObj instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) mObj;
-
- List filters = webApp.getFilters();
- boolean exists = false;
- // Ensure the display does not already exist in the web application
- if (filters != null && !filters.isEmpty()) {
- for (int i = 0; i < filters.size(); i++) {
- String name = ((org.eclipse.jst.j2ee.webapplication.Filter) filters.get(i)).getName();
- if (prop.equals(name))
- exists = true;
- }
- }
- // If the filter name already exists, throw an error
- if (exists) {
- String msg = WebMessages.getResourceString(WebMessages.ERR_FILTER_NAME_EXIST, new String[]{prop});
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- } else if (mObj instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) mObj;
-
- List filters = webApp.getFilters();
- boolean exists = false;
- // Ensure the display does not already exist in the web application
- if (filters != null && !filters.isEmpty()) {
- for (int i = 0; i < filters.size(); i++) {
- String name = ((org.eclipse.jst.javaee.web.Filter) filters.get(i)).getFilterName();
- if (prop.equals(name))
- exists = true;
- }
- }
- // If the filter name already exists, throw an error
- if (exists) {
- String msg = WebMessages.getResourceString(WebMessages.ERR_FILTER_NAME_EXIST, new String[] {prop});
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
-
- // Otherwise, return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassOperation.java
deleted file mode 100644
index a9675d08e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewFilterClassOperation.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * The NewFilterClassOperation is an IDataModelOperation following the
- * IDataModel wizard and operation framework.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * It extends ArtifactEditProviderOperation to provide filter specific java
- * class generation.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * This operation is used by the AddFilterOperation to generate an
- * non annotated java class for an added filter. It shares the
- * NewFilterClassDataModelProvider with the AddFilterOperation to store the
- * appropriate properties required to generate the new filter.
- * @see org.eclipse.jst.j2ee.internal.web.operations.AddFilterOperation
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewFilterClassDataModelProvider
- *
- * A WTPJetEmitter filter template is used to create the class with the filter template.
- * @see org.eclipse.jst.j2ee.internal.project.WTPJETEmitter
- * @see org.eclipse.jst.j2ee.internal.web.operations.CreateFilterTemplateModel
- *
- * Subclasses may extend this operation to provide their own specific filter
- * java class generation. The execute method may be extended to do so. Also,
- * generateUsingTemplates is exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class NewFilterClassOperation extends NewWebClassOperation {
-
- /**
- * folder location of the filter creation templates diretory
- */
- protected static final String TEMPLATE_FILE = "/templates/filter.javajet"; //$NON-NLS-1$
-
- /**
- * This is the constructor which should be used when creating a
- * NewFilterClassOperation. An instance of the NewFilterClassDataModel
- * should be passed in. This does not accept null parameter. It will not
- * return null.
- *
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- * @see NewFilterClassDataModel
- *
- * @param dataModel
- * @return NewFilterClassOperation
- */
- public NewFilterClassOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- /**
- * This method will create an instance of the CreateFilterTemplate model to
- * be used in conjunction with the WTPJETEmitter. This method will not
- * return null.
- *
- * @see CreateFilterTemplateModel
- * @see NewFilterClassOperation#generateUsingTemplates(IProgressMonitor,
- * IPackageFragment)
- *
- * @return CreateFilterTemplateModel
- */
- @Override
- protected CreateFilterTemplateModel createTemplateModel() {
- return new CreateFilterTemplateModel(model);
- }
-
- @Override
- protected String getTemplateFile() {
- return TEMPLATE_FILE;
- }
-
- @Override
- protected FilterTemplate getTemplateImplementation() {
- return FilterTemplate.create(null);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java
deleted file mode 100644
index 8ece2c933..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassDataModelProvider.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_BINDING_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_LISTENER;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-
-/**
- * The NewListenerClassDataModelProvider is a subclass of
- * NewWebClassDataModelProvider and follows the IDataModel Operation and Wizard
- * frameworks.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- *
- * This data model provider is a subclass of the NewWebClassDataModelProvider,
- * which stores base properties necessary in the creation of a default java
- * class.
- * @see org.eclipse.jst.j2ee.internal.common.operations.NewWebClassDataModelProvider
- *
- * The NewListenerClassDataModelProvider provides more specific properties for
- * java class creation that are required in creating a listener java class. The
- * data model provider is used to store these values for the
- * NewListenerClassOperation.
- * @see org.eclipse.jst.j2ee.internal.web.operations.INewListenerClassDataModelProperties
- * That operation will create the listener java class based on the settings
- * defined here in the data model.
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassOperation
- *
- * This data model properties implements the IAnnotationsDataModel to get the
- * USE_ANNOTATIONS property for determining whether or not to generate an
- * annotated java class.
- * @see org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel
- *
- * Clients can subclass this data model provider to cache and provide their own
- * specific attributes. They should also provide their own validation methods,
- * properties interface, and default values for the properties they add.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class NewListenerClassDataModelProvider extends
- NewWebClassDataModelProvider {
-
- public static final String[] LISTENER_INTERFACES = {
- QUALIFIED_SERVLET_CONTEXT_LISTENER,
- QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER,
- QUALIFIED_HTTP_SESSION_LISTENER,
- QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER,
- QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER,
- QUALIFIED_HTTP_SESSION_BINDING_LISTENER,
- QUALIFIED_SERVLET_REQUEST_LISTENER,
- QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER
- };
-
- /**
- * Subclasses may extend this method to provide their own default operation
- * for this data model provider. This implementation uses the
- * AddListenerOperation to drive the listener creation. It will not return
- * null.
- *
- * @see IDataModel#getDefaultOperation()
- *
- * @return IDataModelOperation AddListenerOperation
- */
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new AddListenerOperation(getDataModel());
- }
-
- /**
- * Subclasses may extend this method to provide their own validation on any
- * of the valid data model properties in the hierarchy. It does not accept a
- * null parameter. This method will not return null.
- *
- * @see NewJavaClassDataModelProvider#validate(String)
- *
- * @param propertyName
- * @return IStatus is property value valid?
- */
- @Override
- public IStatus validate(String propertyName) {
- if (propertyName.equals(INTERFACES)) {
- return validateListeners();
- }
-
- // Otherwise defer to super to validate the property
- return super.validate(propertyName);
- }
-
-
- /**
- * Checks if at least one of the application lifecycle listeners is
- * selected.
- */
- private IStatus validateListeners() {
- boolean atLeastOneSelected = false;
- Object value = model.getProperty(INTERFACES);
- if (value != null && (value instanceof List)) {
- List interfaces = (List) value;
- for (String iface : LISTENER_INTERFACES) {
- if (interfaces.contains(iface)) {
- atLeastOneSelected = true;
- break;
- }
- }
- }
-
- if (atLeastOneSelected) {
- return WTPCommonPlugin.OK_STATUS;
- } else {
- String msg = WebMessages.ERR_NO_LISTENER_SELECTED;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassOperation.java
deleted file mode 100644
index 41c2d37da..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewListenerClassOperation.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * The NewListenerClassOperation is an IDataModelOperation following the
- * IDataModel wizard and operation framework.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * It extends ArtifactEditProviderOperation to provide listener specific java
- * class generation.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * This operation is used by the AddListenerOperation to generate either an
- * annotated or non annotated java class for an added application lifecycle listener.
- * It shares the NewListenerClassDataModelProvider with the AddListenerOperation to
- * store the appropriate properties required to generate the new listener.
- * @see org.eclipse.jst.j2ee.internal.web.operations.AddListenerOperation
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewListenerClassDataModelProvider
- *
- * In the annotated case, a WTPJetEmitter listener template is created and used
- * to generate the listener java class with the embedded annotated tags.
- * @see org.eclipse.jst.j2ee.internal.project.WTPJETEmitter
- * @see org.eclipse.jst.j2ee.internal.web.operations.CreateListenerTemplateModel
- *
- * In the non annotated case, the same emitter is used to create the class with
- * the non annotated listener template so the annotated tags are omitted.
- *
- * Subclasses may extend this operation to provide their own specific listener
- * java class generation. The execute method may be extended to do so. Also,
- * generateUsingTemplates is exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class NewListenerClassOperation extends NewWebClassOperation {
-
- /**
- * folder location of the listener creation templates directory
- */
- protected static final String TEMPLATE_FILE = "/templates/listener.javajet"; //$NON-NLS-1$
-
- /**
- * This is the constructor which should be used when creating a
- * NewListenerClassOperation. An instance of the NewListenerClassDataModel
- * should be passed in. This does not accept null parameter. It will not
- * return null.
- *
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- * @see NewListenerClassDataModel
- *
- * @param dataModel
- * @return NewListenerClassOperation
- */
- public NewListenerClassOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- /**
- * This method will create an instance of the CreateListenerTemplateModel to
- * be used in conjunction with the WTPJETEmitter. This method will not
- * return null.
- *
- * @see CreateListenerTemplateModel
- * @see NewListenerClassOperation#generateUsingTemplates(IProgressMonitor,
- * IPackageFragment)
- *
- * @return CreateListenerTemplateModel
- */
- @Override
- protected CreateListenerTemplateModel createTemplateModel() {
- return new CreateListenerTemplateModel(model);
- }
-
- @Override
- protected String getTemplateFile() {
- return TEMPLATE_FILE;
- }
-
- @Override
- protected ListenerTemplate getTemplateImplementation() {
- return ListenerTemplate.create(null);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java
deleted file mode 100644
index 720c704a7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassDataModelProvider.java
+++ /dev/null
@@ -1,552 +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
- * Kiril Mitov, k.mitov@sap.com - bug 204160
- * Kaloyan Raev, kaloyan.raev@sap.com
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.ABSTRACT_METHODS;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CLASS_NAME;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.INTERFACES;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SUPERCLASS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DESTROY;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_DELETE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_GET;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_HEAD;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_OPTIONS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_POST;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_PUT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.DO_TRACE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.GET_SERVLET_CONFIG;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.GET_SERVLET_INFO;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.INIT;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.INIT_PARAM;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.IS_SERVLET_TYPE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.NON_ANNOTATED_TEMPLATE_FILE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.SERVICE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.TEMPLATE_FILE;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.TO_STRING;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties.URL_MAPPINGS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.web.validation.UrlPattern;
-import org.eclipse.osgi.util.NLS;
-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.plugin.WTPCommonPlugin;
-
-/**
- * The NewServletClassDataModelProvider is a subclass of
- * NewWebClassDataModelProvider and follows the IDataModel Operation and Wizard
- * frameworks.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- *
- * This data model provider is a subclass of the NewWebClassDataModelProvider,
- * which stores base properties necessary in the creation of a web artifact
- * class.
- *
- * @see NewWebClassDataModelProvider
- *
- * The NewServletClassDataModelProvider provides more specific properties for
- * java class creation that are required in creating a servlet java class. The
- * data model provider is used to store these values for the
- * NewServletClassOperation.
- *
- * @see INewServletClassDataModelProperties
- *
- * That operation will create the servlet java class based on the settings
- * defined here in the data model.
- *
- * @see NewServletClassOperation
- *
- * This data model properties implements the IAnnotationsDataModel to get the
- * USE_ANNOTATIONS property for determining whether or not to generate an
- * annotated java class.
- *
- * @see org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel
- *
- * Clients can subclass this data model provider to cache and provide their own
- * specific attributes. They should also provide their own validation methods,
- * properties interface, and default values for the properties they add.
- */
-public class NewServletClassDataModelProvider extends
- NewWebClassDataModelProvider {
-
- /**
- * The fully qualified default servlet superclass: HttpServlet.
- */
- private final static String SERVLET_SUPERCLASS = QUALIFIED_HTTP_SERVLET;
-
- /**
- * String array of the default, minimum required fully qualified Servlet
- * interfaces
- */
- private final static String[] SERVLET_INTERFACES = { QUALIFIED_SERVLET };
-
- private final static String ANNOTATED_TEMPLATE_DEFAULT = "servlet.javajet"; //$NON-NLS-1$
-
- private final static String NON_ANNOTATED_TEMPLATE_DEFAULT = "servlet.javajet"; //$NON-NLS-1$
-
- /**
- * Subclasses may extend this method to provide their own default operation
- * for this data model provider. This implementation uses the
- * AddServletOperation to drive the servlet creation. It will not return
- * null.
- *
- * @see IDataModel#getDefaultOperation()
- *
- * @return IDataModelOperation AddServletOperation
- */
- @Override
- public IDataModelOperation getDefaultOperation() {
- return new AddServletOperation(model);
- }
-
- /**
- * Subclasses may extend this method to add their own data model's
- * properties as valid base properties.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#getPropertyNames()
- */
- @Override
- public Set getPropertyNames() {
- // Add servlet specific properties defined in this data model
- Set propertyNames = super.getPropertyNames();
-
- propertyNames.add(INIT);
- propertyNames.add(DESTROY);
- propertyNames.add(GET_SERVLET_CONFIG);
- propertyNames.add(GET_SERVLET_INFO);
- propertyNames.add(SERVICE);
- propertyNames.add(DO_GET);
- propertyNames.add(DO_POST);
- propertyNames.add(DO_PUT);
- propertyNames.add(DO_DELETE);
- propertyNames.add(DO_HEAD);
- propertyNames.add(DO_OPTIONS);
- propertyNames.add(DO_TRACE);
- propertyNames.add(TO_STRING);
- propertyNames.add(IS_SERVLET_TYPE);
- propertyNames.add(INIT_PARAM);
- propertyNames.add(URL_MAPPINGS);
- propertyNames.add(NON_ANNOTATED_TEMPLATE_FILE);
- propertyNames.add(TEMPLATE_FILE);
-
- return propertyNames;
- }
-
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- if (ABSTRACT_METHODS.equals(propertyName)) {
- return ServletSupertypesValidator.isGenericServletSuperclass(model);
- } else if (INIT.equals(propertyName) ||
- DESTROY.equals(propertyName) ||
- GET_SERVLET_CONFIG.equals(propertyName) ||
- GET_SERVLET_INFO.equals(propertyName) ||
- SERVICE.equals(propertyName)) {
- boolean genericServlet = ServletSupertypesValidator.isGenericServletSuperclass(model);
- boolean inherit = model.getBooleanProperty(ABSTRACT_METHODS);
- return genericServlet && inherit;
- } else if (DO_GET.equals(propertyName) ||
- DO_POST.equals(propertyName) ||
- DO_PUT.equals(propertyName) ||
- DO_DELETE.equals(propertyName) ||
- DO_HEAD.equals(propertyName) ||
- DO_OPTIONS.equals(propertyName) ||
- DO_TRACE.equals(propertyName)) {
- boolean httpServlet = ServletSupertypesValidator.isHttpServletSuperclass(model);
- boolean inherit = model.getBooleanProperty(ABSTRACT_METHODS);
- return httpServlet && inherit;
- }
-
- // Otherwise return super implementation
- return super.isPropertyEnabled(propertyName);
- }
-
- /**
- * Subclasses may extend this method to provide their own default values for
- * any of the properties in the data model hierarchy. This method does not
- * accept a null parameter. It may return null. This implementation sets
- * annotation use to be true, and to generate a servlet with doGet and
- * doPost.
- *
- * @see NewWebClassDataModelProvider#getDefaultProperty(String)
- * @see IDataModelProvider#getDefaultProperty(String)
- *
- * @param propertyName
- * @return Object default value of property
- */
- @Override
- public Object getDefaultProperty(String propertyName) {
- // Generate a doPost and doGet methods by default only if a class
- // extending HttpServlet is selected
- if (propertyName.equals(DO_POST) || propertyName.equals(DO_GET)) {
- if (ServletSupertypesValidator.isHttpServletSuperclass(model))
- return Boolean.TRUE;
- }
-
- // Generate a service method by default only if a class
- // not extending HttpServlet is selected
- if (propertyName.equals(SERVICE)) {
- if (!ServletSupertypesValidator.isHttpServletSuperclass(model))
- return Boolean.TRUE;
- }
-
- if (propertyName.equals(INIT) || propertyName.equals(DESTROY) ||
- propertyName.equals(GET_SERVLET_CONFIG) || propertyName.equals(GET_SERVLET_INFO)) {
- if (!ServletSupertypesValidator.isGenericServletSuperclass(model))
- return Boolean.TRUE;
- }
-
- // Use servlet by default
- else if (propertyName.equals(IS_SERVLET_TYPE))
- return Boolean.TRUE;
- else if (propertyName.equals(DISPLAY_NAME)) {
- String className = getStringProperty(CLASS_NAME);
- if (className.endsWith(".jsp")) { //$NON-NLS-1$
- int index = className.lastIndexOf("/"); //$NON-NLS-1$
- className = className.substring(index+1,className.length()-4);
- } else {
- className = Signature.getSimpleName(className);
- }
- return className;
- }
- else if (propertyName.equals(URL_MAPPINGS))
- return getDefaultUrlMapping();
- else if (propertyName.equals(INTERFACES))
- return getServletInterfaces();
- else if (propertyName.equals(SUPERCLASS))
- return SERVLET_SUPERCLASS;
- else if (propertyName.equals(TEMPLATE_FILE))
- return ANNOTATED_TEMPLATE_DEFAULT;
- else if (propertyName.equals(NON_ANNOTATED_TEMPLATE_FILE))
- return NON_ANNOTATED_TEMPLATE_DEFAULT;
-
- // Otherwise check super for default value for property
- return super.getDefaultProperty(propertyName);
- }
-
- /**
- * Subclasses may extend this method to provide their own validation on any
- * of the valid data model properties in the hierarchy. This implementation
- * adds validation for the init params, servlet mappings, display name, and
- * existing class fields specific to the servlet java class creation. It
- * does not accept a null parameter. This method will not return null.
- *
- * @see NewWebClassDataModelProvider#validate(String)
- *
- * @param propertyName
- * @return IStatus is property value valid?
- */
- @Override
- public IStatus validate(String propertyName) {
- // Validate super class
- if (propertyName.equals(SUPERCLASS))
- return validateSuperClassName(getStringProperty(propertyName));
- // Validate init params
- if (propertyName.equals(INIT_PARAM))
- return validateInitParamList((List) getProperty(propertyName));
- // Validate servlet mappings
- if (propertyName.equals(URL_MAPPINGS))
- return validateURLMappingList((List) getProperty(propertyName));
- // Validate the servlet name in DD
- if (propertyName.equals(DISPLAY_NAME))
- return validateDisplayName(getStringProperty(propertyName));
-
- // Otherwise defer to super to validate the property
- return super.validate(propertyName);
- }
-
- @Override
- public boolean propertySet(String propertyName, Object propertyValue) {
- boolean result = false;
-
- if (SUPERCLASS.equals(propertyName)) {
- model.notifyPropertyChange(ABSTRACT_METHODS, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(INIT, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DESTROY, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(GET_SERVLET_CONFIG, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(GET_SERVLET_INFO, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(SERVICE, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_GET, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_POST, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_PUT, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_DELETE, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_HEAD, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_OPTIONS, IDataModel.ENABLE_CHG);
- model.notifyPropertyChange(DO_TRACE, IDataModel.ENABLE_CHG);
-
- if (!hasSuperClass()) {
- model.setProperty(ABSTRACT_METHODS, null);
- model.setProperty(INIT, null);
- model.setProperty(DESTROY, null);
- model.setProperty(GET_SERVLET_CONFIG, null);
- model.setProperty(GET_SERVLET_INFO, null);
- model.setProperty(SERVICE, null);
- model.setProperty(DO_GET, null);
- model.setProperty(DO_POST, null);
- model.setProperty(DO_PUT, null);
- model.setProperty(DO_DELETE, null);
- model.setProperty(DO_HEAD, null);
- model.setProperty(DO_OPTIONS, null);
- model.setProperty(DO_TRACE, null);
- }
-
- model.notifyPropertyChange(ABSTRACT_METHODS, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(INIT, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DESTROY, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(GET_SERVLET_CONFIG, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(GET_SERVLET_INFO, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(SERVICE, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_GET, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_POST, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_PUT, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_DELETE, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_HEAD, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_OPTIONS, IDataModel.DEFAULT_CHG);
- model.notifyPropertyChange(DO_TRACE, IDataModel.DEFAULT_CHG);
-
- if (!ServletSupertypesValidator.isServletSuperclass(model)) {
- List ifaces = (List) model.getProperty(INTERFACES);
- ifaces.add(QUALIFIED_SERVLET);
- }
- }
-
- return result || super.propertySet(propertyName, propertyValue);
- }
-
- /**
- * Subclasses may extend this method to provide their own validation of the specified java
- * classname. This implementation will ensure the class name is not set to Servlet and then will
- * forward on to the NewJavaClassDataModel to validate the class name as valid java. This method
- * does not accept null as a parameter. It will not return null.
- * It will check if the super class extends the javax.servlet.Servlet interface also.
- *
- * @param className
- * @return IStatus is java classname valid?
- */
- protected IStatus validateSuperClassName(String superclassName) {
- //If the servlet implements javax.servlet.Servlet, we do not need a super class
- if (ServletSupertypesValidator.isGenericServletSuperclass(model))
- return WTPCommonPlugin.OK_STATUS;
-
- // Check the super class as a java class
- IStatus status = null;
- if (superclassName.trim().length() > 0) {
- status = super.validate(SUPERCLASS);
- if (status.getSeverity() == IStatus.ERROR)
- return status;
- }
-
- if (!ServletSupertypesValidator.isServletSuperclass(model))
- return WTPCommonPlugin.createErrorStatus(WebMessages.ERR_SERVLET_INTERFACE);
-
- return status;
- }
-
- /**
- * Returns the default Url Mapping depending upon the display name of the Servlet
- *
- * @return List containting the default Url Mapping
- */
- private Object getDefaultUrlMapping() {
- List urlMappings = null;
- String text = (String) getProperty(DISPLAY_NAME);
- if (text != null) {
- urlMappings = new ArrayList();
- urlMappings.add(new String[] {"/" + text}); //$NON-NLS-1$
- }
- return urlMappings;
- }
-
- /**
- * This method is intended for internal use only. It will be used to
- * validate the init params list to ensure there are not any duplicates.
- * This method will accept a null paramter. It will not return null.
- *
- * @see NewServletClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is init params list valid?
- */
- private IStatus validateInitParamList(List prop) {
- if (prop != null && !prop.isEmpty()) {
- // Ensure there are not duplicate entries in the list
- boolean dup = hasDuplicatesInStringArrayList(prop);
- if (dup) {
- String msg = WebMessages.ERR_DUPLICATED_INIT_PARAMETER;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
- // Return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
- /**
- * This method is intended for internal use only. This will validate the
- * servlet mappings list and ensure there are not duplicate entries. It will
- * accept a null parameter. It will not return null.
- *
- * @see NewServletClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is servlet mapping list valid?
- */
- private IStatus validateURLMappingList(List prop) {
- if (prop != null && !prop.isEmpty()) {
- // Ensure there are not duplicates in the mapping list
- boolean dup = hasDuplicatesInStringArrayList(prop);
- if (dup) {
- String msg = WebMessages.ERR_DUPLICATED_URL_MAPPING;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- String isValidValue = validateValue(prop);
- if (isValidValue != null && isValidValue.length() > 0) {
- NLS.bind(WebMessages.ERR_URL_PATTERN_INVALID, isValidValue);
- String resourceString = WebMessages.getResourceString(WebMessages.ERR_URL_PATTERN_INVALID, new String[]{isValidValue});
- return WTPCommonPlugin.createErrorStatus(resourceString);
- }
- } else {
- String msg = WebMessages.ERR_URL_MAPPING_LIST_EMPTY;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- // Return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
- /**
- * This method is intended for internal use only. It provides a simple
- * algorithm for detecting if there are invalid pattern's value in a list.
- * It will accept a null parameter.
- *
- * @see NewServletClassDataModelProvider#validateURLMappingList(List)
- *
- * @param input
- * @return String first invalid pattern's value?
- */
- private String validateValue(List prop) {
- if (prop == null) {
- return "";
- }
- int size = prop.size();
- for (int i = 0; i < size; i++) {
- String urlMappingValue = ((String[]) prop.get(i))[0];
- if (!UrlPattern.isValid(urlMappingValue))
- return urlMappingValue;
- }
- return "";
- }
-
- /**
- * This method will return the list of servlet interfaces to be implemented
- * for the new servlet java class. It will intialize the list using lazy
- * initialization to the minimum interfaces required by the data model
- * SERVLET_INTERFACES. This method will not return null.
- *
- * @see #SERVLET_INTERFACES
- *
- * @return List of servlet interfaces to be implemented
- */
- private List getServletInterfaces() {
- if (interfaceList == null) {
- interfaceList = new ArrayList();
- // Add minimum required list of servlet interfaces to be implemented
- for (int i = 0; i < SERVLET_INTERFACES.length; i++) {
- interfaceList.add(SERVLET_INTERFACES[i]);
- }
- // Remove the javax.servlet.Servlet interface from the list if the
- // superclass already implements it
- if (ServletSupertypesValidator.isServletSuperclass(model)) {
- interfaceList.remove(QUALIFIED_SERVLET);
- }
- }
- // Return interface list
- return interfaceList;
- }
-
- /**
- * This method is intended for internal use only. This will validate whether
- * the display name selected is a valid display name for the servlet in the
- * specified web application. It will make sure the name is not empty and
- * that it doesn't already exist in the web app. This method will accept
- * null as a parameter. It will not return null.
- *
- * @see NewServletClassDataModelProvider#validate(String)
- *
- * @param prop
- * @return IStatus is servlet display name valid?
- */
- private IStatus validateDisplayName(String prop) {
- // Ensure the servlet display name is not null or empty
- if (prop == null || prop.trim().length() == 0) {
- String msg = WebMessages.ERR_DISPLAY_NAME_EMPTY;
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- if (getTargetProject() == null || getTargetComponent() == null)
- return WTPCommonPlugin.OK_STATUS;
-
- IModelProvider provider = ModelProviderManager.getModelProvider(getTargetProject());
- Object mObj = provider.getModelObject();
- if (mObj instanceof org.eclipse.jst.j2ee.webapplication.WebApp) {
- org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) mObj;
-
- List servlets = webApp.getServlets();
- boolean exists = false;
- // Ensure the display does not already exist in the web application
- if (servlets != null && !servlets.isEmpty()) {
- for (int i = 0; i < servlets.size(); i++) {
- String name = ((org.eclipse.jst.j2ee.webapplication.Servlet) servlets.get(i)).getServletName();
- if (prop.equals(name))
- exists = true;
- }
- }
- // If the servlet name already exists, throw an error
- if (exists) {
- String msg = WebMessages.getResourceString(WebMessages.ERR_SERVLET_NAME_EXIST, new String[]{prop});
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- } else if (mObj instanceof org.eclipse.jst.javaee.web.WebApp) {
- org.eclipse.jst.javaee.web.WebApp webApp = (org.eclipse.jst.javaee.web.WebApp) mObj;
-
- List servlets = webApp.getServlets();
- boolean exists = false;
- // Ensure the display does not already exist in the web application
- if (servlets != null && !servlets.isEmpty()) {
- for (int i = 0; i < servlets.size(); i++) {
- String name = ((org.eclipse.jst.javaee.web.Servlet) servlets.get(i)).getServletName();
- if (prop.equals(name))
- exists = true;
- }
- }
- // If the servlet name already exists, throw an error
- if (exists) {
- String msg = WebMessages.getResourceString(WebMessages.ERR_SERVLET_NAME_EXIST, new String[]{prop});
- return WTPCommonPlugin.createErrorStatus(msg);
- }
- }
-
- // Otherwise, return OK
- return WTPCommonPlugin.OK_STATUS;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassOperation.java
deleted file mode 100644
index 72b180949..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewServletClassOperation.java
+++ /dev/null
@@ -1,105 +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
- * Kaloyan Raev, kaloyan.raev@sap.com
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * The NewServletClassOperation is an IDataModelOperation following the
- * IDataModel wizard and operation framework.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * It extends ArtifactEditProviderOperation to provide servlet specific java
- * class generation.
- * @see org.eclipse.wst.common.componentcore.internal.operation.ArtifactEditProviderOperation
- *
- * This operation is used by the AddServletOperation to generate either an
- * annotated or non annotated java class for an added servlet. It shares the
- * NewServletClassDataModelProvider with the AddServletOperation to store the
- * appropriate properties required to generate the new servlet.
- * @see org.eclipse.jst.j2ee.internal.web.operations.AddServletOperation
- * @see org.eclipse.jst.j2ee.internal.web.operations.NewServletClassDataModelProvider
- *
- * In the annotated case, a WTPJetEmitter servlet template is created and used
- * to generate the servlet java class with the embedded annotated tags.
- * @see org.eclipse.jst.j2ee.internal.project.WTPJETEmitter
- * @see org.eclipse.jst.j2ee.internal.web.operations.CreateServletTemplateModel
- *
- * In the non annotated case, the same emitter is used to create the class with
- * the non annotated servlet template so the annotated tags are omitted.
- *
- * Subclasses may extend this operation to provide their own specific servlet
- * java class generation. The execute method may be extended to do so. Also,
- * generateUsingTemplates is exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public class NewServletClassOperation extends NewWebClassOperation {
-
- /**
- * folder location of the servlet creation templates diretory
- */
- protected static final String TEMPLATE_DIR = "/templates/"; //$NON-NLS-1$
-
- /**
- * location of the servlet creation template file
- */
- protected static final String TEMPLATE_FILE = "/templates/servlet.javajet"; //$NON-NLS-1$
-
- /**
- * This is the constructor which should be used when creating a
- * NewServletClassOperation. An instance of the NewServletClassDataModel
- * should be passed in. This does not accept null parameter. It will not
- * return null.
- *
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- * @see NewServletClassDataModel
- *
- * @param dataModel
- * @return NewServletClassOperation
- */
- public NewServletClassOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- /**
- * This method will create an instance of the CreateServletTemplate model to
- * be used in conjunction with the WTPJETEmitter. This method will not
- * return null.
- *
- * @see CreateServletTemplateModel
- * @see NewServletClassOperation#generateUsingTemplates(IProgressMonitor,
- * IPackageFragment)
- *
- * @return CreateServletTemplateModel
- */
- @Override
- protected CreateServletTemplateModel createTemplateModel() {
- return new CreateServletTemplateModel(model);
- }
-
- @Override
- protected String getTemplateFile() {
- return TEMPLATE_FILE;
- }
-
- @Override
- protected ServletTemplate getTemplateImplementation() {
- return ServletTemplate.create(null);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java
deleted file mode 100644
index 474740f02..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassDataModelProvider.java
+++ /dev/null
@@ -1,404 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel.USE_ANNOTATIONS;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CLASS_NAME;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.CONSTRUCTOR;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.MODIFIER_ABSTRACT;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.MODIFIER_PUBLIC;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SOURCE_FOLDER;
-import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.SUPERCLASS;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DESCRIPTION;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.DISPLAY_NAME;
-import static org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties.USE_EXISTING_CLASS;
-
-import java.io.File;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.plugin.WTPCommonPlugin;
-
-/**
- * The NewWebClassDataModelProvider is a subclass of
- * NewJavaClassDataModelProvider and follows the IDataModel Operation and Wizard
- * frameworks.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- *
- * This data model provider is a subclass of the NewJavaClassDataModelProvider,
- * which stores base properties necessary in the creation of a default java
- * class.
- * @see org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider
- *
- * The NewWebClassDataModelProvider provides more specific properties for java
- * class creation that are required in creating a web artifact java class. The
- * data model provider is used to store these values for the
- * AddWebClassOperation.
- * @see org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties
- * That operation will create the web artifact java class based on the
- * settings defined here in the data model.
- * @see org.eclipse.jst.j2ee.internal.web.operations.AddWebClassOperation
- *
- * This data model properties implements the IAnnotationsDataModel to get the
- * USE_ANNOTATIONS property for determining whether or not to generate an
- * annotated java class.
- * @see org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel
- *
- * Clients can subclass this data model provider to cache and provide their own
- * specific attributes. They should also provide their own validation methods,
- * properties interface, and default values for the properties they add.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public abstract class NewWebClassDataModelProvider extends NewJavaClassDataModelProvider {
-
- /**
- * The fully qualified default superclass.
- */
- private final static String DEFAULT_SUPERCLASS = ""; //$NON-NLS-1$
-
- /**
- * The cache of all the interfaces the web artifact java class will
- * implement.
- */
- protected List interfaceList;
-
- private String classNameCache;
- private String existingClassNameCache;
-
- private static boolean useAnnotations = false;
-
- /**
- * Subclasses may extend this method to provide their own determination of
- * whether or not certain properties should be disabled or enabled. This
- * method does not accept null parameter. It will not return null. This
- * implementation makes sure annotation support is only allowed on web
- * projects of J2EE version 1.3 or higher.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#isPropertyEnabled(String)
- * @see IAnnotationsDataModel#USE_ANNOTATIONS
- *
- * @param propertyName
- * @return boolean should property be enabled?
- */
- @Override
- public boolean isPropertyEnabled(String propertyName) {
- // Annotations should only be enabled on a valid j2ee project of version 1.3 or higher
- if (USE_ANNOTATIONS.equals(propertyName)) {
- return !getBooleanProperty(USE_EXISTING_CLASS) && isAnnotationsSupported();
- } else if (MODIFIER_PUBLIC.equals(propertyName)) {
- return false;
- } else if (MODIFIER_ABSTRACT.equals(propertyName)) {
- return false;
- } else if (CONSTRUCTOR.equals(propertyName)) {
- return hasSuperClass();
- }
- // Otherwise return super implementation
- return super.isPropertyEnabled(propertyName);
- }
-
- /**
- * Subclasses may extend this method to add their own data model's
- * properties as valid base properties.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#getPropertyNames()
- */
- @Override
- public Set getPropertyNames() {
- // Add web artifact specific properties defined in this data model
- Set propertyNames = super.getPropertyNames();
-
- propertyNames.add(DISPLAY_NAME);
- propertyNames.add(DESCRIPTION);
- propertyNames.add(USE_EXISTING_CLASS);
- propertyNames.add(USE_ANNOTATIONS);
-
- return propertyNames;
- }
-
- /**
- * Subclasses may extend this method to provide their own default values for
- * any of the properties in the data model hierarchy. This method does not
- * accept a null parameter. It may return null. This implementation sets
- * annotation use to be true.
- *
- * @see NewJavaClassDataModelProvider#getDefaultProperty(String)
- * @see IDataModelProvider#getDefaultProperty(String)
- *
- * @param propertyName
- * @return Object default value of property
- */
- @Override
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(DISPLAY_NAME))
- return Signature.getSimpleName(getStringProperty(CLASS_NAME));
- else if (propertyName.equals(USE_ANNOTATIONS))
- return shouldDefaultAnnotations();
- else if (propertyName.equals(SUPERCLASS))
- return DEFAULT_SUPERCLASS;
- else if (propertyName.equals(USE_EXISTING_CLASS))
- return Boolean.FALSE;
- else if (propertyName.equals(CONSTRUCTOR))
- return hasSuperClass();
-
- // Otherwise check super for default value for property
- return super.getDefaultProperty(propertyName);
- }
-
- /**
- * Subclasses may extend this method to add their own specific behavior when
- * a certain property in the data model hierarchy is set. this method does
- * not accept null for the property name, but it will for propertyValue. It
- * will not return null. It will return false if the set fails. This
- * implementation verifies the display name is set to the class name, that
- * the annotations is disabled/enabled properly, and that the target project
- * name is determined from the source folder setting.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider#propertySet(String,
- * Object)
- *
- * @param propertyName
- * @param propertyValue
- * @return boolean was property set?
- */
- @Override
- public boolean propertySet(String propertyName, Object propertyValue) {
- // If annotations is changed, notify an enablement change
- if (propertyName.equals(USE_ANNOTATIONS)) {
- useAnnotations = ((Boolean) propertyValue).booleanValue();
- if (useAnnotations && !isAnnotationsSupported())
- return true;
- model.notifyPropertyChange(USE_ANNOTATIONS, IDataModel.ENABLE_CHG);
- }
- // If the source folder is changed, ensure we have the correct project name
- if (propertyName.equals(SOURCE_FOLDER)) {
- // Get the project name from the source folder name
- String sourceFolder = (String) propertyValue;
- int index = sourceFolder.indexOf(File.separator);
- String projectName = sourceFolder;
- if (index == 0)
- projectName = sourceFolder.substring(1);
- index = projectName.indexOf(File.separator);
- if (index != -1) {
- projectName = projectName.substring(0, index);
- setProperty(PROJECT_NAME, projectName);
- }
- }
- // Call super to set the property on the data model
- boolean result = super.propertySet(propertyName, propertyValue);
- // If class name is changed, update the display name to be the same
- if (propertyName.equals(CLASS_NAME) && !model.isPropertySet(DISPLAY_NAME)) {
- model.notifyPropertyChange(DISPLAY_NAME, IDataModel.DEFAULT_CHG);
- }
- // After the property is set, if project changed, update the nature and the annotations
- // enablement
- if (propertyName.equals(COMPONENT_NAME)) {
- model.notifyPropertyChange(USE_ANNOTATIONS, IDataModel.ENABLE_CHG);
- }
- // After property is set, if annotations is set to true, update its value based on the new
- // level of the project
- if (getBooleanProperty(USE_ANNOTATIONS)) {
- if (!isAnnotationsSupported())
- setBooleanProperty(USE_ANNOTATIONS, false);
- }
- if (propertyName.equals(USE_EXISTING_CLASS)) {
- model.notifyPropertyChange(USE_ANNOTATIONS, IDataModel.ENABLE_CHG);
-
- if (((Boolean) propertyValue).booleanValue()) {
- classNameCache = getStringProperty(CLASS_NAME);
- setProperty(CLASS_NAME, existingClassNameCache);
- } else {
- existingClassNameCache = getStringProperty(CLASS_NAME);
- setProperty(CLASS_NAME, classNameCache);
- }
- }
- // if super class is changed, notify the constructor checkbox to update
- // its enabled state
- if (SUPERCLASS.equals(propertyName)) {
- model.notifyPropertyChange(CONSTRUCTOR, IDataModel.ENABLE_CHG);
- if (!hasSuperClass()) {
- model.setProperty(CONSTRUCTOR, null);
- }
- model.notifyPropertyChange(CONSTRUCTOR, IDataModel.DEFAULT_CHG);
- }
-
- // Return whether property was set
- return result;
- }
-
- /**
- * This method is used to determine if annotations should try to enable
- * based on workspace settings
- *
- * @return does any valid annotation provider or xdoclet handler exist
- */
- //TODO add this method back in for defect 146696
-// protected boolean isAnnotationProviderDefined() {
-// boolean isControllerEnabled = AnnotationsControllerManager.INSTANCE.isAnyAnnotationsSupported();
-// final String preferred = AnnotationPreferenceStore.getProperty(AnnotationPreferenceStore.ANNOTATIONPROVIDER);
-// IAnnotationProvider annotationProvider = null;
-// boolean isProviderEnabled = false;
-// if (preferred != null) {
-// try {
-// annotationProvider = AnnotationUtilities.findAnnotationProviderByName(preferred);
-// } catch (Exception ex) {
-// //Default
-// }
-// if (annotationProvider != null && annotationProvider.isValid())
-// isProviderEnabled = true;
-// }
-// return isControllerEnabled || isProviderEnabled;
-// }
-
- /**
- * This method checks to see if valid annotation providers exist and if
- * valid project version levels exist.
- *
- * @return should annotations be supported for this project in this
- * workspace
- */
- protected boolean isAnnotationsSupported() {
- //TODO add this check back in for defect 146696
-// if (!isAnnotationProviderDefined())
-// return false;
- if (!model.isPropertySet(PROJECT_NAME))
- return true;
- if (getStringProperty(PROJECT_NAME).equals("")) //$NON-NLS-1$
- return true;
- IProject project = ProjectUtilities.getProject(getStringProperty(PROJECT_NAME));
- String moduleName = getStringProperty(COMPONENT_NAME);
- if (project == null || moduleName == null || moduleName.equals(""))return true; //$NON-NLS-1$
- int j2eeVersion = J2EEVersionUtil.convertVersionStringToInt(J2EEProjectUtilities.getJ2EEProjectVersion(project));
-
- return j2eeVersion > J2EEVersionConstants.VERSION_1_2;
-
- }
-
- /**
- * Subclasses may extend this method to provide their own validation on any
- * of the valid data model properties in the hierarchy. It does not accept a
- * null parameter. This method will not return null.
- *
- * @see NewJavaClassDataModelProvider#validate(String)
- *
- * @param propertyName
- * @return IStatus is property value valid?
- */
- @Override
- public IStatus validate(String propertyName) {
- if (propertyName.equals(SUPERCLASS)) {
- // If our default is the superclass, we know it is ok
- if (getStringProperty(propertyName).equals(DEFAULT_SUPERCLASS))
- return WTPCommonPlugin.OK_STATUS;
- }
-
- if (propertyName.equals(CLASS_NAME)) {
- if (getStringProperty(propertyName).length() !=0 && getBooleanProperty(USE_EXISTING_CLASS)) {
- return WTPCommonPlugin.OK_STATUS;
- }
- }
-
- // Otherwise defer to super to validate the property
- return super.validate(propertyName);
- }
-
- /**
- * This method is intended for internal use only. It provides a simple
- * algorithm for detecting if there are duplicate entries in a list. It will
- * accept a null parameter. It will not return null.
- *
- * @see NewWebClassDataModelProvider#validateInitParamList(List)
- * @see NewWebClassDataModelProvider#validateURLMappingList(List)
- *
- * @param input
- * @return boolean are there dups in the list?
- */
- protected boolean hasDuplicatesInStringArrayList(List input) {
- // If list is null or empty return false
- if (input == null)
- return false;
- int n = input.size();
- boolean dup = false;
- // nested for loops to check each element to see if other elements are the same
- for (int i = 0; i < n; i++) {
- String[] sArray1 = (String[]) input.get(i);
- for (int j = i + 1; j < n; j++) {
- String[] sArray2 = (String[]) input.get(j);
- if (isTwoStringArraysEqual(sArray1, sArray2)) {
- dup = true;
- break;
- }
- }
- if (dup)
- break;
- }
- // Return boolean status for duplicates
- return dup;
- }
-
- /**
- * This method is intended for internal use only. This checks to see if the
- * two string arrays are equal. If either of the arrays are null or empty,
- * it returns false.
- *
- * @see NewWebClassDataModelProvider#hasDuplicatesInStringArrayList(List)
- *
- * @param sArray1
- * @param sArray2
- * @return boolean are Arrays equal?
- */
- protected boolean isTwoStringArraysEqual(String[] sArray1, String[] sArray2) {
- // If either array is null, return false
- if (sArray1 == null || sArray2 == null)
- return false;
- int n1 = sArray1.length;
- int n2 = sArray1.length;
- // If either array is empty, return false
- if (n1 == 0 || n2 == 0)
- return false;
- // If they don't have the same length, return false
- if (n1 != n2)
- return false;
- // If their first elements do not match, return false
- if (!sArray1[0].equals(sArray2[0]))
- return false;
- // Otherwise return true
- return true;
- }
-
- protected boolean hasSuperClass() {
- String superClass = model.getStringProperty(SUPERCLASS);
- return (superClass == null) ? false : superClass.trim().length() > 0;
- }
-
- /**
- * @return boolean should the default annotations be true?
- */
- private static Boolean shouldDefaultAnnotations() {
- if (useAnnotations)
- return Boolean.TRUE;
- return Boolean.FALSE;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassOperation.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassOperation.java
deleted file mode 100644
index 10af881ee..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/NewWebClassOperation.java
+++ /dev/null
@@ -1,240 +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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.application.internal.operations.IAnnotationsDataModel.USE_ANNOTATIONS;
-
-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.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsController;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsControllerManager;
-import org.eclipse.jst.common.internal.annotations.controller.AnnotationsControllerManager.Descriptor;
-import org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
-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.operation.ArtifactEditProviderOperation;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * The NewWebClassOperation is an IDataModelOperation following the IDataModel
- * wizard and operation framework.
- *
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation
- * @see org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider
- *
- * It extends AbstractDataModelOperation to provide web artifact specific java
- * class generation.
- * @see AbstractDataModelOperation
- *
- * This operation is used by the AddWebClassOperation to generate either an
- * annotated or non annotated java class for an added web artifact. It shares
- * the NewWebClassDataModelProvider with the AddWebClassOperation to store the
- * appropriate properties required to generate the new web artifact.
- *
- * @see AddWebClassOperation
- * @see NewWebClassDataModelProvider
- *
- * In the annotated case, a WTPJetEmitter listener template is created and used
- * to generate the listener java class with the embedded annotated tags.
- * @see org.eclipse.jst.j2ee.internal.project.WTPJETEmitter
- * @see CreateWebClassTemplateModel
- *
- * In the non annotated case, the same emitter is used to create the class with
- * the non annotated web artifact template so the annotated tags are omitted.
- *
- * Subclasses may extend this operation to provide their own specific web
- * artifact java class generation. The execute method may be extended to do so.
- * Also, generateUsingTemplates is exposed.
- *
- * The use of this class is EXPERIMENTAL and is subject to substantial changes.
- */
-public abstract class NewWebClassOperation extends NewJavaEEArtifactClassOperation {
-
- /**
- * XDoclet facet constants
- */
- private static final String JST_WEB_XDOCLET_VERSION = "1.2.3"; //$NON-NLS-1$
-
- /**
- * variable for the web plugin
- */
- protected static final String WEB_PLUGIN = "WEB_PLUGIN"; //$NON-NLS-1$
-
- /**
- * This is the constructor which should be used when creating a
- * NewWebClassOperation. An instance of the NewWebClassDataModel should be
- * passed in. This does not accept null parameter. It will not return null.
- *
- * @see ArtifactEditProviderOperation#ArtifactEditProviderOperation(IDataModel)
- * @see NewListenerClassDataModel
- *
- * @param dataModel
- * @return NewListenerClassOperation
- */
- public NewWebClassOperation(IDataModel dataModel) {
- super(dataModel);
- }
-
- /**
- * Subclasses may extend this method to provide their own template based
- * creation of an annotated web artifact java class file. This implementation
- * uses the creation of a CreateWebClassTemplateModel and the WTPJetEmitter
- * to create the java class with the annotated tags. This method accepts
- * null for monitor, it does not accept null for fragment. If annotations
- * are not being used the tags will be omitted from the class.
- *
- * @see CreateWebClassTemplateModel
- * @see #generateTemplateSource(CreateWebClassTemplateModel, IProgressMonitor)
- *
- * @param monitor
- * @param fragment
- * @throws CoreException
- * @throws WFTWrappedException
- */
- protected void generateUsingTemplates(IProgressMonitor monitor, IPackageFragment fragment) throws WFTWrappedException, CoreException {
- // Create the web artifact template model
- CreateWebClassTemplateModel tempModel = createTemplateModel();
- IProject project = getTargetProject();
- String source;
- try {
- // generate the java source based on the template model
- source = generateTemplateSource(WebPlugin.getPlugin(), tempModel, getTemplateFile(), getTemplateImplementation(), monitor);
- } catch (Exception e) {
- throw new WFTWrappedException(e);
- }
- if (fragment != null) {
- // Create the java file
- String javaFileName = tempModel.getClassName() + DOT_JAVA;
- ICompilationUnit cu = fragment.getCompilationUnit(javaFileName);
- // Add the compilation unit to the java file
- if (cu == null || !cu.exists())
- cu = fragment.createCompilationUnit(javaFileName, source, true, monitor);
- IFile aFile = (IFile) cu.getResource();
- // Let the annotations controller process the annotated resource
- AnnotationsController controller = AnnotationsControllerManager.INSTANCE.getAnnotationsController(project);
- if (controller != null)
- controller.process(aFile);
- }
-
- // Add the xdoclet facet, if necessary, for xdoclet listener creation
- try {
- installXDocletFacetIfNecessary(monitor, project);
- } catch (Exception e) {
- throw new WFTWrappedException(e);
- }
- }
-
- /**
- * This method is intended for internal use only. This will add an webdoclet facet to the project.
- *
- * @throws CoreException
- * @throws ExecutionException
- */
- private void installXDocletFacet(IProgressMonitor monitor, IProject project) throws CoreException, ExecutionException {
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- Set fixedFacets = facetedProject.getFixedProjectFacets();
- IDataModel dm = DataModelFactory.createDataModel(new FacetInstallDataModelProvider());
- dm.setProperty(IFacetDataModelProperties.FACET_ID, IJ2EEFacetConstants.DYNAMIC_WEB_XDOCLET);
- dm.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project.getName());
- dm.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JST_WEB_XDOCLET_VERSION);
- IDataModel fdm = DataModelFactory.createDataModel(new FacetProjectCreationDataModelProvider());
- fdm.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, project.getName());
-
- FacetDataModelMap map = (FacetDataModelMap) fdm.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- map.add(dm);
-
- fdm.getDefaultOperation().execute(monitor, null);
- facetedProject.setFixedProjectFacets(fixedFacets);
- }
-
- /**
- * This method is intended for internal use only. This will check to see if it needs to add an
- * webdoclet facet to the project.
- *
- * @throws CoreException
- * @throws ExecutionException
- */
- private void installXDocletFacetIfNecessary(IProgressMonitor monitor, IProject project) throws CoreException, ExecutionException {
-
- // If not using annotations, ignore the xdoclet facet
- if (!model.getBooleanProperty(USE_ANNOTATIONS))
- return;
-
- // If an extended annotations processor is added, ignore the default xdoclet one
- Descriptor descriptor = AnnotationsControllerManager.INSTANCE.getDescriptor(getTargetComponent().getProject());
- if (descriptor != null)
- return;
-
- // Otherwise check and see if the xdoclet facet is on the project yet
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- if (!facetedProject.hasProjectFacet(WebFacetUtils.WEB_XDOCLET_FACET))
- return;
-
- // Install xdoclet facet
- installXDocletFacet(monitor, project);
- }
-
- /**
- * This method will create an instance of the CreateWebClassTemplateModel to
- * be used in conjunction with the WTPJETEmitter. This method will not
- * return null.
- *
- * @see CreateWebClassTemplateModel
- * @see NewWebClassOperation#generateUsingTemplates(IProgressMonitor,
- * IPackageFragment)
- *
- * @return CreateWebClassTemplateModel
- */
- protected abstract CreateWebClassTemplateModel createTemplateModel();
-
- /**
- * This method will return the location of the template file that will be
- * passed to the WTPJETEmitter to generate the template implementation
- * class.
- *
- * @return path to the template file.
- */
- protected abstract String getTemplateFile();
-
- /**
- * This method will return an instance of the template implementation class
- * that is statically compiled in the plugin. This instance can be used to
- * generate the artifact's code without using the WTPJETEmitter.
- *
- * @return an instance of the template implementation class.
- */
- protected abstract Object getTemplateImplementation();
-
- private IVirtualComponent getTargetComponent() {
- return ComponentCore.createComponent(getTargetProject());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java
deleted file mode 100644
index a911a6f55..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletSupertypesValidator.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_GENERIC_SERVLET;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SERVLET;
-import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class ServletSupertypesValidator extends AbstractSupertypesValidator {
-
- public static boolean isHttpServletSuperclass(IDataModel dataModel) {
- if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel)))
- return true;
-
- if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_HTTP_SERVLET))
- return true;
-
- return false;
- }
-
- public static boolean isGenericServletSuperclass(IDataModel dataModel) {
- if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel)))
- return true;
-
- if (QUALIFIED_GENERIC_SERVLET.equals(getSuperclass(dataModel)))
- return true;
-
- if (hasSuperclass(dataModel, getSuperclass(dataModel), QUALIFIED_GENERIC_SERVLET))
- return true;
-
- return false;
- }
-
- public static boolean isServletSuperclass(IDataModel dataModel) {
- if (QUALIFIED_HTTP_SERVLET.equals(getSuperclass(dataModel)))
- return true;
-
- if (QUALIFIED_GENERIC_SERVLET.equals(getSuperclass(dataModel)))
- return true;
-
- if (getInterfaces(dataModel).contains(QUALIFIED_SERVLET))
- return true;
-
- if (hasSuperInterface(dataModel, getSuperclass(dataModel), QUALIFIED_SERVLET))
- return true;
-
- for (Object iface : getInterfaces(dataModel)) {
- if (hasSuperInterface(dataModel, (String) iface, QUALIFIED_SERVLET))
- return true;
- }
-
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletTemplate.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletTemplate.java
deleted file mode 100644
index ff81e0f5e..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/ServletTemplate.java
+++ /dev/null
@@ -1,330 +0,0 @@
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import java.util.*;
-import org.eclipse.jst.j2ee.internal.common.operations.*;
-
-public class ServletTemplate
-{
- protected static String nl;
- public static synchronized ServletTemplate create(String lineSeparator)
- {
- nl = lineSeparator;
- ServletTemplate result = new ServletTemplate();
- nl = null;
- return result;
- }
-
- public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
- protected final String TEXT_1 = "package ";
- protected final String TEXT_2 = ";";
- protected final String TEXT_3 = NL;
- protected final String TEXT_4 = NL + "import ";
- protected final String TEXT_5 = ";";
- protected final String TEXT_6 = NL;
- protected final String TEXT_7 = NL;
- protected final String TEXT_8 = "/**" + NL + " * Servlet implementation class ";
- protected final String TEXT_9 = NL + " *" + NL + " * @web.servlet" + NL + " * name=\"";
- protected final String TEXT_10 = "\"" + NL + " * display-name=\"";
- protected final String TEXT_11 = "\"";
- protected final String TEXT_12 = NL + " * description=\"";
- protected final String TEXT_13 = "\"";
- protected final String TEXT_14 = NL + " *" + NL + " * @web.servlet-mapping" + NL + " * url-pattern=\"";
- protected final String TEXT_15 = "\"";
- protected final String TEXT_16 = NL + " *" + NL + " * @web.servlet-init-param" + NL + " * name=\"";
- protected final String TEXT_17 = "\"" + NL + " * value=\"";
- protected final String TEXT_18 = "\"";
- protected final String TEXT_19 = NL + " * description=\"";
- protected final String TEXT_20 = "\"";
- protected final String TEXT_21 = NL + " */";
- protected final String TEXT_22 = NL + "public ";
- protected final String TEXT_23 = "abstract ";
- protected final String TEXT_24 = "final ";
- protected final String TEXT_25 = "class ";
- protected final String TEXT_26 = " extends ";
- protected final String TEXT_27 = " implements ";
- protected final String TEXT_28 = ", ";
- protected final String TEXT_29 = " {";
- protected final String TEXT_30 = NL + "\tprivate static final long serialVersionUID = 1L;";
- protected final String TEXT_31 = NL + NL + " /**" + NL + " * Default constructor. " + NL + " */" + NL + " public ";
- protected final String TEXT_32 = "() {" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_33 = NL + " " + NL + " /**" + NL + " * @see ";
- protected final String TEXT_34 = "#";
- protected final String TEXT_35 = "(";
- protected final String TEXT_36 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_37 = "(";
- protected final String TEXT_38 = ") {" + NL + " super(";
- protected final String TEXT_39 = ");" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
- protected final String TEXT_40 = NL + NL + "\t/**" + NL + " * @see ";
- protected final String TEXT_41 = "#";
- protected final String TEXT_42 = "(";
- protected final String TEXT_43 = ")" + NL + " */" + NL + " public ";
- protected final String TEXT_44 = " ";
- protected final String TEXT_45 = "(";
- protected final String TEXT_46 = ") {" + NL + " // TODO Auto-generated method stub";
- protected final String TEXT_47 = NL + "\t\t\treturn ";
- protected final String TEXT_48 = ";";
- protected final String TEXT_49 = NL + " }";
- protected final String TEXT_50 = NL + NL + "\t/**" + NL + "\t * @see Servlet#init(ServletConfig)" + NL + "\t */" + NL + "\tpublic void init(ServletConfig config) throws ServletException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_51 = NL + NL + "\t/**" + NL + "\t * @see Servlet#destroy()" + NL + "\t */" + NL + "\tpublic void destroy() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_52 = NL + NL + "\t/**" + NL + "\t * @see Servlet#getServletConfig()" + NL + "\t */" + NL + "\tpublic ServletConfig getServletConfig() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t\treturn null;" + NL + "\t}";
- protected final String TEXT_53 = NL + NL + "\t/**" + NL + "\t * @see Servlet#getServletInfo()" + NL + "\t */" + NL + "\tpublic String getServletInfo() {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t\treturn null; " + NL + "\t}";
- protected final String TEXT_54 = NL + NL + "\t/**" + NL + "\t * @see Servlet#service(ServletRequest request, ServletResponse response)" + NL + "\t */" + NL + "\tpublic void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_55 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)" + NL + "\t */" + NL + "\tprotected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_56 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)" + NL + "\t */" + NL + "\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_57 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)" + NL + "\t */" + NL + "\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_58 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doPut(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_59 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doDelete(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_60 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doHead(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_61 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doOptions(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doOptions(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_62 = NL + NL + "\t/**" + NL + "\t * @see HttpServlet#doTrace(HttpServletRequest, HttpServletResponse)" + NL + "\t */" + NL + "\tprotected void doTrace(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {" + NL + "\t\t// TODO Auto-generated method stub" + NL + "\t}";
- protected final String TEXT_63 = NL + NL + "}";
- protected final String TEXT_64 = NL;
-
- public String generate(Object argument)
- {
- final StringBuffer stringBuffer = new StringBuffer();
- CreateServletTemplateModel model = (CreateServletTemplateModel) argument;
-
- model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
-
-
- if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
-
- stringBuffer.append(TEXT_1);
- stringBuffer.append( model.getJavaPackageName() );
- stringBuffer.append(TEXT_2);
-
- }
-
- stringBuffer.append(TEXT_3);
-
- Collection<String> imports = model.getImports();
- for (String anImport : imports) {
-
- stringBuffer.append(TEXT_4);
- stringBuffer.append( anImport );
- stringBuffer.append(TEXT_5);
-
- }
-
- stringBuffer.append(TEXT_6);
- stringBuffer.append(TEXT_7);
- stringBuffer.append(TEXT_8);
- stringBuffer.append( model.getClassName() );
-
- if (model.isAnnotated()) {
-
- stringBuffer.append(TEXT_9);
- stringBuffer.append( model.getServletName() );
- stringBuffer.append(TEXT_10);
- stringBuffer.append( model.getServletName() );
- stringBuffer.append(TEXT_11);
-
- if (model.getDescription() != null && model.getDescription().length() > 0) {
-
- stringBuffer.append(TEXT_12);
- stringBuffer.append( model.getDescription() );
- stringBuffer.append(TEXT_13);
-
- }
-
- List<String[]> mappings = model.getServletMappings();
- if (mappings != null && mappings.size() > 0) {
- for (int i = 0; i < mappings.size(); i++) {
- String map = model.getServletMapping(i);
- stringBuffer.append(TEXT_14);
- stringBuffer.append( map );
- stringBuffer.append(TEXT_15);
-
- }
- }
- List<String[]> initParams = model.getInitParams();
- if (initParams != null && initParams.size() > 0) {
- for (int i = 0; i < initParams.size(); i++) {
- String name = model.getInitParam(i, CreateServletTemplateModel.NAME);
- String value = model.getInitParam(i, CreateServletTemplateModel.VALUE);
- String description = model.getInitParam(i, CreateServletTemplateModel.DESCRIPTION);
-
- stringBuffer.append(TEXT_16);
- stringBuffer.append( name );
- stringBuffer.append(TEXT_17);
- stringBuffer.append( value );
- stringBuffer.append(TEXT_18);
-
- if (description != null && description.length() > 0) {
-
- stringBuffer.append(TEXT_19);
- stringBuffer.append( description );
- stringBuffer.append(TEXT_20);
-
- }
- }
- }
- }
-
- stringBuffer.append(TEXT_21);
-
- if (model.isPublic()) {
-
- stringBuffer.append(TEXT_22);
-
- }
-
- if (model.isAbstract()) {
-
- stringBuffer.append(TEXT_23);
-
- }
-
- if (model.isFinal()) {
-
- stringBuffer.append(TEXT_24);
-
- }
-
- stringBuffer.append(TEXT_25);
- stringBuffer.append( model.getClassName() );
-
- String superClass = model.getSuperclassName();
- if (superClass != null && superClass.length() > 0) {
-
- stringBuffer.append(TEXT_26);
- stringBuffer.append( superClass );
-
- }
-
- List<String> interfaces = model.getInterfaces();
- if ( interfaces.size() > 0) {
-
- stringBuffer.append(TEXT_27);
-
- }
-
- for (int i = 0; i < interfaces.size(); i++) {
- String INTERFACE = (String) interfaces.get(i);
- if (i > 0) {
-
- stringBuffer.append(TEXT_28);
-
- }
-
- stringBuffer.append( INTERFACE );
-
- }
-
- stringBuffer.append(TEXT_29);
-
- if (model.isGenericServletSuperclass()) {
-
- stringBuffer.append(TEXT_30);
-
- }
-
-
- if (!model.hasEmptySuperclassConstructor()) {
-
- stringBuffer.append(TEXT_31);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_32);
-
- }
-
- if (model.shouldGenSuperclassConstructors()) {
- List<Constructor> constructors = model.getConstructors();
- for (Constructor constructor : constructors) {
- if (constructor.isPublic() || constructor.isProtected()) {
-
- stringBuffer.append(TEXT_33);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_34);
- stringBuffer.append( model.getSuperclassName() );
- stringBuffer.append(TEXT_35);
- stringBuffer.append( constructor.getParamsForJavadoc() );
- stringBuffer.append(TEXT_36);
- stringBuffer.append( model.getClassName() );
- stringBuffer.append(TEXT_37);
- stringBuffer.append( constructor.getParamsForDeclaration() );
- stringBuffer.append(TEXT_38);
- stringBuffer.append( constructor.getParamsForCall() );
- stringBuffer.append(TEXT_39);
-
- }
- }
- }
-
-
- if (model.shouldImplementAbstractMethods()) {
- for (Method method : model.getUnimplementedMethods()) {
-
- stringBuffer.append(TEXT_40);
- stringBuffer.append( method.getContainingJavaClass() );
- stringBuffer.append(TEXT_41);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_42);
- stringBuffer.append( method.getParamsForJavadoc() );
- stringBuffer.append(TEXT_43);
- stringBuffer.append( method.getReturnType() );
- stringBuffer.append(TEXT_44);
- stringBuffer.append( method.getName() );
- stringBuffer.append(TEXT_45);
- stringBuffer.append( method.getParamsForDeclaration() );
- stringBuffer.append(TEXT_46);
-
- String defaultReturnValue = method.getDefaultReturnValue();
- if (defaultReturnValue != null) {
-
- stringBuffer.append(TEXT_47);
- stringBuffer.append( defaultReturnValue );
- stringBuffer.append(TEXT_48);
-
- }
-
- stringBuffer.append(TEXT_49);
-
- }
- }
-
- if (model.shouldGenInit()) {
- stringBuffer.append(TEXT_50);
- }
- if (model.shouldGenDestroy()) {
- stringBuffer.append(TEXT_51);
- }
- if (model.shouldGenGetServletConfig()) {
- stringBuffer.append(TEXT_52);
- }
- if (model.shouldGenGetServletInfo()) {
- stringBuffer.append(TEXT_53);
- }
- if (model.shouldGenService() && !model.isHttpServletSuperclass()) {
- stringBuffer.append(TEXT_54);
- }
- if (model.shouldGenService() && model.isHttpServletSuperclass()) {
- stringBuffer.append(TEXT_55);
- }
- if (model.shouldGenDoGet()) {
- stringBuffer.append(TEXT_56);
- }
- if (model.shouldGenDoPost()) {
- stringBuffer.append(TEXT_57);
- }
- if (model.shouldGenDoPut()) {
- stringBuffer.append(TEXT_58);
- }
- if (model.shouldGenDoDelete()) {
- stringBuffer.append(TEXT_59);
- }
- if (model.shouldGenDoHead()) {
- stringBuffer.append(TEXT_60);
- }
- if (model.shouldGenDoOptions()) {
- stringBuffer.append(TEXT_61);
- }
- if (model.shouldGenDoTrace()) {
- stringBuffer.append(TEXT_62);
- }
- stringBuffer.append(TEXT_63);
- stringBuffer.append(TEXT_64);
- return stringBuffer.toString();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/WebMessages.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/WebMessages.java
deleted file mode 100644
index 47dd11a8a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/operations/WebMessages.java
+++ /dev/null
@@ -1,124 +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
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Jan 13, 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.web.operations;
-
-import org.eclipse.osgi.util.NLS;
-
-
-/**
- * @author jialin
- *
- * To change the template for this generated type comment go to Window - Preferences - Java - Code
- * Generation - Code and Comments
- */
-public class WebMessages extends NLS {
- private static final String BUNDLE_NAME = "web";//$NON-NLS-1$
-
- private WebMessages() {
- // Do not instantiate
- }
-
- public static String ERR_JAR_NAME_EMPTY;
- public static String ERR_JAR_NAME_EXIST;
- public static String ERR_JAVA_PROJECT_NAME_EMPTY;
- public static String ERR_JAVA_PROJECT_NAME_EXIST;
- public static String ERR_DUPLICATED_INIT_PARAMETER;
- public static String ERR_DUPLICATED_URL_MAPPING;
-
- public static String ERR_SERVLET_MAPPING_URL_PATTERN_EXIST;
- public static String KEY_3;
- public static String KEY_4;
- public static String KEY_5;
- public static String KEY_6;
- public static String ERR_FILTER_PARAMETER_NAME_EXIST;
- public static String ERR_FILTER_MAPPING_SERVLET_EXIST;
- public static String ERR_FILTER_MAPPING_SERVLET_DISPATCHER_TYPES_EMPTY;
- public static String ERR_SERVLET_MAPPING_URL_PATTERN_EMPTY;
- public static String ERR_URL_MAPPING_LIST_EMPTY;
- public static String ERR_URL_PATTERN_INVALID;
- public static String ERR_FILTER_MAPPING_EMPTY;
- public static String ERR_DISPLAY_NAME_EMPTY;
- public static String ERR_SERVLET_CLASS_NAME_USED;
- public static String ERR_SERVLET_JAVA_CLASS_NAME_INVALID;
- public static String ERR_SERVLET_MAPPING_SERVLET_NOT_EXIST;
- public static String ERR_SERVLET_NAME_EXIST;
- public static String ERR_SERVLET_DISPLAY_NAME_EXIST;
- public static String ERR_SERVLET_PARAMETER_NAME_EMPTY;
- public static String ERR_SERVLET_PARAMETER_NAME_EXIST;
- public static String ERR_SERVLET_PARAMETER_VALUE_EMPTY;
- public static String ERR_SERVLET_PARAMETER_VALUE_EXIST;
- public static String ERR_SERVLET_ROLE_REF_NAME_EMPTY;
- public static String ERR_SERVLET_ROLE_REF_NAME_EXIST;
- public static String ERR_SERVLET_ROLE_LINK_EMPTY;
- public static String ERR_SERVLET_INTERFACE;
-
- public static String ERR_FILTER_DISPLAY_NAME_EXIST;
- public static String ERR_FILTER_NAME_EXIST;
- public static String ERR_FILTER_CLASS_NAME_USED;
- public static String ERR_FILTER_CLASS_NAME_INVALID;
- public static String ERR_LISTENER_DISPLAY_NAME_EXIST;
- public static String ERR_LISTENER_CLASS_NAME_USED;
- public static String ERR_LISTENER_CLASS_NAME_INVALID;
-
- public static String ERR_PAGE_ENCODING_EMPTY;
- public static String ERR_PAGE_ENCODING_EXIST;
- public static String ERR_URL_PATTERN_EXIST;
- public static String ERR_INCLUDE_PRELUDES_EXIST;
- public static String ERR_INCLUDE_CODAS_EXIST;
- public static String ERR_SECURITY_CONSTRAINT_NAME_EMPTY;
- public static String ERR_SECURITY_CONSTRAINT_NAME_EXIST;
- public static String ERR_CONTEXT_PARAMETER_NAME_EMPTY;
- public static String ERR_CONTEXT_PARAMETER_NAME_EXIST;
- public static String ERR_RESOURCE_NAME_EMPTY;
- public static String ERR_RESOURCE_NAME_EXIST;
- public static String ERR_URL_PATTERNS_EMPTY;
- public static String ERR_MIME_MAPPING_EXTENSION_EMPTY;
- public static String ERR_MIME_MAPPING_EXTENSION_EXIST;
- public static String ERR_WELCOME_PAGE_EMPTY;
- public static String ERR_WELCOME_PAGE_EXIST;
- public static String ERR_ENV_ENTRY_NAME_EMPTY;
- public static String ERR_ENV_ENTRY_NAME_EXIST;
- public static String ERR_ERROR_CODE_EMPTY;
- public static String ERR_ERROR_CODE_MUST_BE_3_DIGITS;
- public static String ERR_ERROR_PAGE_LOCATION_EMPTY;
- public static String ERR_ERROR_PAGE_LOCATION_EXIST;
- public static String ERR_ERROR_PAGE_LOCATION_MUST_START_WITH_SLASH;
- public static String ERR_EXCEPTION_TYPE_EMPTY;
- public static String ERR_EXCEPTION_SECURITY_ID_NO_BEANS;
- public static String ERR_EXCEPTION_ROLE_NAME_EMPTY;
- public static String ERR_LOCALE_NAME_EMPTY;
- public static String ERR_LOCALE_NAME_EXIST;
- public static String ERR_TAGLIBREF_URL_EMPTY;
- public static String ERR_TAGLIBREF_URL_EXIST;
- public static String ERR_MESSAGE_DESTINATION_NAME_EMPTY;
- public static String ERR_MESSAGE_DESTINATION_NAME_EXIST;
- public static String ERR_EXCEPTION_METHOD_ELEMENT_EMPTY;
- public static String ERR_EXCEPTION_METHOD_TRANSACTION_ATTRIBUTES_EMPTY;
- public static String ERR_SERVLET_LIST_EMPTY;
- public static String ERR_FILTER_LIST_EMPTY;
- public static String ERR_LISTENER_LIST_EMPTY;
- public static String ERR_NO_LISTENER_SELECTED;
-
- static {
- NLS.initializeMessages(BUNDLE_NAME, WebMessages.class);
- }
-
- public static String getResourceString(String key, Object[] args) {
- return NLS.bind(key, args);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebModuleExtensionImpl.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebModuleExtensionImpl.java
deleted file mode 100644
index 52d3f91de..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebModuleExtensionImpl.java
+++ /dev/null
@@ -1,196 +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 29, 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.web.plugin;
-
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.application.WebModule;
-import org.eclipse.jst.j2ee.internal.moduleextension.EarModuleExtensionImpl;
-import org.eclipse.jst.j2ee.internal.moduleextension.WebModuleExtension;
-import org.eclipse.jst.j2ee.internal.project.J2EEJavaProjectInfo;
-import org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.internal.web.archive.operations.WebFacetProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-
-
-public class WebModuleExtensionImpl extends EarModuleExtensionImpl implements WebModuleExtension {
-
- /**
- *
- */
- public WebModuleExtensionImpl() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#createProjectInfo()
- */
- public J2EEJavaProjectInfo createProjectInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#addWLPProjects(org.eclipse.core.resources.IProject,
- * java.util.Set)
- */
- public void addWLPProjects(IProject aProject, Set projectsToBuild) {
- // J2EEWebNatureRuntime nature = J2EEWebNatureRuntime.getRuntime(aProject);
- // if (nature == null)
- // return;
- // ILibModule[] libModules = nature.getLibModules();
- // for (int i = 0; i < libModules.length; i++) {
- // IProject p = libModules[i].getProject();
- // if (p.isAccessible())
- // projectsToBuild.add(libModules[i].getProject());
- // }
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#setContextRootForModuleMapping(org.eclipse.jst.j2ee.internal.internal.application.WebModule,
- * org.eclipse.core.resources.IProject)
- */
- public void setContextRootForModuleMapping(WebModule webModule, IProject nestedProject) throws CoreException {
- WebArtifactEdit webEdit = null;
- try {
- // TODO migrate to flex project
- // webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead( nestedProject
- // );
- if (webEdit != null) {
- webEdit.setServerContextRoot(webModule.getContextRoot());
- }
- } finally {
- if (webEdit != null)
- webEdit.dispose();
- }
- // if (wnr != null) {
- // wnr.setContextRoot(webModule.getContextRoot());
- // }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#hasRuntime(org.eclipse.core.resources.IProject)
- */
- public boolean hasRuntime(IProject project) {
- // return J2EEWebNatureRuntimeUtilities.hasJ2EERuntime(project);
- // To do: work based on module
- return false;
- }
-
- // public J2EEImportOperationOLD createImportOperation(IProject
- // nestedProject, WARFile warFile, EARImportConfiguration importConfig){
- // WarImportOperation op = new WarImportOperation(nestedProject, warFile);
- // //op.setServerTarget(info.getServerTarget());
- // HashMap opMap = importConfig.createProjectOption;
- // if(opMap != null && !opMap.isEmpty())
- // op.createWLProjectOptions = opMap;
- // return op;
- // }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#getContentFolder(org.eclipse.core.resources.IProject,
- * org.eclipse.jst.j2ee.internal.internal.commonarchivecore.File)
- */
-
- public String getContentFolder(IProject project, IFile webSettingsFile) {
- String contentFolder = null;
-
- // WebSettings webSettings = new WebSettings(project, webSettingsFile);
- // if (webSettings != null) {
- // contentFolder = webSettings.getWebContentName();
- // }
- // To do: Needs work here, no content folder exists now
- WebArtifactEdit webEdit = null;
- try {
- // TODO migrate to flex project
- // webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
- if (webEdit != null) {
-
- }
- } finally {
- if (webEdit != null)
- webEdit.dispose();
- }
-
- return contentFolder;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.WebModuleExtension#compareWebContextRoot(org.eclipse.jst.j2ee.internal.internal.application.Module,
- * org.eclipse.core.resources.IProject)
- */
- public boolean compareWebContextRoot(Module module, IProject project) throws CoreException {
- String contextRoot = ((WebModule) module).getContextRoot();
- if (contextRoot != null)
- return ((contextRoot).equals(getServerContextRoot(project)));
- return false;
- }
-
- protected String getServerContextRoot(IProject project) {
- WebArtifactEdit webEdit = null;
- try {
- // TODO migrate to flex project
- // webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
- if (webEdit != null) {
- return webEdit.getServerContextRoot();
- }
- } finally {
- if (webEdit != null)
- webEdit.dispose();
- }
- return ""; //$NON-NLS-1$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.EarModuleExtension#createProjectDataModel()
- */
- public IDataModel createProjectDataModel() {
- return DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.j2ee.internal.internal.moduleextension.EarModuleExtension#createImportDataModel()
- */
- public IDataModel createImportDataModel() {
- return DataModelFactory.createDataModel(new WebComponentImportDataModelProvider());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java
deleted file mode 100644
index 37c97592a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/internal/web/plugin/WebPlugin.java
+++ /dev/null
@@ -1,289 +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.web.plugin;
-
-import java.io.IOException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdapterManager;
-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.ILog;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.util.WebEditAdapterFactory;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-import org.eclipse.wst.common.frameworks.internal.WTPPlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-
-/**
- * This is a top-level class of the j2ee plugin.
- *
- */
-
-public class WebPlugin extends WTPPlugin implements ResourceLocator {
- // Default instance of the receiver
- private static WebPlugin inst;
- protected final IPath iconsFolder = new Path(Platform.getBundle(PLUGIN_ID).getEntry("icons").getPath()); //$NON-NLS-1$
- // Links View part of the plugin
- //public static final String LINKS_BUILDER_ID =
- // "com.ibm.etools.links.management.linksbuilder";//$NON-NLS-1$
- public static final String LINKS_BUILDER_ID = "com.ibm.etools.webtools.additions.linksbuilder"; //$NON-NLS-1$
- // LibDir Change Listener
- public static final String LIBDIRCHANGE_BUILDER_ID = "com.ibm.etools.webtools.LibDirBuilder"; //$NON-NLS-1$
- public static final String PLUGIN_ID = "org.eclipse.jst.j2ee.web"; //$NON-NLS-1$
- // LibCopy builder ID
- public static final String LIBCOPY_BUILDER_ID = "org.eclipse.jst.j2ee.LibCopyBuilder"; //$NON-NLS-1$
- // Validation part of the plugin
- //Global ResourceSet (somewhat global)
- private static IPath location;
- public static final String[] ICON_DIRS = new String[]{"icons/full/obj16", //$NON-NLS-1$
- "icons/full/cview16", //$NON-NLS-1$
- "icons/full/ctool16", //$NON-NLS-1$
- "icons/full/clcl16", //$NON-NLS-1$
- "icons/full/ovr16", //$NON-NLS-1$
- "icons/full/extra", //$NON-NLS-1$
- "icons/full/wizban", //$NON-NLS-1$
- "icons", //$NON-NLS-1$
- ""}; //$NON-NLS-1$
-
- /**
- * Create the J2EE plugin and cache its default instance
- */
- public WebPlugin() {
- super();
- if (inst == null)
- inst = this;
- }
-
- /**
- * Get the plugin singleton.
- */
- static public WebPlugin getDefault() {
- return inst;
- }
-
- /*
- * Javadoc copied from interface.
- */
- public URL getBaseURL() {
- return getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- public Object[] getJ2EEWebProjectMigrationExtensions() {
-
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint pct = registry.getExtensionPoint(getBundle().getSymbolicName(), "J2EEWebProjectMigrationExtension"); //$NON-NLS-1$
-
- IExtension[] extension = pct.getExtensions();
- List ret = new Vector();
- for (int l = 0; l < extension.length; ++l) {
- IExtension config = extension[l];
-
- IConfigurationElement[] cElems = config.getConfigurationElements();
- for (int i = 0; i < cElems.length; i++) {
- IConfigurationElement d = cElems[i];
- if (d.getName().equals("migration")) { //$NON-NLS-1$
- try {
- Object me = d.createExecutableExtension("run"); //$NON-NLS-1$
-
- ret.add(me);
- } catch (Exception ex) {
- // ignore this extension, keep going
- }
- }
- }
- }
-
- return ret.toArray();
- }
-
- /**
- * This gets a .gif from the icons folder.
- */
- public Object getImage(String key) {
- return J2EEPlugin.getImageURL(key, getBundle());
- }
-
- // ISSUE: this method is never used in WTP. Seems no need to be API
- public static IPath getInstallLocation() {
- if (location == null) {
- String installLocation = getDefault().getBundle().getLocation();
- location = new Path(installLocation);
- }
- return location;
- }
-
- public static URL getInstallURL() {
- return getDefault().getBundle().getEntry("/"); //$NON-NLS-1$
- }
-
- /**
- * Get the singleton instance.
- */
- public static WebPlugin getPlugin() {
- return inst;
- }
-
- /**
- * Return the plugin directory location- the directory that all the plugins are located in (i.e.
- * d:\installdir\plugin)
- */
- public static IPath getPluginLocation(String pluginId) {
- Bundle bundle = Platform.getBundle(pluginId);
- if (bundle != null) {
- try {
- IPath installPath = new Path(bundle.getEntry("/").toExternalForm()).removeTrailingSeparator(); //$NON-NLS-1$
- String installStr = Platform.asLocalURL(new URL(installPath.toString())).getFile();
- return new Path(installStr);
- } catch (IOException e) {
- //Do nothing
- }
- }
- return null;
- }
-
- /**
- * Return the Servlets Jar file path preference.
- *
- * @return String the file path to the servlets jar, or null if never specified.
- * @deprecated - the preference store is no longer on this plugin because of the UI dependency.
- */
- public String getPreferenceServletsJar() {
- // return getPreferenceStore().getString(IWebToolingCoreConstants.PROP_SERVLET_JAR);
- return "THIS IS THE WRONG PATH - NEED TO CHANGE IMPLEMENTATION!!!!!"; //$NON-NLS-1$
- }
-
- /**
- * Return the Servlets Jar file path preference.
- *
- * @return String the file path to the servlets jar, or null if never specified.
- * @deprecated - the preference store is no longer on this plugin because of the UI dependency.
- */
- public String getPreferenceWebASJar() {
- //return getPreferenceStore().getString(IWebToolingCoreConstants.PROP_WEBAS_JAR);
- return "THIS IS THE WRONG PATH - NEED TO CHANGE IMPLEMENTATION!!!!!"; //$NON-NLS-1$
- }
-
- public static IWorkspace getWorkspace() {
- return ResourcesPlugin.getWorkspace();
- }
-
- /**
- * If this is called from an operation, in response to some other exception that was caught,
- * then the client code should throw {@link com.ibm.etools.wft.util.WFTWrappedException};
- * otherwise this can still be used to signal some other error condition within the operation,
- * or to throw a core exception in a context other than executing an operation
- *
- * Create a new IStatus of type ERROR using the J2EEPlugin ID. aCode is just an internal code.
- */
- public static IStatus newErrorStatus(int aCode, String aMessage, Throwable exception) {
- return newStatus(IStatus.ERROR, aCode, aMessage, exception);
- }
-
- /**
- * If this is called from an operation, in response to some other exception that was caught,
- * then the client code should throw {@link com.ibm.etools.wft.util.WFTWrappedException};
- * otherwise this can still be used to signal some other error condition within the operation,
- * or to throw a core exception in a context other than executing an operation
- *
- * Create a new IStatus of type ERROR, code OPERATION_FAILED, using the J2EEPlugin ID
- */
- public static IStatus newErrorStatus(String aMessage, Throwable exception) {
- return newErrorStatus(0, aMessage, exception);
- }
-
- /**
- * If this is called from an operation, in response to some other exception that was caught,
- * then the client code should throw {@link com.ibm.etools.wft.util.WFTWrappedException};
- * otherwise this can still be used to signal some other error condition within the operation.
- *
- * Create a new IStatus of type ERROR, code OPERATION_FAILED, using the J2EEPlugin ID
- */
- public static IStatus newOperationFailedStatus(String aMessage, Throwable exception) {
- return newStatus(IStatus.ERROR, IResourceStatus.OPERATION_FAILED, aMessage, exception);
- }
-
- /**
- * Create a new IStatus with a severity using the J2EEPlugin ID. aCode is just an internal code.
- */
- public static IStatus newStatus(int severity, int aCode, String aMessage, Throwable exception) {
- return new Status(severity, PLUGIN_ID, aCode, aMessage, exception);
- }
-
- /*
- * Javadoc copied from interface.
- */
- public String getString(String key) {
- return Platform.getResourceString(getBundle(), key);
- }
-
- /*
- * Javadoc copied from interface.
- */
- public String getString(String key, Object[] substitutions) {
- return MessageFormat.format(getString(key), substitutions);
- }
-
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- }
-
- public void start(BundleContext context) throws Exception {
- super.start(context);
- //WebAppResourceFactory.register(WTPResourceFactoryRegistry.INSTANCE);
- IAdapterManager manager = Platform.getAdapterManager();
- manager.registerAdapters(new WebEditAdapterFactory(), ArtifactEditModel.class);
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.common.frameworks.internal.WTPPlugin#getPluginID()
- */
- public String getPluginID() {
- return PLUGIN_ID;
- }
-
- public static void log( final Exception e )
- {
- final ILog log = WebPlugin.getDefault().getLog();
- final String msg = "Encountered an unexpected exception.";
-
- log.log( new Status( IStatus.ERROR, PLUGIN_ID, IStatus.OK, msg, e ) );
- }
- 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);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java
deleted file mode 100644
index ce7642360..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/IServletConstants.java
+++ /dev/null
@@ -1,78 +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:
- * Kaloyan Raev, kaloyan.raev@sap.com - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.web;
-
-public interface IServletConstants {
-
- public static final String QUALIFIED_IO_EXCEPTION = "java.io.IOException"; //$NON-NLS-1$
-
- public static final String QUALIFIED_SERVLET = "javax.servlet.Servlet"; //$NON-NLS-1$
- public static final String QUALIFIED_GENERIC_SERVLET = "javax.servlet.GenericServlet"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SERVLET = "javax.servlet.http.HttpServlet"; //$NON-NLS-1$
-
- public static final String QUALIFIED_SERVLET_EXCEPTION = "javax.servlet.ServletException"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_CONFIG = "javax.servlet.ServletConfig"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_REQUEST = "javax.servlet.ServletRequest"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_RESPONSE = "javax.servlet.ServletResponse"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SERVLET_REQUEST = "javax.servlet.http.HttpServletRequest"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SERVLET_RESPONSE = "javax.servlet.http.HttpServletResponse"; //$NON-NLS-1$
-
- public static final String QUALIFIED_FILTER = "javax.servlet.Filter"; //$NON-NLS-1$
- public static final String QUALIFIED_FILTER_CONFIG = "javax.servlet.FilterConfig"; //$NON-NLS-1$
- public static final String QUALIFIED_FILTER_CHAIN = "javax.servlet.FilterChain"; //$NON-NLS-1$
-
- public static final String QUALIFIED_SERVLET_CONTEXT_LISTENER = "javax.servlet.ServletContextListener"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_CONTEXT_EVENT = "javax.servlet.ServletContextEvent"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_LISTENER = "javax.servlet.ServletContextAttributeListener"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_CONTEXT_ATTRIBUTE_EVENT = "javax.servlet.ServletContextAttributeEvent"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_LISTENER = "javax.servlet.http.HttpSessionListener"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_EVENT = "javax.servlet.http.HttpSessionEvent"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_ATTRIBUTE_LISTENER = "javax.servlet.http.HttpSessionAttributeListener"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_BINDING_EVENT = "javax.servlet.http.HttpSessionBindingEvent"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_ACTIVATION_LISTENER = "javax.servlet.http.HttpSessionActivationListener"; //$NON-NLS-1$
- public static final String QUALIFIED_HTTP_SESSION_BINDING_LISTENER = "javax.servlet.http.HttpSessionBindingListener"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_REQUEST_LISTENER = "javax.servlet.ServletRequestListener"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_REQUEST_EVENT = "javax.servlet.ServletRequestEvent"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER = "javax.servlet.ServletRequestAttributeListener"; //$NON-NLS-1$
- public static final String QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_EVENT = "javax.servlet.ServletRequestAttributeEvent"; //$NON-NLS-1$
-
- public static final String METHOD_INIT = "init"; //$NON-NLS-1$
- public static final String METHOD_DESTROY = "destroy"; //$NON-NLS-1$
- public static final String METHOD_GET_SERVLET_CONFIG = "getServletConfig"; //$NON-NLS-1$
- public static final String METHOD_GET_SERVLET_INFO = "getServletInfo"; //$NON-NLS-1$
- public static final String METHOD_SERVICE = "service"; //$NON-NLS-1$
- public static final String METHOD_DO_GET = "doGet"; //$NON-NLS-1$
- public static final String METHOD_DO_POST = "doPost"; //$NON-NLS-1$
- public static final String METHOD_DO_PUT = "doPut"; //$NON-NLS-1$
- public static final String METHOD_DO_DELETE = "doDelete"; //$NON-NLS-1$
- public static final String METHOD_DO_HEAD = "doHead"; //$NON-NLS-1$
- public static final String METHOD_DO_OPTIONS = "doOptions"; //$NON-NLS-1$
- public static final String METHOD_DO_TRACE = "doTrace"; //$NON-NLS-1$
- public static final String METHOD_TO_STRING = "toString"; //$NON-NLS-1$
- public static final String METHOD_DO_FILTER = "doFilter"; //$NON-NLS-1$
-
- public static final String SERVLET_INIT_SIGNATURE = "(Ljavax/servlet/ServletConfig;)V"; //$NON-NLS-1$
- public static final String DESTROY_SIGNATURE = "()V"; //$NON-NLS-1$
- public static final String GET_SERVLET_CONFIG_SIGNATURE = "()Ljavax/servlet/ServletConfig;"; //$NON-NLS-1$
- public static final String GET_SERVLET_INFO_SIGNATURE = "()Ljava/lang/String;"; //$NON-NLS-1$
- public static final String SERVICE_SIGNATURE = "(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V"; //$NON-NLS-1$
- public static final String HTTP_SERVICE_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_GET_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_POST_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_PUT_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_DELETE_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_HEAD_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_OPTIONS_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String DO_TRACE_SIGNATURE = "(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V"; //$NON-NLS-1$
- public static final String FILTER_INIT_SIGNATURE = "(Ljavax/servlet/FilterConfig;)V"; //$NON-NLS-1$
- public static final String DO_FILTER_SIGNATURE = "(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/validation/UrlPattern.java b/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/validation/UrlPattern.java
deleted file mode 100644
index e8f789cd8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/web/org/eclipse/jst/j2ee/web/validation/UrlPattern.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.jst.j2ee.web.validation;
-
-/**
- * Utility method for URL patterns.
- *
- * <p>
- * Could be used by components dealing with URL patterns like: Servlet and
- * Filter wizards, web.xml validators, etc.
- * </p>
- *
- * @author kraev
- */
-public class UrlPattern {
-
- /**
- * Validates an URL pattern.
- *
- * @param urlPattern
- * the string representation of the URL pattern to validate
- *
- * @return <code>true</code> if the given pattern is a valid one,
- * <code>false</code> - otherwise.
- */
- public static boolean isValid(String urlPattern) {
- // URL Pattern must not be empty string
- if (urlPattern.length() == 0)
- return false;
-
- // URL Pattern must not contain Carriage Return characters
- if (urlPattern.indexOf('\r') != -1)
- return false;
-
- // URL Pattern must not contain New Line characters
- if (urlPattern.indexOf('\n') != -1)
- return false;
-
- // Path Mappings must not contain "*." character sequences
- if (urlPattern.startsWith("/")) {
- if (urlPattern.indexOf("*.") == -1) {
- return true;
- } else {
- return false;
- }
- }
-
- // Extension Mappings must not contain '/' characters
- if (urlPattern.startsWith("*.")) {
- if (urlPattern.indexOf('/') == -1) {
- return true;
- } else {
- return false;
- }
- }
-
- // The URL Pattern is neither a Path Mapping, nor Extension Mapping
- // Therefore, it is invalid
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/AuthConstraintItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/AuthConstraintItemProvider.java
deleted file mode 100644
index 82553e9c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/AuthConstraintItemProvider.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.web.providers;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-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.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-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.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.Description;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.AuthConstraint;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory;
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.AuthConstraint}
- * object.
- */
-public class AuthConstraintItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public AuthConstraintItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns authority_constraint.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("authority_constraint");//$NON-NLS-1$
- }
-
- /**
- * This returns the secConstraint of the AuthConstraint.
- */
- public Object getParent(Object object) {
- return ((AuthConstraint) object).getSecConstraint();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- // This is for the description feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- WebAppEditResourceHandler.getString("The_description_property_UI_"), //$NON-NLS-1$ = "The description property"
- pkg.getAuthConstraint_Description()));
- // This is for the roles feature.
- //
- WebToolingItemPropertyDescriptor propertyDescriptor = new WebToolingItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Roles_UI_"), //$NON-NLS-1$ = "Roles"
- WebAppEditResourceHandler.getString("The_roles_property_UI_"), //$NON-NLS-1$ = "The roles property"
- pkg.getAuthConstraint_Roles(), WebToolingItemPropertyDescriptor.AUTH_CONSTRAINT_ROLES_EDITOR);
- itemPropertyDescriptors.add(propertyDescriptor);
- // This is for the secConstraint feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("SecConstraint_UI_"), //$NON-NLS-1$ = "SecConstraint"
- WebAppEditResourceHandler.getString("The_secConstraint_property_UI_"), //$NON-NLS-1$ = "The secConstraint property"
- pkg.getAuthConstraint_SecConstraint()));
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_AuthConstraint_description_feature"), getString( //$NON-NLS-1$
- "_UI_PropertyDescriptor_description", "_UI_AuthConstraint_description_feature", //$NON-NLS-1$ //$NON-NLS-2$
- "_UI_AuthConstraint_type"), WebapplicationPackage.eINSTANCE.getAuthConstraint_Description(), true, //$NON-NLS-1$
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Roles feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addRolesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_AuthConstraint_roles_feature"), getString( //$NON-NLS-1$
- "_UI_PropertyDescriptor_description", "_UI_AuthConstraint_roles_feature", "_UI_AuthConstraint_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getAuthConstraint_Roles(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and
- * {@link org.eclipse.emf.edit.command.AddCommand}and
- * {@link org.eclipse.emf.edit.command.RemoveCommand}support in {@link #createCommand}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Collection getChildrenReferences(Object object) {
- if (childrenReferences == null) {
- super.getChildrenReferences(object);
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getAuthConstraint_Descriptions());
- }
- return childrenReferences;
- }
-
- public String getText(Object object) {
- String description = ((AuthConstraint) object).getDescription();
- if (description == null) {
- List descList = ((AuthConstraint) object).getDescriptions();
- if (descList != null && descList.size() > 0)
- description = ((Description) descList.get(0)).getValue();
- }
- if (description == null)
- description = ""; //$NON-NLS-1$
- // return WebAppEditResourceHandler.getString("11concat_UI_", (new
- // Object[]{description})); //$NON-NLS-1$ = "AuthConstraint {0}"
- return description;
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(AuthConstraint.class)) {
- case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTION :
- case WebapplicationPackage.AUTH_CONSTRAINT__ROLES :
- case WebapplicationPackage.AUTH_CONSTRAINT__DESCRIPTIONS : {
- 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(WebapplicationPackage.eINSTANCE.getAuthConstraint_Descriptions(), CommonFactory.eINSTANCE.createDescription()));
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getAuthConstraint_Descriptions(), WscommonFactory.eINSTANCE.createDescriptionType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.IEditingDomainItemProvider#createCommand(java.lang.Object,
- * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class,
- * org.eclipse.emf.edit.command.CommandParameter)
- */
- public Command createCommand(Object object, EditingDomain editingDomain, Class commandClass, CommandParameter commandParameter) {
- EStructuralFeature sf = commandParameter.getEReference();
- if (sf == null) {
- sf = commandParameter.getEAttribute();
- if (sf != null && !sf.isMany())
- sf = null;
- }
- if (sf != null) {
- EObject owner = commandParameter.getEOwner();
- Collection collection = commandParameter.getCollection();
- if (commandClass == AddCommand.class) {
- return createAddCommand(editingDomain, owner, sf, collection, commandParameter.getIndex());
- } else if (commandClass == RemoveCommand.class) {
- return createRemoveCommand(editingDomain, owner, sf, collection);
- }
- }
- return super.createCommand(object, editingDomain, commandClass, commandParameter);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ContextParamItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ContextParamItemProvider.java
deleted file mode 100644
index e110ef824..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ContextParamItemProvider.java
+++ /dev/null
@@ -1,190 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.ContextParam;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ContextParam}
- * object.
- */
-public class ContextParamItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ContextParamItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns initializ_parameter_context.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("initializ_parameter_context");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the ContextParam.
- */
- public Object getParent(Object object) {
- return ((ContextParam) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the paramName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ParamName_UI_"), //$NON-NLS-1$ = "ParamName"
- WebAppEditResourceHandler.getString("The_paramName_property_UI_"), //$NON-NLS-1$ = "The paramName property"
- pkg.getContextParam_ParamName()));
-
- // This is for the paramValue feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ParamValue_UI_"), //$NON-NLS-1$ = "ParamValue"
- WebAppEditResourceHandler.getString("The_paramValue_property_UI_"), //$NON-NLS-1$ = "The paramValue property"
- pkg.getContextParam_ParamValue()));
-
- // This is for the description feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- WebAppEditResourceHandler.getString("The_description_property_UI_"), //$NON-NLS-1$ = "The description property"
- pkg.getContextParam_Description()));
-
- // This is for the webApp feature.
- //
- /*
- * itemPropertyDescriptors.add (new ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- * WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- * WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The
- * webApp property" pkg.getContextParam_WebApp()));
- */
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Param Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addParamNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ContextParam_paramName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ContextParam_paramName_feature", "_UI_ContextParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getContextParam_ParamName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Param Value feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addParamValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ContextParam_paramValue_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ContextParam_paramValue_feature", "_UI_ContextParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getContextParam_ParamValue(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ContextParam_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ContextParam_description_feature", "_UI_ContextParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getContextParam_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("12concat_UI_", (new Object[]{((ContextParam) object).getParamName()})); //$NON-NLS-1$ = "ContextParam {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ContextParam.class)) {
- case WebapplicationPackage.CONTEXT_PARAM__PARAM_NAME :
- case WebapplicationPackage.CONTEXT_PARAM__PARAM_VALUE :
- case WebapplicationPackage.CONTEXT_PARAM__DESCRIPTION : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorCodeErrorPageItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorCodeErrorPageItemProvider.java
deleted file mode 100644
index df2ebbf6b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorCodeErrorPageItemProvider.java
+++ /dev/null
@@ -1,125 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.ErrorCodeErrorPage;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorCodeErrorPage}
- * object.
- */
-public class ErrorCodeErrorPageItemProvider extends ErrorPageItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ErrorCodeErrorPageItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns errorcode_errorpage.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("errorcode_errorpage"); //$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the errorCode feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ErrorCode_UI_"), //$NON-NLS-1$ = "ErrorCode"
- WebAppEditResourceHandler.getString("The_errorCode_property_UI_"), //$NON-NLS-1$ = "The errorCode property"
- pkg.getErrorCodeErrorPage_ErrorCode()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Error Code feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addErrorCodePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ErrorCodeErrorPage_errorCode_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ErrorCodeErrorPage_errorCode_feature", "_UI_ErrorCodeErrorPage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getErrorCodeErrorPage_ErrorCode(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- //return WebAppEditResourceHandler.getString("14concat_UI_", (new Object[]{((ErrorCodeErrorPage) object).getErrorCode()})); //$NON-NLS-1$
- return ((ErrorCodeErrorPage) object).getErrorCode() + " -> " + ((ErrorCodeErrorPage) object).getLocation();
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ErrorCodeErrorPage.class)) {
- case WebapplicationPackage.ERROR_CODE_ERROR_PAGE__ERROR_CODE : {
- 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();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorPageItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorPageItemProvider.java
deleted file mode 100644
index 190fa5fec..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ErrorPageItemProvider.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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.ErrorPage;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorPage}object.
- */
-public class ErrorPageItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ErrorPageItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns error_page.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("error_page"); //$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the ErrorPage.
- */
- public Object getParent(Object object) {
- return ((ErrorPage) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the location feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Location_UI_"), //$NON-NLS-1$ = "Location"
- WebAppEditResourceHandler.getString("The_location_property_UI_"), //$NON-NLS-1$ = "The location property"
- pkg.getErrorPage_Location()));
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Location feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addLocationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ErrorPage_location_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ErrorPage_location_feature", "_UI_ErrorPage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getErrorPage_Location(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("13concat_UI_", (new Object[]{((ErrorPage) object).getLocation()})); //$NON-NLS-1$ = "ErrorPage {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ErrorPage.class)) {
- case WebapplicationPackage.ERROR_PAGE__LOCATION : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ExceptionTypeErrorPageItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ExceptionTypeErrorPageItemProvider.java
deleted file mode 100644
index 3861005a4..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ExceptionTypeErrorPageItemProvider.java
+++ /dev/null
@@ -1,123 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.ExceptionTypeErrorPage;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ExceptionTypeErrorPage}object.
- */
-public class ExceptionTypeErrorPageItemProvider extends ErrorPageItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ExceptionTypeErrorPageItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns exception_type_errorpage.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("exception_type_errorpage"); //$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the exceptionType feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ExceptionType_UI_"), //$NON-NLS-1$ = "ExceptionType"
- WebAppEditResourceHandler.getString("The_exceptionType_property_UI_"), //$NON-NLS-1$ = "The exceptionType property"
- pkg.getExceptionTypeErrorPage_ExceptionType()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Exception Type feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addExceptionTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ExceptionTypeErrorPage_exceptionType_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ExceptionTypeErrorPage_exceptionType_feature", "_UI_ExceptionTypeErrorPage_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getExceptionTypeErrorPage_ExceptionType(), true));
- }
-
-
- public String getText(Object object) {
- //return WebAppEditResourceHandler.getString("15concat_UI_", (new Object[]{((ExceptionTypeErrorPage) object).getExceptionTypeName()})); //$NON-NLS-1$ = "ExceptionTypeErrorPage {0}"
- String typeName = ((ExceptionTypeErrorPage) object).getExceptionTypeName();
- if (typeName != null) {
- typeName = typeName.substring(typeName.lastIndexOf('.')+1);
- }
- return typeName + " -> " + ((ExceptionTypeErrorPage) object).getLocation();
- }
-
- /**
- * 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 J2EEPlugin.getDefault();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterItemProvider.java
deleted file mode 100644
index 89c494d90..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterItemProvider.java
+++ /dev/null
@@ -1,263 +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.web.providers;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-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.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;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.Filter;
-import org.eclipse.jst.j2ee.webapplication.InitParam;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-public class FilterItemProvider extends CompatibilityDescriptionGroupItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public FilterItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- InitParam child = WebapplicationFactory.eINSTANCE.createInitParam();
-
- // 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) {
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- WebApp webApp = (WebApp) ((Filter) object).eContainer();
- if (webApp.getJ2EEVersionID() >= J2EEVersionConstants.J2EE_1_4_ID)
- result.add(pkg.getFilter_InitParamValues());
- else
- result.add(pkg.getFilter_InitParams());
- 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.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateInitParam"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return "Create InitParam"; //$NON-NLS-1$
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("26concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type InitParam for the selected {0}."
- }
-
- /**
- * This returns Filter.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter"); //$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the Filter.
- */
- public Object getParent(Object object) {
- return WebapplicationPackage.eINSTANCE.getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- WebapplicationPackage wap = WebapplicationPackage.eINSTANCE;
-
- // This is for the filterName feature.
-
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("FilterItemProvider_UI_0"), //$NON-NLS-1$
- WebAppEditResourceHandler.getString("The_filterName_property_3"), wap.getFilter_Name())); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Filter_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Filter_name_feature", "_UI_Filter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilter_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Filter Class feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addFilterClassPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Filter_filterClass_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Filter_filterClass_feature", "_UI_Filter_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilter_FilterClass(), true));
- }
-
- /**
- * This implements
- * {@link IItemPropertySource#getPropertyValue IItemPropertySource.getPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public Object getPropertyValue(Object object, String property) {
- Object ret = null;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).getPropertyValue(object);
- } else
- ret = super.getPropertyValue(object, property);
- return ret;
- }
-
- public String getText(Object object) {
- Filter filter = (Filter) object;
- String name = filter.getName();
- if (name == null)
- name = "<filter>"; //$NON-NLS-1$
- return name;
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Filter.class)) {
- case WebapplicationPackage.FILTER__NAME :
- case WebapplicationPackage.FILTER__INIT_PARAMS :
- case WebapplicationPackage.FILTER__INIT_PARAM_VALUES : {
- 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(WebapplicationPackage.eINSTANCE.getFilter_InitParams(), WebapplicationFactory.eINSTANCE.createInitParam()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getFilter_InitParamValues(), CommonFactory.eINSTANCE.createParamValue()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- /**
- * This implements {@link IItemPropertySource#isPropertySet IItemPropertySource.isPropertySet}
- * by delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public boolean isPropertySet(Object object, String property) {
- boolean ret = false;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).isPropertySet(object);
- } else
- ret = super.isPropertySet(object, property);
- return ret;
- }
-
- /**
- * This implements
- * {@link IItemPropertySource#setPropertyValue IItemPropertySource.setPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public void setPropertyValue(Object object, String property, Object value) {
-
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).setPropertyValue(object, value);
- } else
- super.setPropertyValue(object, property, value);
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterMappingItemProvider.java
deleted file mode 100644
index fd32339b9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FilterMappingItemProvider.java
+++ /dev/null
@@ -1,196 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.Filter;
-import org.eclipse.jst.j2ee.webapplication.FilterMapping;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FilterMapping}
- * object.
- */
-public class FilterMappingItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public FilterMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns filter_mapping.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("filter_mapping"); //$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the FilterMapping.
- */
- public Object getParent(Object object) {
- return WebapplicationPackage.eINSTANCE.getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
- WebapplicationPackage wap = WebapplicationPackage.eINSTANCE;
-
- // This is for the urlPattern feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("UrlPattern_UI_"), //$NON-NLS-1$ = "UrlPattern"
- WebAppEditResourceHandler.getString("The_urlPattern_property_UI_"), //$NON-NLS-1$ = "The urlPattern property"
- wap.getFilterMapping_UrlPattern()));
-
- // This is for the filter feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), "Filter", WebAppEditResourceHandler.getString("The_filter_property_2"), wap.getFilterMapping_Filter(), false)); //$NON-NLS-1$ //$NON-NLS-2$
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Url Pattern feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUrlPatternPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FilterMapping_urlPattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FilterMapping_urlPattern_feature", "_UI_FilterMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilterMapping_UrlPattern(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Dispatcher Type feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDispatcherTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FilterMapping_dispatcherType_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FilterMapping_dispatcherType_feature", "_UI_FilterMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilterMapping_DispatcherType(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Filter feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addFilterPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FilterMapping_filter_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FilterMapping_filter_feature", "_UI_FilterMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilterMapping_Filter(), true));
- }
-
- /**
- * This adds a property descriptor for the Servlet feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addServletPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FilterMapping_servlet_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FilterMapping_servlet_feature", "_UI_FilterMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFilterMapping_Servlet(), true));
- }
-
-
- public String getText(Object object) {
- FilterMapping filterMapping = (FilterMapping) object;
- Filter filter = filterMapping.getFilter();
- String filterStr = (filter == null) ? WebAppEditResourceHandler.getString("?_UI_") : filter.getName(); //$NON-NLS-1$ = "?"
-
- String mapText = ((FilterMapping) object).getUrlPattern();
- if (mapText == null) {
- Servlet servlet = filterMapping.getServlet();
- if (servlet != null)
- mapText = servlet.getServletName();
- }
- if (mapText == null)
- mapText = "?"; //$NON-NLS-1$
- return WebAppEditResourceHandler.getString("Filter_mapping_text", new Object[]{mapText, filterStr}); //$NON-NLS-1$
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(FilterMapping.class)) {
- case WebapplicationPackage.FILTER_MAPPING__URL_PATTERN :
- case WebapplicationPackage.FILTER_MAPPING__FILTER :
- case WebapplicationPackage.FILTER_MAPPING__SERVLET :
- case WebapplicationPackage.FILTER_MAPPING__DISPATCHER_TYPE : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FormLoginConfigItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FormLoginConfigItemProvider.java
deleted file mode 100644
index f9fe86761..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/FormLoginConfigItemProvider.java
+++ /dev/null
@@ -1,178 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.FormLoginConfig;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FormLoginConfig}
- * object.
- */
-public class FormLoginConfigItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public FormLoginConfigItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns form_login_config.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("form_login_config");//$NON-NLS-1$
- }
-
- /**
- * This returns form_login_config.gif.
- */
- //TODO Removing the UI dependency by commenting out this method
- /*
- * public Image getLabelImage(Object object) { return (Image)
- * WEBUIPlugin.getDefault().getImageFromRegistry("form_login_config");//$NON-NLS-1$ }
- */
- public String getLabelText(Object object) {
- return WebAppEditResourceHandler.getString("52concat_UI_", (new Object[]{((FormLoginConfig) object).getFormLoginPage()})); //$NON-NLS-1$ = "FormLoginConfig {0}"
- }
-
- /**
- * This returns the loginConfig of the FormLoginConfig.
- */
- public Object getParent(Object object) {
- return ((FormLoginConfig) object).getLoginConfig();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the formLoginPage feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("FormLoginPage_UI_"), //$NON-NLS-1$ = "FormLoginPage"
- WebAppEditResourceHandler.getString("The_formLoginPage_property_UI_"), //$NON-NLS-1$ = "The formLoginPage property"
- pkg.getFormLoginConfig_FormLoginPage()));
-
- // This is for the formErrorPage feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("FormErrorPage_UI_"), //$NON-NLS-1$ = "FormErrorPage"
- WebAppEditResourceHandler.getString("The_formErrorPage_property_UI_"), //$NON-NLS-1$ = "The formErrorPage property"
- pkg.getFormLoginConfig_FormErrorPage()));
-
- // This is for the loginConfig feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("LoginConfig_UI_"), //$NON-NLS-1$ = "LoginConfig"
- WebAppEditResourceHandler.getString("The_loginConfig_property_UI_"), //$NON-NLS-1$ = "The loginConfig property"
- pkg.getFormLoginConfig_LoginConfig()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Form Login Page feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addFormLoginPagePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FormLoginConfig_formLoginPage_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FormLoginConfig_formLoginPage_feature", "_UI_FormLoginConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFormLoginConfig_FormLoginPage(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Form Error Page feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addFormErrorPagePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_FormLoginConfig_formErrorPage_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_FormLoginConfig_formErrorPage_feature", "_UI_FormLoginConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getFormLoginConfig_FormErrorPage(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("16concat_UI_", (new Object[]{((FormLoginConfig) object).getFormLoginPage()})); //$NON-NLS-1$ = "FormLoginConfig {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(FormLoginConfig.class)) {
- case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_LOGIN_PAGE :
- case WebapplicationPackage.FORM_LOGIN_CONFIG__FORM_ERROR_PAGE : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/HTTPMethodTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/HTTPMethodTypeItemProvider.java
deleted file mode 100644
index 1828e70d0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/HTTPMethodTypeItemProvider.java
+++ /dev/null
@@ -1,149 +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.web.providers;
-
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.HTTPMethodType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.HTTPMethodType}
- * object.
- */
-public class HTTPMethodTypeItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public HTTPMethodTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns http_type.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("http_type");//$NON-NLS-1$
- }
-
- /**
- * This returns the resCollection of the HTTPMethodType.
- */
- public Object getParent(Object object) {
- return ((HTTPMethodType) object).getHttpMethod();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the httpMethod feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("HttpMethod_UI_"), //$NON-NLS-1$ = "HttpMethod"
- WebAppEditResourceHandler.getString("The_httpMethod_property_UI_"), //$NON-NLS-1$ = "The httpMethod property"
- pkg.getHTTPMethodType_HttpMethod()));
-
- // This is for the resCollection feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ResCollection_UI_"), //$NON-NLS-1$ = "ResCollection"
- WebAppEditResourceHandler.getString("The_resCollection_property_UI_"), //$NON-NLS-1$ = "The resCollection property"
- pkg.getHTTPMethodType_HttpMethod()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Http Method feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addHttpMethodPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_HTTPMethodType_httpMethod_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_HTTPMethodType_httpMethod_feature", "_UI_HTTPMethodType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getHTTPMethodType_HttpMethod(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("17concat_UI_", (new Object[]{((HTTPMethodType) object).getHttpMethod()})); //$NON-NLS-1$ = "HTTPMethodType {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(HTTPMethodType.class)) {
- case WebapplicationPackage.HTTP_METHOD_TYPE__HTTP_METHOD : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/InitParamItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/InitParamItemProvider.java
deleted file mode 100644
index 0a0a6d5e0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/InitParamItemProvider.java
+++ /dev/null
@@ -1,223 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.InitParam;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.InitParam}object.
- */
-public class InitParamItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public InitParamItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns initializ_parameter.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("initializ_parameter"); //$NON-NLS-1$
- }
-
- /**
- * This returns the servlet of the InitParam.
- */
- public Object getParent(Object object) {
- return ((InitParam) object).eContainer();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the paramName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ParamName_UI_"), //$NON-NLS-1$ = "ParamName"
- WebAppEditResourceHandler.getString("The_paramName_property_UI_"), //$NON-NLS-1$ = "The paramName property"
- pkg.getInitParam_ParamName()));
-
- // This is for the paramValue feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ParamValue_UI_"), //$NON-NLS-1$ = "ParamValue"
- WebAppEditResourceHandler.getString("The_paramValue_property_UI_"), //$NON-NLS-1$ = "The paramValue property"
- pkg.getInitParam_ParamValue()));
-
- // This is for the description feature.
- //
- WebToolingItemPropertyDescriptor propertyDescriptor = new WebToolingItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- pkg.getInitParam_Description(), WebToolingItemPropertyDescriptor.MULTILINE_TEXT_EDITOR);
- itemPropertyDescriptors.add(propertyDescriptor);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Param Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addParamNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_InitParam_paramName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_InitParam_paramName_feature", "_UI_InitParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getInitParam_ParamName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Param Value feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addParamValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_InitParam_paramValue_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_InitParam_paramValue_feature", "_UI_InitParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getInitParam_ParamValue(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_InitParam_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_InitParam_description_feature", "_UI_InitParam_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getInitParam_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- /**
- * This implements
- * {@link IItemPropertySource#getPropertyValue IItemPropertySource.getPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public Object getPropertyValue(Object object, String property) {
- Object ret = null;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).getPropertyValue(object);
- } else
- ret = super.getPropertyValue(object, property);
- return ret;
- }
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("18concat_UI_", (new Object[]{((InitParam) object).getParamName(), ((InitParam) object).getParamValue()})); //$NON-NLS-1$ = "{0} = {1}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(InitParam.class)) {
- case WebapplicationPackage.INIT_PARAM__PARAM_NAME :
- case WebapplicationPackage.INIT_PARAM__PARAM_VALUE :
- case WebapplicationPackage.INIT_PARAM__DESCRIPTION : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
- /**
- * This implements {@link IItemPropertySource#isPropertySet IItemPropertySource.isPropertySet}
- * by delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public boolean isPropertySet(Object object, String property) {
- boolean ret = false;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).isPropertySet(object);
- } else
- ret = super.isPropertySet(object, property);
- return ret;
- }
-
- /**
- * This implements
- * {@link IItemPropertySource#setPropertyValue IItemPropertySource.setPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public void setPropertyValue(Object object, String property, Object value) {
-
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).setPropertyValue(object, value);
- } else
- super.setPropertyValue(object, property, value);
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ItemHolder.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ItemHolder.java
deleted file mode 100644
index 19a4b4926..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ItemHolder.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.web.providers;
-
-
-import java.util.Collection;
-import java.util.Vector;
-
-import org.eclipse.emf.edit.provider.ItemProvider;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-
-
-/**
- * Insert the type's description here. Creation date: (6/18/2001 5:53:02 PM)
- *
- * @author: Administrator
- */
-public class ItemHolder extends ItemProvider {
- protected WebApp webApp;
- protected WebArtifactEdit webArtifactEdit;
-
- public ItemHolder() {
- super();
- }
-
- /**
- * Jarholder constructor comment.
- */
- public ItemHolder(WebApp webApp) {
- super();
- setWebApp(webApp);
- }
- public ItemHolder(WebArtifactEdit webArtifactEdit) {
- super();
- setWebArtifactEdit(webArtifactEdit);
- }
-
- public Collection getChildren(Object element) {
- WebApp testElement;
- Vector v = new Vector();
- if (element instanceof ItemHolder) {
- testElement = ((ItemHolder) element).getWebApp();
- v.add(testElement);
- }
- return v;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/18/2001 6:00:43 PM)
- *
- * @return org.eclipse.jst.j2ee.internal.internal.ejb.EJBJar
- */
- public WebApp getWebApp() {
- return webApp;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/18/2001 6:00:43 PM)
- *
- * @param newJar
- * org.eclipse.jst.j2ee.internal.internal.ejb.EJBJar
- */
- public void setWebApp(WebApp aWebApp) {
- webApp = aWebApp;
- }
-
- public WebArtifactEdit getWebArtifactEdit() {
- return webArtifactEdit;
- }
-
- public void setWebArtifactEdit(WebArtifactEdit webArtifactEdit) {
- this.webArtifactEdit = webArtifactEdit;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPConfigItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPConfigItemProvider.java
deleted file mode 100644
index 1a59fa868..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPConfigItemProvider.java
+++ /dev/null
@@ -1,154 +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.web.providers;
-
-
-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.EReference;
-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.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.jsp.JSPConfig;
-import org.eclipse.jst.j2ee.jsp.JspFactory;
-import org.eclipse.jst.j2ee.jsp.JspPackage;
-
-
-/**
- * This is the item provider adpater for a {@link com.ibm.etools.jsp.JSPConfig}object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class JSPConfigItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public JSPConfigItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and
- * {@link org.eclipse.emf.edit.command.AddCommand}and
- * {@link org.eclipse.emf.edit.command.RemoveCommand}support in {@link #createCommand}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Collection getChildrenReferences(Object object) {
- if (childrenReferences == null) {
- super.getChildrenReferences(object);
- childrenReferences.add(JspPackage.eINSTANCE.getJSPConfig_TagLibs());
- childrenReferences.add(JspPackage.eINSTANCE.getJSPConfig_PropertyGroups());
- }
- return childrenReferences;
- }
-
- /**
- * <!-- 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 JSPConfig.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("full/obj16/JSPConfig"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @generated
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("_UI_JSPConfig_type"); //$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(JSPConfig.class)) {
- case JspPackage.JSP_CONFIG__TAG_LIBS :
- case JspPackage.JSP_CONFIG__PROPERTY_GROUPS : {
- 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(JspPackage.eINSTANCE.getJSPConfig_TagLibs(), JspFactory.eINSTANCE.createTagLibRefType()));
-
- newChildDescriptors.add(createChildParameter(JspPackage.eINSTANCE.getJSPConfig_PropertyGroups(), JspFactory.eINSTANCE.createJSPPropertyGroup()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPPropertyGroupItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPPropertyGroupItemProvider.java
deleted file mode 100644
index d05194d2b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPPropertyGroupItemProvider.java
+++ /dev/null
@@ -1,218 +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.web.providers;
-
-
-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.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.common.internal.provider.CompatibilityDescriptionGroupItemProvider;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.jsp.JSPPropertyGroup;
-import org.eclipse.jst.j2ee.jsp.JspPackage;
-
-/**
- * This is the item provider adpater for a {@link com.ibm.etools.jsp.JSPPropertyGroup}object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class JSPPropertyGroupItemProvider extends CompatibilityDescriptionGroupItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public JSPPropertyGroupItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addUrlPatternPropertyDescriptor(object);
- addElIgnoredPropertyDescriptor(object);
- addPageEncodingPropertyDescriptor(object);
- addScriptingInvalidPropertyDescriptor(object);
- addIsXMLPropertyDescriptor(object);
- addIncludePreludesPropertyDescriptor(object);
- addIncludeCodasPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Url Pattern feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUrlPatternPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_urlPattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_urlPattern_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_UrlPattern(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the El Ignored feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addElIgnoredPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_elIgnored_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_elIgnored_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_ElIgnored(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Page Encoding feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addPageEncodingPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_pageEncoding_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_pageEncoding_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_PageEncoding(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Scripting Invalid feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addScriptingInvalidPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_scriptingInvalid_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_scriptingInvalid_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_ScriptingInvalid(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Is XML feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addIsXMLPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_isXML_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_isXML_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_IsXML(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Include Preludes feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addIncludePreludesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_includePreludes_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_includePreludes_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_IncludePreludes(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Include Codas feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addIncludeCodasPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPPropertyGroup_includeCodas_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPPropertyGroup_includeCodas_feature", "_UI_JSPPropertyGroup_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- JspPackage.eINSTANCE.getJSPPropertyGroup_IncludeCodas(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- /**
- * This returns JSPPropertyGroup.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("full/obj16/JSPPropertyGroup"); //$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 = ((JSPPropertyGroup) object).getDisplayName();
- return label == null || label.length() == 0 ? getString("_UI_JSPPropertyGroup_type") : //$NON-NLS-1$
- getString("_UI_JSPPropertyGroup_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(JSPPropertyGroup.class)) {
- case JspPackage.JSP_PROPERTY_GROUP__URL_PATTERN :
- case JspPackage.JSP_PROPERTY_GROUP__EL_IGNORED :
- case JspPackage.JSP_PROPERTY_GROUP__PAGE_ENCODING :
- case JspPackage.JSP_PROPERTY_GROUP__SCRIPTING_INVALID :
- case JspPackage.JSP_PROPERTY_GROUP__IS_XML :
- case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_PRELUDES :
- case JspPackage.JSP_PROPERTY_GROUP__INCLUDE_CODAS : {
- 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 J2EEPlugin.getDefault();
- return WebAppEditResourceHandler.RESOURCE_LOCATOR;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPTypeItemProvider.java
deleted file mode 100644
index 9f7ac5b57..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JSPTypeItemProvider.java
+++ /dev/null
@@ -1,123 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.JSPType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.JSPType}object.
- */
-public class JSPTypeItemProvider extends WebTypeItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public JSPTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns jsp_type.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("jsp_type");//$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the jspFile feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("JspFile_UI_"), //$NON-NLS-1$ = "JspFile"
- WebAppEditResourceHandler.getString("The_jspFile_property_UI_"), //$NON-NLS-1$ = "The jspFile property"
- pkg.getJSPType_JspFile()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Jsp File feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addJspFilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_JSPType_jspFile_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_JSPType_jspFile_feature", "_UI_JSPType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getJSPType_JspFile(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("40concat_UI_", (new Object[]{((JSPType) object).getJspFile()})); //$NON-NLS-1$ = "JSPType {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(JSPType.class)) {
- case WebapplicationPackage.JSP_TYPE__JSP_FILE : {
- 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();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java
deleted file mode 100644
index 9682d7256..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/JspItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,232 +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.web.providers;
-
-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.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.ITreeItemContentProvider;
-import org.eclipse.jst.j2ee.jsp.internal.util.JspAdapterFactory;
-
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers. The
- * adapters generated by this factory convert EMF adapter notifications into calls to
- * {@link #fireNotifyChanged fireNotifyChanged}. The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class JspItemProviderAdapterFactory extends JspAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- 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}. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected Collection supportedTypes = new ArrayList();
-
- /**
- * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public JspItemProviderAdapterFactory() {
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link com.ibm.etools.jsp.JSPConfig}
- * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected JSPConfigItemProvider jspConfigItemProvider;
-
- /**
- * This creates an adapter for a {@link com.ibm.etools.jsp.JSPConfig}. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter createJSPConfigAdapter() {
- if (jspConfigItemProvider == null) {
- jspConfigItemProvider = new JSPConfigItemProvider(this);
- }
-
- return jspConfigItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link com.ibm.etools.jsp.JSPPropertyGroup}
- * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected JSPPropertyGroupItemProvider jspPropertyGroupItemProvider;
-
- /**
- * This creates an adapter for a {@link com.ibm.etools.jsp.JSPPropertyGroup}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter createJSPPropertyGroupAdapter() {
- if (jspPropertyGroupItemProvider == null) {
- jspPropertyGroupItemProvider = new JSPPropertyGroupItemProvider(this);
- }
-
- return jspPropertyGroupItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link com.ibm.etools.jsp.TagLibRefType}
- * instances. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected TagLibRefTypeItemProvider tagLibRefTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link com.ibm.etools.jsp.TagLibRefType}. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter createTagLibRefTypeAdapter() {
- if (tagLibRefTypeItemProvider == null) {
- tagLibRefTypeItemProvider = new TagLibRefTypeItemProvider(this);
- }
-
- return tagLibRefTypeItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- 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;
- }
-
- /**
- * This adds a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingItemProvider.java
deleted file mode 100644
index 2f23448be..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingItemProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-
-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.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.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.LocalEncodingMapping;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMapping}object. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
-public class LocalEncodingMappingItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public LocalEncodingMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addLocalePropertyDescriptor(object);
- addEncodingPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Locale feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addLocalePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_LocalEncodingMapping_locale_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_LocalEncodingMapping_locale_feature", "_UI_LocalEncodingMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getLocalEncodingMapping_Locale(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Encoding feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addEncodingPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_LocalEncodingMapping_encoding_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_LocalEncodingMapping_encoding_feature", "_UI_LocalEncodingMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getLocalEncodingMapping_Encoding(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- /**
- * This returns LocalEncodingMapping.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- */
- public Object getImage(Object object) {
- // return getResourceLocator().getImage("full/obj16/LocalEncodingMapping");
- return WebPlugin.getDefault().getImage("local_encoding_mapping");//$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- */
- public String getText(Object object) {
- String lem = WebAppEditResourceHandler.getString("local_encoding_mapping_UI_"); //$NON-NLS-1$
- String label = ((LocalEncodingMapping) object).getLocale();
- return label == null || label.length() == 0 ? lem : lem + " " + label; //$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(LocalEncodingMapping.class)) {
- case WebapplicationPackage.LOCAL_ENCODING_MAPPING__LOCALE :
- case WebapplicationPackage.LOCAL_ENCODING_MAPPING__ENCODING : {
- 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();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingListItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingListItemProvider.java
deleted file mode 100644
index 986dc41af..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LocalEncodingMappingListItemProvider.java
+++ /dev/null
@@ -1,136 +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.web.providers;
-
-
-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.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.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.LocalEncodingMappingList;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMappingList}object. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
-public class LocalEncodingMappingListItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public LocalEncodingMappingListItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and
- * {@link org.eclipse.emf.edit.command.AddCommand}and
- * {@link org.eclipse.emf.edit.command.RemoveCommand}support in {@link #createCommand}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Collection getChildrenReferences(Object object) {
- if (childrenReferences == null) {
- super.getChildrenReferences(object);
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getLocalEncodingMappingList_LocalEncodingMappings());
- }
- return childrenReferences;
- }
-
-
- /**
- * This returns LocalEncodingMappingList.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- */
- public Object getImage(Object object) {
- // return getResourceLocator().getImage("full/obj16/LocalEncodingMappingList");
- return WebPlugin.getDefault().getImage("local_encoding_mapping_list");//$NON-NLS-1$
- }
-
- /**
- * This returns the label text for the adapted class. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- */
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Local_encoding_mapping_list_UI_"); //$NON-NLS-1$ = "Welcome File List"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(LocalEncodingMappingList.class)) {
- case WebapplicationPackage.LOCAL_ENCODING_MAPPING_LIST__LOCAL_ENCODING_MAPPINGS : {
- 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(WebapplicationPackage.eINSTANCE.getLocalEncodingMappingList_LocalEncodingMappings(), WebapplicationFactory.eINSTANCE.createLocalEncodingMapping()));
- }
-
- /**
- * 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.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LoginConfigItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LoginConfigItemProvider.java
deleted file mode 100644
index 19bf93a33..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/LoginConfigItemProvider.java
+++ /dev/null
@@ -1,224 +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.web.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.LoginConfig;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LoginConfig}object.
- */
-public class LoginConfigItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public LoginConfigItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- 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) {
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- result.add(pkg.getLoginConfig_FormLoginConfig());
- return result;
- }
-
- //TODO Removing UI dependency by commenting out method
- /**
- * This returns the image for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- /*
- * public ImageDescriptor getCreateChildImageDescriptor(Object object) { EObject refObject =
- * (EObject)object; return
- * WEBUIPlugin.getDefault().getImageDescriptor(refObject.eClass().getName() +
- * "Create#CHILD_CLASS_NAME#");//$NON-NLS-1$ }
- */
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_#CHILD_CLASS_NAME#_UI_"); //$NON-NLS-1$ = "Create #CHILD_CLASS_NAME#"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("1concat", (new Object[]{refObject.eClass().getName()}));//$NON-NLS-1$ = "Create a child of type #CHILD_CLASS_NAME# for the selected {0}."
- }
-
- /**
- * This returns form_login_config.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("form_login_config");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the LoginConfig.
- */
- public Object getParent(Object object) {
- return ((LoginConfig) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the authMethod feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("AuthMethod_UI_"), //$NON-NLS-1$ = "AuthMethod"
- WebAppEditResourceHandler.getString("The_authMethod_property_UI_"), //$NON-NLS-1$ = "The authMethod property"
- pkg.getLoginConfig_AuthMethod()));
-
- // This is for the realmName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("RealmName_UI_"), //$NON-NLS-1$ = "RealmName"
- WebAppEditResourceHandler.getString("The_realmName_property_UI_"), //$NON-NLS-1$ = "The realmName property"
- pkg.getLoginConfig_RealmName()));
-
- // This is for the webApp feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The webApp property"
- pkg.getLoginConfig_WebApp()));
-
- // This is for the formLoginConfig feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("FormLoginConfig_UI_"), //$NON-NLS-1$ = "FormLoginConfig"
- WebAppEditResourceHandler.getString("The_formLoginConfig_proper_UI_"), //$NON-NLS-1$ = "The formLoginConfig property"
- pkg.getLoginConfig_FormLoginConfig()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Auth Method feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addAuthMethodPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_LoginConfig_authMethod_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_LoginConfig_authMethod_feature", "_UI_LoginConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getLoginConfig_AuthMethod(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Realm Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addRealmNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_LoginConfig_realmName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_LoginConfig_realmName_feature", "_UI_LoginConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getLoginConfig_RealmName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Authorization Method feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addAuthorizationMethodPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_LoginConfig_authorizationMethod_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_LoginConfig_authorizationMethod_feature", "_UI_LoginConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getLoginConfig_AuthorizationMethod(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("21concat_UI_", (new Object[]{((LoginConfig) object).getRealmName()})); //$NON-NLS-1$ = "LoginConfig {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(LoginConfig.class)) {
- case WebapplicationPackage.LOGIN_CONFIG__AUTH_METHOD :
- case WebapplicationPackage.LOGIN_CONFIG__REALM_NAME :
- case WebapplicationPackage.LOGIN_CONFIG__AUTHORIZATION_METHOD :
- case WebapplicationPackage.LOGIN_CONFIG__FORM_LOGIN_CONFIG : {
- 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(WebapplicationPackage.eINSTANCE.getLoginConfig_FormLoginConfig(), WebapplicationFactory.eINSTANCE.createFormLoginConfig()));
- }
-
- /**
- * 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.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/MimeMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/MimeMappingItemProvider.java
deleted file mode 100644
index 6c086d2d8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/MimeMappingItemProvider.java
+++ /dev/null
@@ -1,171 +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.web.providers;
-
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.MimeMapping;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.MimeMapping}object.
- */
-public class MimeMappingItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public MimeMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns mime_mapping.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("mime_mapping");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the MimeMapping.
- */
- public Object getParent(Object object) {
- return ((MimeMapping) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the extension feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Extension_UI_"), //$NON-NLS-1$ = "Extension"
- WebAppEditResourceHandler.getString("The_extension_property_UI_"), //$NON-NLS-1$ = "The extension property"
- pkg.getMimeMapping_Extension()));
-
- // This is for the mimeType feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("MimeType_UI_"), //$NON-NLS-1$ = "MimeType"
- WebAppEditResourceHandler.getString("The_mimeType_property_UI_"), //$NON-NLS-1$ = "The mimeType property"
- pkg.getMimeMapping_MimeType()));
-
- // This is for the webApp feature.
- //
- /*
- * itemPropertyDescriptors.add (new ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- * WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- * WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The
- * webApp property" pkg.getMimeMapping_WebApp()));
- */
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Extension feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addExtensionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_MimeMapping_extension_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_MimeMapping_extension_feature", "_UI_MimeMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getMimeMapping_Extension(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Mime Type feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addMimeTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_MimeMapping_mimeType_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_MimeMapping_mimeType_feature", "_UI_MimeMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getMimeMapping_MimeType(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("22concat_UI_", (new Object[]{((MimeMapping) object).getExtension()})); //$NON-NLS-1$ = "MimeMapping {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(MimeMapping.class)) {
- case WebapplicationPackage.MIME_MAPPING__EXTENSION :
- case WebapplicationPackage.MIME_MAPPING__MIME_TYPE : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/RoleNameTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/RoleNameTypeItemProvider.java
deleted file mode 100644
index c91f02281..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/RoleNameTypeItemProvider.java
+++ /dev/null
@@ -1,136 +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.web.providers;
-
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.RoleNameType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.RoleNameType}
- * object.
- */
-public class RoleNameTypeItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public RoleNameTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns security_role_nametype.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("security_role_nametype");//$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the roleName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("RoleName_UI_"), //$NON-NLS-1$ = "RoleName"
- WebAppEditResourceHandler.getString("The_roleName_property_UI_"), //$NON-NLS-1$ = "The roleName property"
- pkg.getRoleNameType_RoleName()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Role Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addRoleNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_RoleNameType_roleName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_RoleNameType_roleName_feature", "_UI_RoleNameType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getRoleNameType_RoleName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("23concat_UI_", (new Object[]{((RoleNameType) object).getRoleName()})); //$NON-NLS-1$ = "RoleNameType {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(RoleNameType.class)) {
- case WebapplicationPackage.ROLE_NAME_TYPE__ROLE_NAME : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SecurityConstraintItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SecurityConstraintItemProvider.java
deleted file mode 100644
index 30134bde6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SecurityConstraintItemProvider.java
+++ /dev/null
@@ -1,242 +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.web.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-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.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.DisplayName;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.SecurityConstraint;
-import org.eclipse.jst.j2ee.webapplication.WebResourceCollection;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory;
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SecurityConstraint}
- * object.
- */
-public class SecurityConstraintItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public SecurityConstraintItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- WebResourceCollection child = WebapplicationFactory.eINSTANCE.createWebResourceCollection();
-
- // 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) {
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- result.add(pkg.getSecurityConstraint_WebResourceCollections());
- result.add(pkg.getSecurityConstraint_AuthConstraint());
- result.add(pkg.getSecurityConstraint_UserDataConstraint());
- 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.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateWebResourceCollection"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_WebResourceCollecti_UI_"); //$NON-NLS-1$ = "Create WebResourceCollection"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("24concat", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type WebResourceCollection for the selected {0}."
- }
-
- /**
- * This returns security_constraint.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("security_constraint"); //$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the SecurityConstraint.
- */
- public Object getParent(Object object) {
- return ((SecurityConstraint) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the webApp feature.
- //
- /*
- * itemPropertyDescriptors.add (new ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- * WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- * WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The
- * webApp property" pkg.getSecurityConstraint_WebApp()));
- */
-
- // This is for the displayName feature.
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("DisplayName_UI_"), //$NON-NLS-1$ = "DisplayName"
- WebAppEditResourceHandler.getString("The_displayName_property_UI_"), //$NON-NLS-1$ = "The displayName property"
- pkg.getSecurityConstraint_DisplayName()));
-
- // This is for the authConstraint feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("AuthConstraint_UI_"), //$NON-NLS-1$ = "AuthConstraint"
- WebAppEditResourceHandler.getString("The_authConstraint_propert_UI_"), //$NON-NLS-1$ = "The authConstraint property"
- pkg.getSecurityConstraint_AuthConstraint()));
-
- // This is for the userDataConstraint feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("UserDataConstraint_UI_"), //$NON-NLS-1$ = "UserDataConstraint"
- WebAppEditResourceHandler.getString("The_userDataConstraint_pro_UI_"), //$NON-NLS-1$ = "The userDataConstraint property"
- pkg.getSecurityConstraint_UserDataConstraint()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Display Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDisplayNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_SecurityConstraint_displayName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_SecurityConstraint_displayName_feature", "_UI_SecurityConstraint_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getSecurityConstraint_DisplayName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- public String getText(Object object) {
- String displayName = ((SecurityConstraint) object).getDisplayName();
- if (displayName == null) {
- List displayNameList = ((SecurityConstraint) object).getDisplayNames();
- if (displayNameList != null && displayNameList.size() > 0)
- displayName = ((DisplayName) displayNameList.get(0)).getValue();
- }
- if (displayName == null)
- displayName = ""; //$NON-NLS-1$
- return " " + 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(SecurityConstraint.class)) {
- case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAME :
- case WebapplicationPackage.SECURITY_CONSTRAINT__WEB_RESOURCE_COLLECTIONS :
- case WebapplicationPackage.SECURITY_CONSTRAINT__AUTH_CONSTRAINT :
- case WebapplicationPackage.SECURITY_CONSTRAINT__USER_DATA_CONSTRAINT :
- case WebapplicationPackage.SECURITY_CONSTRAINT__DISPLAY_NAMES : {
- 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(WebapplicationPackage.eINSTANCE.getSecurityConstraint_WebResourceCollections(), WebapplicationFactory.eINSTANCE.createWebResourceCollection()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getSecurityConstraint_AuthConstraint(), WebapplicationFactory.eINSTANCE.createAuthConstraint()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getSecurityConstraint_UserDataConstraint(), WebapplicationFactory.eINSTANCE.createUserDataConstraint()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getSecurityConstraint_DisplayNames(), CommonFactory.eINSTANCE.createDisplayName()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getSecurityConstraint_DisplayNames(), WscommonFactory.eINSTANCE.createDisplayNameType()));
- }
-
- /**
- * 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.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletItemProvider.java
deleted file mode 100644
index 5e84866f0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletItemProvider.java
+++ /dev/null
@@ -1,297 +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.web.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-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.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;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.InitParam;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-public class ServletItemProvider extends CompatibilityDescriptionGroupItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ServletItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- InitParam child = WebapplicationFactory.eINSTANCE.createInitParam();
-
- // 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) {
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- //result.add(pkg.getServlet_WebType());
- WebApp webApp = (WebApp) ((Servlet) object).eContainer();
- if (webApp == null)
- return result;
- if (webApp.getJ2EEVersionID() >= J2EEVersionConstants.J2EE_1_4_ID)
- result.add(pkg.getServlet_InitParams());
- else
- result.add(pkg.getServlet_Params());
- result.add(pkg.getServlet_SecurityRoleRefs());
- result.add(pkg.getServlet_RunAs());
- 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.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateInitParam"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_InitParam_UI_"); //$NON-NLS-1$ = "Create InitParam"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("26concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type InitParam for the selected {0}."
- }
-
- /**
- * This returns Servlet.gif.
- */
- public Object getImage(Object object) {
- WebType wt = ((Servlet) object).getWebType();
- if (wt != null && wt.isJspType())
- return WebPlugin.getDefault().getImage("jsp_type"); //$NON-NLS-1$
-
- return WebPlugin.getDefault().getImage("servlet"); //$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the Servlet.
- */
- public Object getParent(Object object) {
- return ((Servlet) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the servletName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ServletName_UI_"), //$NON-NLS-1$
- //$NON-NLS-1$ = "ServletName"
- WebAppEditResourceHandler.getString("The_servletName_property_UI_"), //$NON-NLS-1$ = "The servletName property"
- pkg.getServlet_ServletName()));
-
-
- // This is for the loadOnStartup feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("LoadOnStartup_UI_"), //$NON-NLS-1$
- //$NON-NLS-1$ = "LoadOnStartup"
- WebAppEditResourceHandler.getString("The_loadOnStartup_property_UI_"), //$NON-NLS-1$ = "The loadOnStartup property"
- pkg.getServlet_LoadOnStartup(), false));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Servlet Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addServletNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Servlet_servletName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Servlet_servletName_feature", "_UI_Servlet_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServlet_ServletName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Load On Startup feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addLoadOnStartupPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_Servlet_loadOnStartup_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_Servlet_loadOnStartup_feature", "_UI_Servlet_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServlet_LoadOnStartup(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This implements
- * {@link IItemPropertySource#getPropertyValue IItemPropertySource.getPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public Object getPropertyValue(Object object, String property) {
- Object ret = null;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).getPropertyValue(object);
- } else
- ret = super.getPropertyValue(object, property);
- return ret;
- }
-
- public String getText(Object object) {
- Servlet servlet = (Servlet) object;
- String name = servlet.getServletName();
- if (name == null)
- name = WebAppEditResourceHandler.getString("<servlet>_UI_"); //$NON-NLS-1$ = "<servlet>"
- return name;
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(Servlet.class)) {
- case WebapplicationPackage.SERVLET__SERVLET_NAME :
- case WebapplicationPackage.SERVLET__LOAD_ON_STARTUP :
- case WebapplicationPackage.SERVLET__WEB_TYPE :
- case WebapplicationPackage.SERVLET__PARAMS :
- case WebapplicationPackage.SERVLET__SECURITY_ROLE_REFS :
- case WebapplicationPackage.SERVLET__RUN_AS :
- case WebapplicationPackage.SERVLET__INIT_PARAMS : {
- 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(WebapplicationPackage.eINSTANCE.getServlet_WebType(), WebapplicationFactory.eINSTANCE.createServletType()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getServlet_WebType(), WebapplicationFactory.eINSTANCE.createJSPType()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getServlet_Params(), WebapplicationFactory.eINSTANCE.createInitParam()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getServlet_SecurityRoleRefs(), CommonFactory.eINSTANCE.createSecurityRoleRef()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getServlet_RunAs(), CommonFactory.eINSTANCE.createRunAsSpecifiedIdentity()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getServlet_InitParams(), CommonFactory.eINSTANCE.createParamValue()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- /**
- * This implements {@link IItemPropertySource#isPropertySet IItemPropertySource.isPropertySet}
- * by delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public boolean isPropertySet(Object object, String property) {
- boolean ret = false;
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ret = ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).isPropertySet(object);
- } else
- ret = super.isPropertySet(object, property);
- return ret;
- }
-
-
- /**
- * This implements
- * {@link IItemPropertySource#setPropertyValue IItemPropertySource.setPropertyValue}by
- * delegating to the descriptor, which is assumed to support the IItemPropertyDescriptor
- * interface
- */
- public void setPropertyValue(Object object, String property, Object value) {
-
- if (getPropertyDescriptor(object, property) instanceof WebToolingItemPropertyDescriptor) {
- ((WebToolingItemPropertyDescriptor) getPropertyDescriptor(object, property)).setPropertyValue(object, value);
- } else
- super.setPropertyValue(object, property, value);
-
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletMappingItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletMappingItemProvider.java
deleted file mode 100644
index 602a2da43..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletMappingItemProvider.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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.Servlet;
-import org.eclipse.jst.j2ee.webapplication.ServletMapping;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletMapping}
- * object.
- */
-public class ServletMappingItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ServletMappingItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns servlet_mapping.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet_mapping");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the ServletMapping.
- */
- public Object getParent(Object object) {
- return ((ServletMapping) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the urlPattern feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("UrlPattern_UI_"), //$NON-NLS-1$ = "UrlPattern"
- WebAppEditResourceHandler.getString("The_urlPattern_property_UI_"), //$NON-NLS-1$ = "The urlPattern property"
- pkg.getServletMapping_UrlPattern()));
-
-
- // This is for the servlet feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Servlet_UI_"), //$NON-NLS-1$ = "Servlet"
- WebAppEditResourceHandler.getString("The_servlet_property_UI_"), //$NON-NLS-1$ = "The servlet property"
- pkg.getServletMapping_Servlet(), false));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Url Pattern feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUrlPatternPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ServletMapping_urlPattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ServletMapping_urlPattern_feature", "_UI_ServletMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServletMapping_UrlPattern(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ServletMapping_name_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ServletMapping_name_feature", "_UI_ServletMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServletMapping_Name(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Servlet feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addServletPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ServletMapping_servlet_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ServletMapping_servlet_feature", "_UI_ServletMapping_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServletMapping_Servlet(), false));
- }
-
-
- public String getText(Object object) {
- String urlStr = ((ServletMapping) object).getUrlPattern();
- Servlet servlet = ((ServletMapping) object).getServlet();
- String servletStr = (servlet == null) ? WebAppEditResourceHandler.getString("?_UI_") : servlet.getServletName(); //$NON-NLS-1$ = "?"
- return WebAppEditResourceHandler.getString("28concat_UI_", (new Object[]{urlStr, servletStr})); //$NON-NLS-1$ = "Servlet mapping ({0} -> {1})"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ServletMapping.class)) {
- case WebapplicationPackage.SERVLET_MAPPING__URL_PATTERN :
- case WebapplicationPackage.SERVLET_MAPPING__NAME :
- case WebapplicationPackage.SERVLET_MAPPING__SERVLET : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletTypeItemProvider.java
deleted file mode 100644
index 2039a8937..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/ServletTypeItemProvider.java
+++ /dev/null
@@ -1,123 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.ServletType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletType}object.
- */
-public class ServletTypeItemProvider extends WebTypeItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public ServletTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns servlet_type.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("servlet_type"); //$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the className feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ClassName_UI_"), //$NON-NLS-1$ = "ClassName"
- WebAppEditResourceHandler.getString("The_className_property_UI_"), //$NON-NLS-1$ = "The className property"
- pkg.getServletType_ClassName()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Class Name feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addClassNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_ServletType_className_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ServletType_className_feature", "_UI_ServletType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getServletType_ClassName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("41concat_UI_", (new Object[]{((ServletType) object).getClassName()})); //$NON-NLS-1$ = "ServletType {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(ServletType.class)) {
- case WebapplicationPackage.SERVLET_TYPE__CLASS_NAME : {
- 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();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SessionConfigItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SessionConfigItemProvider.java
deleted file mode 100644
index e4c8b44c9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/SessionConfigItemProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.SessionConfig;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SessionConfig}
- * object.
- */
-public class SessionConfigItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public SessionConfigItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns session_config.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("session_config");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the SessionConfig.
- */
- public Object getParent(Object object) {
- return ((SessionConfig) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the sessionTimeout feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("SessionTimeout_UI_"), //$NON-NLS-1$ = "SessionTimeout"
- WebAppEditResourceHandler.getString("The_sessionTimeout_propert_UI_"), //$NON-NLS-1$ = "The sessionTimeout property"
- pkg.getSessionConfig_SessionTimeout()));
-
- // This is for the webApp feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The webApp property"
- pkg.getSessionConfig_WebApp()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Session Timeout feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addSessionTimeoutPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_SessionConfig_sessionTimeout_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_SessionConfig_sessionTimeout_feature", "_UI_SessionConfig_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getSessionConfig_SessionTimeout(), true, ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("31concat_UI_", (new Object[]{new Integer(((SessionConfig) object).getSessionTimeout())})); //$NON-NLS-1$ = "SessionConfig {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(SessionConfig.class)) {
- case WebapplicationPackage.SESSION_CONFIG__SESSION_TIMEOUT : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefItemProvider.java
deleted file mode 100644
index ff337fe04..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefItemProvider.java
+++ /dev/null
@@ -1,170 +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.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.TagLibRef;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.TagLibRef}object.
- */
-public class TagLibRefItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public TagLibRefItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns jsp_library_reference.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("jsp_library_reference");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the TagLibRef.
- */
- public Object getParent(Object object) {
- return ((TagLibRef) object).getWebApp();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the taglibURI feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("URI_UI_"), //$NON-NLS-1$ = "TaglibURI"
- WebAppEditResourceHandler.getString("The_taglibURI_property_UI_"), //$NON-NLS-1$ = "The taglibURI property"
- pkg.getTagLibRef_TaglibURI()));
-
- // This is for the taglibLocation feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Location_UI_"), //$NON-NLS-1$ = "TaglibLocation"
- WebAppEditResourceHandler.getString("The_taglibLocation_propert_UI_"), //$NON-NLS-1$ = "The taglibLocation property"
- pkg.getTagLibRef_TaglibLocation()));
-
- // This is for the webApp feature.
- //
- /*
- * itemPropertyDescriptors.add (new ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- * WebAppEditResourceHandler.getString("WebApp_UI_"), //$NON-NLS-1$ = "WebApp"
- * WebAppEditResourceHandler.getString("The_webApp_property_UI_"), //$NON-NLS-1$ = "The
- * webApp property" pkg.getTagLibRef_WebApp()));
- */
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Taglib URI feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addTaglibURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_TagLibRef_taglibURI_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_TagLibRef_taglibURI_feature", "_UI_TagLibRef_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getTagLibRef_TaglibURI(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Taglib Location feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addTaglibLocationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_TagLibRef_taglibLocation_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_TagLibRef_taglibLocation_feature", "_UI_TagLibRef_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getTagLibRef_TaglibLocation(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("32concat_UI_", (new Object[]{((TagLibRef) object).getTaglibURI()})); //$NON-NLS-1$ = "TagLibRef {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(TagLibRef.class)) {
- case WebapplicationPackage.TAG_LIB_REF__TAGLIB_URI :
- case WebapplicationPackage.TAG_LIB_REF__TAGLIB_LOCATION : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefTypeItemProvider.java
deleted file mode 100644
index 9430cfc03..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/TagLibRefTypeItemProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-
-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.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.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.jsp.JspPackage;
-import org.eclipse.jst.j2ee.jsp.TagLibRefType;
-
-/**
- * This is the item provider adpater for a {@link com.ibm.etools.jsp.TagLibRefType}object. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
-public class TagLibRefTypeItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public TagLibRefTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addTaglibURIPropertyDescriptor(object);
- addTaglibLocationPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Taglib URI feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addTaglibURIPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("URI_UI_"), //$NON-NLS-1$
- WebAppEditResourceHandler.getString("URI_UI_"), //$NON-NLS-1$
- JspPackage.eINSTANCE.getTagLibRefType_TaglibURI(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Taglib Location feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addTaglibLocationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Location_UI_"), //$NON-NLS-1$
- WebAppEditResourceHandler.getString("Location_UI_"), //$NON-NLS-1$
- JspPackage.eINSTANCE.getTagLibRefType_TaglibLocation(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- /**
- * This returns TagLibRefType.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("full/obj16/TagLibRefType"); //$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 = ((TagLibRefType) object).getTaglibURI();
- String tlrt = WebAppEditResourceHandler.getString("_UI_TagLibRefType_type"); //$NON-NLS-1$
- return label == null || label.length() == 0 ? tlrt : tlrt + " " + label; //$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(TagLibRefType.class)) {
- case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_URI :
- case JspPackage.TAG_LIB_REF_TYPE__TAGLIB_LOCATION : {
- 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 J2EEPlugin.getDefault();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/URLPatternTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/URLPatternTypeItemProvider.java
deleted file mode 100644
index 25339c397..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/URLPatternTypeItemProvider.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.URLPatternType;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.URLPatternType}
- * object.
- */
-public class URLPatternTypeItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public URLPatternTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns url_type.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("url_type");//$NON-NLS-1$
- }
-
- /**
- * This returns the resCollection of the URLPatternType.
- */
- public Object getParent(Object object) {
- return ((URLPatternType) object).getResCollection();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the urlPattern feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("UrlPattern_UI_"), //$NON-NLS-1$ = "UrlPattern"
- WebAppEditResourceHandler.getString("The_urlPattern_property_UI_"), //$NON-NLS-1$ = "The urlPattern property"
- pkg.getURLPatternType_UrlPattern()));
-
- // This is for the resCollection feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("ResCollection_UI_"), //$NON-NLS-1$ = "ResCollection"
- WebAppEditResourceHandler.getString("The_resCollection_property_UI_"), //$NON-NLS-1$ = "The resCollection property"
- pkg.getURLPatternType_ResCollection()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Url Pattern feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUrlPatternPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_URLPatternType_urlPattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_URLPatternType_urlPattern_feature", "_UI_URLPatternType_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getURLPatternType_UrlPattern(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("33concat_UI_", (new Object[]{((URLPatternType) object).getUrlPattern()})); //$NON-NLS-1$ = "URLPatternType {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(URLPatternType.class)) {
- case WebapplicationPackage.URL_PATTERN_TYPE__URL_PATTERN : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/UserDataConstraintItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/UserDataConstraintItemProvider.java
deleted file mode 100644
index 02c04b112..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/UserDataConstraintItemProvider.java
+++ /dev/null
@@ -1,189 +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.web.providers;
-
-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.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.common.CommonFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.UserDataConstraint;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory;
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.UserDataConstraint}
- * object.
- */
-public class UserDataConstraintItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public UserDataConstraintItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns user_data_constraint.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("user_data_constraint"); //$NON-NLS-1$
- }
-
- /**
- * This returns the secConstraint of the UserDataConstraint.
- */
- public Object getParent(Object object) {
- return ((UserDataConstraint) object).getSecConstraint();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the description feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- WebAppEditResourceHandler.getString("The_description_property_UI_"), //$NON-NLS-1$ = "The description property"
- pkg.getUserDataConstraint_Description()));
-
- // This is for the transportGuarantee feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("TransportGuarantee_UI_"), //$NON-NLS-1$ = "TransportGuarantee"
- WebAppEditResourceHandler.getString("The_transportGuarantee_pro_UI_"), //$NON-NLS-1$ = "The transportGuarantee property"
- pkg.getUserDataConstraint_TransportGuarantee()));
-
- // This is for the secConstraint feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("SecConstraint_UI_"), //$NON-NLS-1$ = "SecConstraint"
- WebAppEditResourceHandler.getString("The_secConstraint_property_UI_"), //$NON-NLS-1$ = "The secConstraint property"
- pkg.getUserDataConstraint_SecConstraint()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_UserDataConstraint_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_UserDataConstraint_description_feature", "_UI_UserDataConstraint_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getUserDataConstraint_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Transport Guarantee feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addTransportGuaranteePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_UserDataConstraint_transportGuarantee_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_UserDataConstraint_transportGuarantee_feature", "_UI_UserDataConstraint_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getUserDataConstraint_TransportGuarantee(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This specifies how to implement {@link #getChildren}and
- * {@link org.eclipse.emf.edit.command.AddCommand}and
- * {@link org.eclipse.emf.edit.command.RemoveCommand}support in {@link #createCommand}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Collection getChildrenReferences(Object object) {
- if (childrenReferences == null) {
- super.getChildrenReferences(object);
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getUserDataConstraint_Descriptions());
- }
- return childrenReferences;
- }
-
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("34concat_UI_", (new Object[]{((UserDataConstraint) object).getTransportGuarantee().getName()})); //$NON-NLS-1$ = "UserDataConstraint {0}"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(UserDataConstraint.class)) {
- case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTION :
- case WebapplicationPackage.USER_DATA_CONSTRAINT__TRANSPORT_GUARANTEE :
- case WebapplicationPackage.USER_DATA_CONSTRAINT__DESCRIPTIONS : {
- 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(WebapplicationPackage.eINSTANCE.getUserDataConstraint_Descriptions(), CommonFactory.eINSTANCE.createDescription()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getUserDataConstraint_Descriptions(), WscommonFactory.eINSTANCE.createDescriptionType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return J2EEPlugin.getDefault();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppEditResourceHandler.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppEditResourceHandler.java
deleted file mode 100644
index 8e82792ec..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppEditResourceHandler.java
+++ /dev/null
@@ -1,97 +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.web.providers;
-
-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.web.plugin.WebPlugin;
-
-
-public class WebAppEditResourceHandler {
-
- private static ResourceBundle fgResourceBundle;
-
- public static ResourceLocator RESOURCE_LOCATOR = new ResourceLocator() {
- public URL getBaseURL() {
- return null;
- }
-
- public Object getImage(String arg0) {
- return WebPlugin.getDefault().getImage(arg0);
- }
-
- public String getString(String arg0) {
- return WebAppEditResourceHandler.getString(arg0);
- }
-
- public String getString(String arg0, Object[] arg1) {
- return WebAppEditResourceHandler.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("webedit");//$NON-NLS-1$
- } catch (MissingResourceException e) {
- // does nothing - this method will return null and
- // getString(String) will return the key
- // it was called with
- }
- return null;
- }
-
- public static String getString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle = getResourceBundle();
- }
-
- if (fgResourceBundle != null) {
- try {
- return fgResourceBundle.getString(key);
- } catch (MissingResourceException e) {
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
- }
- }
- return "!" + key + "!";//$NON-NLS-2$//$NON-NLS-1$
-
- }
-
- public static String getString(String key, Object[] args) {
-
- try {
- return MessageFormat.format(getString(key), args);
- } catch (IllegalArgumentException e) {
- return getString(key);
- }
-
- }
-
- public static String getString(String key, Object[] args, int x) {
-
- return getString(key);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppItemProvider.java
deleted file mode 100644
index d56548afb..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebAppItemProvider.java
+++ /dev/null
@@ -1,349 +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.web.providers;
-
-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.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.common.CommonFactory;
-import org.eclipse.jst.j2ee.common.CommonPackage;
-import org.eclipse.jst.j2ee.common.internal.provider.JNDIEnvRefsGroupItemProvider;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.internal.webservices.WSDLServiceExtManager;
-import org.eclipse.jst.j2ee.internal.webservices.WSDLServiceHelper;
-import org.eclipse.jst.j2ee.jsp.JspFactory;
-import org.eclipse.jst.j2ee.webapplication.ContextParam;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebApp}object.
- */
-public class WebAppItemProvider extends JNDIEnvRefsGroupItemProvider implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WebAppItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- ContextParam child = WebapplicationFactory.eINSTANCE.createContextParam();
-
- // TODO: initialize child here...
-
- return child;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren(java.lang.Object)
- */
- public Collection getChildren(Object object) {
- WebApp webApp = (WebApp) object;
- Collection myChildren = super.getChildren(object);
- if (webApp.getVersionID() <= J2EEVersionConstants.WEB_2_3_ID) {
- WSDLServiceHelper serviceHelper = WSDLServiceExtManager.getServiceHelper();
- myChildren.addAll(serviceHelper.get13ServiceRefs(webApp));
- }
- return myChildren;
- }
-
- /**
- * 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);
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_Contexts());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_ErrorPages());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_FileList());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_TagLibs());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_Constraints());
- //childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_LoginConfig());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_MimeMappings());
- //childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_SessionConfig());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_ServletMappings());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_Servlets());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_SecurityRoles());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_Filters());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_FilterMappings());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_Listeners());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_ContextParams());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_JspConfig());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_MessageDestinations());
- childrenReferences.add(WebapplicationPackage.eINSTANCE.getWebApp_LocalEncodingMappingList());
- }
- return childrenReferences;
- }
-
- /**
- * <!-- 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.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateContextParam"); //$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_ContextParam_UI_"); //$NON-NLS-1$ = "Create ContextParam"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("35concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type ContextParam for the selected {0}."
- }
-
- public Object getImage(Object object) {
- String key = null;
- if (((WebApp) object).eResource() == null)
- return J2EEPlugin.getPlugin().getImage("web_application"); //$NON-NLS-1$
- switch (((WebApp) object).getVersionID()) {
- case J2EEVersionConstants.WEB_2_2_ID :
- key = "webapp_22"; //$NON-NLS-1$
- break;
-
- case J2EEVersionConstants.WEB_2_3_ID :
- key = "webapp_23"; //$NON-NLS-1$
- break;
-
- case J2EEVersionConstants.WEB_2_4_ID :
- default :
- key = "webapp_24"; //$NON-NLS-1$
- break;
- }
- return WebPlugin.getDefault().getImage(key);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the distributable feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Distributable_UI_"), //$NON-NLS-1$
- //$NON-NLS-1$ = "Distributable"
- WebAppEditResourceHandler.getString("The_distributable_property_UI_"), //$NON-NLS-1$ = "The distributable property"
- pkg.getWebApp_Distributable()));
-
-
- // This is for the fileList feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("FileList_UI_"), //$NON-NLS-1$ = "FileList"
- WebAppEditResourceHandler.getString("The_fileList_property_UI_"), //$NON-NLS-1$ = "The fileList property"
- pkg.getWebApp_FileList()));
-
- /*
- * // ccc - for usability reasons, these descriptors are removed from the property
- * sheet. // This is for the loginConfig feature. // itemPropertyDescriptors.add (new
- * ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), "LoginConfig",
- * "The loginConfig property", pkg.getWebApp_LoginConfig()));
- * // This is for the sessionConfig feature. // itemPropertyDescriptors.add (new
- * ItemPropertyDescriptor
- * (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- * "SessionConfig", "The sessionConfig property", pkg.getWebApp_SessionConfig()));
- */
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Distributable feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDistributablePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebApp_distributable_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebApp_distributable_feature", "_UI_WebApp_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebApp_Distributable(), true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE));
- }
-
- /**
- * 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_WebApp_version_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebApp_version_feature", "_UI_WebApp_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebApp_Version(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- public String getText(Object object) {
- WebApp webApp = (WebApp) object;
- String name = webApp.getDisplayName();
- if (name == null)
- name = WebAppEditResourceHandler.getString("<web_app>_UI_"); //$NON-NLS-1$ = "<web app>"
- return name;
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(WebApp.class)) {
- case WebapplicationPackage.WEB_APP__DISTRIBUTABLE :
- case WebapplicationPackage.WEB_APP__VERSION :
- case WebapplicationPackage.WEB_APP__CONTEXTS :
- case WebapplicationPackage.WEB_APP__ERROR_PAGES :
- case WebapplicationPackage.WEB_APP__FILE_LIST :
- case WebapplicationPackage.WEB_APP__TAG_LIBS :
- case WebapplicationPackage.WEB_APP__CONSTRAINTS :
- case WebapplicationPackage.WEB_APP__LOGIN_CONFIG :
- case WebapplicationPackage.WEB_APP__MIME_MAPPINGS :
- case WebapplicationPackage.WEB_APP__SESSION_CONFIG :
- case WebapplicationPackage.WEB_APP__SERVLET_MAPPINGS :
- case WebapplicationPackage.WEB_APP__SERVLETS :
- case WebapplicationPackage.WEB_APP__SECURITY_ROLES :
- case WebapplicationPackage.WEB_APP__FILTERS :
- case WebapplicationPackage.WEB_APP__FILTER_MAPPINGS :
- case WebapplicationPackage.WEB_APP__LISTENERS :
- case WebapplicationPackage.WEB_APP__CONTEXT_PARAMS :
- case WebapplicationPackage.WEB_APP__JSP_CONFIG :
- case WebapplicationPackage.WEB_APP__MESSAGE_DESTINATIONS :
- case WebapplicationPackage.WEB_APP__LOCAL_ENCODING_MAPPING_LIST : {
- 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(WebapplicationPackage.eINSTANCE.getWebApp_Contexts(), WebapplicationFactory.eINSTANCE.createContextParam()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_ErrorPages(), WebapplicationFactory.eINSTANCE.createErrorPage()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_ErrorPages(), WebapplicationFactory.eINSTANCE.createExceptionTypeErrorPage()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_ErrorPages(), WebapplicationFactory.eINSTANCE.createErrorCodeErrorPage()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_FileList(), WebapplicationFactory.eINSTANCE.createWelcomeFileList()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_TagLibs(), WebapplicationFactory.eINSTANCE.createTagLibRef()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_Constraints(), WebapplicationFactory.eINSTANCE.createSecurityConstraint()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_LoginConfig(), WebapplicationFactory.eINSTANCE.createLoginConfig()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_MimeMappings(), WebapplicationFactory.eINSTANCE.createMimeMapping()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_SessionConfig(), WebapplicationFactory.eINSTANCE.createSessionConfig()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_ServletMappings(), WebapplicationFactory.eINSTANCE.createServletMapping()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_Servlets(), WebapplicationFactory.eINSTANCE.createServlet()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_SecurityRoles(), CommonFactory.eINSTANCE.createSecurityRole()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_Filters(), WebapplicationFactory.eINSTANCE.createFilter()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_FilterMappings(), WebapplicationFactory.eINSTANCE.createFilterMapping()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_Listeners(), CommonFactory.eINSTANCE.createListener()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_ContextParams(), CommonFactory.eINSTANCE.createParamValue()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_JspConfig(), JspFactory.eINSTANCE.createJSPConfig()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_MessageDestinations(), CommonFactory.eINSTANCE.createMessageDestination()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebApp_LocalEncodingMappingList(), WebapplicationFactory.eINSTANCE.createLocalEncodingMappingList()));
- }
-
- /**
- * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) {
- boolean qualify = feature == CommonPackage.eINSTANCE.getJNDIEnvRefsGroup_EjbRefs() || feature == CommonPackage.eINSTANCE.getJNDIEnvRefsGroup_EjbLocalRefs();
- return getString(qualify ? "_UI_CreateChild_text2" : "_UI_CreateChild_text", //$NON-NLS-1$ //$NON-NLS-2$
- new Object[]{getTypeText(child), getFeatureText(feature), getTypeText(owner)});
- }
-
- /**
- * 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.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebResourceCollectionItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebResourceCollectionItemProvider.java
deleted file mode 100644
index 4b294a667..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebResourceCollectionItemProvider.java
+++ /dev/null
@@ -1,294 +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.web.providers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-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.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-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.common.CommonFactory;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.URLPatternType;
-import org.eclipse.jst.j2ee.webapplication.WebResourceCollection;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory;
-
-/**
- * This is the item provider adpater for a
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebResourceCollection}object.
- */
-public class WebResourceCollectionItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WebResourceCollectionItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- URLPatternType child = WebapplicationFactory.eINSTANCE.createURLPatternType();
-
- // 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) {
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
- Collection result = new ArrayList();
- result.add(pkg.getWebResourceCollection_UrlPattern());
- result.add(pkg.getWebResourceCollection_HttpMethod());
- 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.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateURLPatternType");//$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_URLPatternType_UI_"); //$NON-NLS-1$ = "Create URLPatternType"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("37concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type URLPatternType for the selected {0}."
- }
-
- /**
- * This returns web_resource_collection.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("web_resource_collection");//$NON-NLS-1$
- }
-
- /**
- * This returns the secConstraint of the WebResourceCollection.
- */
- public Object getParent(Object object) {
- return ((WebResourceCollection) object).getSecConstraint();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the webResourceName feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("WebResourceName_UI_"), //$NON-NLS-1$ = "WebResourceName"
- WebAppEditResourceHandler.getString("The_webResourceName_proper_UI_"), //$NON-NLS-1$ = "The webResourceName property"
- pkg.getWebResourceCollection_WebResourceName()));
-
- // This is for the description feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("Description_UI__UI_"), //$NON-NLS-1$ = "Description"
- WebAppEditResourceHandler.getString("The_description_property_UI_"), //$NON-NLS-1$ = "The description property"
- pkg.getWebResourceCollection_Description()));
-
- // This is for the secConstraint feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("SecConstraint_UI_"), //$NON-NLS-1$ = "SecConstraint"
- WebAppEditResourceHandler.getString("The_secConstraint_property_UI_"), //$NON-NLS-1$ = "The secConstraint property"
- pkg.getWebResourceCollection_SecConstraint()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Web Resource Name feature. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected void addWebResourceNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebResourceCollection_webResourceName_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebResourceCollection_webResourceName_feature", "_UI_WebResourceCollection_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebResourceCollection_WebResourceName(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Description feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addDescriptionPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebResourceCollection_description_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebResourceCollection_description_feature", "_UI_WebResourceCollection_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebResourceCollection_Description(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Url Pattern feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addUrlPatternPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebResourceCollection_urlPattern_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebResourceCollection_urlPattern_feature", "_UI_WebResourceCollection_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebResourceCollection_UrlPattern(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- /**
- * This adds a property descriptor for the Http Method feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addHttpMethodPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WebResourceCollection_httpMethod_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WebResourceCollection_httpMethod_feature", "_UI_WebResourceCollection_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWebResourceCollection_HttpMethod(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
- public String getText(Object object) {
- // return WebAppEditResourceHandler.getString("38concat_UI_", (new Object[] {
- // ((WebResourceCollection)object).getWebResourceName() })); //$NON-NLS-1$ =
- // "WebResourceCollection {0}"
- return ((WebResourceCollection) object).getWebResourceName();
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(WebResourceCollection.class)) {
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__WEB_RESOURCE_NAME :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTION :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__URL_PATTERN :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTTP_METHOD :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__UR_LS :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__DESCRIPTIONS :
- case WebapplicationPackage.WEB_RESOURCE_COLLECTION__HTT_PS : {
- 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(((WebResourceCollection) WebapplicationPackage.eINSTANCE.getWebResourceCollection()).getURLs(), WebapplicationFactory.eINSTANCE.createURLPatternType()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebResourceCollection_Descriptions(), CommonFactory.eINSTANCE.createDescription()));
-
- newChildDescriptors.add(createChildParameter(WebapplicationPackage.eINSTANCE.getWebResourceCollection_Descriptions(), WscommonFactory.eINSTANCE.createDescriptionType()));
-
- newChildDescriptors.add(createChildParameter(((WebResourceCollection) WebapplicationPackage.eINSTANCE.getWebResourceCollection()).getHttpMethod(), WebapplicationFactory.eINSTANCE.createHTTPMethodType()));
- }
-
- /**
- * 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.IEditingDomainItemProvider#createCommand(java.lang.Object,
- * org.eclipse.emf.edit.domain.EditingDomain, java.lang.Class,
- * org.eclipse.emf.edit.command.CommandParameter)
- */
- public Command createCommand(Object object, EditingDomain editingDomain, Class commandClass, CommandParameter commandParameter) {
- EStructuralFeature sf = commandParameter.getEReference();
- if (sf == null) {
- sf = commandParameter.getEAttribute();
- if (sf != null && !sf.isMany())
- sf = null;
- }
- if (sf != null) {
- EObject owner = commandParameter.getEOwner();
- Collection collection = commandParameter.getCollection();
- if (commandClass == AddCommand.class) {
- return createAddCommand(editingDomain, owner, sf, collection, commandParameter.getIndex());
- } else if (commandClass == RemoveCommand.class) {
- return createRemoveCommand(editingDomain, owner, sf, collection);
- }
- }
- return super.createCommand(object, editingDomain, commandClass, commandParameter);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebToolingItemPropertyDescriptor.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebToolingItemPropertyDescriptor.java
deleted file mode 100644
index 11a3640ba..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebToolingItemPropertyDescriptor.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-
-/**
- * Insert the type's description here. Creation date: (12/11/2000 5:54:28 PM)
- *
- * @author: Administrator
- */
-public class WebToolingItemPropertyDescriptor extends ItemPropertyDescriptor {
-
- protected int cellEditorType = -1;
- public final static int SMALL_ICON_EDITOR = 1;
- public final static int LARGE_ICON_EDITOR = 2;
- public final static int MULTILINE_TEXT_EDITOR = 3;
- public final static int AUTH_CONSTRAINT_ROLES_EDITOR = 4;
-
- /**
- * This creates an instance where the category and filter flags are empty and the cell editor is
- * determined for the references.
- */
- public WebToolingItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EReference[] parentReferences) {
- super(adapterFactory, displayName, description, parentReferences);
- }
-
- /**
- * This creates an instance where the category is filter flags are empty and the cell editor is
- * determined from the type of the structural feature>
- */
- public WebToolingItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature) {
- super(adapterFactory, displayName, description, feature);
- }
-
- /**
- * This creates an instance where the category is filter flags are empty and the cell editor is
- * determined from the type of the structural feature>
- */
- public WebToolingItemPropertyDescriptor(AdapterFactory adapterFactory, String displayName, String description, EStructuralFeature feature, int newCellEditorType) {
- super(adapterFactory, displayName, description, feature);
- cellEditorType = newCellEditorType;
- }
-
- protected void executeCommand(EditingDomain editingDomain, Command command) {
- //TODO We need to use the CommandStack from the WebEditModel.
- // if (editingDomain instanceof StructuredTextEditingDomain)
- // ((StructuredTextEditingDomain) editingDomain).execute(command);
- // else
- // editingDomain.getCommandStack().execute(command);
-
- }
-
- /**
- * Returns the editor type.
- */
- public int getCellEditorType() {
- return cellEditorType;
- }
-
- /**
- * This does the delegated job of setting the property to the given value. It is implemented in
- * a generic way using the structural feature.
- */
- public void setPropertyValue(Object object, Object value) {
- EObject refObject = (EObject) object;
- EditingDomain editingDomain = getEditingDomain(object);
-
- if (parentReferences != null) {
- EObject refValue = (EObject) value;
- Command removeCommand = null;
- for (int i = 0; i < parentReferences.length; ++i) {
- Object oldValue = refObject.eGet(parentReferences[i]);
- if (oldValue != null) {
- final EReference parentReference = parentReferences[i];
- if (oldValue == value) {
- return;
- }
- // else if (refValue.refIsInstanceOf(parentReference.getEType(), true))
- else if (refValue.eClass() == parentReference.getEType() || refValue.eClass().getEAllSuperTypes().contains(parentReference.getEType())) {
- if (editingDomain == null) {
- refObject.eSet(parentReference, value);
- } else {
- Command setCommand = SetCommand.create(editingDomain, refObject, parentReference, value);
- executeCommand(editingDomain, setCommand);
- }
- return;
- } else {
- if (editingDomain == null) {
- refObject.eSet(parentReference, null);
- } else {
- removeCommand = SetCommand.create(editingDomain, refObject, parentReference, null);
- }
- break;
- }
- }
- }
-
- for (int i = 0; i < parentReferences.length; ++i) {
- final EReference parentReference = parentReferences[i];
- //if (refValue.refIsInstanceOf(parentReference.getEType(), true))
- if (refValue.eClass() == parentReference.getEType() || refValue.eClass().getEAllSuperTypes().contains(parentReference.getEType())) {
- if (editingDomain == null) {
- refObject.eSet(parentReferences[i], value);
- } else {
- if (removeCommand != null) {
- final CompoundCommand compoundCommand = new CompoundCommand(CompoundCommand.LAST_COMMAND_ALL);
- compoundCommand.append(removeCommand);
- compoundCommand.append(SetCommand.create(editingDomain, refObject, parentReference, value));
- executeCommand(editingDomain, compoundCommand);
- } else {
- executeCommand(editingDomain, SetCommand.create(editingDomain, refObject, parentReference, value));
- }
- }
- break;
- }
- }
- } else {
- if (editingDomain == null) {
- refObject.eSet(feature, value);
- } else {
- executeCommand(editingDomain, SetCommand.create(editingDomain, refObject, feature, value));
- }
- }
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebTypeItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebTypeItemProvider.java
deleted file mode 100644
index f9c7cd2ff..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebTypeItemProvider.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebType}object.
- */
-public class WebTypeItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WebTypeItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns web_type.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("web_type");//$NON-NLS-1$
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- //WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;;
-
- }
- return itemPropertyDescriptors;
- }
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("WebType_UI_"); //$NON-NLS-1$ = "WebType"
- }
-
- /**
- * 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 J2EEPlugin.getDefault();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapter.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapter.java
deleted file mode 100644
index fa80205bd..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapter.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-import java.util.Collection;
-import java.util.Collections;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-
-
-/**
- * This extended item provider supports two addition features, (@link CreateChildCommand} and
- * {@link CreateChildrenCommand}. These two actions are implemented uniformly on all our item
- * adapters using this common base class.
- */
-public class WebapplicationItemProviderAdapter extends org.eclipse.emf.edit.provider.ItemProviderAdapter {
-
- /**
- * This creates and instance from an adapter factory and a domain notifier.
- */
- protected WebapplicationItemProviderAdapter(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This implements the default behavior for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.command.CreateChildCommand}.
- */
- public Object createChild(Object object) {
- return null;
- }
-
- /**
- * This creates the default new children for {@link CreateChildrenCommand}.
- */
- public Collection createChildren(Object object) {
- return Collections.EMPTY_LIST;
- }
-
- /**
- * This returns the default create child image.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- Collection achildrenReferences = getChildrenReferences(object);
- if (achildrenReferences.size() != 1) {
- return WebPlugin.getDefault().getImage("create_child"); //$NON-NLS-1$
- }
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "Create" + //$NON-NLS-1$
- ((EReference) achildrenReferences.iterator().next()).getEType().getName());
-
- }
-
- /**
- * This returns the default create children label.
- */
- public String getCreateChildrenText(Object object) {
- //EObject refObject = (EObject) object;
- Collection achildrenReferences = getChildrenReferences(object);
- if (achildrenReferences.size() != 1) {
- return WebAppEditResourceHandler.getString("Create_Two_Children_UI_"); //$NON-NLS-1$ = "Create Two Children"
- }
- return WebAppEditResourceHandler.getString("9concat_UI_", (new Object[]{((EReference) achildrenReferences.iterator().next()).getEType().getName()})); //$NON-NLS-1$ = "Create Two {0}s"
-
- }
-
- /**
- * This returns the default create children help text.
- */
- public String getCreateChildrenToolTipText(Object object) {
- EObject refObject = (EObject) object;
- Collection achildrenReferences = getChildrenReferences(object);
- if (achildrenReferences.size() != 1) {
- return WebAppEditResourceHandler.getString("7concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create two new children for the selected {0}."
- }
- return WebAppEditResourceHandler.getString("8concat_UI_", (new Object[]{((EReference) achildrenReferences.iterator().next()).getEType().getName(), refObject.eClass().getName()})); //$NON-NLS-1$
- //$NON-NLS-1$ = "Create two new children of type {0} for the selected {1}."
-
- }
-
- /**
- * This returns the default create child label.
- */
- public String getCreateChildText(Object object) {
- //EObject refObject = (EObject) object;
- Collection achildrenReferences = getChildrenReferences(object);
- if (achildrenReferences.size() != 1) {
- return WebAppEditResourceHandler.getString("Create_Child_UI_"); //$NON-NLS-1$ = "Create Child"
- }
- return WebAppEditResourceHandler.getString("6concat_UI_", (new Object[]{((EReference) achildrenReferences.iterator().next()).getEType().getName()})); //$NON-NLS-1$ = "Create {0}"
-
- }
-
- /**
- * This returns the default create child help text.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- Collection achildrenReferences = getChildrenReferences(object);
- if (achildrenReferences.size() != 1) {
- return WebAppEditResourceHandler.getString("2concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a new child for the selected {0}."
- }
- return WebAppEditResourceHandler.getString("4concat_UI_", (new Object[]{((EReference) achildrenReferences.iterator().next()).getEType().getName(), refObject.eClass().getName()})); //$NON-NLS-1$
- //$NON-NLS-1$ = "Create a child of type {0} for the selected {1}."
-
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java
deleted file mode 100644
index 3cebe0b3a..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WebapplicationItemProviderAdapterFactory.java
+++ /dev/null
@@ -1,686 +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.web.providers;
-
-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.common.internal.provider.ListenerItemProvider;
-import org.eclipse.jst.j2ee.webapplication.internal.util.WebapplicationAdapterFactory;
-
-
-/**
- * This is the factory that is used to provide the interfaces needed to support
- * {@link org.eclipse.jface.viewer.ContentViewer}s. The adapters generated by this factory convert
- * MOF adapter notificiations into {@link org.eclipse.jface.DomainEvent}s. The adapters also
- * support property sheets, see {@link com.ibm.itp.ui.api.propertysheet}.
- */
-public class WebapplicationItemProviderAdapterFactory extends WebapplicationAdapterFactory 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.webapplication.WebApp}
- * instances.
- */
- protected WebAppItemProvider webAppItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ContextParam}instances.
- */
- protected ContextParamItemProvider contextParamItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorPage}instances.
- */
- protected ErrorPageItemProvider errorPageItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ExceptionTypeErrorPage}instances.
- */
- protected ExceptionTypeErrorPageItemProvider exceptionTypeErrorPageItemProvider;
- /**
- * This keeps track of the one adapter used for all {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Filter}
- * instances.
- */
- protected FilterItemProvider filterItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FilterMapping}instances.
- */
- protected FilterMappingItemProvider filterMappingItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorCodeErrorPage}instances.
- */
- protected ErrorCodeErrorPageItemProvider errorCodeErrorPageItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFileList}instances.
- */
- protected WelcomeFileListItemProvider welcomeFileListItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFile}instances.
- */
- protected WelcomeFileItemProvider welcomeFileItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.TagLibRef}instances.
- */
- protected TagLibRefItemProvider tagLibRefItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.TagLibRefType}instances.
- */
- protected TagLibRefTypeItemProvider tagLibRefTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SecurityConstraint}instances.
- */
- protected SecurityConstraintItemProvider securityConstraintItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebResourceCollection}instances.
- */
- protected WebResourceCollectionItemProvider webResourceCollectionItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.URLPatternType}instances.
- */
- protected URLPatternTypeItemProvider uRLPatternTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.HTTPMethodType}instances.
- */
- protected HTTPMethodTypeItemProvider hTTPMethodTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.AuthConstraint}instances.
- */
- protected AuthConstraintItemProvider authConstraintItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.UserDataConstraint}instances.
- */
- protected UserDataConstraintItemProvider userDataConstraintItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LoginConfig}instances.
- */
- protected LoginConfigItemProvider loginConfigItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FormLoginConfig}instances.
- */
- protected FormLoginConfigItemProvider formLoginConfigItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.MimeMapping}instances.
- */
- protected MimeMappingItemProvider mimeMappingItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SessionConfig}instances.
- */
- protected SessionConfigItemProvider sessionConfigItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletMapping}instances.
- */
- protected ServletMappingItemProvider servletMappingItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Servlet}instances.
- */
- protected ServletItemProvider servletItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebType}instances.
- */
- protected WebTypeItemProvider webTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletType}instances.
- */
- protected ServletTypeItemProvider servletTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.JSPType}instances.
- */
- protected JSPTypeItemProvider jSPTypeItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.InitParam}instances.
- */
- protected InitParamItemProvider initParamItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Listener}instances.
- */
- protected ListenerItemProvider listenerItemProvider;
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.RoleNameType}instances.
- */
- protected RoleNameTypeItemProvider roleNameTypeItemProvider;
- protected Disposable disposable = new Disposable();
-
- /**
- * This constructs an instance from a domain notifier.
- */
- public WebapplicationItemProviderAdapterFactory() {
- 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.webapplication.AuthConstraint}.
- */
- public Adapter createAuthConstraintAdapter() {
- if (authConstraintItemProvider == null) {
- authConstraintItemProvider = new AuthConstraintItemProvider(this);
- }
-
- return authConstraintItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ContextParam}.
- */
- public Adapter createContextParamAdapter() {
- if (contextParamItemProvider == null) {
- contextParamItemProvider = new ContextParamItemProvider(this);
- }
-
- return contextParamItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorCodeErrorPage}.
- */
- public Adapter createErrorCodeErrorPageAdapter() {
- if (errorCodeErrorPageItemProvider == null) {
- errorCodeErrorPageItemProvider = new ErrorCodeErrorPageItemProvider(this);
- }
-
- return errorCodeErrorPageItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ErrorPage}.
- */
- public Adapter createErrorPageAdapter() {
- if (errorPageItemProvider == null) {
- errorPageItemProvider = new ErrorPageItemProvider(this);
- }
-
- return errorPageItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ExceptionTypeErrorPage}.
- */
- public Adapter createExceptionTypeErrorPageAdapter() {
- if (exceptionTypeErrorPageItemProvider == null) {
- exceptionTypeErrorPageItemProvider = new ExceptionTypeErrorPageItemProvider(this);
- }
-
- return exceptionTypeErrorPageItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Filter}.
- */
- public Adapter createFilterAdapter() {
- if (filterItemProvider == null) {
- filterItemProvider = new FilterItemProvider(this);
- }
-
- return filterItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMappingList}instances. <!-- begin-user-doc
- * --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected LocalEncodingMappingListItemProvider localEncodingMappingListItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMappingList}.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter createLocalEncodingMappingListAdapter() {
- if (localEncodingMappingListItemProvider == null) {
- localEncodingMappingListItemProvider = new LocalEncodingMappingListItemProvider(this);
- }
-
- return localEncodingMappingListItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMapping}instances. <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- *
- * @generated
- */
- protected LocalEncodingMappingItemProvider localEncodingMappingItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LocalEncodingMapping}.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Adapter createLocalEncodingMappingAdapter() {
- if (localEncodingMappingItemProvider == null) {
- localEncodingMappingItemProvider = new LocalEncodingMappingItemProvider(this);
- }
-
- return localEncodingMappingItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FilterMapping}.
- */
- public Adapter createFilterMappingAdapter() {
- if (filterMappingItemProvider == null) {
- filterMappingItemProvider = new FilterMappingItemProvider(this);
- }
-
- return filterMappingItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.FormLoginConfig}.
- */
- public Adapter createFormLoginConfigAdapter() {
- if (formLoginConfigItemProvider == null) {
- formLoginConfigItemProvider = new FormLoginConfigItemProvider(this);
- }
-
- return formLoginConfigItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.HTTPMethodType}.
- */
- public Adapter createHTTPMethodTypeAdapter() {
- if (hTTPMethodTypeItemProvider == null) {
- hTTPMethodTypeItemProvider = new HTTPMethodTypeItemProvider(this);
- }
-
- return hTTPMethodTypeItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.InitParam}.
- */
- public Adapter createInitParamAdapter() {
- if (initParamItemProvider == null) {
- initParamItemProvider = new InitParamItemProvider(this);
- }
-
- return initParamItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Listener}.
- */
- public Adapter createListenerAdapter() {
- if (listenerItemProvider == null) {
- listenerItemProvider = new ListenerItemProvider(this);
- }
-
- return listenerItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.JSPType}.
- */
- public Adapter createJSPTypeAdapter() {
- if (jSPTypeItemProvider == null) {
- jSPTypeItemProvider = new JSPTypeItemProvider(this);
- }
-
- return jSPTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.URLPatternType}instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected URLPatternTypeItemProvider urlPatternTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.LoginConfig}.
- */
- public Adapter createLoginConfigAdapter() {
- if (loginConfigItemProvider == null) {
- loginConfigItemProvider = new LoginConfigItemProvider(this);
- }
-
- return loginConfigItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.MimeMapping}.
- */
- public Adapter createMimeMappingAdapter() {
- if (mimeMappingItemProvider == null) {
- mimeMappingItemProvider = new MimeMappingItemProvider(this);
- }
-
- return mimeMappingItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.RoleNameType}.
- */
- public Adapter createRoleNameTypeAdapter() {
- if (roleNameTypeItemProvider == null) {
- roleNameTypeItemProvider = new RoleNameTypeItemProvider(this);
- }
-
- return roleNameTypeItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SecurityConstraint}.
- */
- public Adapter createSecurityConstraintAdapter() {
- if (securityConstraintItemProvider == null) {
- securityConstraintItemProvider = new SecurityConstraintItemProvider(this);
- }
-
- return securityConstraintItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.Servlet}.
- */
- public Adapter createServletAdapter() {
- if (servletItemProvider == null) {
- servletItemProvider = new ServletItemProvider(this);
- }
-
- return servletItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletMapping}.
- */
- public Adapter createServletMappingAdapter() {
- if (servletMappingItemProvider == null) {
- servletMappingItemProvider = new ServletMappingItemProvider(this);
- }
-
- return servletMappingItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.ServletType}.
- */
- public Adapter createServletTypeAdapter() {
- if (servletTypeItemProvider == null) {
- servletTypeItemProvider = new ServletTypeItemProvider(this);
- }
-
- return servletTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.JSPType}instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected JSPTypeItemProvider jspTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.SessionConfig}.
- */
- public Adapter createSessionConfigAdapter() {
- if (sessionConfigItemProvider == null) {
- sessionConfigItemProvider = new SessionConfigItemProvider(this);
- }
-
- return sessionConfigItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.TagLibRef}.
- */
- public Adapter createTagLibRefAdapter() {
- if (tagLibRefItemProvider == null) {
- tagLibRefItemProvider = new TagLibRefItemProvider(this);
- }
-
- return tagLibRefItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.TagLibRef}.
- */
- public Adapter createTagLibRefTypeAdapter() {
- if (tagLibRefTypeItemProvider == null) {
- tagLibRefTypeItemProvider = new TagLibRefTypeItemProvider(this);
- }
-
- return tagLibRefTypeItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.URLPatternType}.
- */
- public Adapter createURLPatternTypeAdapter() {
- if (uRLPatternTypeItemProvider == null) {
- uRLPatternTypeItemProvider = new URLPatternTypeItemProvider(this);
- }
-
- return uRLPatternTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.HTTPMethodType}instances. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected HTTPMethodTypeItemProvider httpMethodTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.UserDataConstraint}.
- */
- public Adapter createUserDataConstraintAdapter() {
- if (userDataConstraintItemProvider == null) {
- userDataConstraintItemProvider = new UserDataConstraintItemProvider(this);
- }
-
- return userDataConstraintItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebApp}.
- */
- public Adapter createWebAppAdapter() {
- if (webAppItemProvider == null) {
- webAppItemProvider = new WebAppItemProvider(this);
- }
-
- return webAppItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebResourceCollection}.
- */
- public Adapter createWebResourceCollectionAdapter() {
- if (webResourceCollectionItemProvider == null) {
- webResourceCollectionItemProvider = new WebResourceCollectionItemProvider(this);
- }
-
- return webResourceCollectionItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WebType}.
- */
- public Adapter createWebTypeAdapter() {
- if (webTypeItemProvider == null) {
- webTypeItemProvider = new WebTypeItemProvider(this);
- }
-
- return webTypeItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFile}.
- */
- public Adapter createWelcomeFileAdapter() {
- if (welcomeFileItemProvider == null) {
- welcomeFileItemProvider = new WelcomeFileItemProvider(this);
- }
-
- return welcomeFileItemProvider;
- }
-
- /**
- * This creates an adapter for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFileList}.
- */
- public Adapter createWelcomeFileListAdapter() {
- if (welcomeFileListItemProvider == null) {
- welcomeFileListItemProvider = new WelcomeFileListItemProvider(this);
- }
-
- return welcomeFileListItemProvider;
- }
-
- public void dispose() {
- disposable.dispose();
- }
-
- /**
- * This returns the root adapter factory that contains the 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 the factory.
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileItemProvider.java
deleted file mode 100644
index 7ea31c7d1..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileItemProvider.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.providers;
-
-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.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.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFile;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFile}object.
- */
-public class WelcomeFileItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WelcomeFileItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns welcome_file.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("welcome_file");//$NON-NLS-1$
- }
-
- /**
- * This returns the fileList of the WelcomeFile.
- */
- public Object getParent(Object object) {
- return ((WelcomeFile) object).getFileList();
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- WebapplicationPackage pkg = WebapplicationPackage.eINSTANCE;
-
- // This is for the welcomeFile feature.
- //
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), WebAppEditResourceHandler.getString("WelcomeFile_UI_"), //$NON-NLS-1$ = "WelcomeFile"
- WebAppEditResourceHandler.getString("The_welcomeFile_property_UI_"), //$NON-NLS-1$ = "The welcomeFile property"
- pkg.getWelcomeFile_WelcomeFile()));
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Welcome File feature. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- protected void addWelcomeFilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add(new ItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getString("_UI_WelcomeFile_welcomeFile_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_WelcomeFile_welcomeFile_feature", "_UI_WelcomeFile_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- WebapplicationPackage.eINSTANCE.getWelcomeFile_WelcomeFile(), true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE));
- }
-
-
- public String getText(Object object) {
- WelcomeFile welcomeFile = (WelcomeFile) object;
- String name = welcomeFile.getWelcomeFile();
- if (name == null)
- name = WebAppEditResourceHandler.getString("<welcome-file>_UI_"); //$NON-NLS-1$ = "<welcome-file>"
- return name;
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(WelcomeFile.class)) {
- case WebapplicationPackage.WELCOME_FILE__WELCOME_FILE : {
- 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();
- }
-
- /**
- * This always returns false. The base class has already implemented
- * {@link org.eclipse.emf.edit.provider.ItemProviderAdapter#getChildren ItemProviderAdapter.getChildren}
- * to return the empty enumeration, and this to check that enumeration, but we know there can't
- * be any children, so this is faster.
- */
- public boolean hasChildren(Object object) {
- return false;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileListItemProvider.java b/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileListItemProvider.java
deleted file mode 100644
index 6893d0904..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webedit/org/eclipse/jst/j2ee/internal/web/providers/WelcomeFileListItemProvider.java
+++ /dev/null
@@ -1,161 +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.web.providers;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.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.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationPackage;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFile;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFileList;
-
-
-/**
- * This is the item provider adpater for a {@link org.eclipse.jst.j2ee.internal.internal.webapplication.WelcomeFileList}
- * object.
- */
-public class WelcomeFileListItemProvider extends WebapplicationItemProviderAdapter implements IEditingDomainItemProvider, IItemLabelProvider, IItemPropertySource, IStructuredItemContentProvider, ITreeItemContentProvider {
-
- /**
- * This constructs an instance from a factory and a notifier.
- */
- public WelcomeFileListItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @generated
- */
- public List getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This creates a new child for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object createChild(Object object) {
- // TODO: check that this is what you want.
- WelcomeFile child = WebapplicationFactory.eINSTANCE.createWelcomeFile();
-
- // 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) {
- return Collections.singleton(WebapplicationPackage.eINSTANCE.getWelcomeFileList_File());
- }
-
- /**
- * This returns the image for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public Object getCreateChildImage(Object object) {
- EObject refObject = (EObject) object;
- return WebPlugin.getDefault().getImage(refObject.eClass().getName() + "CreateWelcomeFile");//$NON-NLS-1$
- }
-
- /**
- * This returns the label for {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildText(Object object) {
- return WebAppEditResourceHandler.getString("Create_WelcomeFile_UI_"); //$NON-NLS-1$ = "Create WelcomeFile"
- }
-
- /**
- * This returns the help text for
- * {@link org.eclipse.jst.j2ee.internal.internal.webapplication.commandCreateChildCommand}.
- */
- public String getCreateChildToolTipText(Object object) {
- EObject refObject = (EObject) object;
- return WebAppEditResourceHandler.getString("42concat_UI_", (new Object[]{refObject.eClass().getName()})); //$NON-NLS-1$ = "Create a child of type WelcomeFile for the selected {0}."
- }
-
- /**
- * This returns welcome_list.gif.
- */
- public Object getImage(Object object) {
- return WebPlugin.getDefault().getImage("welcome_list");//$NON-NLS-1$
- }
-
- /**
- * This returns the webApp of the WelcomeFileList.
- */
- public Object getParent(Object object) {
- return ((WelcomeFileList) object).getWebApp();
- }
-
- public String getText(Object object) {
- return WebAppEditResourceHandler.getString("Welcome_File_List_UI_"); //$NON-NLS-1$ = "Welcome File List"
- }
-
- /**
- * This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}. <!--
- * begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public void notifyChanged(Notification notification) {
- switch (notification.getFeatureID(WelcomeFileList.class)) {
- case WebapplicationPackage.WELCOME_FILE_LIST__FILE : {
- 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(WebapplicationPackage.eINSTANCE.getWelcomeFileList_File(), WebapplicationFactory.eINSTANCE.createWelcomeFile()));
- }
-
- /**
- * 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.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WTProjectStrategyUtils.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WTProjectStrategyUtils.java
deleted file mode 100644
index 34c047791..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WTProjectStrategyUtils.java
+++ /dev/null
@@ -1,90 +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.web.archive.operations;
-
-
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-
-
-public class WTProjectStrategyUtils {
- public static File findSourceFile(Archive archive, String file) {
- if (isClassFile(file))
- return findSourceFileForClass(archive, file);
-
- // Look in the CLASSES directory
- try {
- if (!isOutputFile(file))
- return archive.getFile(file);
- } catch (java.io.FileNotFoundException ex) {
- //Do nothing
- }
- return null;
- }
-
- public static File findSourceFileForClass(Archive archive, String classFile) {
- // Look in the CLASSES directory
- IPath classFilePath = new Path(classFile);
- IPath sourceFilePath = classFilePath.removeFileExtension().addFileExtension("java");//$NON-NLS-1$
- try {
- File file = archive.getFile(sourceFilePath.toString());
- if (file != null)
- return file;
- } catch (java.io.FileNotFoundException ex) {
- //Do nothing
- }
-
- // Look in the LIB directory
- sourceFilePath = new Path(ArchiveConstants.WEBAPP_LIB_URI).append(sourceFilePath);
- try {
- File file = archive.getFile(sourceFilePath.toString());
- if (file != null)
- return file;
- } catch (java.io.FileNotFoundException ex) {
- //Do nothing
- }
- return null;
-
- }
-
- public static boolean isClassFile(String uri) {
- return uri.startsWith(ArchiveConstants.WEBAPP_CLASSES_URI) && uri.endsWith(".class");//$NON-NLS-1$
- }
-
- public static boolean isOutputFile(String uri) {
- return uri.startsWith(ArchiveConstants.WEBAPP_CLASSES_URI);
- }
-
- public static boolean isSourceFile(String uri) {
- // A file is considered a java source file if it is in the
- // WEB_INF directory and it does not end with .class.
- if (uri.startsWith(J2EEConstants.WEB_INF + "/") && //$NON-NLS-1$
- uri.endsWith(".java"))//$NON-NLS-1$
- return true;
- return false;
-
- }
-
- public static String makeRelative(String pathString, String relToPathString) {
- IPath relToPath = new Path(relToPathString);
- IPath path = new Path(pathString);
-
- if (path.matchingFirstSegments(relToPath) == relToPath.segmentCount())
- path = path.removeFirstSegments(relToPath.segmentCount());
-
- return path.toString();
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportDataModelProvider.java
deleted file mode 100644
index a749b683f..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportDataModelProvider.java
+++ /dev/null
@@ -1,86 +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.web.archive.operations;
-
-import java.util.Set;
-
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentExportDataModelProvider;
-import org.eclipse.jst.j2ee.internal.earcreation.EARCreationResourceHandler;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.web.datamodel.properties.IWebComponentExportDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class WebComponentExportDataModelProvider extends J2EEComponentExportDataModelProvider implements IWebComponentExportDataModelProperties {
-
- public WebComponentExportDataModelProvider() {
- super();
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new WebComponentExportOperation(model);
- }
-
- public Set getPropertyNames() {
- Set propertyNames = super.getPropertyNames();
- propertyNames.add(EXCLUDE_COMPILE_JSP);
- return propertyNames;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (EXCLUDE_COMPILE_JSP.equals(propertyName)) {
- return Boolean.FALSE;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- protected String getProjectType() {
- return J2EEProjectUtilities.DYNAMIC_WEB;
- }
-
- protected String getWrongComponentTypeString(String projectName) {
- return EARCreationResourceHandler.getString(EARCreationResourceHandler.NOT_A_WAR, new Object[]{projectName});
- }
-
- protected String getModuleExtension() {
- return ".war"; //$NON-NLS-1$
- }
- /**
- * Exports the specified Web Module project to the specified WAR file.
- *
- * @param webProjectName
- * The name of the Web Module project to export.
- * @param warFileName
- * The fully qualified WAR file location to export the specified Web Module project.
- * @param overwriteExisting
- * If this is <code>true</code> then an existing file at the location specified by
- * <code>earFileName</code> will be overwritten.
- * @param exportSource
- * If this is <code>true</code> then all source files in the specified Web Module
- * will be included in the resulting WAR file.
- * @plannedfor WTP 1.0
- */
- // TODO: determine plan for new DM Provider
- // public static void exportProject(String webProjectName, String warFileName, boolean
- // overwriteExisting, boolean exportSource) {
- // WebModuleExportDataModel dataModel = new WebModuleExportDataModel();
- // dataModel.setProperty(PROJECT_NAME, webProjectName);
- // dataModel.setBooleanProperty(OVERWRITE_EXISTING, overwriteExisting);
- // dataModel.setProperty(ARCHIVE_DESTINATION, warFileName);
- // dataModel.setBooleanProperty(EXPORT_SOURCE_FILES, exportSource);
- // try {
- // dataModel.getDefaultOperation().run(null);
- // } catch (InvocationTargetException e) {
- // Logger.getLogger().logError(e);
- // } catch (InterruptedException e) {
- // Logger.getLogger().logError(e);
- // }
- // }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportOperation.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportOperation.java
deleted file mode 100644
index 38aae57c0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentExportOperation.java
+++ /dev/null
@@ -1,73 +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.web.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.j2ee.internal.archive.operations.AppClientArchiveOpsResourceHandler;
-import org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation;
-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 WebComponentExportOperation extends J2EEArtifactExportOperation {
-
- public WebComponentExportOperation() {
- super();
- }
-
- public WebComponentExportOperation(IDataModel model) {
- super(model);
- }
-
- protected 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();
- WebComponentLoadStrategyImpl ls = new WebComponentLoadStrategyImpl(getComponent());
- ls.setExportSource(isExportSource());
- setModuleFile(caf.openWARFile(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 "War File";
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportDataModelProvider.java
deleted file mode 100644
index abd26d3f7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportDataModelProvider.java
+++ /dev/null
@@ -1,190 +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.web.archive.operations;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEComponentImportDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.J2EEUtilityJarImportDataModelProvider;
-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.IJ2EEComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-import org.eclipse.jst.j2ee.internal.archive.ArchiveWrapper;
-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.IJ2EEFacetConstants;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetProjectCreationDataModelProperties;
-import org.eclipse.jst.j2ee.web.datamodel.properties.IWebComponentImportDataModelProperties;
-import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
-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.DataModelEvent;
-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.internal.plugin.WTPCommonPlugin;
-
-/**
- * This dataModel is used for to import Web Modules (from WAR files) into the workspace.
- *
- * This class (and all its fields and methods) is likely to change during the WTP 1.0 milestones as
- * the new project structures are adopted. Use at your own risk.
- *
- * @plannedfor WTP 1.0
- */
-public final class WebComponentImportDataModelProvider extends J2EEComponentImportDataModelProvider implements IWebComponentImportDataModelProperties {
-
- public Set getPropertyNames() {
- Set propertyNames = super.getPropertyNames();
- propertyNames.add(WEB_LIB_MODELS);
- propertyNames.add(WEB_LIB_ARCHIVES_SELECTED);
- propertyNames.add(CONTEXT_ROOT);
- return propertyNames;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(WEB_LIB_MODELS) || propertyName.equals(WEB_LIB_ARCHIVES_SELECTED)) {
- return Collections.EMPTY_LIST;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- protected int getType() {
- return XMLResource.WEB_APP_TYPE;
- }
-
- protected void handleUnknownType(JavaEEQuickPeek jqp) {
- jqp.setType(J2EEVersionConstants.WEB_TYPE);
- jqp.setVersion(J2EEVersionConstants.WEB_2_5_ID);
- jqp.setJavaEEVersion(J2EEVersionConstants.JEE_5_0_ID);
- }
-
-
- protected IStatus validateModuleType() {
- if (getArchiveWrapper().getJavaEEQuickPeek().getType() == J2EEConstants.WEB_TYPE)
- return OK_STATUS;
-
- // TODO: STRING MOVE
- return WTPCommonPlugin.createErrorStatus(WTPCommonPlugin.getResourceString("Temp String for none WARFile")); //$NON-NLS-1$);
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- 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 webFacetDataModel = map.getFacetDataModel( J2EEProjectUtilities.DYNAMIC_WEB );
-
- int version = getModuleSpecVersion();
- String versionText = J2EEVersionUtil.getServletTextVersion( version );
- webFacetDataModel.setStringProperty(IFacetDataModelProperties.FACET_VERSION_STR, versionText);
- updateJavaFacetVersion();
- model.notifyPropertyChange(PROJECT_NAME, IDataModel.VALID_VALUES_CHG);
- }
-
- ArchiveWrapper archiveWrapper = (ArchiveWrapper) propertyValue;
- if (null != archiveWrapper) {
- List <ArchiveWrapper> libs = archiveWrapper.getWebLibs();
- List nestedModels = new ArrayList();
- for (int i = 0; i < libs.size(); i++) {
- IDataModel localModel = DataModelFactory.createDataModel(new J2EEUtilityJarImportDataModelProvider());
- localModel.setProperty(ARCHIVE_WRAPPER, libs.get(i));
- localModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, getProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME));
- IDataModel facetDataModel = localModel.getNestedModel(IJ2EEComponentImportDataModelProperties.NESTED_MODEL_J2EE_COMPONENT_CREATION);
- facetDataModel.setBooleanProperty(IJ2EEFacetProjectCreationDataModelProperties.ADD_TO_EAR, false);
- nestedModels.add(localModel);
- }
- setProperty(WEB_LIB_MODELS, nestedModels);
- }
- }else if(propertyName.equals(CONTEXT_ROOT)){
- IDataModel creationModel = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
- FacetDataModelMap map = (FacetDataModelMap) creationModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel webFacetDataModel = map.getFacetDataModel( J2EEProjectUtilities.DYNAMIC_WEB );
- webFacetDataModel.setStringProperty(IWebFacetInstallDataModelProperties.CONTEXT_ROOT, (String)propertyValue);
- }else if(propertyName.equals(WEB_LIB_ARCHIVES_SELECTED)) {
- validateLibModelRuntimes();
- }
- return true;
- }
-
- @Override
- public IStatus validate(String propertyName) {
- if(FACET_RUNTIME.equals(propertyName)){
- super.validate(propertyName);
- return validateLibModelRuntimes();
- }
- return super.validate(propertyName);
- }
-
- private IStatus validateLibModelRuntimes() {
- List libArchives = (List)getProperty(WEB_LIB_ARCHIVES_SELECTED);
- List libModels = (List)getProperty(WEB_LIB_MODELS);
- IStatus status = OK_STATUS;
- for (int i=0; i < libModels.size(); i++) {
- IDataModel libModel = (IDataModel)libModels.get(i);
- if (libArchives.contains(libModel.getProperty(ARCHIVE_WRAPPER))){
- status = libModel.validateProperty(FACET_RUNTIME);
- }
- if(!status.isOK()){
- return status;
- }
- }
- return status;
- }
-
- protected Archive openArchive(String uri) throws OpenFailureException {
- Archive archive = CommonarchiveFactory.eINSTANCE.openWARFile(getArchiveOptions(), uri);
- return archive;
- }
-
- protected IDataModel createJ2EEComponentCreationDataModel() {
- return DataModelFactory.createDataModel(new WebFacetProjectCreationDataModelProvider());
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new WebComponentImportOperation(model);
- }
-
- public void init() {
- super.init();
- IDataModel componentCreationDM = model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION);
- FacetDataModelMap map = (FacetDataModelMap) componentCreationDM.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel webFacet = map.getFacetDataModel( IJ2EEFacetConstants.DYNAMIC_WEB );
- webFacet.setBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD, false);
- }
-
- public void propertyChanged(DataModelEvent event) {
- super.propertyChanged(event);
- if (event.getPropertyName().equals(IFacetProjectCreationDataModelProperties.FACET_RUNTIME) && event.getDataModel() == model.getNestedModel(NESTED_MODEL_J2EE_COMPONENT_CREATION)) {
- Object propertyValue = event.getProperty();
- IDataModel nestedModel = null;
- List projectModels = (List) getProperty(WEB_LIB_MODELS);
- for (int i = 0; i < projectModels.size(); i++) {
- nestedModel = (IDataModel) projectModels.get(i);
- nestedModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, propertyValue);
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportOperation.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportOperation.java
deleted file mode 100644
index bbd45abc0..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentImportOperation.java
+++ /dev/null
@@ -1,134 +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.web.archive.operations;
-
-import java.lang.reflect.InvocationTargetException;
-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.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.strategy.SaveStrategy;
-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.WebComponentArchiveSaveAdapter;
-import org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactImportOperation;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.jst.j2ee.web.datamodel.properties.IWebComponentImportDataModelProperties;
-import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
-import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-public class WebComponentImportOperation extends J2EEArtifactImportOperation {
- /**
- * @param model
- */
- public WebComponentImportOperation(IDataModel model) {
- super(model);
- }
-
- protected final int LINK_COMPONENTS_WORK = 10;
- protected final int LIB_FOLDER_WORK = 2;
-
- protected int computeTotalWork() {
- int baseWork = super.computeTotalWork() + LIB_FOLDER_WORK;
- List selectedLibs = (List) model.getProperty(IWebComponentImportDataModelProperties.WEB_LIB_ARCHIVES_SELECTED);
- List libProjects = (List) model.getProperty(IWebComponentImportDataModelProperties.WEB_LIB_MODELS);
- IDataModel importModel = null;
- ArchiveWrapper libArchive = null;
- for (int i = 0; null != libProjects && i < libProjects.size(); i++) {
- importModel = (IDataModel) libProjects.get(i);
- libArchive = (ArchiveWrapper) importModel.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- if (selectedLibs.contains(libArchive)) {
- baseWork += LINK_COMPONENTS_WORK + PROJECT_CREATION_WORK + libArchive.getSize();
- }
- }
-
- return baseWork;
- }
-
- protected void doExecute(IProgressMonitor monitor) throws ExecutionException {
- super.doExecute(monitor);
- IVirtualFolder libFolder = virtualComponent.getRootFolder().getFolder(WebArtifactEdit.WEBLIB);
- if (!libFolder.exists()) {
- try {
- libFolder.create(IResource.FORCE, new SubProgressMonitor(monitor, LIB_FOLDER_WORK));
- } catch (CoreException e) {
- Logger.getLogger().logError(e);
- }
- } else {
- monitor.worked(LIB_FOLDER_WORK);
- }
- try {
- importWebLibraryProjects(monitor);
- } catch (InvocationTargetException e) {
- Logger.getLogger().logError(e);
- } catch (InterruptedException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- private void importWebLibraryProjects(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException, ExecutionException {
- List <ArchiveWrapper> selectedLibs = (List<ArchiveWrapper>) model.getProperty(IWebComponentImportDataModelProperties.WEB_LIB_ARCHIVES_SELECTED);
- List <Object> selectedLibsUnderlyingArchives = new ArrayList();
- for(ArchiveWrapper lib: selectedLibs){
- selectedLibsUnderlyingArchives.add(lib.getUnderLyingArchive());
- }
- List <IDataModel> libProjects = (List <IDataModel>) model.getProperty(IWebComponentImportDataModelProperties.WEB_LIB_MODELS);
- IDataModel importModel = null;
- IVirtualComponent nestedComponent = null;
- ArchiveWrapper libArchive = null;
- List targetComponents = new ArrayList();
- Map compToURIMap = new HashMap();
- for (int i = 0; null != libProjects && i < libProjects.size(); i++) {
- importModel = (IDataModel) libProjects.get(i);
- libArchive = (ArchiveWrapper) importModel.getProperty(IJ2EEComponentImportDataModelProperties.ARCHIVE_WRAPPER);
- if (selectedLibsUnderlyingArchives.contains(libArchive.getUnderLyingArchive())) {
- importModel.getDefaultOperation().execute(new SubProgressMonitor(monitor, PROJECT_CREATION_WORK + libArchive.getSize()) , info);
- nestedComponent = (IVirtualComponent) importModel.getProperty(IJ2EEComponentImportDataModelProperties.COMPONENT);
- targetComponents.add(nestedComponent);
- String archiveURI = libArchive.getPath().lastSegment();
- compToURIMap.put(nestedComponent, archiveURI);
- }
- }
- /**
- * The J2EEComponentClasspathContainr will handle adding these to the classpath, so they
- * don't need to be added here.
- */
- if (targetComponents.size() > 0) {
- IDataModel createRefComponentsModel = DataModelFactory.createDataModel(new CreateReferenceComponentsDataModelProvider());
- createRefComponentsModel.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, virtualComponent);
- createRefComponentsModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, "/WEB-INF/lib/"); //$NON-NLS-1$
- createRefComponentsModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, targetComponents);
- createRefComponentsModel.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_TO_URI_MAP, compToURIMap);
- createRefComponentsModel.getDefaultOperation().execute(new SubProgressMonitor(monitor, LINK_COMPONENTS_WORK * targetComponents.size()), info);
- }
- }
-
- protected SaveStrategy createSaveStrategy(IVirtualComponent aVirtualComponent) {
- return new WebComponentSaveStrategyImpl(aVirtualComponent);
- }
-
- protected ComponentArchiveSaveAdapter getArchiveSaveAdapter(
- IVirtualComponent virtualComponent) {
- return new WebComponentArchiveSaveAdapter(virtualComponent);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentLoadStrategyImpl.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentLoadStrategyImpl.java
deleted file mode 100644
index 1ac47ebb9..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentLoadStrategyImpl.java
+++ /dev/null
@@ -1,127 +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.web.archive.operations;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.exception.OpenFailureException;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
-import org.eclipse.jst.j2ee.internal.archive.operations.ComponentLoadStrategyImpl;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.jst.j2ee.project.WebUtilities;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-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 WebComponentLoadStrategyImpl extends ComponentLoadStrategyImpl {
-
- public WebComponentLoadStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- public WebComponentLoadStrategyImpl(IVirtualComponent vComponent, boolean includeClasspathComponents) {
- super(vComponent, includeClasspathComponents);
- }
-
- public List getFiles() {
- super.getFiles();
- addLooseLibJARsToFiles();
- if (includeClasspathComponents) {
- addMappedClassFolders(IClasspathDependencyConstants.WEB_INF_CLASSES_PATH);
- }
- return filesHolder.getFiles();
- }
-
- public IVirtualReference[] getLibModules() {
- return WebUtilities.getLibModules(getComponent());
- }
-
- 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());
- }
- String uri = iLibModule.getRuntimePath().makeRelative().toString() + "/" + 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 {
- Archive utilJAR = J2EEProjectUtilities.asArchive(uri, looseComponent.getProject(), isExportSource());
- if (utilJAR == null)
- continue;
- filesHolder.addFile(utilJAR);
- } catch (OpenFailureException oe) {
- String message = ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.UNABLE_TO_LOAD_MODULE_ERROR_, new Object[]{uri, getComponent().getProject().getName(), oe.getConcatenatedMessages()}); //$NON-NLS-1$
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logTrace(message);
- }
- }
- }
- }
- protected synchronized ArtifactEdit getArtifactEditForRead() {
- if(artifactEdit == null){
- artifactEdit = WebArtifactEdit.getWebArtifactEditForRead(vComponent);
- }
- return artifactEdit;
- }
-
- 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 VirtualArchiveComponent
- && runtimePath.equals(IClasspathDependencyConstants.RUNTIME_MAPPING_INTO_CONTAINER_PATH)) {
- final VirtualArchiveComponent comp = (VirtualArchiveComponent) ref.getReferencedComponent();
- File cpEntryFile = comp.getUnderlyingDiskFile();
- if (!cpEntryFile.exists()) {
- final IFile wbFile = comp.getUnderlyingWorkbenchFile();
- cpEntryFile = new File(wbFile.getLocation().toOSString());
- }
- addExternalFile("WEB-INF/lib/" + ref.getArchiveName(), cpEntryFile);
- }
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentSaveStrategyImpl.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentSaveStrategyImpl.java
deleted file mode 100644
index 3a72a18ac..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebComponentSaveStrategyImpl.java
+++ /dev/null
@@ -1,106 +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.web.archive.operations;
-
-import java.util.HashMap;
-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.Archive;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.WARFile;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveConstants;
-import org.eclipse.jst.j2ee.commonarchivecore.internal.util.ArchiveUtil;
-import org.eclipse.jst.j2ee.internal.archive.operations.J2EEComponentSaveStrategyImpl;
-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 WebComponentSaveStrategyImpl extends J2EEComponentSaveStrategyImpl {
-
- public WebComponentSaveStrategyImpl(IVirtualComponent vComponent) {
- super(vComponent);
- }
-
- /**
- * DoNotUseMeThisWillBeDeletedPost15
- *
- * @deprecated
- * @param archive
- * @return
- */
- protected boolean operationHandlesNested(Archive archive) {
- return !shouldLinkAsComponentRef(archive);
- }
-
- protected boolean shouldAddImportedClassesToClasspath() {
- return false; // never add to classpath because the web app container will pick this up.
- }
-
- protected String getImportedClassesURI(File aFile) {
- String uri = aFile.getURI();
- return WTProjectStrategyUtils.makeRelative(uri, ArchiveConstants.WEBAPP_CLASSES_URI);
- }
-
- protected IPath getImportedClassesRuntimePath() {
- return new Path("/" + ArchiveConstants.WEBAPP_CLASSES_URI);
- }
-
- protected IPath getOutputPathForFile(File aFile) {
- if (null != nonStandardSourceFiles && nonStandardSourceFiles.containsKey(aFile)) {
- IVirtualFolder rootFolder = vComponent.getRootFolder();
- IVirtualFile vFile = rootFolder.getFile((String) nonStandardSourceFiles.get(aFile));
- IFile iFile = vFile.getUnderlyingFile();
- return iFile.getProjectRelativePath();
- }
- return super.getOutputPathForFile(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 nonStandardSourceFiles;
-
- protected boolean isClassWithoutSource(File aFile) {
- String javaUri = ArchiveUtil.classUriToJavaUri(aFile.getURI());
- if (javaUri == null)
- return false;
- if (archive.containsFile(javaUri)) {
- 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;
- if (archive.containsFile(jspUri)) {
- return false;
- }
- }
-
- // see if the source is in another directory
- File sourceFile = ((WARFile) archive).getSourceFile(aFile);
- if (null == sourceFile) {
- return true;
- }
- if (nonStandardSourceFiles == null) {
- nonStandardSourceFiles = new HashMap();
- }
- if (!nonStandardSourceFiles.containsKey(sourceFile)) {
- nonStandardSourceFiles.put(sourceFile, javaUri);
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebFacetProjectCreationDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebFacetProjectCreationDataModelProvider.java
deleted file mode 100644
index af93dd9f3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/archive/operations/WebFacetProjectCreationDataModelProvider.java
+++ /dev/null
@@ -1,75 +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.web.archive.operations;
-
-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.J2EEConstants;
-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.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
-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 WebFacetProjectCreationDataModelProvider extends J2EEFacetProjectCreationDataModelProvider {
-
- public WebFacetProjectCreationDataModelProvider() {
- super();
- }
-
- public void init() {
- super.init();
-
- Collection<IProjectFacet> requiredFacets = new ArrayList<IProjectFacet>();
- requiredFacets.add(JavaFacetUtils.JAVA_FACET);
- requiredFacets.add(IJ2EEFacetConstants.DYNAMIC_WEB_FACET);
- setProperty(REQUIRED_FACETS_COLLECTION, requiredFacets);
-
- FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
- IDataModel javaFacet = map.getFacetDataModel( JavaFacetUtils.JAVA_FACET.getId() );
- IDataModel webFacet = map.getFacetDataModel( IJ2EEFacetConstants.DYNAMIC_WEB_FACET.getId() );
- String webRoot = webFacet.getStringProperty(IWebFacetInstallDataModelProperties.CONFIG_FOLDER);
- String webSrc = webFacet.getStringProperty(IWebFacetInstallDataModelProperties.SOURCE_FOLDER);
- javaFacet.setProperty(IJavaFacetInstallDataModelProperties.SOURCE_FOLDER_NAME, webSrc);
- // If using optimized single root structure, set the output folder to "<content folder>/WEB-INF/classes"
- if (ProductManager.shouldUseSingleRootStructure())
- javaFacet.setProperty(IJavaFacetInstallDataModelProperties.DEFAULT_OUTPUT_FOLDER_NAME, webRoot+"/"+J2EEConstants.WEB_INF_CLASSES); //$NON-NLS-1$
- webFacet.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 webFacet = map.getFacetDataModel( J2EEProjectUtilities.DYNAMIC_WEB );
- webFacet.setProperty( IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI, propertyValue );
- }
- return super.propertySet(propertyName, propertyValue);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.java
deleted file mode 100644
index f0b00aebc..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005-2006 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.web.classpath;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.common.jdt.internal.classpath.FlexibleProjectContainer;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class WebAppLibrariesContainer
-
- extends FlexibleProjectContainer
-
-{
- private static final IPath[] paths
- = new IPath[] { new Path( "WEB-INF/lib" ),
- new Path( "WEB-INF/classes" ) };
-
- private static final PathType[] types
- = new PathType[] { PathType.LIB_DIRECTORY, PathType.CLASSES_DIRECTORY };
-
- public static final String CONTAINER_ID
- = "org.eclipse.jst.j2ee.internal.web.container";
-
- public WebAppLibrariesContainer( final IPath path,
- final IJavaProject jproject )
- {
- super( path, jproject, getProject( path, jproject), paths, types );
- }
-
- public String getDescription()
- {
- if( this.owner.getProject() != this.project )
- {
- return NLS.bind( Resources.labelWithProject, this.project.getName() );
- }
- else
- {
- return Resources.label;
- }
- }
-
- public void install()
- {
- final IJavaProject[] projects = new IJavaProject[] { this.owner };
- final IClasspathContainer[] conts = new IClasspathContainer[] { this };
-
- try
- {
- JavaCore.setClasspathContainer( path, projects, conts, null );
- }
- catch( JavaModelException e )
- {
- WebPlugin.log( e );
- }
- }
-
- public void refresh()
- {
- ( new WebAppLibrariesContainer( this.path, this.owner ) ).install();
- }
-
- private static final IProject getProject( final IPath path,
- final IJavaProject jproject )
- {
- if( path.segmentCount() == 1 )
- {
- return jproject.getProject();
- }
- else
- {
- final String name = path.segment( 1 );
- return ResourcesPlugin.getWorkspace().getRoot().getProject( name );
- }
- }
-
- private static final class Resources
-
- extends NLS
-
- {
- public static String label;
- public static String labelWithProject;
-
- static
- {
- initializeMessages( WebAppLibrariesContainer.class.getName(),
- Resources.class );
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.properties b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.properties
deleted file mode 100644
index cbdcc18fc..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainer.properties
+++ /dev/null
@@ -1,12 +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
-###############################################################################
-label = Web App Libraries
-labelWithProject = Web App Libraries [{0}] \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainerInitializer.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainerInitializer.java
deleted file mode 100644
index ed02a7d99..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/classpath/WebAppLibrariesContainerInitializer.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2005-2006 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.web.classpath;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jst.common.jdt.internal.classpath.FlexibleProjectContainerInitializer;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class WebAppLibrariesContainerInitializer
-
- extends FlexibleProjectContainerInitializer
-
-{
- public void initialize( final IPath path,
- final IJavaProject jproj )
-
- throws CoreException
-
- {
- ( new WebAppLibrariesContainer( path, jproj ) ).install();
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ClasspathUtilities.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ClasspathUtilities.java
deleted file mode 100644
index aaae1b770..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ClasspathUtilities.java
+++ /dev/null
@@ -1,68 +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.web.operations;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-
-public class ClasspathUtilities {
-
- static public IClasspathEntry[] addClasspathEntries(IClasspathEntry[] entries1, IClasspathEntry[] entries2) {
- List list = new ArrayList(entries1.length + entries2.length);
- list.addAll(Arrays.asList(entries1));
-
- for (int i = 0; i < entries2.length; i++) {
- IClasspathEntry iClasspathEntry = entries2[i];
- if (!list.contains(iClasspathEntry))
- list.add(iClasspathEntry);
- }
-
- IClasspathEntry[] ret = new IClasspathEntry[list.size()];
- return (IClasspathEntry[]) list.toArray(ret);
- }
-
- static protected boolean entryExists(IClasspathEntry entry, IClasspathEntry[] col) {
- for (int i = 0; i < col.length; i++) {
- IClasspathEntry otherEntry = col[i];
- if (entry.getContentKind() != otherEntry.getContentKind())
- continue;
-
- if (entry.getEntryKind() != otherEntry.getEntryKind())
- continue;
-
- if (entry.isExported() != otherEntry.isExported())
- continue;
-
- if (!entry.getPath().equals(otherEntry.getPath()))
- continue;
- return true;
- }
- return false;
- }
-
- static public IClasspathEntry[] removeClasspathEntries(IClasspathEntry[] removeFromCol, IClasspathEntry[] removeCol) {
- List list = new ArrayList(removeFromCol.length);
- // list.addAll(Arrays.asList(removeFromCol));
-
- for (int i = 0; i < removeFromCol.length; i++) {
- IClasspathEntry iClasspathEntry = removeFromCol[i];
- if (!entryExists(iClasspathEntry, removeCol))
- list.add(iClasspathEntry);
- }
-
- IClasspathEntry[] ret = new IClasspathEntry[list.size()];
- return (IClasspathEntry[]) list.toArray(ret);
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicDataModelProvider.java
deleted file mode 100644
index 6de2bbb09..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicDataModelProvider.java
+++ /dev/null
@@ -1,39 +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.web.operations;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.jst.j2ee.web.datamodel.properties.IConvertStaticWebToDyamnicDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-
-public class ConvertStaticWebToDyamnicDataModelProvider extends AbstractDataModelProvider implements IConvertStaticWebToDyamnicDataModelProperties {
-
-
- public ConvertStaticWebToDyamnicDataModelProvider() {
- super();
- }
-
- public IDataModelOperation getDefaultOperation() {
- return new ConvertStaticWebToDyamnicOperation(model);
- }
-
-
- public Set getPropertyNames() {
- Set propertyNames = new HashSet();
- propertyNames.add(PROJECT);
- propertyNames.add(CONVERT_TO_WEB_VERSION);
- return propertyNames;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicOperation.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicOperation.java
deleted file mode 100644
index 5b21b57c5..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ConvertStaticWebToDyamnicOperation.java
+++ /dev/null
@@ -1,114 +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.web.operations;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jst.common.project.facet.IJavaFacetInstallDataModelProperties;
-import org.eclipse.jst.common.project.facet.JavaFacetInstallDataModelProvider;
-import org.eclipse.jst.common.project.facet.JavaFacetUtils;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.web.plugin.WebPlugin;
-import org.eclipse.jst.j2ee.web.datamodel.properties.IConvertStaticWebToDyamnicDataModelProperties;
-import org.eclipse.jst.j2ee.web.project.facet.IWebFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider;
-import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-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.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.project.facet.ProductManager;
-
-public class ConvertStaticWebToDyamnicOperation extends AbstractDataModelOperation {
-
- public ConvertStaticWebToDyamnicOperation() {
- super();
- }
-
- public ConvertStaticWebToDyamnicOperation(IDataModel dm) {
- super(dm);
- }
-
- @Override
- public IStatus execute(IProgressMonitor monitor, IAdaptable info)
- throws ExecutionException {
- try {
- doConvert();
- } catch (Exception e) {
- WebPlugin.log(e);
- }
-
-
- return OK_STATUS;
- }
-
- protected void doConvert() throws Exception {
-
-
- String selectedVersion = model.getStringProperty(IConvertStaticWebToDyamnicDataModelProperties.CONVERT_TO_WEB_VERSION);
- IProject project = (IProject) model.getProperty(IConvertStaticWebToDyamnicDataModelProperties.PROJECT);
- IFacetedProject facetedProject = ProjectFacetsManager.create(project);
- Set fixedFacets = new HashSet();
- fixedFacets.addAll(facetedProject.getFixedProjectFacets());
- IProjectFacet webFacet = ProjectFacetsManager.getProjectFacet(IModuleConstants.WST_WEB_MODULE);
- fixedFacets.remove(webFacet);
- fixedFacets.add(WebFacetUtils.WEB_FACET);
- fixedFacets.add(JavaFacetUtils.JAVA_FACET);
- facetedProject.setFixedProjectFacets(fixedFacets);
- IProjectFacetVersion webFv = WebFacetUtils.WEB_FACET.getVersion(selectedVersion);
- IProjectFacetVersion javaFv = JavaFacetUtils.compilerLevelToFacet(JavaFacetUtils.getCompilerLevel(project));
- IFacetedProject.Action uninstall = new IFacetedProject.Action(IFacetedProject.Action.Type.UNINSTALL, facetedProject.getInstalledVersion(webFacet), null);
- IDataModel webModelCfg = DataModelFactory.createDataModel(new WebFacetInstallDataModelProvider());
- webModelCfg.setBooleanProperty(IWebFacetInstallDataModelProperties.ADD_TO_EAR, false);
- // Get the default web root folder name (just in case the .component file doesn't exist for some reason)
- String webRoot = webModelCfg.getStringProperty(IWebFacetInstallDataModelProperties.CONFIG_FOLDER);
-
- IVirtualComponent c = ComponentCore.createComponent(project);
- c.create(0, null);
- if (c.exists()) {
- // Get the web root folder from the .component file
- IVirtualFolder root = c.getRootFolder();
- webRoot = root.getUnderlyingFolder().getName();
- // Store the name into the properties for use during facet instal
- webModelCfg.setStringProperty(IWebFacetInstallDataModelProperties.CONFIG_FOLDER, webRoot);
- }
-
- IDataModel javaModelCfg = null;
- if (ProductManager.shouldUseSingleRootStructure()){
- javaModelCfg = DataModelFactory.createDataModel(new JavaFacetInstallDataModelProvider());
- javaModelCfg.setProperty(IJavaFacetInstallDataModelProperties.DEFAULT_OUTPUT_FOLDER_NAME,
- webRoot+"/"+ J2EEConstants.WEB_INF_CLASSES); //$NON-NLS-1$
- }
-
- IFacetedProject.Action install = new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL,webFv,webModelCfg);
- IFacetedProject.Action javaInstall = new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, javaFv, javaModelCfg);
- Set set = new HashSet();
- set.add(uninstall);
- set.add(install);
- set.add(javaInstall);
- facetedProject.modify(set, new NullProgressMonitor());
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebProjectWizardInfo.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebProjectWizardInfo.java
deleted file mode 100644
index e8de100ce..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebProjectWizardInfo.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-
-public interface IWebProjectWizardInfo {
- /**
- * Adds entries to the class path for this project
- */
- public void addToClasspathEntries(IClasspathEntry[] entries);
-
- /**
- * Get the name of the specified project Creation date: (11/09/00 10:05:24 AM)
- *
- * @return java.lang.String
- */
- public String getProjectName();
-
- /**
- * Get the Enterprise Application Project
- */
- public String getEARProjectName();
-
- /**
- * Get the name of the web content folder. If not set then return the current default.
- */
- public String getWebContentName();
-
- /**
- * Set the name of the web content folder
- */
- public void setWebContentName(String name);
-
- /**
- * Get the name of the Java source folder If not set then return the current default.
- */
- public String getJavaSourceName();
-
- /**
- * Set the name of the Java source folder
- */
- public void setJavaSourceName(String name);
-
- /**
- * Return an Object for the assocated properties or null
- */
- public Object getProperty(String propertyName);
-
- /**
- * Set an Object for the assocated properties or null
- */
- public void setProperty(String propertyName, Object value);
-
-
-}
-
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingConstants.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingConstants.java
deleted file mode 100644
index 9c5053087..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingConstants.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-
-
-/*
- * The IConfigurationConstants are the list of tags that are usuable for specifying a web
- * application parameters via XML
- *
- * @see WebApplicationSpecification for the full DTD
- */
-
-public interface IWebToolingConstants {
-
- public String TRUE = "true"; //$NON-NLS-1$
- public String FALSE = "false"; //$NON-NLS-1$
-
- public String HTTP_PATH_PREFIX = "http://"; //$NON-NLS-1$
- public String INDEX_FILE = "index.html"; //$NON-NLS-1$
- public String HTTP_PARAMETER_SEPARATOR = "?"; //$NON-NLS-1$
- public String CONTENT_LENGTH_HEADER_KEY = "Content-Length"; //$NON-NLS-1$
-
- public String SENTENCE_TERMINATOR = "."; //$NON-NLS-1$
-
- public String POST_COMMAND = "POST"; //$NON-NLS-1$
- public String GET_COMMAND = "GET"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingCoreConstants.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingCoreConstants.java
deleted file mode 100644
index 1d9eaaaec..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/IWebToolingCoreConstants.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.web.operations;
-
-/**
- * The IWebToolingCoreConstants are the constants required by the ITP core
- */
-public interface IWebToolingCoreConstants {
- public String PLUG_IN_ID = "com.ibm.etools.webtools"; //$NON-NLS-1$
- public String PROP_SERVLET_JAR = "com.ibm.etools.webtools.servletjar"; //$NON-NLS-1$
- public String PROP_WEBAS_JAR = "com.ibm.etools.webtools.webasjar"; //$NON-NLS-1$
- public String PROP_CLIENT_NAME = "com.ibm.etools.webtools.clientname"; //$NON-NLS-1$
- public String PROP_LINK_STYLE = "com.ibm.etools.webtools.linkstyle"; //$NON-NLS-1$
- public String PROP_MODIFY_LINK_PROMPT = "com.ibm.etools.webtools.modifyprompt"; //$NON-NLS-1$
- public String PROP_AUTO_MODIFY_LINK = "com.ibm.etools.webtools.automodify"; //$NON-NLS-1$
- public String JDT_IDENTIFIER = "org.eclipse.jdt.ui"; //$NON-NLS-1$
- public String RUNTIME_IDENTIFIER = "WebNatureRuntime"; //$NON-NLS-1$
- public String DOC_RELATIVE = "DOC_RELATIVE"; //$NON-NLS-1$
- public String DOC_ROOT_RELATIVE = "DOC_ROOT_RELATIVE"; //$NON-NLS-1$
- public String ICON_PATH = "icons"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/MasterCSS.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/MasterCSS.java
deleted file mode 100644
index f17c1b7ed..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/MasterCSS.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-
-
-/**
- * Code generation class compiled from template file MasterCSS.tpl
- */
-public class MasterCSS implements WebToolingTemplate {
- private static final String TEXT_1 = "BODY\r\n{\r\n BACKGROUND-COLOR: #FFE4B5;\r\n COLOR: black;\r\n FONT-FAMILY: 'Times New Roman'\r\n}\r\nH1\r\n{\r\n COLOR: navy;\r\n FONT-FAMILY: 'Times New Roman';\r\n FONT-SIZE: x-large;\r\n FONT-WEIGHT: bolder;\r\n TEXT-TRANSFORM: capitalize\r\n}\r\nH2\r\n{\r\n COLOR: navy;\r\n FONT-FAMILY: 'Times New Roman';\r\n FONT-SIZE: large;\r\n FONT-WEIGHT: bolder;\r\n TEXT-TRANSFORM: capitalize\r\n}\r\nH3\r\n{\r\n COLOR: navy;\r\n FONT-FAMILY: 'Times New Roman';\r\n FONT-SIZE: large;\r\n FONT-WEIGHT: lighter;\r\n TEXT-TRANSFORM: capitalize\r\n}";//$NON-NLS-1$
- private static final String TEXT_2 = "\r\n";//$NON-NLS-1$
-
- /**
- * Code generation method
- *
- * @return String
- */
- public String generate(TemplateData data) {
- StringBuffer sb = new StringBuffer();
- sb.append(TEXT_1);
- sb.append(TEXT_2);
- return sb.toString();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/RelationData.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/RelationData.java
deleted file mode 100644
index fec530c38..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/RelationData.java
+++ /dev/null
@@ -1,994 +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.web.operations;
-
-
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-import java.util.Vector;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-
-
-/**
- * This class stores the relationship between two files. In particular, this is an inLink and the
- * files which reference it.
- */
-public class RelationData {
- public class Link implements Cloneable {
-
- private String url;
- private int occurrences = 0;
-
- public Link(String newUrl, int occ) {
- url = newUrl;
- occurrences = occ;
- }
-
- /**
- * Returns an exact copy of this object.
- *
- * @return Created clone object
- */
- public Object clone() {
- return new Link(url, occurrences);
- }
-
- /**
- * Returns the url of the file that references this inLink
- *
- * @return String
- */
- public String getURL() {
- return url;
- }
-
- /**
- * Returns the number of times this file references the inLink
- *
- * @return int
- */
- public int getOccurrences() {
- return occurrences;
- }
-
- private int addOccurrence(int add) {
- occurrences = occurrences + add;
- return occurrences;
- }
-
- public String toString() {
- return url;
- }
- }
-
- // our relationship table. Key is a string which is the path of the inLink,
- // value is a vector of files that reference the inLink.
- protected Hashtable inLinksTable = null;
- protected Hashtable anchorsTable = null;
- private static final int INIT_HASH_TABLE_SIZE = 100;
- private static final int INIT_ANCHORS_HASH_TABLE_SIZE = 10;
- private boolean fileOk = false;
- private static final String LINK_STATE_FILE_NAME = "link_table_states.txt";//$NON-NLS-1$
- private static final String LINK_SERVERCONTEXTROOT_FILE_NAME = "link_scr_states.txt";//$NON-NLS-1$
- public static final String LINK_MISSING_FILE = "-";//$NON-NLS-1$
- public static final String LINK_INDEX_SEPARATOR = "+";//$NON-NLS-1$
- public static final String ANCHOR_INDEX_SEPARATOR = "#";//$NON-NLS-1$
- public static final String LINK_OCCURENCE_SEPARATOR = "/";//$NON-NLS-1$
- public static final String ANCHOR_SEPARATOR = "#### ANCHORS ####";//$NON-NLS-1$
-
- /**
- * RelationData constructor comment.
- */
- public RelationData() {
- super();
- inLinksTable = new Hashtable(INIT_HASH_TABLE_SIZE);
- anchorsTable = new Hashtable(INIT_ANCHORS_HASH_TABLE_SIZE);
- }
-
- public Link addInLink(String file_path, String parent_path, int occurence) {
- Vector in_links = (Vector) inLinksTable.get(file_path);
- if (in_links == null) {
- return null;
- }
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- //
- // Increment the occurence and return
- //
-
- if (url.compareTo(parent_path) == 0) {
- inlnk.addOccurrence(occurence);
- return inlnk;
- }
- }
-
- //
- // The link does not exist, need to add an entry in the table for it
- //
-
- Link inlnk = new Link(parent_path, occurence);
- in_links.addElement(inlnk);
- return inlnk;
- }
-
- public void changeInLink(String filePath, boolean missing) {
-
- if (missing) {
- Vector inlinks = (Vector) inLinksTable.remove(filePath);
- inLinksTable.put(LINK_MISSING_FILE + filePath, inlinks);
- } else {
- Vector inlinks = (Vector) inLinksTable.remove(LINK_MISSING_FILE + filePath);
- inLinksTable.put(filePath, inlinks);
- }
- }
-
-
- /*
- * returns which projects depend on this file i.e. any projects that are in this file's list of
- * in_links
- */
- public Collection getDependentProjects(String file_path) {
- Hashtable outProjects = new Hashtable();
- Vector in_links = (Vector) inLinksTable.get(file_path);
-
- if (in_links != null) {
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
- // should be in the form of: /ProjName/....
- if (url.length() > 0) {
- // key could be the filename or the missing filename ("-" + filename)
- // take this into account and offset the index accordingly
- int index = 0;
- int offset = 1;
- if (url.charAt(0) == '-') {
- index = url.indexOf(IPath.SEPARATOR, 2);
- offset = 2;
- } else {
- index = url.indexOf(IPath.SEPARATOR, 1);
- offset = 1;
- }
- if (index != -1) {
- String projName = url.substring(offset, index);
- outProjects.put(projName, projName);
- }
- }
- }
- }
- return outProjects.values();
- }
-
- /*
- * returns which cross-project files depend on this file i.e. any projects that are in this
- * file's list of in_links
- */
- public Collection getDependentProjectFiles(String projName) {
- Hashtable outProjects = new Hashtable();
-
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String path = (String) aenum.nextElement();
- // should be in the form of: /ProjName/....
- if (path.length() > 0) {
- // if path is a missing filename ("-" + filename) then it means that it had
- // to come from this project (that is, the external nonexistent file could not have
- // linked to this project). So, we will not add this path. Also, since it is marked
- // broken, it probably won't exist to do anything with it anyway.
- if (path.charAt(0) != '-') {
- int index = path.indexOf(IPath.SEPARATOR, 1);
- if (index != -1) {
- String currentProjName = path.substring(1, index);
- if (!currentProjName.equals(projName)) {
- outProjects.put(path, path);
- }
- }
- }
- }
- }
- return outProjects.values();
- }
-
-
-
- public void createInLinkEntry(String file_path, String parent_path, int occurence) {
-
- Vector in_links = new Vector();
- Link inlnk = new Link(parent_path, occurence);
- in_links.addElement(inlnk);
- inLinksTable.put(file_path, in_links);
- }
-
-
-
- public void dump() {
- if (false) {
- if (inLinksTable != null) {
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- StringBuffer St = new StringBuffer();
- String key = (String) aenum.nextElement();
- St.append("\nKey=" + key + "\n");//$NON-NLS-1$//$NON-NLS-2$
- Vector in_links = (Vector) inLinksTable.get(key);
- int nb_of_links = in_links.size();
-
- // Replace the string by index
- // Add a '+'separator only for more than one links to save space
- //
-
-
- for (int i = 0; i < nb_of_links; i++) {
- Link lnk = (Link) in_links.elementAt(i);
- St.append("\tValue=" + lnk.getURL() + "[" + lnk.getOccurrences() + "]");//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logInfo(St.toString());
- }
- }
- }
- }
-
- public void dump(boolean dump) {
- if (dump) {
- if (inLinksTable != null) {
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- StringBuffer St = new StringBuffer();
- String key = (String) aenum.nextElement();
- St.append("\nKey=" + key + "\n");//$NON-NLS-1$//$NON-NLS-2$
- Vector in_links = (Vector) inLinksTable.get(key);
- int nb_of_links = in_links.size();
-
- // Replace the string by index
- // Add a '+'separator only for more than one links to save space
- //
-
-
- for (int i = 0; i < nb_of_links; i++) {
- Link lnk = (Link) in_links.elementAt(i);
- St.append("\tValue=" + lnk.getURL() + "[" + lnk.getOccurrences() + "]");//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(St.toString());
- }
- }
- }
- }
-
- /**
- * used for LinksBuilder debugging
- */
- public void dump2() {
- if (inLinksTable != null) {
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- StringBuffer St = new StringBuffer();
- String key = (String) aenum.nextElement();
-
- Vector in_links = (Vector) inLinksTable.get(key);
- int nb_of_links = in_links.size();
- St.append("\nKey=" + key + " -- num:" + nb_of_links + "\n");//$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- // Replace the string by index
- // Add a '+'separator only for more than one links to save space
- //
-
-
- for (int i = 0; i < nb_of_links; i++) {
- Link lnk = (Link) in_links.elementAt(i);
- St.append("\tValue=" + lnk.getURL() + "[" + lnk.getOccurrences() + "]");//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- }
- System.out.println(St.toString());
- }
- }
- System.out.println("************************************************\n\n\n\n************************************\n"); //$NON-NLS-1$
- }
-
-
- public Vector getInLinks(String filePath) {
- return (Vector) inLinksTable.get(filePath);
- }
-
- public void getInLinks(String filePath, Vector vectInLinks) {
-
- if (inLinksTable != null) {
- dump();
- Vector in_links = (Vector) inLinksTable.get(filePath);
- if (in_links != null) {
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) ((Link) in_links.elementAt(i)).clone();
- vectInLinks.addElement(inlnk);
- }
- }
- }
- }
-
- public Hashtable getAnchorsTable() {
- return anchorsTable;
- }
-
- /**
- * Returns the file used to store ServerContextRoot for the project.
- */
- public static File getPreviousSCRFile(IProject project) {
- return new Path(J2EEPlugin.getDefault().getStateLocation().toString() + File.separator + project.getName() + File.separator + LINK_SERVERCONTEXTROOT_FILE_NAME).toFile();
- }
-
- /**
- * Returns the file used to store the state of the link relations for the project.
- *
- * @return java.io.File The state file
- * @param project
- * org.eclipse.core.resources.IProject The project to get the state file for.
- */
- private File getStateFile(IProject project) {
- return new Path(J2EEPlugin.getDefault().getStateLocation().toString() + File.separator + project.getName() + File.separator + LINK_STATE_FILE_NAME).toFile();
- }
-
- public boolean hasInLinkEntry(String path) {
- return inLinksTable.containsKey(path);
- }
-
- /**
- * Run through all missing-file (-) RD entries to see if any of them closely match the path to
- * this class. Return all of the matches.
- */
- public Vector getPossibleMissingEndingMatches(IPath classPath) {
- Vector v = new Vector();
-
- String match = classPath.lastSegment();
- match = match.substring(0, match.length() - 6); // length minus ".class"
-
- String classPathStr = classPath.toString();
- String matchingClassPath = classPathStr.toString().substring(0, classPathStr.length() - 6);
-
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String path = (String) aenum.nextElement();
- // check if path ends with the class name that has been added/removed
- if (path.startsWith(LINK_MISSING_FILE) && path.endsWith(match)) {
- // OK: simple match found; now let's match with finer granularity.
- // Take path and put it into a form where we can check if it is a
- // close match to the class that has changed:
- // /Proj/Web Content/com.acme.Foo --> com/acme/Foo
- String linkPath;
- int index = path.lastIndexOf(IPath.SEPARATOR);
- if (index != -1 && index < path.length() - 1) {
- linkPath = path.substring(index + 1);
- } else {
- linkPath = path;
- }
- String closeMatch = linkPath.replace('.', IPath.SEPARATOR);
-
- if (matchingClassPath.endsWith(closeMatch)) {
- Vector in_links = (Vector) inLinksTable.get(path);
- String nonMissingPath = path.substring(1, path.length());
- changeInLink(nonMissingPath, false);
- if (in_links != null) {
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
- v.add(url);
- }
- }
- }
- }
- }
- return v;
- }
-
-
- /**
- * Run through all existing RD entries to see if any of them closely match the path to this
- * class. Return all of the matches.
- */
- public Vector getPossibleExistingEndingMatches(IPath classPath) {
- Vector v = new Vector();
-
- String match = classPath.lastSegment();
- match = match.substring(0, match.length() - 6); // length minus ".class"
-
- String classPathStr = classPath.toString();
- String matchingClassPath = classPathStr.toString().substring(0, classPathStr.length() - 6);
-
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String path = (String) aenum.nextElement();
- // check if path ends with the class name that has been added/removed
- if (path.endsWith(match) && !path.startsWith(LINK_MISSING_FILE)) {
- // OK: simple match found; now let's match with finer granularity.
- // Take path and put it into a form where we can check if it is a
- // close match to the class that has changed:
- // /Proj/Web Content/com.acme.Foo --> com/acme/Foo
- String linkPath;
- int index = path.lastIndexOf(IPath.SEPARATOR);
- if (index != -1 && index < path.length() - 1) {
- linkPath = path.substring(index + 1);
- } else {
- linkPath = path;
- }
- String closeMatch = linkPath.replace('.', IPath.SEPARATOR);
-
- if (matchingClassPath.endsWith(closeMatch)) {
- Vector in_links = (Vector) inLinksTable.get(path);
- changeInLink(path, true);
- if (in_links != null) {
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
- v.add(url);
- }
- }
- }
- }
- }
- return v;
- }
-
- /**
- * Run through all existing RD entries to see if any of them closely match the path to this
- * class. Remove the inlinks for all the matches.
- */
- public void removeInLinksPossibleExistingEndingMatches(IPath classPath) {
- String match = classPath.lastSegment();
- match = match.substring(0, match.length() - 6); // length minus ".class"
-
- String classPathStr = classPath.toString();
- String matchingClassPath = classPathStr.toString().substring(0, classPathStr.length() - 6);
-
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String path = (String) aenum.nextElement();
- if (path.endsWith(match) && !path.startsWith(LINK_MISSING_FILE)) {
- // OK: simple match found; now let's match with finer granularity.
- // Take path and put it into a form where we can check if it is a
- // close match to the class that has changed:
- // /Proj/Web Content/com.acme.Foo --> com/acme/Foo
- String linkPath;
- int index = path.lastIndexOf(IPath.SEPARATOR);
- if (index != -1 && index < path.length() - 1) {
- linkPath = path.substring(index + 1);
- } else {
- linkPath = path;
- }
- String closeMatch = linkPath.replace('.', IPath.SEPARATOR);
-
- if (matchingClassPath.endsWith(closeMatch)) {
- removeInLinks(path);
- }
- }
- }
- }
-
- /**
- * Initialize links tables
- */
- public void initialize() {
- inLinksTable = new Hashtable(INIT_HASH_TABLE_SIZE);
- anchorsTable = new Hashtable(INIT_ANCHORS_HASH_TABLE_SIZE);
-
- }
-
- /**
- * Initialize links tables
- */
- public void initializeAnchors() {
- anchorsTable = new Hashtable(INIT_ANCHORS_HASH_TABLE_SIZE);
- }
-
- /**
- * Initialize links tables
- */
- public void initializeInLinks() {
- inLinksTable = new Hashtable(INIT_HASH_TABLE_SIZE);
- }
-
- /**
- * Return true if the file to restore data from existed and was successfully read.
- *
- * @return boolean
- */
- public boolean isFileOk() {
- return fileOk;
- }
-
- public boolean isInitialized() {
- return (inLinksTable != null);
- }
-
- public void newInLinkEntry(String path) {
- if (!inLinksTable.containsKey(path))
- inLinksTable.put(path, new Vector());
- }
-
- public void removeInLinks(String file_path) {
-
- //
- // Iterate through the fLinksTable to remove all in-links references
- // for file_path
- //
-
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- Vector in_links = (Vector) inLinksTable.get(key);
-
- for (int i = 0; i < in_links.size(); i++) {
-
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
- in_links.removeElementAt(i);
- break;
- }
-
- //
- // Remove the entry in the fLinksTable if the in-link
- // of the file is not in the workbench and an orphan link
- // otherwise update the in-links fLinksTable
- //
- }
-
- if (in_links.isEmpty() && key.startsWith(LINK_MISSING_FILE)) {
- inLinksTable.remove(key);
- }
- }
- }
-
- /**
- * Iterate through the fLinksTable to return all out-links references for file_path
- *
- * @param file_path
- * @return
- */
- public List getOutLinks(String file_path) {
- ArrayList list = new ArrayList();
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- Vector in_links = (Vector) inLinksTable.get(key);
-
- for (int i = 0; i < in_links.size(); i++) {
-
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
- list.add(key);
- break;
- }
- }
- }
-
- return list;
- }
-
-
- /**
- * return whether other resources link to this file or not
- */
- public boolean referencedByOtherLinks(String file_path) {
-
- //
- // Iterate through the fLinksTable to remove all in-links references
- // for file_path
- //
- boolean referenced = false;
- for (Enumeration aenum = inLinksTable.keys(); !referenced && aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- Vector in_links = (Vector) inLinksTable.get(key);
-
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
- referenced = true;
- break;
- }
- }
- }
- return referenced;
- }
-
-
- /*
- * performs as removeInLinks( String ) ... But for performance reasons, this also additionally
- * returns a list of all the projects that this file is dependent upon. This is useful to get
- * this information, and then go to all of those projects' relation data and tell them to
- * removeInLinks for this file.
- */
- public Collection removeInLinksForProjects(String file_path) {
-
- //
- // Iterate through the fLinksTable to remove all in-links references
- // for file_path
- //
- Hashtable projects = new Hashtable();
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- Vector in_links = (Vector) inLinksTable.get(key);
-
- for (int i = 0; i < in_links.size(); i++) {
-
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
- // should be in the form of: /ProjName/....
- if (key.length() > 0) {
- // key could be the filename or the missing filename ("-" + filename)
- // take this into account and offset the index accordingly
- int index = 0;
- int offset = 1;
- if (key.charAt(0) == '-') {
- index = key.indexOf(IPath.SEPARATOR, 2);
- offset = 2;
- } else {
- index = key.indexOf(IPath.SEPARATOR, 1);
- offset = 1;
- }
- if (index != -1) {
- String projName = key.substring(offset, index);
- projects.put(projName, projName);
- }
- }
- in_links.removeElementAt(i);
- break;
- }
-
- //
- // Remove the entry in the fLinksTable if the in-link
- // of the file is not in the workbench and an orphan link
- // otherwise update the in-links fLinksTable
- //
- }
-
- if (in_links.isEmpty() && key.startsWith(LINK_MISSING_FILE))
- inLinksTable.remove(key);
- }
-
- return projects.values();
- }
-
-
-
- /**
- * performs as removeInLinks( String ) ... But for performance reasons, it additionally returns
- * which projects depend on this file. i.e. any projects that are in this file's list of
- * in_links
- */
- public Collection removeInLinksAndGetDependentProjects(String file_path) {
- //
- // Iterate through the fLinksTable to remove all in-links references
- // for file_path
- //
- Hashtable projects = new Hashtable();
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- Vector in_links = (Vector) inLinksTable.get(key);
-
- if (key.equals(RelationData.LINK_MISSING_FILE + file_path)) {
- int index = -1;
- for (int i = 0; i < in_links.size(); i++) {
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
- index = i;
- }
- if (url.length() > 1) {
- int projindex = url.indexOf(IPath.SEPARATOR, 1);
- if (projindex != -1) {
- String projName = url.substring(1, projindex);
- projects.put(projName, projName);
- }
- }
- }
- if (index != -1) {
- in_links.removeElementAt(index);
- }
-
- } else {
- for (int i = 0; i < in_links.size(); i++) {
-
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(file_path) == 0) {
-
- in_links.removeElementAt(i);
- break;
- }
-
- //
- // Remove the entry in the fLinksTable if the in-link
- // of the file is not in the workbench and an orphan link
- // otherwise update the in-links fLinksTable
- //
- }
- }
-
- if (in_links.isEmpty() && key.startsWith(LINK_MISSING_FILE)) {
- inLinksTable.remove(key);
- }
- }
- return projects.values();
- }
-
-
- /**
- * remove all references to a specific inLink. When removeOrphan is true the inLink entry is
- * removed as well, when there are no more refereces to it
- */
- public void removeInLinks(String inLinkEntry, String inLinkReference, boolean removeOrphan) {
-
- String key = inLinkEntry;
- Vector in_links = (Vector) inLinksTable.get(key);
-
- for (int i = 0; i < in_links.size(); i++) {
-
- Link inlnk = (Link) in_links.elementAt(i);
- String url = inlnk.getURL();
-
- if (url.compareTo(inLinkReference) == 0) {
- in_links.removeElementAt(i);
- break;
- }
- }
-
- // If there are no more references to the inLinkEntry
- // and the caller wants this orphan deleted then
- // remove the key from the table
- if (in_links.isEmpty() && removeOrphan)
- inLinksTable.remove(key);
-
- }
-
- /**
- * Restores this builder's saved state and returns whether it was successful in doing so.
- */
- public boolean restore(IProject project) {
- if (project != null) {
- // get the state
- File stateFile = getStateFile(project);
- if (stateFile.exists()) {
- inLinksTable = new Hashtable(INIT_HASH_TABLE_SIZE);
-
- // read inLinksTable from stateFile
- Vector keys = new Vector();
- Vector indices = new Vector();
- BufferedReader reader = null;
- try {
- reader = new BufferedReader(new FileReader(stateFile));
-
- String line = null;
- // while( ((line = reader.readLine()) != null) && !line.startsWith(
- // ANCHOR_SEPARATOR ) )
- while ((line = reader.readLine()) != null) {
- String buffer = line;
-
-
- // to take into account the possibility of links spanning multiple lines,
- // keep reading until we find a line that starts with an idicator
- // that the link is finished (a line beginning w/ LINK_INDEX_SEPARATOR)
- line = reader.readLine();
- while (line != null && !line.startsWith(LINK_INDEX_SEPARATOR)) {
- buffer = buffer + line;
- line = reader.readLine();
- }
- // add link string (/MyProj/file.html)
- if (buffer != null) {
- keys.addElement(buffer);
- }
- // add references line (+2/3...)
- if (line != null) {
- indices.addElement(line);
- } else {
- System.out.println(ProjectSupportResourceHandler.Syntax_Error_in_the_links_UI_); //$NON-NLS-1$ = "Syntax Error in the links state file"
- return false;
- }
- }
-
- // Use this to load anchor information
- // // Now let's add all of the extra anchor information
- // if ( line != null && line.startsWith( ANCHOR_SEPARATOR ) ) {
- // while( (line = reader.readLine()) != null )
- // {
- // String buffer = line;
- //
- // // to take into account the possibility of links spanning multiple lines,
- // // keep reading until we find a line that starts with an idicator
- // // that the link is finished (a line beginning w/ LINK_INDEX_SEPARATOR)
- // line = reader.readLine();
- // while ( line != null && !line.startsWith( ANCHOR_INDEX_SEPARATOR ) ) {
- // buffer = buffer + line;
- // line = reader.readLine();
- // }
- //
- // // add file and all of its anchors
- // if ( buffer != null && line != null)
- // {
- // anchorsTable.put( buffer, line );
- // }
- // else
- // {
- // System.out.println(ResourceHandler.getString("Syntax_Error_in_the_links_UI_"));
- // //$NON-NLS-1$ = "Syntax Error in the links state file"
- // return false;
- // }
- // }
- //
- // }
- } catch (FileNotFoundException fe) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(fe);
- } catch (IOException ie) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ie);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (IOException ie2) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ie2);
- }
- }
- }
-
-
- //
- // Populate the hash inLinksTable with keys (file paths) and values (in links files
- // paths)
- //
- fileOk = true;
- for (int i = 0; i < keys.size(); i++) {
- try {
- String key = (String) keys.elementAt(i);
- String compacted_indices = (String) indices.elementAt(i);
-
- //
- // Parse the in-links indexes
- //
-
- int size = keys.size();
- Vector in_links = new Vector();
- if (compacted_indices != LINK_INDEX_SEPARATOR) {
-
- // Extract indexes and occurences
-
- StringTokenizer st_idx_occ = new StringTokenizer(new String(compacted_indices), LINK_INDEX_SEPARATOR);
- while (st_idx_occ.hasMoreTokens()) {
- String idx_occ = new String(st_idx_occ.nextToken());
- int pos_occ = idx_occ.indexOf(LINK_OCCURENCE_SEPARATOR);
- int index;
- int occurence = 1;
- if (pos_occ == -1) {
- index = Integer.valueOf(idx_occ).intValue();
- } else {
- index = Integer.valueOf(idx_occ.substring(0, pos_occ)).intValue();
- occurence = Integer.valueOf(idx_occ.substring(pos_occ + 1)).intValue();
- }
- if (index >= 0 && index < size) {
- Link inlnk = new Link((String) keys.elementAt(index), occurence);
- in_links.addElement(inlnk);
- }
- }
- }
- inLinksTable.put(key, in_links);
- } catch (Exception e) {
- fileOk = false;
- }
- }
-
- return fileOk;
- }
- return false;
-
- }
-
- return false;
- }
-
- /**
- * Saves this builder's state to disk so that it can be restarted in the same state later.
- */
- public void save(IProject project) {
-
- File stateFile = getStateFile(project);
- if (inLinksTable == null) {
- stateFile.delete();
- } else {
-
- // Prepare the index vector
-
- Vector index_vector = new Vector(inLinksTable.size());
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- index_vector.addElement(aenum.nextElement());
- }
-
- // write inLinksTable to stateFile
-
- try {
- File parentFolder = stateFile.getParentFile();
- if (!parentFolder.exists()) {
- parentFolder.mkdirs();
- }
- PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(stateFile)));
- for (Enumeration aenum = inLinksTable.keys(); aenum.hasMoreElements();) {
- String key = (String) aenum.nextElement();
- out.print(key);
- out.println();
- out.print(LINK_INDEX_SEPARATOR);
- Vector in_links = (Vector) inLinksTable.get(key);
- int nb_of_links = in_links.size();
-
- // Replace the string by index
- // Add a '+'separator only for more than one links to save space
- // Add '/<occurence>' only if occurence > 1 to save space
- //
-
- Link lnk = null;
- int nb_lnks = 0;
- if (nb_of_links > 0) {
- lnk = (Link) in_links.elementAt(0);
- out.print(index_vector.indexOf(lnk.getURL()));
- nb_lnks = lnk.getOccurrences();
- if (nb_lnks > 1) {
- out.print(LINK_OCCURENCE_SEPARATOR);
- out.print(nb_lnks);
- }
- for (int i = 1; i < nb_of_links; i++) {
- out.print(LINK_INDEX_SEPARATOR);
- lnk = (Link) in_links.elementAt(i);
- out.print(index_vector.indexOf(lnk.getURL()));
- nb_lnks = lnk.getOccurrences();
- if (nb_lnks > 1) {
- out.print(LINK_OCCURENCE_SEPARATOR);
- out.print(nb_lnks);
- }
- }
- }
- out.println();
- }
- /*
- * use this to save out anchor information //
- * ############################################ if ( !anchorsTable.isEmpty() ) {
- * out.println( ANCHOR_SEPARATOR ); } for (Enumeration enum = anchorsTable.keys();
- * enum.hasMoreElements();) { String key = (String) enum.nextElement();
- * out.print(key); out.println(); //out.print(ANCHOR_INDEX_SEPARATOR); out.println(
- * anchorsTable.get(key) ); }
- */
-
- out.flush();
- out.close();
- } catch (IOException e) {
- org.eclipse.jem.util.logger.proxy.Logger.getLogger().logError(ProjectSupportResourceHandler.Error_while_saving_links_s_EXC_); //$NON-NLS-1$ = "Error while saving links state file"
- }
- }
- }
-
- /**
- * Insert the method's description here. Creation date: (3/21/2001 1:45:58 PM)
- *
- * @param newFileOk
- * boolean
- */
- void setFileOk(boolean newFileOk) {
- fileOk = newFileOk;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ServerTargetUtil.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ServerTargetUtil.java
deleted file mode 100644
index 5003dc621..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/ServerTargetUtil.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.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 12, 2003
- */
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.internal.servertarget.IServerTargetConstants;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-
-/**
- * A class with some useful methods that support server targetting for Web projects.
- *
- * @author Pratik Shah
- */
-public class ServerTargetUtil {
-
- private static final String defaultId = "com.ibm.etools.websphere.serverTarget.base.v51"; //$NON-NLS-1$
- private static final String defaultExpressId = "com.ibm.etools.websphere.serverTarget.express.v51"; //$NON-NLS-1$
-
- /**
- * @param targets
- * A list of IServerTargets
- * @return The index of the target server with the
- * {@link #getDefaultServerTargetId() default Id}; or 0, if it could not be found.
- */
- public static int findDefaultServerTargetIndex(List targets) {
- int index = 0;
- for (int i = 0; i < targets.size(); i++) {
- IRuntime target = (IRuntime) targets.get(i);
- if (target.getId().equals(getDefaultServerTargetId())) {
- index = i;
- break;
- }
- }
- return index;
- }
-
- /**
- * @param target
- * The IServerTarget that has to be found in the given list; it can be
- * <code>null</code>
- * @param list
- * The List from which the IServerTarget has to be found
- *
- * @return The index of the given target in the given list; or 0, if the given target could not
- * be found in the given list. Two IServerTargets are considered to be equal if they
- * have the same ID.
- */
- public static int findIndexOf(IRuntime target, List list) {
- int index = 0;
- if (target != null) {
- for (int i = 0; i < list.size(); i++) {
- IRuntime element = (IRuntime) list.get(i);
- if (element.equals(target)) {
- index = i;
- break;
- }
- }
- }
- return index;
- }
-
- /**
- * @return the Id of the target server that should be selected by default
- */
- public static String getDefaultServerTargetId() {
- String id = defaultExpressId;
- if (J2EEPlugin.isEJBSupportAvailable()) {
- id = defaultId;
- }
- return id;
- }
-
- /**
- * @param isJ2EE13
- * <code>true</code> if the constant for J2EE version 1.3 is desired
- * @return IServerTargetConstants.J2EE_12 or IServerTargetConstants.J2EE_13
- */
- public static String getJ2EEVersion(boolean isJ2EE13) {
- return isJ2EE13 ? IServerTargetConstants.J2EE_13 : IServerTargetConstants.J2EE_12;
- }
-
- /**
- * A convenient method that takes in a list of IServerTargets and returns an array of labels of
- * the IServerTargets in the given list.
- *
- * @param serverTargets
- * The list of IServerTargets
- * @return An array lof labels of the IServerTargets in the given list
- */
- public static String[] getServerNames(List serverTargets) {
- String[] result = new String[serverTargets.size()];
- for (int i = 0; i < result.length; i++) {
- IRuntime runtime = (IRuntime) serverTargets.get(i);
- result[i] = runtime.getName() + " (" + runtime.getRuntimeType().getName() + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- return result;
- }
-
- /**
- * @param prjName
- * name of the project whose ServerTarget has to be retrieved; it can be
- * <code>null</code>
- *
- * @return the ServerTarget of the given project; <code>null</code> if the project does not
- * exist or its ServerTarget is not specified.
- */
- public static IRuntime getServerTarget(String prjName) {
- if (prjName != null && !prjName.trim().equals("")) { //$NON-NLS-1$
- IProject prj = ResourcesPlugin.getWorkspace().getRoot().getProject(prjName);
- if (prj != null && prj.exists()) {
- return ServerCore.getProjectProperties(prj).getRuntimeTarget();
- }
- }
- return null;
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/TemplateData.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/TemplateData.java
deleted file mode 100644
index 092e80054..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/TemplateData.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-
-
-public class TemplateData {
- protected java.lang.String wtFileName = "";//$NON-NLS-1$
- protected java.lang.String wtCSSName = "";//$NON-NLS-1$
- protected java.lang.String wtContainerLocatoin = "";//$NON-NLS-1$
- protected java.lang.String taglibs;
-
- /**
- * TemplateData constructor comment.
- */
- public TemplateData() {
- super();
- }
-
- /**
- */
- public String getContainerLocatoin() {
- return wtContainerLocatoin;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/4/2001 5:24:30 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getCSSName() {
- return wtCSSName;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/4/2001 5:22:56 PM)
- *
- * @return java.lang.String
- */
- public String getFileName() {
- return wtFileName;
- }
-
- /**
- * Insert the method's description here. Creation date: (11/15/2001 4:16:10 PM)
- *
- * @return java.lang.String
- */
- public java.lang.String getTaglibs() {
- return taglibs;
- }
-
- /**
- */
- public void setContainerLocatoin(String newFileName) {
- wtContainerLocatoin = newFileName;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/4/2001 5:24:30 PM)
- *
- * @param newCSSName
- * java.lang.String
- */
- public void setCSSName(java.lang.String newCSSName) {
- wtCSSName = newCSSName;
- }
-
- /**
- * Insert the method's description here. Creation date: (6/4/2001 5:22:56 PM)
- *
- * @param newWtFileName
- * java.lang.String
- */
- public void setFileName(String newFileName) {
- wtFileName = newFileName;
- }
-
- /**
- * Insert the method's description here. Creation date: (11/15/2001 4:16:10 PM)
- *
- * @param newTaglibs
- * java.lang.String
- */
- public void setTaglibs(java.lang.String newTaglibs) {
- taglibs = newTaglibs;
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebPropertiesUtil.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebPropertiesUtil.java
deleted file mode 100644
index acf43e94b..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebPropertiesUtil.java
+++ /dev/null
@@ -1,585 +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.web.operations;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
-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.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.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jdt.core.IClasspathEntry;
-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.jem.workbench.utility.JemProjectUtilities;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-
-import com.ibm.icu.util.StringTokenizer;
-
-public class WebPropertiesUtil {
- // private static final char[] BAD_CHARS = {'/', '\\', ':'};
- private static final char[] BAD_CHARS = {':'};
- public static final String DEFAULT_JAVA_SOURCE_NAME = "Java Source"; //$NON-NLS-1$
- //TODO Port to flexible structure
- /**
- * Update the Web Content folder to a new value if it is different. This applies to both Static
- * and J2EE Web Projects. In the case of a J2EE Project, the library classpath entries will be
- * modifies to reflect the new location.
- *
- * @param project
- * The Web Project to update
- * @param webContentName
- * The new name given to the Web Project's Web Content folder
- * @param progressMonitor
- * Indicates progress of the update operation
- * @return True if the web content rename was actually renamed, false if unneeded.
- * @throws CoreException
- * The exception that occured during renaming of the the project's web content
- * folder
- */
- public static boolean updateWebContentNameAndProperties(IProject project, String webContentName, IProgressMonitor progressMonitor) throws CoreException {
- boolean success = false;
- if (project.exists() && project.isOpen()) {
-
- /*
- * IBaseWebNature webNature = J2EEWebNatureRuntimeUtilities.getRuntime(project); if
- * (webContentName == null) { if (webNature.isStatic()) { webContentName =
- * J2EEWebNatureRuntimeUtilities.getDefaultStaticWebContentName(); } else {
- * webContentName = J2EEWebNatureRuntimeUtilities.getDefaultJ2EEWebContentName(); } }
- */
-
- IPath newPath = new Path(webContentName);
- if (getModuleServerRoot(project).getProjectRelativePath().equals(newPath))
- return false;
- if (project.exists(newPath)) {
- IStatus status = new Status(IStatus.ERROR, "org.eclipse.jst.j2ee", IStatus.OK, ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Could_not_rename_____2, new Object[]{webContentName}), null); //$NON-NLS-1$ //$NON-NLS-2$
- throw new CoreException(status);
- }
-
- moveWebContentFolder(project, webContentName, progressMonitor);
- updateWebContentNamePropertiesOnly(project, webContentName, progressMonitor);
- success = true;
- }
- return success;
- }
-
- /**
- * Update the classpath entries and Server Root Name for this web project only.
- *
- * @param project
- * @param webContentName
- * @return
- */
- public static void updateWebContentNamePropertiesOnly(IProject project, String webContentName, IProgressMonitor progressMonitor) throws CoreException {
- IPath newPath = new Path(webContentName);
- if (getModuleServerRoot(project).equals(newPath))
- return;
-
- if (!getModuleServerRoot(project).equals(webContentName)) {
-
- // if (webModuleArtifact.isJ2EE) {
- // Update the library references
- IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
-
- IClasspathEntry[] classpath = javaProject.getRawClasspath();
- IClasspathEntry[] newClasspath = new IClasspathEntry[classpath.length];
-
- for (int i = 0; i < classpath.length; i++) {
- if (classpath[i].getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
- IClasspathEntry library = classpath[i];
- IPath libpath = library.getPath();
- IPath modServerRootPath = getModuleServerRoot(project).getFullPath();
- if (modServerRootPath.isPrefixOf(libpath)) {
- IPath prunedPath = libpath.removeFirstSegments(modServerRootPath.segmentCount());
- IPath relWebContentPath = new Path(webContentName + "/" + prunedPath.toString()); //$NON-NLS-1$
- IResource absWebContentPath = project.getFile(relWebContentPath);
-
- IPath srcAttachmentPath = library.getSourceAttachmentPath();
- if (null != srcAttachmentPath) {
- prunedPath = srcAttachmentPath.removeFirstSegments(modServerRootPath.segmentCount());
- }
- IResource absWebContentSrcAttachmentPath = project.getFile(relWebContentPath);
-
- newClasspath[i] = JavaCore.newLibraryEntry(absWebContentPath.getFullPath(), absWebContentSrcAttachmentPath.getFullPath(), library.getSourceAttachmentRootPath(), library.isExported());
-
- } else {
- newClasspath[i] = classpath[i];
- }
-
- } else {
- newClasspath[i] = classpath[i];
- }
- // }
-
- // Set the java output folder
- IFolder outputFolder = project.getFolder(getModuleServerRoot(project).getFullPath());
- javaProject.setRawClasspath(newClasspath, outputFolder.getFullPath(), new SubProgressMonitor(progressMonitor, 1));
- }
- // update websettings
- // TODO add to WebArtifactEdit
- // webNature.setModuleServerRootName(webContentName);
- }
- }
-
- /**
- * Moves the web content folder to the name indicated only if that path doesn't already exist in
- * the project.
- *
- * @param project
- * The web project to be updated.
- * @param webContentName
- * The new web content name
- * @param progressMonitor
- * Indicates progress
- * @throws CoreException
- * The exception that occured during move operation
- */
- public static void moveWebContentFolder(IProject project, String webContentName, IProgressMonitor progressMonitor) throws CoreException {
- IPath newPath = new Path(webContentName);
- if (!project.exists(newPath)) {
- if (newPath.segmentCount() > 1) {
- for (int i = newPath.segmentCount() - 1; i > 0; i--) {
- IPath tempPath = newPath.removeLastSegments(i);
- IFolder tempFolder = project.getFolder(tempPath);
- if (!tempFolder.exists()) {
- tempFolder.create(true, true, null);
- }
- }
- }
- newPath = project.getFullPath().append(newPath);
- IContainer webContentRoot = getModuleServerRoot(project);
- IPath oldPath = webContentRoot.getProjectRelativePath();
- webContentRoot.move(newPath, IResource.FORCE | IResource.KEEP_HISTORY, new SubProgressMonitor(progressMonitor, 1));
- for (int i = 0; i < oldPath.segmentCount(); i++) {
- IPath tempPath = oldPath.removeLastSegments(i);
- IFolder tempFolder = project.getFolder(tempPath);
- if (tempFolder.exists() && tempFolder.members().length == 0) {
- tempFolder.delete(true, true, null);
- }
- }
- }
- }
-
- /**
- * Synchonizies the class path and the lib directories to catch any changes from the last use
- * Creation date: (4/17/01 11:48:12 AM)
- */
- protected static void synch(IProject project, IProgressMonitor monitor) {
-
- try {
- if (monitor == null) {
- monitor = new NullProgressMonitor();
- }
- monitor.beginTask(ProjectSupportResourceHandler.Sychronize_Class_Path_UI_, 4); //$NON-NLS-1$
- //$NON-NLS-1$ = "Sychronize Class Path"
-
- IContainer lib_folder = getWebLibFolder(project);
- // Nothing to do if the lib folder does not exist.
- if (lib_folder == null || !lib_folder.isAccessible())
- return;
- IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
- IPath lib_path = lib_folder.getProjectRelativePath();
- IPath lib_full_path = lib_folder.getFullPath();
-
- IClasspathEntry[] cp = javaProject.getRawClasspath();
-
- boolean needsToBeModified = false;
- // Create a map of the lib projects in the current project
- Hashtable lib_jars = new Hashtable();
- IResource[] children = lib_folder.members();
- monitor.subTask(ProjectSupportResourceHandler.Catalog_Lib_Directory__UI_); //$NON-NLS-1$
- //$NON-NLS-1$ = "Catalog Lib Directory:"
- for (int j = 0; j < children.length; j++) {
- IResource child = children[j];
- // monitor.setTaskName(ResourceHandler.getString("Catalog_Lib_Directory__UI_") +
- // child); //$NON-NLS-1$ = "Catalog Lib Directory:"
- // Make sure it is a zip or a jar file
- if (child.getType() == IResource.FILE && (child.getFullPath().toString().toLowerCase().endsWith(".jar") //$NON-NLS-1$
- || child.getFullPath().toString().toLowerCase().endsWith(".zip"))) { //$NON-NLS-1$
- lib_jars.put(child.getFullPath(), child);
- }
-
- }
-
- monitor.worked(1);
- monitor.subTask(ProjectSupportResourceHandler.Update_ClassPath__UI_); //$NON-NLS-1$
- //$NON-NLS-1$ = "Update ClassPath:"
- // Loop through all the classpath dirs looking for ones that may have
- // been deleted
- Vector newClassPathVector = new Vector();
- for (int j = 0; j < cp.length; j++) {
-
- // If it is a lib_path
- if (cp[j].getPath().toString().startsWith(lib_path.toString()) || cp[j].getPath().toString().startsWith(lib_full_path.toString())) {
- // It was already in the class path
- if (lib_jars.get(cp[j].getPath()) != null) {
- newClassPathVector.add(cp[j]);
- // Remove it from the hash table of paths to add back
- // monitor.setTaskName(ResourceHandler.getString("Catalog_Lib_Directory__UI_")
- // + cp[j].getPath()); //$NON-NLS-1$ = "Catalog Lib Directory:"
- lib_jars.remove(cp[j].getPath());
-
- } else {
- // You have removed something form the class path you
- // will need to re-build
- // monitor.setTaskName(ResourceHandler.getString("Catalog_Lib_Directory_Remo_UI_")
- // + cp[j].getPath()); //$NON-NLS-1$ = "Catalog Lib Directory:Remove "
- needsToBeModified = true;
- }
- } else {
- monitor.subTask(ProjectSupportResourceHandler.Catalog_Lib_Directory__UI_ + cp[j].getPath()); //$NON-NLS-1$
- //$NON-NLS-1$ = "Catalog Lib Directory:"
- newClassPathVector.add(cp[j]);
- }
- }
- monitor.worked(1);
- monitor.subTask(ProjectSupportResourceHandler.Update_ClassPath__UI_); //$NON-NLS-1$
- //$NON-NLS-1$ = "Update ClassPath:"
-
- // Add any entries not already found
- Enumeration aenum = lib_jars.keys();
- while (aenum.hasMoreElements()) {
- IPath path = (IPath) aenum.nextElement();
- newClassPathVector.add(JavaCore.newLibraryEntry(path, null, null));
- // You have added something form the class path you
- // will need to re-build
- // monitor.setTaskName(ResourceHandler.getString("23concat_UI_", (new Object[] {
- // path }))); //$NON-NLS-1$ = "Catalog Lib Directory:Add {0}"
- needsToBeModified = true;
- }
-
- monitor.worked(1);
- monitor.subTask(ProjectSupportResourceHandler.Set_ClassPath__UI_); //$NON-NLS-1$
- //$NON-NLS-1$ = "Set ClassPath:"
-
- // Tansfer the vector to an array
- IClasspathEntry[] newClassPathArray = new IClasspathEntry[newClassPathVector.size()];
-
- for (int j = 0; j < newClassPathArray.length; j++) {
- newClassPathArray[j] = (IClasspathEntry) newClassPathVector.get(j);
- }
-
- // Only change the class path if there has been a modification
- if (needsToBeModified) {
-
- try {
- javaProject.setRawClasspath(newClassPathArray, monitor);
- } catch (Exception e) {
- Logger.getLogger().log(e);
- }
- }
-
- } catch (ClassCastException ex) {
- Logger.getLogger().log(ex);
- } catch (CoreException ex) {
- Logger.getLogger().log(ex);
- } finally {
- monitor.done();
- }
- }
-
- public static void updateContextRoot(IProject project, String contextRoot) {
- if (project.exists() && project.isOpen()) {
- WebArtifactEdit webEdit = null;
- try {
- // TODO migrate to flex projects
- // webEdit = (WebArtifactEdit) StructureEdit.getFirstArtifactEditForRead(project);
- if (webEdit != null)
- webEdit.setServerContextRoot(contextRoot);
- } finally {
- if (webEdit != null)
- webEdit.dispose();
- }
-
- }
- }
-
-
- /**
- * @param project
- * org.eclipse.core.resources.IProject
- */
- /**
- * Returns a error message that states whether a context root is valid or not returns null if
- * context root is fine
- *
- * @return java.lang.String
- * @param contextRoot
- * java.lang.String
- */
- public static String validateContextRoot(String contextRoot) {
-
- if (contextRoot == null)
- return null;
-
- String errorMessage = null;
-
- String name = contextRoot;
- if (name.equals("") || name == null) { //$NON-NLS-1$
- // this was added because the error message shouldnt be shown initially. It should be
- // shown only if context root field is edited to
- errorMessage = ProjectSupportResourceHandler.Context_Root_cannot_be_empty_2; //$NON-NLS-1$
- return errorMessage;
- }
-
- /*******************************************************************************************
- * // JZ - fix to defect 204264, "/" is valid in context root if (name.indexOf("//") != -1) {
- * //$NON-NLS-1$ errorMessage = "// are invalid characters in a resource name"; return
- * errorMessage; }
- ******************************************************************************************/
-
- if (name.trim().equals(name)) {
- StringTokenizer stok = new StringTokenizer(name, "."); //$NON-NLS-1$
- outer : while (stok.hasMoreTokens()) {
- String token = stok.nextToken();
- for (int i = 0; i < token.length(); i++) {
- if (!(token.charAt(i) == '_') && !(token.charAt(i) == '-') && !(token.charAt(i) == '/') && Character.isLetterOrDigit(token.charAt(i)) == false) {
- if (Character.isWhitespace(token.charAt(i))) {
- // Removed because context roots can contain white space
- // errorMessage =
- // ResourceHandler.getString("_Context_root_cannot_conta_UI_");//$NON-NLS-1$
- // = " Context root cannot contain whitespaces."
- } else {
- errorMessage = ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.The_character_is_invalid_in_a_context_root, new Object[]{(new Character(token.charAt(i))).toString()}); //$NON-NLS-1$
- break outer;
- }
- }
- }
- }
- } // en/ end of if(name.trim
- else
- errorMessage = ProjectSupportResourceHandler.Names_cannot_begin_or_end_with_whitespace_5; //$NON-NLS-1$
-
- return errorMessage;
- }
-
-
- /**
- * Return true if the string contains any of the characters in the array.
- */
- private static boolean contains(String str, char[] chars) {
- for (int i = 0; i < chars.length; i++) {
- if (str.indexOf(chars[i]) != -1)
- return true;
- }
- return false;
- }
-
-
- public static String validateFolderName(String folderName) {
- if (folderName.length() == 0)
- return ProjectSupportResourceHandler.Folder_name_cannot_be_empty_2; //$NON-NLS-1$
-
- if (contains(folderName, BAD_CHARS))
- return ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Folder_name_is_not_valid, new Object[]{folderName}); //$NON-NLS-1$
-
- return null;
- }
-
-
- public static String validateWebContentName(String webContentName, IProject project, String javaSourceName) {
-
- String msg = validateFolderName(webContentName);
- if (msg != null)
- return msg;
-
- if (javaSourceName != null && webContentName.equals(javaSourceName))
- return ProjectSupportResourceHandler.Folder_names_cannot_be_equal_4; //$NON-NLS-1$
-
- // If given a java project, check to make sure current package fragment
- // root folders do not overlap with new web content name
- if (project != null) {
- IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
- if (javaProject != null) {
- try {
- IPackageFragmentRoot roots[] = javaProject.getPackageFragmentRoots();
- for (int i = 0; i < roots.length; i++) {
- IPackageFragmentRoot root = roots[i];
- if (!root.isArchive()) {
- IResource resource = root.getCorrespondingResource();
- if (resource.getType() == IResource.FOLDER) {
- IPath path = resource.getFullPath();
- String rootFolder = path.segment(1);
- if (webContentName.equals(rootFolder)) {
- if (root.getKind() == IPackageFragmentRoot.K_SOURCE)
- return ProjectSupportResourceHandler.Folder_name_cannot_be_the_same_as_Java_source_folder_5; //$NON-NLS-1$
-
- return ProjectSupportResourceHandler.Folder_name_cannot_be_the_same_as_Java_class_folder_6; //$NON-NLS-1$
- }
- }
- }
- }
- } catch (JavaModelException e) {
- return null;
- }
- }
- }
-
- return null;
- }
-
-
- /**
- * Update given web nature to the current version if necessary.
- *
- * @param webNature
- * The web Nature that should be examined.
- * @return True if successful, false if unnecessary.
- * @throws CoreException
- * The exception that occured during the version change operation.
- */
- /*
- * static public boolean updateNatureToCurrentVersion(J2EEWebNatureRuntime webNature) throws
- * CoreException {
- *
- * boolean success = false;
- *
- * if (webNature.getVersion() != WEB.CURRENT_VERSION) {
- * webNature.setVersion(J2EESettings.CURRENT_VERSION); success = true; }
- * ((J2EEModuleWorkbenchURIConverterImpl)
- * webNature.getResourceSet().getURIConverter()).recomputeContainersIfNecessary();
- *
- * return success; }
- */
-
- /**
- * Move the old source folder to the new default folder.
- *
- * @param project
- * The Web Project we are working with.
- * @param oldSourceFolder
- * The old "Java Source" folder that will be moved.
- * @param javaSourceName
- * The new name of the "Java Source" folder, or null for default.
- * @return The location of the new folder, or null if no move was necessary.
- * @throws CoreException
- * The exception that occured during the move operation.
- */
- static public IContainer updateJavaSourceName(IProject project, IContainer oldSourceFolder, String javaSourceName, IProgressMonitor progressMonitor) throws CoreException {
- IContainer newSourceFolder = null;
- if (oldSourceFolder != null) {
- IPath newPath;
- if (javaSourceName == null)
- newPath = new Path(DEFAULT_JAVA_SOURCE_NAME);
- else
- newPath = new Path(javaSourceName);
-
- // Make sure new path is different form old path
- if (!project.getFolder(newPath).getFullPath().equals(oldSourceFolder.getFullPath())) {
- oldSourceFolder.move(newPath, IResource.FORCE | IResource.KEEP_HISTORY, new SubProgressMonitor(progressMonitor, 1));
- JemProjectUtilities.removeFromJavaClassPath(project, oldSourceFolder);
- newSourceFolder = project.getFolder(newPath);
- JemProjectUtilities.appendJavaClassPath(project, JavaCore.newSourceEntry(project.getFolder(newPath).getFullPath()));
- }
- }
- return newSourceFolder;
- }
-
-
- /**
- * Get the source folder that should be used for migration.
- *
- * @param project
- * The Web Project to examine.
- * @return The source folder to use in migration, or null if it should be skipped.
- */
- static public IContainer getJavaSourceFolder(IProject project) {
- List sourceRoots = JemProjectUtilities.getSourceContainers(project);
- IContainer oldSourceFolder = null;
-
- if (sourceRoots != null) {
- if (sourceRoots.size() == 1) {
- IContainer sourceFolder = (IContainer) sourceRoots.get(0);
- if (sourceFolder instanceof IFolder) {
- oldSourceFolder = sourceFolder;
- }
- }
- }
- return oldSourceFolder;
- }
-
- public static IFolder getModuleServerRoot(IProject project) {
- // TODO need to implement module server root properly
- IPath compRootPath = ComponentCore.createComponent(project).getRootFolder().getUnderlyingFolder().getProjectRelativePath();
- return project.getFolder(compRootPath);
- //return project.getFolder("WebContent");
-
- }
-
- public static IVirtualFolder getWebLibFolder(IVirtualComponent webComponent) {
- IPath path = new Path(J2EEConstants.WEB_INF + "/" + "lib");
- IVirtualFolder libFolder = webComponent.getRootFolder().getFolder(path);
- return libFolder;
- }
-
- //TODO delete jsholl
- /**
- * @deprecated use getWebLibFolder(IVirtualComponent webComponent)
- * @param project
- * @return
- */
- public static IContainer getWebLibFolder(IProject project) {
- return getWebLibFolder(ComponentCore.createComponent(project)).getUnderlyingFolder();
- }
-
- //
- // static public boolean isImportedClassesJARFileInLibDir(IResource resource) {
- // if (resource == null || !resource.exists())
- // return false;
- // return resource.getType() == resource.FILE &&
- // resource.getName().endsWith(IWebNatureConstants.IMPORTED_CLASSES_SUFFIX) && isZip(resource);
- // }
- //
- // static public boolean isLibDirJARFile(IResource resource) {
- // if (resource == null || !resource.exists())
- // return false;
- // return resource.getType() == resource.FILE && isZip(resource);
- // }
- //
- // static public boolean isZip(IResource resource) {
- // String path = resource.getLocation().toOSString();
- // ZipFile zip = null;
- //
- // try {
- // zip = new ZipFile(path);
- // } catch (IOException notAZip) {
- // return false;
- // } finally {
- // if (zip != null) {
- // try {
- // zip.close();
- // } catch (IOException ex) {}
- // }
- // }
- // return zip != null;
- // }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingException.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingException.java
deleted file mode 100644
index a60bf8522..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingException.java
+++ /dev/null
@@ -1,99 +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.web.operations;
-
-
-
-import java.io.IOException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.xml.sax.SAXException;
-
-
-/**
- * The WebToolingException class is the generic class for exceptions generated by the web tooling.
- */
-public class WebToolingException extends Exception {
- public static final String SAX_ERROR_MESSAGE = ProjectSupportResourceHandler.Operation_failed_due_to_SA_ERROR_; //$NON-NLS-1$ = "Operation failed due to SAX error: "
- public static final String IO_ERROR_MESSAGE = ProjectSupportResourceHandler.Operation_failed_due_to_IO_ERROR_; //$NON-NLS-1$ = "Operation failed due to IO error: "
- public static final String CORE_ERROR_MESSAGE = ProjectSupportResourceHandler.Operation_failed_due_to_Co_ERROR_; //$NON-NLS-1$ = "Operation failed due to Core error: "
- public static final String JAVA_MODEL_ERROR_MESSAGE = ProjectSupportResourceHandler.Operation_failed_due_to_Ja_ERROR_; //$NON-NLS-1$ = "Operation failed due to Java Model error: "
-
- /**
- * Create a new WebToolingException with no message.
- */
- public WebToolingException() {
- super();
- }
-
- /**
- * Create a new instance of the receiver for a supplied IO Exception
- *
- * @param message
- * java.lang.String
- */
- public WebToolingException(IOException exception) {
- this(IO_ERROR_MESSAGE, exception);
- }
-
- /**
- * Create a new WebToolingException with error message of s.
- *
- * @param s
- * java.lang.String
- */
- public WebToolingException(String s) {
- super(s);
- }
-
- /**
- * Create a new instance of the receiver with the supplied preamble and the message of the
- * example appended to the end.
- *
- * @param message
- * java.lang.String
- */
- public WebToolingException(String preamble, Throwable exception) {
- this(preamble + exception.getMessage());
- }
-
- /**
- * Create a new instance of the receiver for a supplied CoreException
- *
- * @param exception
- * CoreException
- */
- public WebToolingException(CoreException exception) {
- this(CORE_ERROR_MESSAGE, exception);
- }
-
- /**
- * Create a new instance of the receiver for a supplied JavaModelException.
- *
- * @param exception
- * JavaModelException
- */
- public WebToolingException(JavaModelException exception) {
- this(JAVA_MODEL_ERROR_MESSAGE, exception);
- }
-
- /**
- * Create a new instance of the receiver for a supplied SAX Exception
- *
- * @param exception
- * SAXException
- */
- public WebToolingException(SAXException exception) {
- this(SAX_ERROR_MESSAGE, exception);
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingTemplate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingTemplate.java
deleted file mode 100644
index 7c9f60725..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/operations/WebToolingTemplate.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/***************************************************************************************************
- * Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors: IBM Corporation - initial API and implementation
- **************************************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.operations;
-
-public interface WebToolingTemplate {
- /**
- * Insert the method's description here. Creation date: (12/6/2000 7:35:38 PM)
- *
- * @param data
- * TemplateData
- */
- public String generate(TemplateData data);
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebArtifactEditUtilities.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebArtifactEditUtilities.java
deleted file mode 100644
index be022f87c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebArtifactEditUtilities.java
+++ /dev/null
@@ -1,42 +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.internal.web.util;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-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.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-
-public class WebArtifactEditUtilities {
-
- public static IVirtualComponent getWebComponent(Servlet servlet) {
- IProject project = ProjectUtilities.getProject(servlet);
- IVirtualComponent component = ComponentCore.createComponent(project);
- WebArtifactEdit edit = null;
- try {
- if (J2EEProjectUtilities.isDynamicWebProject(project)) {
- edit = WebArtifactEdit.getWebArtifactEditForRead(component);
- WebApp webapp = edit.getWebApp();
- if (webapp.getServletNamed(servlet.getServletName()) != null)
- return component;
- }
- } finally {
- if (edit != null)
- edit.dispose();
- }
- return null;
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebEditAdapterFactory.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebEditAdapterFactory.java
deleted file mode 100644
index d954a9ce8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/internal/web/util/WebEditAdapterFactory.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
- *******************************************************************************/
-package org.eclipse.jst.j2ee.internal.web.util;
-
-import org.eclipse.core.runtime.IAdapterFactory;
-import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ArtifactEdit;
-import org.eclipse.wst.common.componentcore.internal.ArtifactEditModel;
-
-
-/**
- * <p>
- * Adapts {@see org.eclipse.wst.common.modulecore.ArtifactEditModel}s to
- * {@see org.eclipse.jst.j2ee.internal.web.util.WebArtifactEdit}&nbsp; facades.
- * </p>
- */
-public class WebEditAdapterFactory implements IAdapterFactory {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
- */
- public Object getAdapter(Object adaptableObject, Class adapterType) {
- if (adapterType == WebArtifactEdit.ADAPTER_TYPE || adapterType == ArtifactEdit.ADAPTER_TYPE) {
- ArtifactEditModel editModel = (ArtifactEditModel) adaptableObject;
- if (J2EEProjectUtilities.isDynamicWebProject(editModel.getProject()))
- return new WebArtifactEdit((ArtifactEditModel) adaptableObject);
- }
- return null;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
- */
- public Class[] getAdapterList() {
- return new Class[]{ArtifactEdit.class, WebArtifactEdit.class};
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/WebArtifactEdit.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/WebArtifactEdit.java
deleted file mode 100644
index f3f19e62c..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/WebArtifactEdit.java
+++ /dev/null
@@ -1,688 +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.web.componentcore.util;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.jem.util.emf.workbench.WorkbenchResourceHelperBase;
-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.componentcore.util.EARArtifactEdit;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.J2EEVersionConstants;
-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.internal.web.archive.operations.WebComponentLoadStrategyImpl;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.project.WebUtilities;
-import org.eclipse.jst.j2ee.webapplication.WebApp;
-import org.eclipse.jst.j2ee.webapplication.WebAppResource;
-import org.eclipse.jst.j2ee.webapplication.WebapplicationFactory;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFile;
-import org.eclipse.jst.j2ee.webapplication.WelcomeFileList;
-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.ReferencedComponent;
-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;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper;
-
-
-
-/**
- * <p>
- * WebArtifactEdit obtains a Web Deployment Descriptor metamodel specifec data from a
- * {@see org.eclipse.jst.j2ee.webapplication.WebAppResource}&nbsp; which stores the metamodel. The
- * {@see org.eclipse.jst.j2ee.webapplication.WebAppResource}&nbsp;is retrieved from the
- * {@see org.eclipse.wst.common.modulecore.ArtifactEditModel}&nbsp;using a constant {@see
- * J2EEConstants#WEBAPP_DD_URI_OBJ}. The defined methods extract data or manipulate the contents of
- * the underlying resource.
- * </p>
- *
- */
-public class WebArtifactEdit extends EnterpriseArtifactEdit implements IArtifactEditFactory {
-
- private static final String WEB_CONTENT_TYPE = "org.eclipse.jst.j2ee.webDD";
- /**
- * <p>
- * Identifier used to link WebArtifactEdit to a WebEditAdapterFactory {@see
- * WebEditAdapterFactory} stored in an AdapterManger (@see AdapterManager)
- * </p>
- */
- public static final Class ADAPTER_TYPE = WebArtifactEdit.class;
- public static final String WEB_CONTENT = "WebContent"; //$NON-NLS-1$
- public static final String WEB_INF = "WEB-INF"; //$NON-NLS-1$
- public static final String META_INF = "META-INF"; //$NON-NLS-1$
-
- public static IPath WEBLIB = new Path("/WEB-INF/lib"); //$NON-NLS-1$
-
- /**
- *
- */
- public WebArtifactEdit() {
- super();
- }
-
- public WebArtifactEdit(IVirtualComponent aModule) {
- super(aModule);
- }
-
- protected BinaryComponentHelper initBinaryComponentHelper(IVirtualComponent binaryModule) {
- return new JavaEEBinaryComponentHelper(binaryModule);
- }
-
- /**
- * @param aHandle
- * @param toAccessAsReadOnly
- * @throws IllegalArgumentException
- */
- public WebArtifactEdit(IProject aProject, boolean toAccessAsReadOnly) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly);
- }
-
- /**
- * @param aHandle
- * @param toAccessAsReadOnly
- * @throws IllegalArgumentException
- */
- public WebArtifactEdit(IProject aProject, boolean toAccessAsReadOnly, boolean forCreate) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly, forCreate, J2EEProjectUtilities.DYNAMIC_WEB);
- }
-
- /**
- * @param aHandle
- * @param toAccessAsReadOnly
- * @throws IllegalArgumentException
- */
- protected WebArtifactEdit(IProject aProject, boolean toAccessAsReadOnly, boolean forCreate, String editModelID) throws IllegalArgumentException {
- super(aProject, toAccessAsReadOnly, forCreate, editModelID);
- }
-
- /**
- * <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 WebArtifactEdit getWebArtifactEditForRead(IProject aProject) {
- WebArtifactEdit artifactEdit = null;
- try {
- if (isValidWebModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new WebArtifactEdit(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 WebArtifactEdit getWebArtifactEditForWrite(IProject aProject) {
- WebArtifactEdit artifactEdit = null;
- try {
- if (isValidWebModule(ComponentCore.createComponent(aProject)))
- artifactEdit = new WebArtifactEdit(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 WebArtifactEdit that are returned through this
- * method must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an WebArtifactEdit 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 WebArtifactEdit that may only be used to read the underlying content
- * model
- * @throws UnresolveableURIException
- * could not resolve uri.
- */
- public static WebArtifactEdit getWebArtifactEditForRead(IVirtualComponent aModule) {
- if (aModule == null)
- return null;
- if (aModule.isBinary()) {
- return new WebArtifactEdit(aModule);
- }
-
- return getWebArtifactEditForRead(aModule.getProject());
- }
-
-
- /**
- * <p>
- * Returns an instance facade to manage the underlying edit model for the given
- * {@see WorkbenchComponent}. Instances of WebArtifactEdit that are returned through this
- * method must be {@see #dispose()}ed of when no longer in use.
- * </p>
- * <p>
- * Use to acquire an WebArtifactEdit 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 WebArtifactEdit that may be used to modify and persist changes to the
- * underlying content model
- */
- public static WebArtifactEdit getWebArtifactEditForWrite(IVirtualComponent aModule) {
- if (aModule == null || aModule.isBinary())
- return null;
- return getWebArtifactEditForWrite(aModule.getProject());
- }
-
- /**
- * @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 isValidWebModule(IVirtualComponent aModule) throws UnresolveableURIException {
- if (!isValidEditableModule(aModule))
- return false;
- return J2EEProjectUtilities.isDynamicWebProject(aModule.getProject());
- }
-
- /**
- * <p>
- * Creates an instance facade for the given {@see ArtifactEditModel}.
- * </p>
- *
- * @param anArtifactEditModel
- */
- public WebArtifactEdit(ArtifactEditModel model) {
- super(model);
-
- }
-
- /**
- * <p>
- * Creates an instance facade for the given {@see ArtifactEditModel}
- * </p>
- *
- * <p>
- * Note: This method is for internal use only. Clients should not call this method.
- * </p>
- *
- * @param aNature
- * A non-null {@see ModuleCoreNature}for an accessible project
- * @param aModule
- * A non-null {@see WorkbenchComponent}pointing to a module from the given
- * {@see ModuleCoreNature}
- */
- protected WebArtifactEdit(ModuleCoreNature aNature, IVirtualComponent aModule, boolean toAccessAsReadOnly) {
- super(aNature, aModule, toAccessAsReadOnly);
- }
-
-
-
- /**
- * <p>
- * Retrieves J2EE version information from WebAppResource.
- * </p>
- *
- * @return an integer representation of a J2EE Spec version
- *
- */
- public int getJ2EEVersion() {
- verifyOperationSupported();
- return ((WebAppResource) getDeploymentDescriptorResource()).getJ2EEVersionID();
- }
-
- /**
- * <p>
- * Obtains the WebApp (@see WebApp) root object from the WebAppResource. If the root object does
- * not exist, then one is created (@link addWebAppIfNecessary(getWebApplicationXmiResource())).
- * 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;
- }
- addWebAppIfNecessary((WebAppResource) getDeploymentDescriptorResource());
- return (EObject) contents.get(0);
- }
-
- /**
- * <p>
- * Retrieves the underlying resource from the ArtifactEditModel using defined URI.
- * </p>
- *
- * @return Resource
- *
- */
- public Resource getDeploymentDescriptorResource() {
- verifyOperationSupported();
- if (isBinary()) {
- return getBinaryComponentHelper().getResource(J2EEConstants.WEBAPP_DD_URI_OBJ);
- }
- return getArtifactEditModel().getResource(J2EEConstants.WEBAPP_DD_URI_OBJ);
- }
-
- /**
- * <p>
- * Retrieves Servlet version information derived from the {@see WebAppResource}.
- * </p>
- *
- * @return an integer representation of a module version
- *
- */
- public int getServletVersion() {
- verifyOperationSupported();
- return ((WebAppResource) getDeploymentDescriptorResource()).getModuleVersionID();
- }
-
- /**
- * This method returns the integer representation for the JSP specification level associated
- * with the J2EE version for this workbench module. This method will not return null and returns
- * 20 as default.
- *
- * @see WebArtifactEdit#getServletVersion()
- *
- * @return an integer representation of the JSP level
- */
- public int getJSPVersion() {
- verifyOperationSupported();
- int servletVersion = getServletVersion();
- if (servletVersion == J2EEVersionConstants.WEB_2_2_ID)
- return J2EEVersionConstants.JSP_1_1_ID;
- else if (servletVersion == J2EEVersionConstants.WEB_2_3_ID)
- return J2EEVersionConstants.JSP_1_2_ID;
- else
- return J2EEVersionConstants.JSP_2_0_ID;
- }
-
- /**
- * <p>
- * Creates a deployment descriptor root object (WebApp) 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}
- * @param version
- * Version to be set on resource....if null default is taken
- *
- * Note: This method is typically used for JUNIT - move?
- * </p>
- */
- protected void addWebAppIfNecessary(XMLResource aResource) {
- verifyOperationSupported();
- if (isBinary()) {
- throwAttemptedBinaryEditModelAccess();
- }
- if (aResource != null) {
- if (aResource.getContents() == null || aResource.getContents().isEmpty()) {
- WebApp webAppNew = WebapplicationFactory.eINSTANCE.createWebApp();
- aResource.getContents().add(webAppNew);
- aResource.setModified(true);
- }
- WebApp webApp = (WebApp) aResource.getContents().get(0);
- URI moduleURI = getArtifactEditModel().getModuleURI();
- try {
- webApp.setDisplayName(StructureEdit.getDeployedName(moduleURI));
- } catch (UnresolveableURIException e) {
- // Ignore
- }
- aResource.setID(webApp, J2EEConstants.WEBAPP_ID);
-
- WelcomeFileList wList = WebapplicationFactory.eINSTANCE.createWelcomeFileList();
- List files = wList.getFile();
- WelcomeFile file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("index.html"); //$NON-NLS-1$
- files.add(file);
- file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("index.htm"); //$NON-NLS-1$
- files.add(file);
- file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("index.jsp"); //$NON-NLS-1$
- files.add(file);
- file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("default.html"); //$NON-NLS-1$
- files.add(file);
- file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("default.htm"); //$NON-NLS-1$
- files.add(file);
- file = WebapplicationFactory.eINSTANCE.createWelcomeFile();
- file.setWelcomeFile("default.jsp"); //$NON-NLS-1$
- files.add(file);
-
- webApp.setFileList(wList);
-
- try {
- aResource.saveIfNecessary();
- } catch (java.net.ConnectException ex) {
-
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
-
- /**
- * This method returns the full path to the deployment descriptor resource for the associated
- * workbench module. This method may return null.
- *
- * @see WebArtifactEdit#getDeploymentDescriptorResource()
- *
- * @return the full IPath for the deployment descriptor resource
- */
- public IPath getDeploymentDescriptorPath() {
- verifyOperationSupported();
- IFile file = WorkbenchResourceHelper.getFile(getDeploymentDescriptorResource());
- if (file != null)
- return file.getFullPath();
- return null;
- }
-
- /**
- * This method will retrieve the web app resource, create it if necessary, add get the root
- * object, the web app out of that web app resource. It will create the web app instance if need
- * be, and add it to the web resource. Then, it returns the web app object as the model root.
- * This method will not return null.
- *
- * @see EnterpriseArtifactEdit#createModelRoot()
- *
- * @return the eObject instance of the model root
- */
- public EObject createModelRoot() {
- verifyOperationSupported();
- if (isBinary()) {
- throwAttemptedBinaryEditModelAccess();
- }
- return createModelRoot(getJ2EEVersion());
- }
-
- /**
- * This method will retrieve the web app resource, create it if necessary, add get the root
- * object, set version the web app out of that web app resource. It will create the web app
- * instance if need be, and add it to the web resource. Then, it returns the web app object as
- * the model root. This method will not return null.
- *
- * @see EnterpriseArtifactEdit#createModelRoot()
- *
- * @return the eObject instance of the model root
- */
- public EObject createModelRoot(int version) {
- verifyOperationSupported();
- if (isBinary()) {
- throwAttemptedBinaryEditModelAccess();
- }
- WebAppResource res = (WebAppResource) getDeploymentDescriptorResource();
- res.setModuleVersionID(version);
- addWebAppIfNecessary(res);
- return res.getRootObject();
- }
-
- /**
- * @deprecated
- * use {@link WebUtilities}{@link #getLibModules()}
- */
- public IVirtualReference[] getLibModules() {
- return WebUtilities.getLibModules(getProject());
- }
-
- /**
- * This method will add the dependent modules from the passed in array to the dependentmodules
- * list of the associated workbench module. It will ensure a null is not passed and it will
- * ensure the dependent modules are not already in the list.
- *
- * <p>
- * Note: This method is for internal use only. Clients should not call this method.
- * </p>
- *
- * @param libModules
- * array of dependent modules to add as web libraries
- */
- public void addLibModules(ReferencedComponent[] libModules) {
- // TODO - Need to implement
- // if (libModules==null)
- // return;
- // for (int i=0; i<libModules.length; i++) {
- // if (!module.getReferencedComponents().contains(libModules[i]))
- // module.getReferencedComponents().add(libModules[i]);
- // }
- }
-
- /**
- * This method will retrieve the context root for this web project's .component file. It is
- * meant to handle a standalone web case.
- *
- * @return contextRoot String
- */
- public String getServerContextRoot() {
- return J2EEProjectUtilities.getServerContextRoot(getProject());
- }
-
- /**
- * This method will retrieve the context root for this web project in the associated parameter's
- * application.xml. If the earProject is null, then the contextRoot from the .component of the
- * web project is returned.
- *
- * @param earProject
- * @return contextRoot String
- */
- public String getServerContextRoot(IProject earProject) {
- if (earProject == null || !J2EEProjectUtilities.isEARProject(earProject))
- return getServerContextRoot();
- EARArtifactEdit earEdit = null;
- String contextRoot = null;
- try {
- earEdit = EARArtifactEdit.getEARArtifactEditForRead(earProject);
- if (earEdit != null)
- contextRoot = earEdit.getWebContextRoot(getProject());
- } finally {
- if (earEdit != null)
- earEdit.dispose();
- }
- return contextRoot;
- }
-
- /**
- * This method will update the context root for this web project on the EAR which is passed in.
- * If no EAR is passed the .component file for the web project will be updated.
- *
- * @param earProject
- * @param aContextRoot
- */
- public void setServerContextRoot(IProject earProject, String aContextRoot) {
- if (earProject == null || !J2EEProjectUtilities.isEARProject(earProject))
- setServerContextRoot(aContextRoot);
- EARArtifactEdit earEdit = null;
- try {
- earEdit = EARArtifactEdit.getEARArtifactEditForWrite(earProject);
- if (earEdit != null)
- earEdit.setWebContextRoot(getProject(), aContextRoot);
- } finally {
- if (earEdit != null) {
- earEdit.saveIfNecessary(new NullProgressMonitor());
- earEdit.dispose();
- }
- }
- }
-
- /**
- * This method sets the context root property on the web project's .component file for the
- * standalone case.
- *
- * @param contextRoot
- * string
- */
- public void setServerContextRoot(String contextRoot) {
- J2EEProjectUtilities.setServerContextRoot(getProject(), contextRoot);
- }
-
-
- /**
- * @return WebApp
- */
- public WebApp getWebApp() {
- verifyOperationSupported();
-
- return (WebApp) getDeploymentDescriptorRoot();
- }
-
-
- public ArtifactEdit createArtifactEditForRead(IVirtualComponent aComponent) {
- return getWebArtifactEditForRead(aComponent);
- }
-
-
- public ArtifactEdit createArtifactEditForWrite(IVirtualComponent aComponent) {
- return getWebArtifactEditForWrite(aComponent);
- }
-
- public Archive asArchive(boolean includeSource, boolean includeClasspathComponents) throws OpenFailureException {
- verifyOperationSupported();
- if (isBinary()) {
- JavaEEBinaryComponentHelper helper = (JavaEEBinaryComponentHelper)getBinaryComponentHelper();
- return helper.accessLegacyArchive();
- } else {
- WebComponentLoadStrategyImpl loader = new WebComponentLoadStrategyImpl(getComponent(), includeClasspathComponents);
- loader.setExportSource(includeSource);
- String uri = ModuleURIUtil.getHandleString(getComponent());
- return CommonarchiveFactory.eINSTANCE.openWARFile(loader, uri);
- }
- }
-
- public static void createDeploymentDescriptor(IProject project, int version) {
- WebArtifactEdit webEdit = new WebArtifactEdit(project, false, true);
- try {
- webEdit.createModelRoot(version);
- webEdit.save(null);
- } finally { // Make sure new resource is removed - the uri used for creation shouldn't be cached
- Resource newRes = webEdit.getDeploymentDescriptorResource();
- WorkbenchResourceHelperBase.getResourceSet(project).getResources().remove(newRes);
- newRes.unload();
- webEdit.dispose();
- }
- }
- public IModelProvider create(IProject project) {
- return (IModelProvider)getWebArtifactEditForRead(project);
- }
-
- public IModelProvider create(IVirtualComponent component) {
- return (IModelProvider)getWebArtifactEditForRead(component);
- }
-
- public void modify(Runnable runnable, IPath modelPath) {
- setWritableEdit(getWebArtifactEditForWrite(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{
- getWritableEdit().dispose();
- setWritableEdit(null);
- }
- }
-
-
- protected String getContentTypeDescriber() {
- return WEB_CONTENT_TYPE;
- }
- protected URI getRootURI() {
- return J2EEConstants.WEBAPP_DD_URI_OBJ;
- }
-
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/package.xml b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/package.xml
deleted file mode 100644
index 6a17c4ece..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/componentcore/util/package.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
- <head>
- <meta
- name="root"
- content="../../../../../../../" />
- <title>WebArtifactEdit api overview</title>
- </head>
-
- <body>
- <abstract>
- This package includes the WebArtifactEdit api. This api is used to work with the emf model
- of a flexible web module. It contains api to read and serialize out the emf model for web applications.
- </abstract>
-
- <a href="#top">top</a>
- </body>
-</html>
- \ No newline at end of file
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IConvertStaticWebToDyamnicDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IConvertStaticWebToDyamnicDataModelProperties.java
deleted file mode 100644
index ccfad90c8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IConvertStaticWebToDyamnicDataModelProperties.java
+++ /dev/null
@@ -1,25 +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.web.datamodel.properties;
-
-import org.eclipse.jst.j2ee.internal.web.operations.ConvertStaticWebToDyamnicDataModelProvider;
-
-public interface IConvertStaticWebToDyamnicDataModelProperties {
-
- /**
- * 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 = ConvertStaticWebToDyamnicDataModelProvider.class;
-
- public static final String PROJECT = "IConvertStaticWebToDyamnicProperties.PROJECT"; //$NON-NLS-1$
- public static final String CONVERT_TO_WEB_VERSION = "IConvertStaticWebToDyamnicProperties.CONVERT_TO_WEB_VERSION"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentExportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentExportDataModelProperties.java
deleted file mode 100644
index 129150da3..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentExportDataModelProperties.java
+++ /dev/null
@@ -1,37 +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.web.datamodel.properties;
-
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEComponentExportDataModelProperties;
-/**
- * <p>
- * IWebComponentExportDataModelProperties provides properties to the IDataModel associated with the
- * WebComponentExportDataModelProvider.
- * 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 IWebComponentExportDataModelProperties extends IJ2EEComponentExportDataModelProperties {
- /**
- * Required, type Boolean flag which indicates whether or not to export compiled JSP files
- * (compiled files exist in /WEB-INF/classes as .class and .java[for debug])
- */
- public static final String EXCLUDE_COMPILE_JSP = "WebExportDataModel.EXCLUDE_COMPILE_JSP"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentImportDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentImportDataModelProperties.java
deleted file mode 100644
index 7a8697f63..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/IWebComponentImportDataModelProperties.java
+++ /dev/null
@@ -1,58 +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.web.datamodel.properties;
-
-import java.util.List;
-
-import org.eclipse.jst.j2ee.commonarchivecore.internal.Archive;
-import org.eclipse.jst.j2ee.datamodel.properties.IJ2EEModuleImportDataModelProperties;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-
-/**
- * <p>
- * IWebComponentImportDataModelProperties provides properties to the IDataModel associated with the
- * WebComponentImportDataModelProvider. 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 IWebComponentImportDataModelProperties extends IJ2EEModuleImportDataModelProperties {
-
- /**
- * <p>
- * This optional {@link List} property is used to specify which nested web libraries should be
- * expanded into projects during import. The contents of this {@link List} property should be
- * {@link Archive}s.
- * </p>
- */
- public static final String WEB_LIB_ARCHIVES_SELECTED = "WARImportDataModel.WEB_LIB_ARCHIVES_SELECTED"; //$NON-NLS-1$
-
- /**
- * <p>
- * This {@link List} property should not be set by clients. This list contains the
- * {@link IDataModel}s for creating the new components to be created for each of the selected
- * archives. This list will contain one entry for each web lib archive regardless of whether it
- * is selected for import by the {@link #WEB_LIB_ARCHIVES_SELECTED} property.
- * </p>
- */
- public static final String WEB_LIB_MODELS = "WARImportDataModel.WEB_LIB_MODELS"; //$NON-NLS-1$
-
- public static final String CONTEXT_ROOT = "IAddWebComponentToEnterpriseApplicationDataModelProperties.CONTEXT_ROOT"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/package.xml b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/package.xml
deleted file mode 100644
index bc7e674b8..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/datamodel/properties/package.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
- <head>
- <meta
- name="root"
- content="../../../../../../../" />
- <title>web module data model api overview</title>
- </head>
-
- <body>
- <abstract>
- This package includes the api to create, import and export web modules. The interfaces in this package
- define the properties that can be set on the web modules data models that are use 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.web/webproject/org/eclipse/jst/j2ee/web/project/facet/IWebFacetInstallDataModelProperties.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/IWebFacetInstallDataModelProperties.java
deleted file mode 100644
index 21c44e6b7..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/IWebFacetInstallDataModelProperties.java
+++ /dev/null
@@ -1,27 +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.web.project.facet;
-
-import org.eclipse.jst.j2ee.internal.web.archive.operations.WebFacetProjectCreationDataModelProvider;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-
-public interface IWebFacetInstallDataModelProperties 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 = WebFacetProjectCreationDataModelProvider.class;
-
- public static final String CONTEXT_ROOT = "IWebFacetInstallDataModelProperties.CONTEXT_ROOT"; //$NON-NLS-1$
-
- public static final String SOURCE_FOLDER = "IWebFacetInstallDataModelProperties.SOURCE_FOLDER"; //$NON-NLS-1$
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java
deleted file mode 100644
index 2cdd9da44..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDataModelProvider.java
+++ /dev/null
@@ -1,168 +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.web.project.facet;
-
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.common.project.facet.JavaFacetUtils;
-import org.eclipse.jst.common.project.facet.core.JavaFacetInstallConfig;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-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.jst.j2ee.internal.project.ProjectSupportResourceHandler;
-import org.eclipse.jst.j2ee.project.facet.J2EEModuleFacetInstallDataModelProvider;
-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.IProjectFacetVersion;
-import org.eclipse.wst.project.facet.ProductManager;
-
-import com.ibm.icu.util.StringTokenizer;
-
-public class WebFacetInstallDataModelProvider extends J2EEModuleFacetInstallDataModelProvider implements IWebFacetInstallDataModelProperties {
-
- public Set getPropertyNames() {
- Set names = super.getPropertyNames();
- names.add(CONTEXT_ROOT);
- names.add(SOURCE_FOLDER);
- return names;
- }
-
- public Object getDefaultProperty(String propertyName) {
- if (propertyName.equals(CONFIG_FOLDER)) {
- return J2EEPlugin.getDefault().getJ2EEPreferences().getString(J2EEPreferences.Keys.WEB_CONTENT_FOLDER);
- } else if (propertyName.equals(SOURCE_FOLDER)) {
- final JavaFacetInstallConfig javaModel = findJavaFacetInstallConfig();
- final List<IPath> sourceFolders = javaModel.getSourceFolders();
- return ( sourceFolders.isEmpty() ? null : sourceFolders.get( 0 ).toPortableString() );
- } else if (propertyName.equals(CONTEXT_ROOT)) {
- return getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
- } else if (propertyName.equals(FACET_ID)) {
- return DYNAMIC_WEB;
- } else if (propertyName.equals(MODULE_URI)) {
- String projectName = model.getStringProperty(FACET_PROJECT_NAME).replace(' ', '_');
- return projectName + IJ2EEModuleConstants.WAR_EXT;
- } else if (propertyName.equals(GENERATE_DD)) {
- IProjectFacetVersion facetVersion = (IProjectFacetVersion)getProperty(FACET_VERSION);
- if(facetVersion == WebFacetUtils.WEB_25){
- return Boolean.valueOf(J2EEPlugin.getDefault().getJ2EEPreferences().getBoolean(J2EEPreferences.Keys.DYNAMIC_WEB_GENERATE_DD));
- }
- return Boolean.TRUE;
- }
- return super.getDefaultProperty(propertyName);
- }
-
- public boolean propertySet(String propertyName, Object propertyValue) {
- if (ADD_TO_EAR.equals(propertyName)) {
- model.notifyPropertyChange(CONTEXT_ROOT, IDataModel.ENABLE_CHG);
- } else if (FACET_PROJECT_NAME.equals(propertyName)) {
- model.notifyPropertyChange(CONTEXT_ROOT, IDataModel.VALID_VALUES_CHG);
- } else if (propertyName.equals(CONFIG_FOLDER)) {
- // If using optimized single root structure, update the output folder based on content folder change
- // The output folder will be "<contentRoot>/WEB-INF/classes"
- if (ProductManager.shouldUseSingleRootStructure())
- {
- final JavaFacetInstallConfig javaModel = findJavaFacetInstallConfig();
-
- if( javaModel != null )
- {
- final IPath outputFolder
- = propertyValue == null ? null : new Path( (String) propertyValue + "/" +J2EEConstants.WEB_INF_CLASSES );
-
- javaModel.setDefaultOutputFolder( outputFolder );
- }
- }
- return true;
- } else if (propertyName.equals(SOURCE_FOLDER))
- {
- final JavaFacetInstallConfig javaModel = findJavaFacetInstallConfig();
-
- if( javaModel != null )
- {
- final IPath sourceFolder
- = propertyValue == null ? null : new Path( (String) propertyValue );
-
- javaModel.setSourceFolder( sourceFolder );
- }
- }
- return super.propertySet(propertyName, propertyValue);
- }
-
- private JavaFacetInstallConfig findJavaFacetInstallConfig()
- {
- final IFacetedProjectWorkingCopy fpjwc
- = (IFacetedProjectWorkingCopy) this.model.getProperty( FACETED_PROJECT_WORKING_COPY );
-
- if( fpjwc != null )
- {
- final IFacetedProject.Action javaInstallAction
- = fpjwc.getProjectFacetAction( JavaFacetUtils.JAVA_FACET );
-
- final Object config = javaInstallAction.getConfig();
-
- if( config instanceof JavaFacetInstallConfig )
- {
- return (JavaFacetInstallConfig) config;
- }
- else
- {
- return (JavaFacetInstallConfig) Platform.getAdapterManager().getAdapter( config, JavaFacetInstallConfig.class );
- }
- }
-
- return null;
- }
-
- public boolean isPropertyEnabled(String propertyName) {
- return super.isPropertyEnabled(propertyName);
- }
-
- protected int convertFacetVersionToJ2EEVersion(IProjectFacetVersion version) {
- return J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(version.getVersionString());
- }
-
- public IStatus validate(String name) {
- if (name.equals(CONTEXT_ROOT)) {
- return validateContextRoot(getStringProperty(CONTEXT_ROOT));
- } else if (name.equals(SOURCE_FOLDER)) {
- return validateFolderName(getStringProperty(SOURCE_FOLDER));
- }
- // the superclass validates the content directory which is actually a "CONFIG_FOLDER"
- return super.validate(name);
- }
-
- protected IStatus validateContextRoot(String contextRoot) {
- if (contextRoot == null) {
- return J2EEPlugin.newErrorStatus(ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Context_Root_cannot_be_empty_2, new Object[]{contextRoot}), null);
- } else if (contextRoot.trim().equals(contextRoot)) {
- StringTokenizer stok = new StringTokenizer(contextRoot, "."); //$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) {
- Object[] invalidChar = new Object[]{(new Character(token.charAt(i))).toString()};
- String errorStatus = ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.The_character_is_invalid_in_a_context_root, invalidChar); //$NON-NLS-1$
- return J2EEPlugin.newErrorStatus(errorStatus, null);
- }
- }
- }
- } else
- return J2EEPlugin.newErrorStatus(ProjectSupportResourceHandler.getString(ProjectSupportResourceHandler.Names_cannot_begin_or_end_with_whitespace_5, new Object[]{contextRoot}), null); //$NON-NLS-1$
- return OK_STATUS;
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
deleted file mode 100644
index 51a398539..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetInstallDelegate.java
+++ /dev/null
@@ -1,341 +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.web.project.facet;
-
-import java.io.ByteArrayInputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-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.IProject;
-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.jdt.core.JavaModelException;
-import org.eclipse.jem.util.logger.proxy.Logger;
-import org.eclipse.jst.common.frameworks.CommonFrameworksPlugin;
-import org.eclipse.jst.common.project.facet.WtpUtils;
-import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
-import org.eclipse.jst.j2ee.internal.J2EEConstants;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.internal.web.classpath.WebAppLibrariesContainer;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDelegate;
-import org.eclipse.jst.j2ee.web.componentcore.util.WebArtifactEdit;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.datamodel.FacetDataModelProvider;
-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;
-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;
-import org.eclipse.wst.project.facet.ProductManager;
-
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainer;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathContainerUtils;
-import org.eclipse.jst.javaee.core.DisplayName;
-import org.eclipse.jst.javaee.core.JavaeeFactory;
-import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.jst.javaee.web.WebFactory;
-import org.eclipse.jst.javaee.web.WelcomeFileList;
-
-public final class WebFacetInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public void execute(final IProject project, final IProjectFacetVersion fv, final Object cfg, final IProgressMonitor monitor) throws CoreException {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
-
- try {
- final IDataModel model = (IDataModel) cfg;
-
- final IJavaProject jproj = JavaCore.create(project);
-
- // Add WTP natures.
-
- WtpUtils.addNatures(project);
-
- // Create the directory structure.
-
- final IWorkspace ws = ResourcesPlugin.getWorkspace();
- final IPath pjpath = project.getFullPath();
-
- final IPath contentdir = setContentPropertyIfNeeded(model, pjpath, project);
- mkdirs(ws.getRoot().getFolder(contentdir));
-
- final IPath webinf = contentdir.append("WEB-INF"); //$NON-NLS-1$
- IFolder webinfFolder = ws.getRoot().getFolder(webinf);
- mkdirs(webinfFolder);
-
- final IPath webinflib = webinf.append("lib"); //$NON-NLS-1$
- mkdirs(ws.getRoot().getFolder(webinflib));
-
- // Setup the flexible project structure.
-
- final IVirtualComponent c = ComponentCore.createComponent(project);
-
- c.create(0, null);
-
- String contextRoot = model.getStringProperty(IWebFacetInstallDataModelProperties.CONTEXT_ROOT);
- setContextRootPropertyIfNeeded(c, contextRoot);
- setJavaOutputPropertyIfNeeded(model,c);
-
- final IVirtualFolder webroot = c.getRootFolder();
- if (webroot.getProjectRelativePath().equals(new Path("/"))) //$NON-NLS-1$
- webroot.createLink(new Path("/" + model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)), 0, null); //$NON-NLS-1$
-
- if( fv == WebFacetUtils.WEB_25 )
- {
- if(model.getBooleanProperty(IJ2EEFacetInstallDataModelProperties.GENERATE_DD)){
- createWeb25DeploymentDescriptor(project, fv, webinfFolder, monitor);
- }
- }
- else
- {
- // Create the deployment descriptor (web.xml) if one doesn't exist
- if (!webinfFolder.getFile("web.xml").exists()) { //$NON-NLS-1$
- String ver = fv.getVersionString();
- int nVer = J2EEVersionUtil.convertVersionStringToInt(ver);
- WebArtifactEdit.createDeploymentDescriptor(project, nVer);
- }
- }
-
- // Set entries for src folders
- final IVirtualFolder jsrc = c.getRootFolder().getFolder("/WEB-INF/classes"); //$NON-NLS-1$
- final IClasspathEntry[] cp = jproj.getRawClasspath();
- for (int i = 0; i < cp.length; i++) {
- final IClasspathEntry cpe = cp[i];
- if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
- if( cpe.getPath().removeFirstSegments(1).segmentCount() > 0 )
- jsrc.createLink(cpe.getPath().removeFirstSegments(1), 0, null);
- }
- }
-
- IVirtualFile vf = c.getRootFolder().getFile(new Path(J2EEConstants.MANIFEST_URI));
- IFile manifestmf = vf.getUnderlyingFile();
- if (manifestmf == null || !manifestmf.exists()) {
- try {
- createManifest(project, c.getRootFolder().getUnderlyingFolder(), monitor);
- } catch (InvocationTargetException e) {
- Logger.getLogger().logError(e);
- } catch (InterruptedException e) {
- Logger.getLogger().logError(e);
- }
- }
-
- // Setup the classpath.
-
- ClasspathHelper.removeClasspathEntries(project, fv);
-
- if (!ClasspathHelper.addClasspathEntries(project, fv)) {
- // TODO: Support the no runtime case.
- // ClasspathHelper.addClasspathEntries( project, fv, <something> );
- }
-
- // Add the web libraries container.
-
-
- if(J2EEComponentClasspathContainerUtils.getDefaultUseWebAppLibraries()){
- final IPath webLibContainer = new Path(WebAppLibrariesContainer.CONTAINER_ID);
- addToClasspath(jproj, JavaCore.newContainerEntry(webLibContainer));
- }
-
- 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);
- }
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
- }
-
- private void setJavaOutputPropertyIfNeeded(IDataModel model, final IVirtualComponent c) {
- // Make sure output folder is set properly for web projects, and the product setting for single root structure is maintained.
- // We may need to change the existing setup
-
- if (ProductManager.shouldUseSingleRootStructure()) {
- String outputFolder = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)+"/"+J2EEConstants.WEB_INF_CLASSES;
-
- IJavaProject jproj = JavaCore.create(c.getProject());
- IClasspathEntry[] current = null;
- boolean webinf = false;
- IPath pjpath = c.getProject().getFullPath();
- try {
- current = jproj.getRawClasspath();
- List updatedList = new ArrayList();
- IPath sourcePath = null;
- boolean changeNeeded = false;
- 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(J2EEConstants.WEB_INF_CLASSES) == -1)) {
- //output different than J2EEConstants.WEB_INF_CLASSES
- sourcePath = entry.getPath();
- updatedList.add(JavaCore.newSourceEntry(sourcePath));
- changeNeeded = true;
- }
- else
- updatedList.add(entry);
- }
- IPath currentDefaultOutput = null;
- currentDefaultOutput = jproj.getOutputLocation();
- if (currentDefaultOutput.toString().indexOf(J2EEConstants.WEB_INF_CLASSES) == -1)
- changeNeeded = true;
- if (changeNeeded) {
- IClasspathEntry[] updated = (IClasspathEntry[])updatedList.toArray(new IClasspathEntry[updatedList.size()]);
- IPath outdir = pjpath.append(outputFolder);
- jproj.setRawClasspath(updated,outdir ,null);
- jproj.save(null, true);
- }
- } catch (JavaModelException e) {
- Logger.getLogger().logError(e);
- }
- }
- // Now just set the property
- String existing = c.getMetaProperties().getProperty("java-output-path"); //$NON-NLS-1$
- if (existing == null)
- setOutputFolder(model, c);
- }
-
- /**
- * This overrides the default J2EE set output folder which sets the output folder to the content root
- * if the optimized single root structure is used. For web projects, we need to switch this to
- * set the output folder to "<contentRoot>/WEB-INF/classes"
- *
- * @param model
- * @param component
- */
- protected void setOutputFolder(IDataModel model, IVirtualComponent component) {
- String outputFolder = null;
- // If using single root structure, set the output folder to "<contentRoot>/WEB-INF/classes"
- if (ProductManager.shouldUseSingleRootStructure())
- outputFolder = model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER)+"/"+J2EEConstants.WEB_INF_CLASSES;
- // Otherwise set the output folder to the product setting default
- else
- outputFolder = CommonFrameworksPlugin.getDefault().getPluginPreferences().getString(CommonFrameworksPlugin.OUTPUT_FOLDER);
-
- component.setMetaProperty("java-output-path", outputFolder ); //$NON-NLS-1$
- }
-
- private void setContextRootPropertyIfNeeded(final IVirtualComponent c, String contextRoot) {
- String existing = c.getMetaProperties().getProperty("context-root"); //$NON-NLS-1$
- if (existing == null)
- c.setMetaProperty("context-root", contextRoot); //$NON-NLS-1$
- }
-
- private IPath setContentPropertyIfNeeded(final IDataModel model, final IPath pjpath, IProject project) {
- IVirtualComponent c = ComponentCore.createComponent(project);
- if (c.exists()) {
- if( !c.getRootFolder().getProjectRelativePath().isRoot() ){
- return c.getRootFolder().getUnderlyingResource().getFullPath();
- }
- }
- return pjpath.append(model.getStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER));
- }
-
- private void createWeb25DeploymentDescriptor(final IProject project, final IProjectFacetVersion fv,
- IFolder webinfFolder, IProgressMonitor monitor) throws CoreException {
- // Create the deployment descriptor (web.xml) if one doesn't exist
- IFile webxmlFile = webinfFolder.getFile("web.xml"); //$NON-NLS-1$
- if (!webxmlFile.exists()) {
- try {
- // Create a minimal web.xml file, so the model can be initialized
- final String webXmlContents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<web-app id=\"WebApp_ID\" version=\"2.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/web-app_2_5.xsd\">\n</web-app>"; //$NON-NLS-1$
- webxmlFile.create(new ByteArrayInputStream(webXmlContents.getBytes("UTF-8")), true, monitor); //$NON-NLS-1$
-
- final IModelProvider provider = ModelProviderManager.getModelProvider(project, fv);
- Runnable runnable = new Runnable(){
-
- public void run() {
- WebApp webApp = (WebApp) provider.getModelObject();
-
- // Add the display-name tag
- DisplayName displayName = (DisplayName) JavaeeFactory.eINSTANCE.createDisplayName();
- displayName.setValue(project.getName());
- webApp.getDisplayNames().add(displayName);
-
- // welcome file list
- List<String> welcomeFiles = Arrays.asList(
- "index.html", //$NON-NLS-1$
- "index.htm", //$NON-NLS-1$
- "index.jsp", //$NON-NLS-1$
- "default.html", //$NON-NLS-1$
- "default.htm", //$NON-NLS-1$
- "default.jsp" //$NON-NLS-1$
- );
-
- // Add the welcome-file-list tag
- WelcomeFileList welcomeFileList = (WelcomeFileList) WebFactory.eINSTANCE.createWelcomeFileList();
- welcomeFileList.getWelcomeFiles().addAll(welcomeFiles);
- webApp.getWelcomeFileLists().add(welcomeFileList);
- }
- };
- provider.modify(runnable, null);
- } catch (UnsupportedEncodingException e) {
- Logger.getLogger().logError(e);
- }
- }
- }
-
-
- private static void mkdirs(final IFolder folder)
-
- throws CoreException
-
- {
- if (!folder.exists()) {
- if (folder.getParent() instanceof IFolder) {
- mkdirs((IFolder) folder.getParent());
- }
-
- folder.create(true, true, null);
- }
- else
- {
- IContainer x = folder;
-
- while( x instanceof IFolder && x.isDerived() )
- {
- x.setDerived( false );
- x = x.getParent();
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetPostInstallDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetPostInstallDelegate.java
deleted file mode 100644
index fbb89f6cb..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetPostInstallDelegate.java
+++ /dev/null
@@ -1,72 +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.web.project.facet;
-
-import static org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR;
-import static org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties.EAR_PROJECT_NAME;
-import static org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties.MODULE_URI;
-import static org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.internal.common.J2EEVersionUtil;
-import org.eclipse.jst.j2ee.project.facet.J2EEFacetInstallDelegate;
-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;
-
-public final class WebFacetPostInstallDelegate extends J2EEFacetInstallDelegate implements IDelegate {
-
- public void execute(final IProject project, final IProjectFacetVersion fv, final Object cfg, final IProgressMonitor monitor) throws CoreException {
- if (monitor != null) {
- monitor.beginTask("", 1); //$NON-NLS-1$
- }
-
- try {
- final IDataModel model = (IDataModel) cfg;
-
- // Associate with an EAR, if necessary.
- if ( model.getBooleanProperty(ADD_TO_EAR) ) {
- final String earProjectName = model.getStringProperty(EAR_PROJECT_NAME);
-
- if ( earProjectName != null && !earProjectName.equals("") ) { //$NON-NLS-1$
-
- String ver = fv.getVersionString();
-
- String j2eeVersionText = J2EEVersionUtil.convertVersionIntToString(J2EEVersionUtil.convertWebVersionStringToJ2EEVersionID(ver));
- final String moduleURI = model.getStringProperty(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);
- }
- } finally {
- if (monitor != null) {
- monitor.done();
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetRuntimeChangedDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetRuntimeChangedDelegate.java
deleted file mode 100644
index 8c67966d5..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetRuntimeChangedDelegate.java
+++ /dev/null
@@ -1,67 +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.web.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class WebFacetRuntimeChangedDelegate
-
- implements IDelegate
-
-{
- public void execute( final IProject project,
- final IProjectFacetVersion fv,
- final Object cfg,
- final IProgressMonitor monitor )
-
- throws CoreException
-
- {
- if( monitor != null )
- {
- monitor.beginTask( "", 1 );
- }
-
- try
- {
- ClasspathHelper.removeClasspathEntries( project, fv );
-
- if( ! ClasspathHelper.addClasspathEntries( project, fv ) )
- {
- // TODO: Support the no runtime case.
- // ClasspathHelper.addClasspathEntries( project, fv, <something> );
- }
-
- if( monitor != null )
- {
- monitor.worked( 1 );
- }
- }
- finally
- {
- if( monitor != null )
- {
- monitor.done();
- }
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java
deleted file mode 100644
index cbf249113..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetUtils.java
+++ /dev/null
@@ -1,45 +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.web.project.facet;
-
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
-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;
-
-public class WebFacetUtils {
-
- public static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet(IJ2EEFacetConstants.DYNAMIC_WEB);
- public static final IProjectFacetVersion WEB_22 = WEB_FACET.getVersion("2.2"); //$NON-NLS-1$
- public static final IProjectFacetVersion WEB_23 = WEB_FACET.getVersion("2.3"); //$NON-NLS-1$
- public static final IProjectFacetVersion WEB_24 = WEB_FACET.getVersion("2.4"); //$NON-NLS-1$
- public static final IProjectFacetVersion WEB_25 = WEB_FACET.getVersion("2.5"); //$NON-NLS-1$
-
- public static final IProjectFacet WEB_XDOCLET_FACET = getWebDocletFacet();
-
- public static IProjectFacet getProjectFacet(String id) {
- try {
- return ProjectFacetsManager.getProjectFacet(id);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-
- private static IProjectFacet getWebDocletFacet() {
- try {
- return ProjectFacetsManager.getProjectFacet(IJ2EEFacetConstants.DYNAMIC_WEB_XDOCLET);
- } catch (IllegalArgumentException e) {
- // the web doclet facet is not defined
- return null;
- }
- }
-
-}
diff --git a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetVersionChangeDelegate.java b/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetVersionChangeDelegate.java
deleted file mode 100644
index f780044c6..000000000
--- a/plugins/org.eclipse.jst.j2ee.web/webproject/org/eclipse/jst/j2ee/web/project/facet/WebFacetVersionChangeDelegate.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.web.project.facet;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
-import org.eclipse.wst.common.project.facet.core.IDelegate;
-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;
-
-/**
- * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
- */
-
-public final class WebFacetVersionChangeDelegate
-
- implements IDelegate
-
-{
- public void execute( final IProject project,
- final IProjectFacetVersion fv,
- final Object cfg,
- final IProgressMonitor monitor )
-
- throws CoreException
-
- {
- if( monitor != null )
- {
- monitor.beginTask( "", 1 );
- }
-
- try
- {
- // Find the version that's currently installed.
-
- final IFacetedProject fproj
- = ProjectFacetsManager.create( project );
-
- final IProjectFacetVersion oldver
- = fproj.getInstalledVersion( fv.getProjectFacet() );
-
- // Reset the classpath.
-
- ClasspathHelper.removeClasspathEntries( project, oldver );
-
- if( ! ClasspathHelper.addClasspathEntries( project, fv ) )
- {
- // TODO: Support the no runtime case.
- // ClasspathHelper.addClasspathEntries( project, fv, <something> );
- }
-
- // Update the component version.
-
-
-// final IVirtualComponent c = ComponentCore.createComponent(project);
-
-// final StructureEdit edit
-// = StructureEdit.getStructureEditForWrite( project );
-//
-// try
-// {
-// final ComponentType oldctype
-// = StructureEdit.getComponentType( c );
-//
-// final ComponentType newctype
-// = ComponentcoreFactory.eINSTANCE.createComponentType();
-//
-// newctype.setComponentTypeId( oldctype.getComponentTypeId() );
-// newctype.setVersion( fv.getVersionString() );
-// newctype.getProperties().addAll( oldctype.getProperties() );
-//
-// StructureEdit.setComponentType( c, newctype );
-//
-// edit.saveIfNecessary( null );
-// }
-// finally
-// {
-// edit.dispose();
-// }
-
- if( monitor != null )
- {
- monitor.worked( 1 );
- }
- }
- finally
- {
- if( monitor != null )
- {
- monitor.done();
- }
- }
- }
-
-}

Back to the top