Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Ju2018-01-25 15:03:21 -0500
committerDanny Ju2018-01-25 15:03:21 -0500
commita17dcbd33347ebf382dbcf7bf14359a03d78f37e (patch)
tree95ecb19d41097e99349c38e9d4bf7ac125d22696
parentdfc4f4bb068bdf437e0fc46e2b5840fdae7f7bd4 (diff)
downloadglassfish-tools-a17dcbd33347ebf382dbcf7bf14359a03d78f37e.tar.gz
glassfish-tools-a17dcbd33347ebf382dbcf7bf14359a03d78f37e.tar.xz
glassfish-tools-a17dcbd33347ebf382dbcf7bf14359a03d78f37e.zip
Initial commit
-rw-r--r--.gitignore4
-rw-r--r--build.properties112
-rw-r--r--build.xml18
-rw-r--r--description1
-rw-r--r--features/org.eclipse.glassfish.tools.everything/.project17
-rw-r--r--features/org.eclipse.glassfish.tools.everything/LICENSE.md637
-rw-r--r--features/org.eclipse.glassfish.tools.everything/build.properties1
-rw-r--r--features/org.eclipse.glassfish.tools.everything/feature.xml7
-rw-r--r--features/org.eclipse.glassfish.tools.source/.project17
-rw-r--r--features/org.eclipse.glassfish.tools.source/.settings/oracle.eclipse.tools.webtier.ui.prefs2
-rw-r--r--features/org.eclipse.glassfish.tools.source/build.properties7
-rw-r--r--features/org.eclipse.glassfish.tools.source/epl-v20.html300
-rw-r--r--features/org.eclipse.glassfish.tools.source/feature.properties162
-rw-r--r--features/org.eclipse.glassfish.tools.source/feature.xml20
-rw-r--r--features/org.eclipse.glassfish.tools.source/license.html181
-rw-r--r--features/org.eclipse.glassfish.tools/.project17
-rw-r--r--features/org.eclipse.glassfish.tools/build.properties4
-rw-r--r--features/org.eclipse.glassfish.tools/epl-v20.html300
-rw-r--r--features/org.eclipse.glassfish.tools/feature.properties162
-rw-r--r--features/org.eclipse.glassfish.tools/feature.xml35
-rw-r--r--features/org.eclipse.glassfish.tools/license.html181
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/.classpath7
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/.gitignore6
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/.project28
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/LICENSE.md637
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/about.html28
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/build.properties6
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/bundle.properties2
-rw-r--r--plugins/org.eclipse.glassfish.tools.jver/src/org/eclipse/glassfish/tools/jver/JavaVersionDetector.java23
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/.classpath7
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/.gitignore6
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/.project28
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/.settings/oracle.eclipse.tools.webtier.ui.prefs2
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/LICENSE.md637
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/META-INF/MANIFEST.MF40
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/about.html28
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/build.properties8
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/create.pngbin0 -> 1014 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ear.gifbin0 -> 600 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ejb_module.gifbin0 -> 1021 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/folder_open.gifbin0 -> 324 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/glassfishserver.gifbin0 -> 29310 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/logfile.gifbin0 -> 568 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/resources.gifbin0 -> 588 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/sunappsrv.gifbin0 -> 446 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/updateCenter.pngbin0 -> 3554 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/web_module.gifbin0 -> 588 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/obj16/webservice.pngbin0 -> 782 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/icons/wizard75x66.pngbin0 -> 6234 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/plugin.properties31
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/plugin.xml463
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishToolsUIPlugin.java91
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishUI.sdef87
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/JAXRSActionPanels.java24
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/SunAppServerLaunchConfigurationTabGroup.java57
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/editorsections/ServerSection.java107
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.java48
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.properties1
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProviderFactory.java35
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.java174
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.sdef21
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassFishLogPageParticipant.java47
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassfishConsoleTracker.java47
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/LogStyle.java110
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/preferences/GlassFishPreferencePage.java77
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/properties/ServerPropertyPage.java169
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/DriverMaps.java355
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JDBCInfo.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JMSInfo.java72
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/MailInfo.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/UrlData.java254
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCResourceWizardPage.java316
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCWizard.java249
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSResourceWizardPage.java256
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSWizard.java216
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailResourceWizardPage.java242
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailWizard.java199
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.java61
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.properties40
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/ResourceWizard.java137
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceClassOperation.java107
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceDataModelProvider.java246
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceTemplateModel.java228
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizard.java97
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizardPage.java318
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/ContainerResourceTemplate.java343
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/GenericResourceTemplate.java368
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.properties33
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ApplicationNode.java82
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedApplicationsNode.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedWebServicesNode.java77
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/GenericActionProvider.java116
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/NodeTypes.java81
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ResourcesNode.java156
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ServerViewActionProvider.java120
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ServerViewContentProvider.java93
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ServerViewLabelProvider.java80
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ServerViewViewerSorter.java27
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/TreeNode.java93
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/WebServiceNode.java76
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/actions/OpenInBrowserAction.java87
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/actions/TestWebServiceAction.java80
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/actions/UndeployAction.java158
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/actions/UnregisterResourceAction.java165
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/actions/WSDLInfoWebServiceAction.java80
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishSapphireRuntimeWizardFragment.java97
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishSapphireServerWizardFragment.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishSapphireWizardFragment.java159
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishTestConnectionAction.java95
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishWizardResources.java23
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/GlassfishWizardResources.properties2
-rw-r--r--plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/wizards/NewGlassfishDomainAction.java65
-rw-r--r--plugins/org.eclipse.glassfish.tools/.classpath7
-rw-r--r--plugins/org.eclipse.glassfish.tools/.gitignore6
-rw-r--r--plugins/org.eclipse.glassfish.tools/.project28
-rw-r--r--plugins/org.eclipse.glassfish.tools/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--plugins/org.eclipse.glassfish.tools/LICENSE.md637
-rw-r--r--plugins/org.eclipse.glassfish.tools/META-INF/MANIFEST.MF90
-rw-r--r--plugins/org.eclipse.glassfish.tools/about.html28
-rw-r--r--plugins/org.eclipse.glassfish.tools/about.ini2
-rw-r--r--plugins/org.eclipse.glassfish.tools/about.properties9
-rw-r--r--plugins/org.eclipse.glassfish.tools/build.properties12
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/glassfish-application-client_6_0-1.dtd554
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/glassfish-application_6_0-1.dtd544
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/glassfish-ejb-jar_3_1-1.dtd1186
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/glassfish-resources_1_5.dtd866
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/glassfish-web-app_3_0-1.dtd846
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sip-app_1_0.dtd820
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client-container_1_0.dtd130
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client-container_1_1.dtd271
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client-container_1_2.dtd274
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client_1_3-0.dtd64
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client_1_4-0.dtd189
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client_1_4-1.dtd438
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client_5_0-0.dtd502
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application-client_6_0-0.dtd515
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application_1_3-0.dtd37
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application_1_4-0.dtd51
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application_5_0-0.dtd58
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-application_6_0-0.dtd498
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-cmp-mapping_1_0.dtd107
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-cmp-mapping_1_1.dtd106
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-cmp-mapping_1_2.dtd113
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-connector_1_0-0.dtd73
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-connector_1_5-0.dtd69
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-converged-loadbalancer_1_0.dtd121
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-data-centric-rule_1_0.dtd62
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_0.dtd2007
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_1.dtd3080
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_2.dtd3697
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_3.dtd3867
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_4.dtd4399
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-domain_1_5.dtd4749
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_2_0-0.dtd449
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_2_0-1.dtd454
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_2_1-0.dtd756
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_2_1-1.dtd1085
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_3_0-0.dtd1113
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_3_0-1.dtd1148
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-ejb-jar_3_1-0.dtd1108
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-loadbalancer_1_0.dtd156
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-loadbalancer_1_1.dtd172
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-loadbalancer_1_2.dtd207
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-resources_1_0.dtd650
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-resources_1_1.dtd650
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-resources_1_2.dtd662
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-resources_1_3.dtd732
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-resources_1_4.dtd832
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-server_1_0.dtd1063
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-sip-app_1_1-0.dtd467
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_2_3-0.dtd237
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_2_3-1.dtd237
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_2_4-0.dtd473
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_2_4-1.dtd749
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_2_5-0.dtd796
-rw-r--r--plugins/org.eclipse.glassfish.tools/dtds/sun-web-app_3_0-0.dtd800
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/GlassFishLogo.pngbin0 -> 3908 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/Javaicon.gifbin0 -> 1094 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/obj16/appclient_module.gifbin0 -> 604 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/obj16/glassfishserver.gifbin0 -> 29310 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/obj16/java_jar.gifbin0 -> 594 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/icons/obj16/registration.pngbin0 -> 642 bytes
-rw-r--r--plugins/org.eclipse.glassfish.tools/plugin.properties43
-rw-r--r--plugins/org.eclipse.glassfish.tools/plugin.xml789
-rw-r--r--plugins/org.eclipse.glassfish.tools/schema/runtimeComponentProviders.exsd65
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/AdminURLHelper.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/AssembleModules.java462
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/ExportJavaEEArchive.java70
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/FacetActionConfigFactory.java24
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/FacetUninstallDelegate.java51
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassFishInstall.java443
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassFishRuntime.java358
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassFishServer.java1001
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassFishServerBehaviour.java1021
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassFishTools.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassfishLaunchableAdapterDelegate.java144
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassfishServerConfigServices.java290
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassfishServerLaunchDelegate.java456
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/GlassfishToolsPlugin.java143
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/ICreateGlassfishDomainOp.java104
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/IGlassfishRuntimeModel.java78
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/IGlassfishServerModel.java182
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/InstallJAXRS.java28
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/LastTaskEventListener.java42
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/Messages.java86
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/Messages.properties75
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/PreferenceConstants.java28
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/ReadDomainInfo.java296
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/RuntimeComponentProvider.java35
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/RuntimeConfigurator.java289
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/ServerStatus.java24
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/StartupArgsImpl.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/exceptions/GlassfishLaunchException.java50
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/exceptions/HttpPortUpdateException.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/exceptions/UniqueNameNotFound.java20
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/GlassfishEjbFacetInstallDelegate.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/GlassfishEjbFacetUninstallDelegate.java26
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/GlassfishWebFacetInstallDelegate.java40
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/GlassfishWebFacetUninstallDelegate.java26
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/IGlassfishDeploymentDescriptor.java20
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/IGlassfishEjbDeploymentDescriptor.java17
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/IGlassfishWebDeploymentDescriptor.java20
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/AbstractGlassfishDeploymentDescriptor.java37
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishDeploymentDescriptorFactory.java57
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishDescriptorRootController.java102
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishDescriptorType.java84
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishEJBDescriptorRootController.java25
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishEjbDeploymentDescriptorSapphire.java57
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/internal/GlassfishWebDeploymentDescriptorSapphire.java69
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/models/IGlassfishDeploymentDescriptorModel.java42
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/facets/models/IGlassfishEjbDescriptorModel.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/AbstractGlassfishSelectionHandler.java62
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/AquariumHandler.java17
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/GetSupportHandler.java18
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/GlassFishStateTester.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/GlassFishVersionTester.java29
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/OpenDomainHomeHandler.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/OpenServerHomeHandler.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/ShowURLHandler.java46
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/URIHelper.java47
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/UpdateCenterHandler.java112
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/UpdateCenterV2Handler.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/ViewAdminConsoleHandler.java52
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/handlers/ViewLogHandler.java51
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/ContainsRuntimeComponentType.java142
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/CreateGlassfishDomainOpMethods.java108
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/DomainNameValidationService.java44
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/GlassFishClasspathProvider.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/GlassFishRuntimeBridge.java163
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/GlassfishStateResolver.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/Library.java49
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/ManifestUtil.java189
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/RuntimeComponentProvidersExtensionPoint.java127
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/ServerStateListener.java18
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/ServerStatusMonitor.java119
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/SystemLibrariesContainer.java444
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/SystemLibrariesContainer.properties1
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/internal/SystemLibrariesSetting.java115
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/AbstractGlassfishConsole.java41
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/AbstractLogFilter.java105
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/GlassfishConsole.java145
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/GlassfishConsoleManager.java129
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/GlassfishStartupConsole.java24
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/IGlassFishConsole.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/ILogFilter.java26
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/LevelResolver.java60
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/LogFormatterSimple.java41
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/LogReader.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/LogRecord.java107
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/NoOpFilter.java23
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/PatternLogFilterV4.java65
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/StateLogFilterV3.java232
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/log/V3LogFilter.java259
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/preferences/PreferenceInitializer.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/ExceptionMessages.properties12
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/GlassFishIdeException.java154
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/GlassFishStatus.java504
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/GlassFishStatusListener.java71
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/GlassFishToolsConfig.java61
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/LogMessages.properties21
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/TaskEvent.java192
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/TaskState.java114
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/TaskStateListener.java34
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ActionReport.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/AdminFactory.java134
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/AdminFactoryHttp.java87
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/AdminFactoryRest.java87
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/Command.java73
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandAddResources.java127
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandChangeAdminPassword.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateAdminObject.java94
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateCluster.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateConnector.java104
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateConnectorConnectionPool.java81
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateInstance.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateJDBCConnectionPool.java202
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandCreateJDBCResource.java158
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandDeleteCluster.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandDeleteInstance.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandDeleteResource.java72
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandDeploy.java118
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandDisable.java44
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandEnable.java44
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandException.java135
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandFetchLogData.java72
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandGetProperty.java125
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandJava.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandJavaClassPath.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandListComponents.java80
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandListResources.java107
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandListWebServices.java40
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandLocation.java98
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandRedeploy.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandRestartDAS.java87
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandRestoreDomain.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandSetProperty.java187
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStartCluster.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStartDAS.java71
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStartInstance.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStopCluster.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStopDAS.java76
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandStopInstance.java79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandTarget.java44
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandTargetName.java46
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandUndeploy.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/CommandVersion.java132
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ExceptionMessages.properties60
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/LogMessages.properties126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/MessagePart.java38
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/PasswordFile.java366
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ProcessIOContent.java423
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ProcessIOParser.java413
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ProcessIOResult.java33
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/Result.java93
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ResultList.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ResultLog.java58
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ResultMap.java57
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ResultProcess.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ResultString.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/Runner.java992
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerAsadmin.java315
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerAsadminChangeAdminPassword.java116
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerAsadminRestoreDomain.java128
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttp.java543
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpAddResources.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpClass.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateAdminObject.java133
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateConnector.java114
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateConnectorConnectionPool.java126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateInstance.java139
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateJDBCConnectionPool.java126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpCreateJDBCResource.java126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpDeleteInstance.java70
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpDeleteResource.java65
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpDeploy.java300
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpEnableDisable.java99
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpGetProperty.java126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpListComponents.java103
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpListResources.java117
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpListWebServices.java102
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpLocation.java66
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpRedeploy.java147
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpRestartDAS.java82
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpSetProperty.java49
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpTarget.java86
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerHttpUndeploy.java101
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerJava.java308
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerLocal.java264
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRest.java304
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestAddResources.java51
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestClass.java36
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateCluster.java60
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateConnector.java60
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateConnectorPool.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateInstance.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateJDBCConnectionPool.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestCreateJDBCResource.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestDeleteCluster.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestDeleteInstance.java48
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestDeleteResource.java46
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestDeploy.java203
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestDisable.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestEnable.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestFetchLogData.java229
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestGetProperty.java131
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestList.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestListApplications.java38
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestListResources.java38
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestListWebServices.java38
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestLocation.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestSetProperty.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestStartCluster.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestStartInstance.java48
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestStopCluster.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestStopDAS.java52
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestStopInstance.java48
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/RunnerRestUndeploy.java52
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ServerAdmin.java208
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ValueLog.java118
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/ValueProcess.java107
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/CloudTasks.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/CommandCloud.java59
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/CommandCloudDeploy.java58
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/RunnerHttpCloud.java73
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/RunnerRestCloud.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/cloud/RunnerRestCloudDeploy.java124
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/ActionReport.java46
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/MessagePart.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/ResponseContentType.java34
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/ResponseParser.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/ResponseParserFactory.java48
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/RestActionReport.java70
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/RestResponseParser.java24
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/admin/response/RestXMLResponseParser.java207
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/DataException.java119
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/ExceptionMessages.properties8
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishAdminInterface.java103
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishConfig.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishContainer.java155
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishJavaEEConfig.java90
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishJavaSEConfig.java71
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishLibrary.java161
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishServerStatus.java42
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishStatusCheck.java116
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishStatusCheckResult.java124
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/GlassFishStatusTask.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/IdeContext.java33
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/LogMessages.properties7
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/StartupArgs.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/StartupArgsEntity.java147
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/ToolConfig.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/ToolsConfig.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/cloud/GlassFishAccount.java66
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/cloud/GlassFishAccountEntity.java221
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/cloud/GlassFishCloud.java57
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/data/cloud/GlassFishCloudEntity.java160
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/logging/Logger.java412
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/ExceptionMessages.properties20
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLog.java130
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogEvent.java54
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogEventListener.java26
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogException.java63
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogLocal.java208
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogPiped.java408
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogRemote.java158
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/FetchLogSimple.java58
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/JpaSupport.java137
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/LogMessages.properties48
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/ServerStatus.java1158
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/ServerTasks.java379
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/AsadminTool.java58
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/ConfigBuilder.java291
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/ConfigBuilderProvider.java112
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/ConfigUtils.java244
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/FileSet.java114
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/GlassFishConfigManager.java32
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/GlassFishConfigXMLImpl.java126
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/GlassFishTool.java52
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/GlassFishV3.xml79
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/GlassFishV4.xml78
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/JavaEEProfile.java295
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/JavaEESet.java190
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/JavaSEPlatform.java142
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/JavaSESet.java84
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/JavaSet.java53
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/LibraryNode.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/ModuleType.java121
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/ServerConfigException.java91
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/config/Tools.java55
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/AbstractReader.java62
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReader.java66
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderClasspath.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderJava.java94
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderJavaEE.java168
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderJavaSE.java142
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderJavadocs.java91
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderServer.java169
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderSources.java41
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ConfigReaderTools.java160
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/FilesetReader.java97
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/HttpData.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/HttpListenerReader.java104
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JavaEEModuleReader.java147
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JavaEEProfileCheckReader.java203
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JavaEEProfileReader.java166
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JavaSEPlatformReader.java100
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JmxConnectorReader.java83
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/JvmConfigReader.java190
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/LinkReader.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/LogMessages.properties41
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/LookupReader.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/NetworkListenerReader.java111
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/PathReader.java95
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ResourcesReader.java123
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/TargetConfigNameReader.java63
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/TargetConfigReader.java60
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/ToolsAsadminReader.java97
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/TreeParser.java463
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/parser/XMLReader.java30
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/AbstractTask.java108
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/AdminPortTask.java237
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/ExceptionMessages.properties25
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/GlassFishStatusEntity.java100
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/LogMessages.properties49
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/RunnerTask.java147
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/ServerStateException.java74
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusJob.java1348
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusJobState.java199
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusResult.java78
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusResultLocations.java72
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusResultVersion.java70
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/server/state/StatusScheduler.java751
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/CyclicStringBuffer.java170
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/ExceptionMessages.properties15
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/Jar.java123
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/JarException.java95
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/JavaUtils.java364
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/LinkedList.java630
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/LogMessages.properties16
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/NetUtils.java446
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/OsUtils.java412
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/ServerUtils.java920
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/StringPrefixTree.java556
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/sdk/utils/Utils.java189
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/serverview/AppDesc.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/serverview/ResourceDesc.java43
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/serverview/WSDesc.java41
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/JavaLocationDefaultValueService.java138
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/JavaLocationValidationService.java45
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/JdkFilter.java42
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/JdtUtil.java503
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/ModuleUtil.java90
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/NodesUtils.java170
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/PartialCompletionException.java34
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/PluginUtil.java377
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/ResourceUtils.java424
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/ServerStatusHelper.java333
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/StreamGobbler.java68
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/Utils.java439
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/WizardUtil.java69
-rw-r--r--plugins/org.eclipse.glassfish.tools/src/org/eclipse/glassfish/tools/utils/WtpUtil.java50
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_class.template45
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_constructors.template36
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_flags.template8
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_imports.template14
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_methods.template28
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/_package.template13
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/containerresource.javajet76
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/ejbtimer.javajet22
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/generator.skeleton19
-rw-r--r--plugins/org.eclipse.glassfish.tools/templates/genericresource.javajet93
-rw-r--r--releng/.gitignore3
-rw-r--r--releng/associate-sites.xml3
-rw-r--r--releng/site.xml20
558 files changed, 105622 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b25ed91
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/build
+/dev-eclipse
+/dev-target
+.DS_Store
diff --git a/build.properties b/build.properties
new file mode 100644
index 0000000..deaef0f
--- /dev/null
+++ b/build.properties
@@ -0,0 +1,112 @@
+# The name of the product for display purposes
+
+product.name = Eclipse GlassFish Tools
+
+# The prefix to use when creating the product repository archive and other packages
+
+product.package.file.prefix = gf-tools
+
+# The feature that includes all other features
+
+root.feature = org.eclipse.glassfish.tools.everything
+
+# The feature whose version determines the overall product version
+
+version.master.feature = org.eclipse.glassfish.tools
+
+# The names of the supported target configurations, separated by commas
+
+configurations = oxygen.2
+
+# The minimal (oldest) supported configuration
+
+configuration.min = oxygen.2
+
+# The maximum (newest) supported configuration
+
+configuration.max = oxygen.2
+
+# The configuration to use for the main build as well as for dev-eclipse and dev-target
+
+configuration.recommended = oxygen.2
+
+# Common base for all configurations
+
+common.base = \
+${rep.eclipse.sapphire-9.1},\
+${rep.eclipse.mylyn-latest},\
+${rep.eclipse.egit-latest}
+
+# The oxygen.2 configuration
+
+oxygen.2.repositories = \
+${rep.eclipse-oxygen.2},\
+${rep.eclipse.gef-oxygen.2},\
+${rep.eclipse.emf-oxygen.2},\
+${rep.eclipse.datatools-oxygen.2},\
+${rep.eclipse.jetty-oxygen.2},\
+${rep.eclipse.wtp-oxygen.2},\
+${rep.eclipse.orbit-oxygen.2},\
+${common.base}
+
+# Automatically set Require-Bundle version ranges
+
+require.bundle.version.constraint.excludes = \
+.*\.source
+
+require.bundle.version.constraint.rules = \
+*=[M1.M2.M3,T1+1.0.0)
+
+# Automatically set Export-Package versions
+
+set.export.package.versions = false
+
+# FindBugs
+
+findbugs = false
+findbugs.includes = **/plugins/org.eclipse.glassfish.tools*.jar
+findbugs.excludes = **/plugins/*.source_*.jar
+
+# Installables
+
+iu.glassfish.tools = org.eclipse.glassfish.tools.feature.group
+iu.glassfish.tools.source = org.eclipse.glassfish.tools.source.feature.group
+
+# The components to install in build's target platform
+
+iu.build.target = \
+${iu.eclipse.jdt},\
+${iu.eclipse.pde},\
+${iu.eclipse.gef},\
+${iu.eclipse.emf},\
+${iu.eclipse.datatools},\
+${iu.eclipse.wtp},\
+${iu.eclipse.sapphire}
+
+# The components to install in dev-target (typically the same as build target, but with source)
+
+iu.dev.target = \
+${iu.eclipse.platform.source},\
+${iu.eclipse.jdt},\
+${iu.eclipse.jdt.source},\
+${iu.eclipse.pde},\
+${iu.eclipse.pde.source},\
+${iu.eclipse.gef.sdk},\
+${iu.eclipse.emf.sdk},\
+${iu.eclipse.datatools.sdk},\
+${iu.eclipse.wtp.sdk},\
+${iu.eclipse.sapphire},\
+${iu.eclipse.sapphire.source},\
+${iu.glassfish.tools},\
+${iu.glassfish.tools.source}
+
+# The components to install in dev-eclipse
+
+iu.dev.env = \
+${iu.eclipse.jdt},\
+${iu.eclipse.pde},\
+${iu.eclipse.xml.tools},\
+${iu.eclipse.emf.sdk},\
+${iu.eclipse.mylyn},\
+${iu.eclipse.egit},\
+${iu.eclipse.sapphire.sdk}
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..a0a04f9
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,18 @@
+<project name="gf-tools" default="full-build">
+
+ <dirname property="root.dir" file="${ant.file.sapphire}"/>
+ <property name="build.dir" value="${root.dir}/build"/>
+ <property name="releng.dir" value="${root.dir}/releng"/>
+
+ <delete dir="releng/corundum" quiet="true"/>
+ <property name="corundum-url" value="https://hudson.eclipse.org/sapphire/job/Corundum/lastSuccessfulBuild/artifact/corundum.zip"/>
+ <get src="${corundum-url}" dest="releng/corundum.zip" usetimestamp="true"/>
+ <unzip src="releng/corundum.zip" dest="releng/corundum"/>
+
+ <import file="releng/corundum/corundum.xml"/>
+
+ <import>
+ <fileset dir="releng/corundum/extensions/eclipse.org" includes="*.xml"/>
+ </import>
+
+</project>
diff --git a/description b/description
new file mode 100644
index 0000000..f6e7152
--- /dev/null
+++ b/description
@@ -0,0 +1 @@
+Eclipse GlassFish Tools
diff --git a/features/org.eclipse.glassfish.tools.everything/.project b/features/org.eclipse.glassfish.tools.everything/.project
new file mode 100644
index 0000000..7bb7646
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.everything/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.glassfish.tools.everything.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.glassfish.tools.everything/LICENSE.md b/features/org.eclipse.glassfish.tools.everything/LICENSE.md
new file mode 100644
index 0000000..5de3d1b
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.everything/LICENSE.md
@@ -0,0 +1,637 @@
+# Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+ 1. DEFINITIONS
+
+ "Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+ "Contributor" means any person or entity that Distributes the Program.
+
+ "Licensed Patents" mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+
+ "Program" means the Contributions Distributed in accordance with this
+ Agreement.
+
+ "Recipient" means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+
+ "Derivative Works" shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+
+ "Modified Works" shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations,
+ interfaces, types, classes, structures, or files of the Program solely
+ in each case in order to link to, bind by name, or subclass the Program
+ or Modified Works thereof.
+
+ "Distribute" means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+
+ "Source Code" means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+
+ "Secondary License" means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+
+ 2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+ 3. REQUIREMENTS
+
+ 3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+ 3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+ 3.3 Contributors may not remove or alter any copyright, patent,
+ trademark, attribution notices, disclaimers of warranty, or limitations
+ of liability ("notices") contained within the Program from any copy of
+ the Program which they Distribute, provided that Contributors may add
+ their own appropriate notices.
+
+ 4. COMMERCIAL DISTRIBUTION
+
+ Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program,
+ the Contributor who includes the Program in a commercial product
+ offering should do so in a manner which does not create potential
+ liability for other Contributors. Therefore, if a Contributor includes
+ the Program in a commercial product offering, such Contributor
+ ("Commercial Contributor") hereby agrees to defend and indemnify every
+ other Contributor ("Indemnified Contributor") against any losses,
+ damages and costs (collectively "Losses") arising from claims, lawsuits
+ and other legal actions brought by a third party against the Indemnified
+ Contributor to the extent caused by the acts or omissions of such
+ Commercial Contributor in connection with its distribution of the Program
+ in a commercial product offering. The obligations in this section do not
+ apply to any claims or Losses relating to any actual or alleged
+ intellectual property infringement. In order to qualify, an Indemnified
+ Contributor must: a) promptly notify the Commercial Contributor in
+ writing of such claim, and b) allow the Commercial Contributor to control,
+ and cooperate with the Commercial Contributor in, the defense and any
+ related settlement negotiations. The Indemnified Contributor may
+ participate in any such claim at its own expense.
+
+ For example, a Contributor might include the Program in a commercial
+ product offering, Product X. That Contributor is then a Commercial
+ Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance
+ claims and warranties are such Commercial Contributor's responsibility
+ alone. Under this section, the Commercial Contributor would have to
+ defend claims against the other Contributors related to those performance
+ claims and warranties, and if a court requires any other Contributor to
+ pay any damages as a result, the Commercial Contributor must pay
+ those damages.
+
+ 5. NO WARRANTY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+ IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+ PURPOSE. Each Recipient is solely responsible for determining the
+ appropriateness of using and distributing the Program and assumes all
+ risks associated with its exercise of rights under this Agreement,
+ including but not limited to the risks and costs of program errors,
+ compliance with applicable laws, damage to or loss of data, programs
+ or equipment, and unavailability or interruption of operations.
+
+ 6. DISCLAIMER OF LIABILITY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+ SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+ PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+ EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+ 7. GENERAL
+
+ If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of
+ the remainder of the terms of this Agreement, and without further
+ action by the parties hereto, such provision shall be reformed to the
+ minimum extent necessary to make such provision valid and enforceable.
+
+ If Recipient institutes patent litigation against any entity
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
+ Program itself (excluding combinations of the Program with other software
+ or hardware) infringes such Recipient's patent(s), then such Recipient's
+ rights granted under Section 2(b) shall terminate as of the date such
+ litigation is filed.
+
+ All Recipient's rights under this Agreement shall terminate if it
+ fails to comply with any of the material terms or conditions of this
+ Agreement and does not cure such failure in a reasonable period of
+ time after becoming aware of such noncompliance. If all Recipient's
+ rights under this Agreement terminate, Recipient agrees to cease use
+ and distribution of the Program as soon as reasonably practicable.
+ However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+ Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and
+ may only be modified in the following manner. The Agreement Steward
+ reserves the right to publish new versions (including revisions) of
+ this Agreement from time to time. No one other than the Agreement
+ Steward has the right to modify this Agreement. The Eclipse Foundation
+ is the initial Agreement Steward. The Eclipse Foundation may assign the
+ responsibility to serve as the Agreement Steward to a suitable separate
+ entity. Each new version of the Agreement will be given a distinguishing
+ version number. The Program (including Contributions) may always be
+ Distributed subject to the version of the Agreement under which it was
+ received. In addition, after a new version of the Agreement is published,
+ Contributor may elect to Distribute the Program (including its
+ Contributions) under the new version.
+
+ Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+
+ Exhibit A - Form of Secondary Licenses Notice
+
+ "This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
+
+---
+
+## The GNU General Public License (GPL) Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor
+ Boston, MA 02110-1335
+ USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your freedom to
+ share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change free software--to
+ make sure the software is free for all its users. This General Public
+ License applies to most of the Free Software Foundation's software and
+ to any other program whose authors commit to using it. (Some other Free
+ Software Foundation software is covered by the GNU Library General
+ Public License instead.) You can apply it to your programs, too.
+
+ When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this
+ service if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new
+ free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights. These
+ restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you have.
+ You must make sure that they, too, receive or can get the source code.
+ And you must show them these terms so they know their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software. If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+
+ Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent must
+ be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed under
+ the terms of this General Public License. The "Program", below, refers
+ to any such program or work, and a "work based on the Program" means
+ either the Program or any derivative work under copyright law: that is
+ to say, a work containing the Program or a portion of it, either
+ verbatim or with modifications and/or translated into another language.
+ (Hereinafter, translation is included without limitation in the term
+ "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of running
+ the Program is not restricted, and the output from the Program is
+ covered only if its contents constitute a work based on the Program
+ (independent of having been made by running the Program). Whether that
+ is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's source
+ code as you receive it, in any medium, provided that you conspicuously
+ and appropriately publish on each copy an appropriate copyright notice
+ and disclaimer of warranty; keep intact all the notices that refer to
+ this License and to the absence of any warranty; and give any other
+ recipients of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion of
+ it, thus forming a work based on the Program, and copy and distribute
+ such modifications or work under the terms of Section 1 above, provided
+ that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third parties
+ under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this License.
+ (Exception: if the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program
+ is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program, and
+ can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based on
+ the Program, the distribution of the whole must be on the terms of this
+ License, whose permissions for other licensees extend to the entire
+ whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of a
+ storage or distribution medium does not bring the other work under the
+ scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your cost
+ of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed
+ only for noncommercial distribution and only if you received the
+ program in object code or executable form with such an offer, in
+ accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source code
+ means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special
+ exception, the source code distributed need not include anything that is
+ normally distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on
+ which the executable runs, unless that component itself accompanies the
+ executable.
+
+ If distribution of executable or object code is made by offering access
+ to copy from a designated place, then offering equivalent access to copy
+ the source code from the same place counts as distribution of the source
+ code, even though third parties are not compelled to copy the source
+ along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt otherwise
+ to copy, modify, sublicense or distribute the Program is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will
+ not have their licenses terminated so long as such parties remain in
+ full compliance.
+
+ 5. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and all
+ its terms and conditions for copying, distributing or modifying the
+ Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not
+ responsible for enforcing compliance by third parties to this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot distribute
+ so as to satisfy simultaneously your obligations under this License and
+ any other pertinent obligations, then as a consequence you may not
+ distribute the Program at all. For example, if a patent license would
+ not permit royalty-free redistribution of the Program by all those who
+ receive copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely from
+ distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is implemented
+ by public license practices. Many people have made generous
+ contributions to the wide range of software distributed through that
+ system in reliance on consistent application of that system; it is up to
+ the author/donor to decide if he or she is willing to distribute
+ software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License may
+ add an explicit geographical distribution limitation excluding those
+ countries, so that distribution is permitted only in or among countries
+ not thus excluded. In such case, this License incorporates the
+ limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Program does not specify a version
+ number of this License, you may choose any version ever published by the
+ Free Software Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted by the
+ Free Software Foundation, write to the Free Software Foundation; we
+ sometimes make exceptions for this. Our decision will be guided by the
+ two goals of preserving the free status of all derivatives of our free
+ software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+ AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest to
+ attach them to the start of each source file to most effectively convey
+ the exclusion of warranty; and each file should have at least the
+ "copyright" line and a pointer to where the full notice is found.
+
+ One line to give the program's name and a brief idea of what it does.
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
+ `show w'. This is free software, and you are welcome to redistribute
+ it under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the
+ appropriate parts of the General Public License. Of course, the commands
+ you use may be called something other than `show w' and `show c'; they
+ could even be mouse-clicks or menu items--whatever suits your program.
+
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (which makes passes at compilers) written by
+ James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+ This General Public License does not permit incorporating your program
+ into proprietary programs. If your program is a subroutine library, you
+ may consider it more useful to permit linking proprietary applications
+ with the library. If this is what you want to do, use the GNU Library
+ General Public License instead of this License.
+
+---
+
+## CLASSPATH EXCEPTION
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License version 2 cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from or
+ based on this library. If you modify this library, you may extend this
+ exception to your version of the library, but you are not obligated to
+ do so. If you do not wish to do so, delete this exception statement
+ from your version.
diff --git a/features/org.eclipse.glassfish.tools.everything/build.properties b/features/org.eclipse.glassfish.tools.everything/build.properties
new file mode 100644
index 0000000..64f93a9
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.everything/build.properties
@@ -0,0 +1 @@
+bin.includes = feature.xml
diff --git a/features/org.eclipse.glassfish.tools.everything/feature.xml b/features/org.eclipse.glassfish.tools.everything/feature.xml
new file mode 100644
index 0000000..107e189
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.everything/feature.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<feature id="org.eclipse.glassfish.tools.everything" label="GlassFish Tools Build Wrapper" provider-name="Eclipse.org - GlassFish Tools" version="1.0.0.qualifier">
+
+ <includes id="org.eclipse.glassfish.tools" version="0.0.0"/>
+ <includes id="org.eclipse.glassfish.tools.source" version="0.0.0"/>
+
+</feature>
diff --git a/features/org.eclipse.glassfish.tools.source/.project b/features/org.eclipse.glassfish.tools.source/.project
new file mode 100644
index 0000000..8a79ec6
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.glassfish.tools.source.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.glassfish.tools.source/.settings/oracle.eclipse.tools.webtier.ui.prefs b/features/org.eclipse.glassfish.tools.source/.settings/oracle.eclipse.tools.webtier.ui.prefs
new file mode 100644
index 0000000..e3869fb
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/.settings/oracle.eclipse.tools.webtier.ui.prefs
@@ -0,0 +1,2 @@
+_hiddenCategory_\:HTML=false
+eclipse.preferences.version=1
diff --git a/features/org.eclipse.glassfish.tools.source/build.properties b/features/org.eclipse.glassfish.tools.source/build.properties
new file mode 100644
index 0000000..538ec49
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/build.properties
@@ -0,0 +1,7 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ epl-v20.html,\
+ license.html
+generate.plugin@org.eclipse.glassfish.tools.source=org.eclipse.glassfish.tools
+generate.plugin@org.eclipse.glassfish.tools.jver.source=org.eclipse.glassfish.tools.jver
+generate.plugin@org.eclipse.glassfish.tools.ui.source=org.eclipse.glassfish.tools.ui
diff --git a/features/org.eclipse.glassfish.tools.source/epl-v20.html b/features/org.eclipse.glassfish.tools.source/epl-v20.html
new file mode 100644
index 0000000..626fd4a
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/epl-v20.html
@@ -0,0 +1,300 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0058)https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+
+</body></html> \ No newline at end of file
diff --git a/features/org.eclipse.glassfish.tools.source/feature.properties b/features/org.eclipse.glassfish.tools.source/feature.properties
new file mode 100644
index 0000000..8558c5a
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/feature.properties
@@ -0,0 +1,162 @@
+featureName=GlassFish Tools Source
+providerName=Eclipse.org - GlassFish Tools
+
+featureDescription=\
+Source code for GlassFish Tools.
+
+copyright = \
+Copyright (c) 2018 Oracle\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v2.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v20.html (SPDX-License-Identifier: EPL-2.0)
+
+# "licenseURL" property - URL of the license
+# do not translate value - just change to point to a locale-specific HTML page
+
+licenseURL=license.html
+
+# "license" property - text of the license
+# should be plain text version of license agreement pointed to be "licenseURL"
+
+license=\
+Eclipse Foundation Software User Agreement\n\
+\n\
+November 22, 2017\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
+AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
+THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
+BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
+APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
+MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public License\n\
+Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
+available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
+"Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code, documentation\n\
+and other files maintained in the Eclipse Foundation source code repository\n\
+("Repository") in software modules ("Modules") and made available as\n\
+downloadable archives ("Downloads").\n\
+\n\
+- Content may be structured and packaged into modules to facilitate\n\
+ delivering, extending, and upgrading the Content. Typical modules may\n\
+ include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
+ features ("Features").\n\
+- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
+ (Java(TM) ARchive) in a directory named "plugins".\n\
+- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
+ associated material. Each Feature may be packaged as a sub-directory in a\n\
+ directory named "features". Within a Feature, files named "feature.xml" may\n\
+ contain a list of the names and version numbers of the Plug-ins and/or\n\
+ Fragments associated with that Feature.\n\
+- Features may also include other Features ("Included Features"). Within a\n\
+ Feature, files named "feature.xml" may contain a list of the names and\n\
+ version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be contained in\n\
+files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
+and Included Features should be contained in files named "license.html"\n\
+("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
+directory of a Download or Module including, but not limited to the following\n\
+locations:\n\
+\n\
+- The top-level (root) directory\n\
+- Plug-in and Fragment directories\n\
+- Inside Plug-ins and Fragments packaged as JARs\n\
+- Sub-directories of the directory named "src" of certain Plug-ins\n\
+- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using\n\
+the Provisioning Technology (as defined below), you must agree to a license\n\
+("Feature Update License") during the installation process. If the Feature\n\
+contains Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform you\n\
+where you can locate them. Feature Update Licenses may be found in the "license"\n\
+property of files named "feature.properties" found within a Feature. Such\n\
+Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your use of\n\
+the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
+OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+- Eclipse Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/epl-v10.html)\n\
+- Eclipse Distribution License Version 1.0 (available at\n\
+ http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+- Common Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/cpl-v10.html)\n\
+- Apache Software License 1.1 (available at\n\
+ http://www.apache.org/licenses/LICENSE)\n\
+- Apache Software License 2.0 (available at\n\
+ http://www.apache.org/licenses/LICENSE-2.0)\n\
+- Mozilla Public License Version 1.1 (available at\n\
+ http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
+USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
+provided, please contact the Eclipse Foundation to determine what terms and\n\
+conditions govern that particular Content.\n\
+\n\
+Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which\n\
+include, but are not limited to, p2 and the Eclipse Update Manager\n\
+("Provisioning Technology") for the purpose of allowing users to install\n\
+software, documentation, information and/or other materials (collectively\n\
+"Installable Software"). This capability is provided with the intent of allowing\n\
+such users to install, extend and update Eclipse-based products. Information\n\
+about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install\n\
+Installable Software. You shall be responsible for enabling the applicable\n\
+license agreements relating to the Installable Software to be presented to, and\n\
+accepted by, the users of the Provisioning Technology in accordance with the\n\
+Specification. By using Provisioning Technology in such a manner and making it\n\
+available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the\n\
+following:\n\
+\n\
+1. A series of actions may occur ("Provisioning Process") in which a user may\n\
+ execute the Provisioning Technology on a machine ("Target Machine") with the\n\
+ intent of installing, extending or updating the functionality of an\n\
+ Eclipse-based product.\n\
+2. During the Provisioning Process, the Provisioning Technology may cause third\n\
+ party Installable Software or a portion thereof to be accessed and copied to\n\
+ the Target Machine.\n\
+3. Pursuant to the Specification, you will provide to the user the terms and\n\
+ conditions that govern the use of the Installable Software ("Installable\n\
+ Software Agreement") and such Installable Software Agreement shall be\n\
+ accessed from the Target Machine in accordance with the Specification. Such\n\
+ Installable Software Agreement must inform the user of the terms and\n\
+ conditions that govern the Installable Software and must solicit acceptance\n\
+ by the end user in the manner prescribed in such Installable\n\
+ Software Agreement. Upon such indication of agreement by the user, the\n\
+ provisioning Technology will complete installation of the\n\
+ Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are currently\n\
+may have restrictions on the import, possession, and use, and/or re-export to\n\
+another country, of encryption software. BEFORE using any encryption software,\n\
+please check the country's laws, regulations and policies concerning the import,\n\
+possession, or use, and re-export of encryption software, to see if this is\n\
+permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
+United States, other countries, or both.
diff --git a/features/org.eclipse.glassfish.tools.source/feature.xml b/features/org.eclipse.glassfish.tools.source/feature.xml
new file mode 100644
index 0000000..f4cfc85
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/feature.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<feature id="org.eclipse.glassfish.tools.source" label="%featureName" provider-name="%providerName" version="1.0.0.qualifier">
+
+ <description>
+ %featureDescription
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="license.html">
+ %license
+ </license>
+
+ <plugin download-size="0" id="org.eclipse.glassfish.tools.source" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.glassfish.tools.jver.source" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.glassfish.tools.ui.source" install-size="0" unpack="false" version="0.0.0"/>
+
+</feature>
diff --git a/features/org.eclipse.glassfish.tools.source/license.html b/features/org.eclipse.glassfish.tools.source/license.html
new file mode 100644
index 0000000..b267fa4
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools.source/license.html
@@ -0,0 +1,181 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+ <h2>Eclipse Foundation Software User Agreement</h2>
+ <p>November 22, 2017</p>
+
+ <h3>Usage Of Content</h3>
+
+ <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
+ INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY
+ THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
+ GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
+ APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
+ AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
+ AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
+ USE THE CONTENT.</p>
+
+ <h3>Applicable Licenses</h3>
+
+ <p>
+ Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+ Eclipse Public License Version 2.0 ("EPL"). A copy of the
+ EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+ For purposes of the EPL, "Program" will mean the Content.
+ </p>
+
+ <p>Content includes, but is not limited to, source code, object
+ code, documentation and other files maintained in the Eclipse
+ Foundation source code repository ("Repository") in software
+ modules ("Modules") and made available as downloadable
+ archives ("Downloads").</p>
+
+ <ul>
+ <li>Content may be structured and packaged into modules to
+ facilitate delivering, extending, and upgrading the Content. Typical
+ modules may include plug-ins ("Plug-ins"), plug-in
+ fragments ("Fragments"), and features
+ ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory
+ or JAR (Java ARchive) in a directory named
+ "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+ Fragments and associated material. Each Feature may be packaged as a
+ sub-directory in a directory named "features". Within a
+ Feature, files named "feature.xml" may contain a list of
+ the names and version numbers of the Plug-ins and/or Fragments
+ associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+ Features"). Within a Feature, files named
+ "feature.xml" may contain a list of the names and version
+ numbers of Included Features.</li>
+ </ul>
+
+ <p>The terms and conditions governing Plug-ins and Fragments should
+ be contained in files named "about.html"
+ ("Abouts"). The terms and conditions governing Features and
+ Included Features should be contained in files named
+ "license.html" ("Feature Licenses"). Abouts and
+ Feature Licenses may be located in any directory of a Download or
+ Module including, but not limited to the following locations:</p>
+
+ <ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of
+ certain Plug-ins</li>
+ <li>Feature directories</li>
+ </ul>
+
+ <p>Note: if a Feature made available by the Eclipse Foundation is
+ installed using the Provisioning Technology (as defined below), you
+ must agree to a license ("Feature Update License") during
+ the installation process. If the Feature contains Included Features,
+ the Feature Update License should either provide you with the terms
+ and conditions governing the Included Features or inform you where you
+ can locate them. Feature Update Licenses may be found in the
+ "license" property of files named
+ "feature.properties" found within a Feature. Such Abouts,
+ Feature Licenses, and Feature Update Licenses contain the terms and
+ conditions (or references to such terms and conditions) that govern
+ your use of the associated Content in that directory.</p>
+
+ <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
+ REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+ CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
+ ARE NOT LIMITED TO):</p>
+
+ <ul>
+ <li>Eclipse Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>)
+ </li>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)
+ </li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)
+ </li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)
+ </li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)
+ </li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)
+ </li>
+ </ul>
+
+ <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+ CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+ or Feature Update License is provided, please contact the Eclipse
+ Foundation to determine what terms and conditions govern that
+ particular Content.</p>
+
+
+ <h3>Use of Provisioning Technology</h3>
+
+ <p>
+ The Eclipse Foundation makes available provisioning software, examples
+ of which include, but are not limited to, p2 and the Eclipse Update
+ Manager ("Provisioning Technology") for the purpose of
+ allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+ capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+ packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").
+ </p>
+
+ <p>You may use Provisioning Technology to allow other parties to
+ install Installable Software. You shall be responsible for enabling
+ the applicable license agreements relating to the Installable Software
+ to be presented to, and accepted by, the users of the Provisioning
+ Technology in accordance with the Specification. By using Provisioning
+ Technology in such a manner and making it available in accordance with
+ the Specification, you further acknowledge your agreement to, and the
+ acquisition of all necessary rights to permit the following:</p>
+
+ <ol>
+ <li>A series of actions may occur ("Provisioning
+ Process") in which a user may execute the Provisioning
+ Technology on a machine ("Target Machine") with the intent
+ of installing, extending or updating the functionality of an
+ Eclipse-based product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+ may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+ the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such
+ Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+ Software Agreement must inform the user of the terms and conditions
+ that govern the Installable Software and must solicit acceptance by
+ the end user in the manner prescribed in such Installable Software
+ Agreement. Upon such indication of agreement by the user, the
+ provisioning Technology will complete installation of the Installable
+ Software.</li>
+ </ol>
+
+ <h3>Cryptography</h3>
+
+ <p>Content may contain encryption software. The country in which
+ you are currently may have restrictions on the import, possession, and
+ use, and/or re-export to another country, of encryption software.
+ BEFORE using any encryption software, please check the country's laws,
+ regulations and policies concerning the import, possession, or use,
+ and re-export of encryption software, to see if this is permitted.</p>
+
+ <p>
+ <small>Java and all Java-based trademarks are trademarks of
+ Oracle Corporation in the United States, other countries, or both.</small>
+ </p>
+
+
+</body></html> \ No newline at end of file
diff --git a/features/org.eclipse.glassfish.tools/.project b/features/org.eclipse.glassfish.tools/.project
new file mode 100644
index 0000000..79b8b2f
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.glassfish.tools.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.glassfish.tools/build.properties b/features/org.eclipse.glassfish.tools/build.properties
new file mode 100644
index 0000000..ac26e89
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/build.properties
@@ -0,0 +1,4 @@
+bin.includes = feature.xml,\
+ feature.properties,\
+ epl-v20.html,\
+ license.html
diff --git a/features/org.eclipse.glassfish.tools/epl-v20.html b/features/org.eclipse.glassfish.tools/epl-v20.html
new file mode 100644
index 0000000..626fd4a
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/epl-v20.html
@@ -0,0 +1,300 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0058)https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+
+</body></html> \ No newline at end of file
diff --git a/features/org.eclipse.glassfish.tools/feature.properties b/features/org.eclipse.glassfish.tools/feature.properties
new file mode 100644
index 0000000..a18f39d
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/feature.properties
@@ -0,0 +1,162 @@
+featureName = GlassFish Tools
+providerName = Eclipse.org - GlassFish Tools
+
+featureDescription=\
+Tools for developing applications for GlassFish.
+
+copyright = \
+Copyright (c) 2018 Oracle\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v2.0\n\
+which accompanies this distribution, and is available at\n\
+http://www.eclipse.org/legal/epl-v20.html (SPDX-License-Identifier: EPL-2.0)
+
+# "licenseURL" property - URL of the license
+# do not translate value - just change to point to a locale-specific HTML page
+
+licenseURL=license.html
+
+# "license" property - text of the license
+# should be plain text version of license agreement pointed to be "licenseURL"
+
+license=\
+Eclipse Foundation Software User Agreement\n\
+\n\
+November 22, 2017\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\
+AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\
+THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\
+TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\
+BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\
+AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\
+APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\
+MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
+is provided to you under the terms and conditions of the Eclipse Public License\n\
+Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\
+available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\
+"Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code, documentation\n\
+and other files maintained in the Eclipse Foundation source code repository\n\
+("Repository") in software modules ("Modules") and made available as\n\
+downloadable archives ("Downloads").\n\
+\n\
+- Content may be structured and packaged into modules to facilitate\n\
+ delivering, extending, and upgrading the Content. Typical modules may\n\
+ include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\
+ features ("Features").\n\
+- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\
+ (Java(TM) ARchive) in a directory named "plugins".\n\
+- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\
+ associated material. Each Feature may be packaged as a sub-directory in a\n\
+ directory named "features". Within a Feature, files named "feature.xml" may\n\
+ contain a list of the names and version numbers of the Plug-ins and/or\n\
+ Fragments associated with that Feature.\n\
+- Features may also include other Features ("Included Features"). Within a\n\
+ Feature, files named "feature.xml" may contain a list of the names and\n\
+ version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be contained in\n\
+files named "about.html" ("Abouts"). The terms and conditions governing Features\n\
+and Included Features should be contained in files named "license.html"\n\
+("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\
+directory of a Download or Module including, but not limited to the following\n\
+locations:\n\
+\n\
+- The top-level (root) directory\n\
+- Plug-in and Fragment directories\n\
+- Inside Plug-ins and Fragments packaged as JARs\n\
+- Sub-directories of the directory named "src" of certain Plug-ins\n\
+- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using\n\
+the Provisioning Technology (as defined below), you must agree to a license\n\
+("Feature Update License") during the installation process. If the Feature\n\
+contains Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform you\n\
+where you can locate them. Feature Update Licenses may be found in the "license"\n\
+property of files named "feature.properties" found within a Feature. Such\n\
+Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\
+conditions (or references to such terms and conditions) that govern your use of\n\
+the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\
+OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+- Eclipse Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/epl-v10.html)\n\
+- Eclipse Distribution License Version 1.0 (available at\n\
+ http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+- Common Public License Version 1.0 (available at\n\
+ http://www.eclipse.org/legal/cpl-v10.html)\n\
+- Apache Software License 1.1 (available at\n\
+ http://www.apache.org/licenses/LICENSE)\n\
+- Apache Software License 2.0 (available at\n\
+ http://www.apache.org/licenses/LICENSE-2.0)\n\
+- Mozilla Public License Version 1.1 (available at\n\
+ http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\
+USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\
+provided, please contact the Eclipse Foundation to determine what terms and\n\
+conditions govern that particular Content.\n\
+\n\
+Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which\n\
+include, but are not limited to, p2 and the Eclipse Update Manager\n\
+("Provisioning Technology") for the purpose of allowing users to install\n\
+software, documentation, information and/or other materials (collectively\n\
+"Installable Software"). This capability is provided with the intent of allowing\n\
+such users to install, extend and update Eclipse-based products. Information\n\
+about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install\n\
+Installable Software. You shall be responsible for enabling the applicable\n\
+license agreements relating to the Installable Software to be presented to, and\n\
+accepted by, the users of the Provisioning Technology in accordance with the\n\
+Specification. By using Provisioning Technology in such a manner and making it\n\
+available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the\n\
+following:\n\
+\n\
+1. A series of actions may occur ("Provisioning Process") in which a user may\n\
+ execute the Provisioning Technology on a machine ("Target Machine") with the\n\
+ intent of installing, extending or updating the functionality of an\n\
+ Eclipse-based product.\n\
+2. During the Provisioning Process, the Provisioning Technology may cause third\n\
+ party Installable Software or a portion thereof to be accessed and copied to\n\
+ the Target Machine.\n\
+3. Pursuant to the Specification, you will provide to the user the terms and\n\
+ conditions that govern the use of the Installable Software ("Installable\n\
+ Software Agreement") and such Installable Software Agreement shall be\n\
+ accessed from the Target Machine in accordance with the Specification. Such\n\
+ Installable Software Agreement must inform the user of the terms and\n\
+ conditions that govern the Installable Software and must solicit acceptance\n\
+ by the end user in the manner prescribed in such Installable\n\
+ Software Agreement. Upon such indication of agreement by the user, the\n\
+ provisioning Technology will complete installation of the\n\
+ Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are currently\n\
+may have restrictions on the import, possession, and use, and/or re-export to\n\
+another country, of encryption software. BEFORE using any encryption software,\n\
+please check the country's laws, regulations and policies concerning the import,\n\
+possession, or use, and re-export of encryption software, to see if this is\n\
+permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\
+United States, other countries, or both.
diff --git a/features/org.eclipse.glassfish.tools/feature.xml b/features/org.eclipse.glassfish.tools/feature.xml
new file mode 100644
index 0000000..3c92bc7
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/feature.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<feature id="org.eclipse.glassfish.tools" label="%featureName" plugin="org.eclipse.glassfish.tools" provider-name="%providerName" version="1.0.0.qualifier">
+
+ <description>
+ %featureDescription
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+
+ <import feature="org.eclipse.platform" match="compatible" version="4.7.2"/>
+
+ <import feature="org.eclipse.sapphire" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.java" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.java.jdt" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.modeling.xml" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.osgi" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.platform" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.ui" match="compatible" version="9.1"/>
+ <import feature="org.eclipse.sapphire.ui.swt.xml.editor" match="compatible" version="9.1"/>
+
+ </requires>
+
+ <plugin download-size="0" id="org.eclipse.glassfish.tools" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.glassfish.tools.jver" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.glassfish.tools.ui" install-size="0" unpack="false" version="0.0.0"/>
+
+</feature>
diff --git a/features/org.eclipse.glassfish.tools/license.html b/features/org.eclipse.glassfish.tools/license.html
new file mode 100644
index 0000000..b267fa4
--- /dev/null
+++ b/features/org.eclipse.glassfish.tools/license.html
@@ -0,0 +1,181 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- saved from url=(0044)http://www.eclipse.org/legal/epl/notice.html -->
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+ <h2>Eclipse Foundation Software User Agreement</h2>
+ <p>November 22, 2017</p>
+
+ <h3>Usage Of Content</h3>
+
+ <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
+ INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY
+ THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS
+ GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY
+ APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
+ BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
+ AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
+ AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
+ USE THE CONTENT.</p>
+
+ <h3>Applicable Licenses</h3>
+
+ <p>
+ Unless otherwise indicated, all Content made available by the Eclipse
+ Foundation is provided to you under the terms and conditions of the
+ Eclipse Public License Version 2.0 ("EPL"). A copy of the
+ EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>.
+ For purposes of the EPL, "Program" will mean the Content.
+ </p>
+
+ <p>Content includes, but is not limited to, source code, object
+ code, documentation and other files maintained in the Eclipse
+ Foundation source code repository ("Repository") in software
+ modules ("Modules") and made available as downloadable
+ archives ("Downloads").</p>
+
+ <ul>
+ <li>Content may be structured and packaged into modules to
+ facilitate delivering, extending, and upgrading the Content. Typical
+ modules may include plug-ins ("Plug-ins"), plug-in
+ fragments ("Fragments"), and features
+ ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory
+ or JAR (Java ARchive) in a directory named
+ "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or
+ Fragments and associated material. Each Feature may be packaged as a
+ sub-directory in a directory named "features". Within a
+ Feature, files named "feature.xml" may contain a list of
+ the names and version numbers of the Plug-ins and/or Fragments
+ associated with that Feature.</li>
+ <li>Features may also include other Features ("Included
+ Features"). Within a Feature, files named
+ "feature.xml" may contain a list of the names and version
+ numbers of Included Features.</li>
+ </ul>
+
+ <p>The terms and conditions governing Plug-ins and Fragments should
+ be contained in files named "about.html"
+ ("Abouts"). The terms and conditions governing Features and
+ Included Features should be contained in files named
+ "license.html" ("Feature Licenses"). Abouts and
+ Feature Licenses may be located in any directory of a Download or
+ Module including, but not limited to the following locations:</p>
+
+ <ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of
+ certain Plug-ins</li>
+ <li>Feature directories</li>
+ </ul>
+
+ <p>Note: if a Feature made available by the Eclipse Foundation is
+ installed using the Provisioning Technology (as defined below), you
+ must agree to a license ("Feature Update License") during
+ the installation process. If the Feature contains Included Features,
+ the Feature Update License should either provide you with the terms
+ and conditions governing the Included Features or inform you where you
+ can locate them. Feature Update Licenses may be found in the
+ "license" property of files named
+ "feature.properties" found within a Feature. Such Abouts,
+ Feature Licenses, and Feature Update Licenses contain the terms and
+ conditions (or references to such terms and conditions) that govern
+ your use of the associated Content in that directory.</p>
+
+ <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY
+ REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND
+ CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT
+ ARE NOT LIMITED TO):</p>
+
+ <ul>
+ <li>Eclipse Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>)
+ </li>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)
+ </li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)
+ </li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)
+ </li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)
+ </li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)
+ </li>
+ </ul>
+
+ <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
+ CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
+ or Feature Update License is provided, please contact the Eclipse
+ Foundation to determine what terms and conditions govern that
+ particular Content.</p>
+
+
+ <h3>Use of Provisioning Technology</h3>
+
+ <p>
+ The Eclipse Foundation makes available provisioning software, examples
+ of which include, but are not limited to, p2 and the Eclipse Update
+ Manager ("Provisioning Technology") for the purpose of
+ allowing users to install software, documentation, information and/or
+ other materials (collectively "Installable Software"). This
+ capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about
+ packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ ("Specification").
+ </p>
+
+ <p>You may use Provisioning Technology to allow other parties to
+ install Installable Software. You shall be responsible for enabling
+ the applicable license agreements relating to the Installable Software
+ to be presented to, and accepted by, the users of the Provisioning
+ Technology in accordance with the Specification. By using Provisioning
+ Technology in such a manner and making it available in accordance with
+ the Specification, you further acknowledge your agreement to, and the
+ acquisition of all necessary rights to permit the following:</p>
+
+ <ol>
+ <li>A series of actions may occur ("Provisioning
+ Process") in which a user may execute the Provisioning
+ Technology on a machine ("Target Machine") with the intent
+ of installing, extending or updating the functionality of an
+ Eclipse-based product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology
+ may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user
+ the terms and conditions that govern the use of the Installable
+ Software ("Installable Software Agreement") and such
+ Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable
+ Software Agreement must inform the user of the terms and conditions
+ that govern the Installable Software and must solicit acceptance by
+ the end user in the manner prescribed in such Installable Software
+ Agreement. Upon such indication of agreement by the user, the
+ provisioning Technology will complete installation of the Installable
+ Software.</li>
+ </ol>
+
+ <h3>Cryptography</h3>
+
+ <p>Content may contain encryption software. The country in which
+ you are currently may have restrictions on the import, possession, and
+ use, and/or re-export to another country, of encryption software.
+ BEFORE using any encryption software, please check the country's laws,
+ regulations and policies concerning the import, possession, or use,
+ and re-export of encryption software, to see if this is permitted.</p>
+
+ <p>
+ <small>Java and all Java-based trademarks are trademarks of
+ Oracle Corporation in the United States, other countries, or both.</small>
+ </p>
+
+
+</body></html> \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.jver/.classpath b/plugins/org.eclipse.glassfish.tools.jver/.classpath
new file mode 100644
index 0000000..2fbb7a2
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.glassfish.tools.jver/.gitignore b/plugins/org.eclipse.glassfish.tools.jver/.gitignore
new file mode 100644
index 0000000..1448173
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/.gitignore
@@ -0,0 +1,6 @@
+/bin
+/.resources
+/.javacc
+/@dot
+/@dot.log
+/javaCompiler...args
diff --git a/plugins/org.eclipse.glassfish.tools.jver/.project b/plugins/org.eclipse.glassfish.tools.jver/.project
new file mode 100644
index 0000000..55f389e
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.glassfish.tools.jver</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.glassfish.tools.jver/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.glassfish.tools.jver/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..19ef865
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+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.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/plugins/org.eclipse.glassfish.tools.jver/LICENSE.md b/plugins/org.eclipse.glassfish.tools.jver/LICENSE.md
new file mode 100644
index 0000000..5de3d1b
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/LICENSE.md
@@ -0,0 +1,637 @@
+# Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+ 1. DEFINITIONS
+
+ "Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+ "Contributor" means any person or entity that Distributes the Program.
+
+ "Licensed Patents" mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+
+ "Program" means the Contributions Distributed in accordance with this
+ Agreement.
+
+ "Recipient" means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+
+ "Derivative Works" shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+
+ "Modified Works" shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations,
+ interfaces, types, classes, structures, or files of the Program solely
+ in each case in order to link to, bind by name, or subclass the Program
+ or Modified Works thereof.
+
+ "Distribute" means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+
+ "Source Code" means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+
+ "Secondary License" means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+
+ 2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+ 3. REQUIREMENTS
+
+ 3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+ 3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+ 3.3 Contributors may not remove or alter any copyright, patent,
+ trademark, attribution notices, disclaimers of warranty, or limitations
+ of liability ("notices") contained within the Program from any copy of
+ the Program which they Distribute, provided that Contributors may add
+ their own appropriate notices.
+
+ 4. COMMERCIAL DISTRIBUTION
+
+ Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program,
+ the Contributor who includes the Program in a commercial product
+ offering should do so in a manner which does not create potential
+ liability for other Contributors. Therefore, if a Contributor includes
+ the Program in a commercial product offering, such Contributor
+ ("Commercial Contributor") hereby agrees to defend and indemnify every
+ other Contributor ("Indemnified Contributor") against any losses,
+ damages and costs (collectively "Losses") arising from claims, lawsuits
+ and other legal actions brought by a third party against the Indemnified
+ Contributor to the extent caused by the acts or omissions of such
+ Commercial Contributor in connection with its distribution of the Program
+ in a commercial product offering. The obligations in this section do not
+ apply to any claims or Losses relating to any actual or alleged
+ intellectual property infringement. In order to qualify, an Indemnified
+ Contributor must: a) promptly notify the Commercial Contributor in
+ writing of such claim, and b) allow the Commercial Contributor to control,
+ and cooperate with the Commercial Contributor in, the defense and any
+ related settlement negotiations. The Indemnified Contributor may
+ participate in any such claim at its own expense.
+
+ For example, a Contributor might include the Program in a commercial
+ product offering, Product X. That Contributor is then a Commercial
+ Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance
+ claims and warranties are such Commercial Contributor's responsibility
+ alone. Under this section, the Commercial Contributor would have to
+ defend claims against the other Contributors related to those performance
+ claims and warranties, and if a court requires any other Contributor to
+ pay any damages as a result, the Commercial Contributor must pay
+ those damages.
+
+ 5. NO WARRANTY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+ IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+ PURPOSE. Each Recipient is solely responsible for determining the
+ appropriateness of using and distributing the Program and assumes all
+ risks associated with its exercise of rights under this Agreement,
+ including but not limited to the risks and costs of program errors,
+ compliance with applicable laws, damage to or loss of data, programs
+ or equipment, and unavailability or interruption of operations.
+
+ 6. DISCLAIMER OF LIABILITY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+ SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+ PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+ EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+ 7. GENERAL
+
+ If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of
+ the remainder of the terms of this Agreement, and without further
+ action by the parties hereto, such provision shall be reformed to the
+ minimum extent necessary to make such provision valid and enforceable.
+
+ If Recipient institutes patent litigation against any entity
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
+ Program itself (excluding combinations of the Program with other software
+ or hardware) infringes such Recipient's patent(s), then such Recipient's
+ rights granted under Section 2(b) shall terminate as of the date such
+ litigation is filed.
+
+ All Recipient's rights under this Agreement shall terminate if it
+ fails to comply with any of the material terms or conditions of this
+ Agreement and does not cure such failure in a reasonable period of
+ time after becoming aware of such noncompliance. If all Recipient's
+ rights under this Agreement terminate, Recipient agrees to cease use
+ and distribution of the Program as soon as reasonably practicable.
+ However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+ Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and
+ may only be modified in the following manner. The Agreement Steward
+ reserves the right to publish new versions (including revisions) of
+ this Agreement from time to time. No one other than the Agreement
+ Steward has the right to modify this Agreement. The Eclipse Foundation
+ is the initial Agreement Steward. The Eclipse Foundation may assign the
+ responsibility to serve as the Agreement Steward to a suitable separate
+ entity. Each new version of the Agreement will be given a distinguishing
+ version number. The Program (including Contributions) may always be
+ Distributed subject to the version of the Agreement under which it was
+ received. In addition, after a new version of the Agreement is published,
+ Contributor may elect to Distribute the Program (including its
+ Contributions) under the new version.
+
+ Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+
+ Exhibit A - Form of Secondary Licenses Notice
+
+ "This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
+
+---
+
+## The GNU General Public License (GPL) Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor
+ Boston, MA 02110-1335
+ USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your freedom to
+ share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change free software--to
+ make sure the software is free for all its users. This General Public
+ License applies to most of the Free Software Foundation's software and
+ to any other program whose authors commit to using it. (Some other Free
+ Software Foundation software is covered by the GNU Library General
+ Public License instead.) You can apply it to your programs, too.
+
+ When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this
+ service if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new
+ free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights. These
+ restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you have.
+ You must make sure that they, too, receive or can get the source code.
+ And you must show them these terms so they know their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software. If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+
+ Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent must
+ be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed under
+ the terms of this General Public License. The "Program", below, refers
+ to any such program or work, and a "work based on the Program" means
+ either the Program or any derivative work under copyright law: that is
+ to say, a work containing the Program or a portion of it, either
+ verbatim or with modifications and/or translated into another language.
+ (Hereinafter, translation is included without limitation in the term
+ "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of running
+ the Program is not restricted, and the output from the Program is
+ covered only if its contents constitute a work based on the Program
+ (independent of having been made by running the Program). Whether that
+ is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's source
+ code as you receive it, in any medium, provided that you conspicuously
+ and appropriately publish on each copy an appropriate copyright notice
+ and disclaimer of warranty; keep intact all the notices that refer to
+ this License and to the absence of any warranty; and give any other
+ recipients of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion of
+ it, thus forming a work based on the Program, and copy and distribute
+ such modifications or work under the terms of Section 1 above, provided
+ that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third parties
+ under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this License.
+ (Exception: if the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program
+ is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program, and
+ can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based on
+ the Program, the distribution of the whole must be on the terms of this
+ License, whose permissions for other licensees extend to the entire
+ whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of a
+ storage or distribution medium does not bring the other work under the
+ scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your cost
+ of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed
+ only for noncommercial distribution and only if you received the
+ program in object code or executable form with such an offer, in
+ accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source code
+ means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special
+ exception, the source code distributed need not include anything that is
+ normally distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on
+ which the executable runs, unless that component itself accompanies the
+ executable.
+
+ If distribution of executable or object code is made by offering access
+ to copy from a designated place, then offering equivalent access to copy
+ the source code from the same place counts as distribution of the source
+ code, even though third parties are not compelled to copy the source
+ along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt otherwise
+ to copy, modify, sublicense or distribute the Program is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will
+ not have their licenses terminated so long as such parties remain in
+ full compliance.
+
+ 5. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and all
+ its terms and conditions for copying, distributing or modifying the
+ Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not
+ responsible for enforcing compliance by third parties to this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot distribute
+ so as to satisfy simultaneously your obligations under this License and
+ any other pertinent obligations, then as a consequence you may not
+ distribute the Program at all. For example, if a patent license would
+ not permit royalty-free redistribution of the Program by all those who
+ receive copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely from
+ distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is implemented
+ by public license practices. Many people have made generous
+ contributions to the wide range of software distributed through that
+ system in reliance on consistent application of that system; it is up to
+ the author/donor to decide if he or she is willing to distribute
+ software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License may
+ add an explicit geographical distribution limitation excluding those
+ countries, so that distribution is permitted only in or among countries
+ not thus excluded. In such case, this License incorporates the
+ limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Program does not specify a version
+ number of this License, you may choose any version ever published by the
+ Free Software Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted by the
+ Free Software Foundation, write to the Free Software Foundation; we
+ sometimes make exceptions for this. Our decision will be guided by the
+ two goals of preserving the free status of all derivatives of our free
+ software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+ AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest to
+ attach them to the start of each source file to most effectively convey
+ the exclusion of warranty; and each file should have at least the
+ "copyright" line and a pointer to where the full notice is found.
+
+ One line to give the program's name and a brief idea of what it does.
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
+ `show w'. This is free software, and you are welcome to redistribute
+ it under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the
+ appropriate parts of the General Public License. Of course, the commands
+ you use may be called something other than `show w' and `show c'; they
+ could even be mouse-clicks or menu items--whatever suits your program.
+
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (which makes passes at compilers) written by
+ James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+ This General Public License does not permit incorporating your program
+ into proprietary programs. If your program is a subroutine library, you
+ may consider it more useful to permit linking proprietary applications
+ with the library. If this is what you want to do, use the GNU Library
+ General Public License instead of this License.
+
+---
+
+## CLASSPATH EXCEPTION
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License version 2 cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from or
+ based on this library. If you modify this library, you may extend this
+ exception to your version of the library, but you are not obligated to
+ do so. If you do not wish to do so, delete this exception statement
+ from your version.
diff --git a/plugins/org.eclipse.glassfish.tools.jver/META-INF/MANIFEST.MF b/plugins/org.eclipse.glassfish.tools.jver/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b74ae85
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-Vendor: %BundleVendor
+Bundle-SymbolicName: org.eclipse.glassfish.tools.jver
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: bundle
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/plugins/org.eclipse.glassfish.tools.jver/about.html b/plugins/org.eclipse.glassfish.tools.jver/about.html
new file mode 100644
index 0000000..32577c0
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 22, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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> \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.jver/build.properties b/plugins/org.eclipse.glassfish.tools.jver/build.properties
new file mode 100644
index 0000000..13d0873
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ bundle.properties,\
+ about.html,\
+ .
diff --git a/plugins/org.eclipse.glassfish.tools.jver/bundle.properties b/plugins/org.eclipse.glassfish.tools.jver/bundle.properties
new file mode 100644
index 0000000..80e58a9
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/bundle.properties
@@ -0,0 +1,2 @@
+BundleName = Java Version Detector
+BundleVendor = Eclipse.org - GlassFish Tools
diff --git a/plugins/org.eclipse.glassfish.tools.jver/src/org/eclipse/glassfish/tools/jver/JavaVersionDetector.java b/plugins/org.eclipse.glassfish.tools.jver/src/org/eclipse/glassfish/tools/jver/JavaVersionDetector.java
new file mode 100644
index 0000000..aa051b4
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.jver/src/org/eclipse/glassfish/tools/jver/JavaVersionDetector.java
@@ -0,0 +1,23 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.jver;
+
+/**
+ * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
+ */
+
+public final class JavaVersionDetector
+{
+ public static void main( final String[] args )
+ {
+ System.err.println( System.getProperty( "java.version" ) );
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/.classpath b/plugins/org.eclipse.glassfish.tools.ui/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.glassfish.tools.ui/.gitignore b/plugins/org.eclipse.glassfish.tools.ui/.gitignore
new file mode 100644
index 0000000..1448173
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/.gitignore
@@ -0,0 +1,6 @@
+/bin
+/.resources
+/.javacc
+/@dot
+/@dot.log
+/javaCompiler...args
diff --git a/plugins/org.eclipse.glassfish.tools.ui/.project b/plugins/org.eclipse.glassfish.tools.ui/.project
new file mode 100644
index 0000000..3b6a97b
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.glassfish.tools.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.glassfish.tools.ui/.settings/oracle.eclipse.tools.webtier.ui.prefs b/plugins/org.eclipse.glassfish.tools.ui/.settings/oracle.eclipse.tools.webtier.ui.prefs
new file mode 100644
index 0000000..e3869fb
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/.settings/oracle.eclipse.tools.webtier.ui.prefs
@@ -0,0 +1,2 @@
+_hiddenCategory_\:HTML=false
+eclipse.preferences.version=1
diff --git a/plugins/org.eclipse.glassfish.tools.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.glassfish.tools.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..7341ab1
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+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.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/plugins/org.eclipse.glassfish.tools.ui/LICENSE.md b/plugins/org.eclipse.glassfish.tools.ui/LICENSE.md
new file mode 100644
index 0000000..5de3d1b
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/LICENSE.md
@@ -0,0 +1,637 @@
+# Eclipse Public License - v 2.0
+
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+ 1. DEFINITIONS
+
+ "Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+ "Contributor" means any person or entity that Distributes the Program.
+
+ "Licensed Patents" mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+
+ "Program" means the Contributions Distributed in accordance with this
+ Agreement.
+
+ "Recipient" means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+
+ "Derivative Works" shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+
+ "Modified Works" shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations,
+ interfaces, types, classes, structures, or files of the Program solely
+ in each case in order to link to, bind by name, or subclass the Program
+ or Modified Works thereof.
+
+ "Distribute" means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+
+ "Source Code" means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+
+ "Secondary License" means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+
+ 2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+ 3. REQUIREMENTS
+
+ 3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+ 3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+ 3.3 Contributors may not remove or alter any copyright, patent,
+ trademark, attribution notices, disclaimers of warranty, or limitations
+ of liability ("notices") contained within the Program from any copy of
+ the Program which they Distribute, provided that Contributors may add
+ their own appropriate notices.
+
+ 4. COMMERCIAL DISTRIBUTION
+
+ Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program,
+ the Contributor who includes the Program in a commercial product
+ offering should do so in a manner which does not create potential
+ liability for other Contributors. Therefore, if a Contributor includes
+ the Program in a commercial product offering, such Contributor
+ ("Commercial Contributor") hereby agrees to defend and indemnify every
+ other Contributor ("Indemnified Contributor") against any losses,
+ damages and costs (collectively "Losses") arising from claims, lawsuits
+ and other legal actions brought by a third party against the Indemnified
+ Contributor to the extent caused by the acts or omissions of such
+ Commercial Contributor in connection with its distribution of the Program
+ in a commercial product offering. The obligations in this section do not
+ apply to any claims or Losses relating to any actual or alleged
+ intellectual property infringement. In order to qualify, an Indemnified
+ Contributor must: a) promptly notify the Commercial Contributor in
+ writing of such claim, and b) allow the Commercial Contributor to control,
+ and cooperate with the Commercial Contributor in, the defense and any
+ related settlement negotiations. The Indemnified Contributor may
+ participate in any such claim at its own expense.
+
+ For example, a Contributor might include the Program in a commercial
+ product offering, Product X. That Contributor is then a Commercial
+ Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance
+ claims and warranties are such Commercial Contributor's responsibility
+ alone. Under this section, the Commercial Contributor would have to
+ defend claims against the other Contributors related to those performance
+ claims and warranties, and if a court requires any other Contributor to
+ pay any damages as a result, the Commercial Contributor must pay
+ those damages.
+
+ 5. NO WARRANTY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+ IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+ PURPOSE. Each Recipient is solely responsible for determining the
+ appropriateness of using and distributing the Program and assumes all
+ risks associated with its exercise of rights under this Agreement,
+ including but not limited to the risks and costs of program errors,
+ compliance with applicable laws, damage to or loss of data, programs
+ or equipment, and unavailability or interruption of operations.
+
+ 6. DISCLAIMER OF LIABILITY
+
+ EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+ PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+ SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+ PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+ EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGES.
+
+ 7. GENERAL
+
+ If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of
+ the remainder of the terms of this Agreement, and without further
+ action by the parties hereto, such provision shall be reformed to the
+ minimum extent necessary to make such provision valid and enforceable.
+
+ If Recipient institutes patent litigation against any entity
+ (including a cross-claim or counterclaim in a lawsuit) alleging that the
+ Program itself (excluding combinations of the Program with other software
+ or hardware) infringes such Recipient's patent(s), then such Recipient's
+ rights granted under Section 2(b) shall terminate as of the date such
+ litigation is filed.
+
+ All Recipient's rights under this Agreement shall terminate if it
+ fails to comply with any of the material terms or conditions of this
+ Agreement and does not cure such failure in a reasonable period of
+ time after becoming aware of such noncompliance. If all Recipient's
+ rights under this Agreement terminate, Recipient agrees to cease use
+ and distribution of the Program as soon as reasonably practicable.
+ However, Recipient's obligations under this Agreement and any licenses
+ granted by Recipient relating to the Program shall continue and survive.
+
+ Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and
+ may only be modified in the following manner. The Agreement Steward
+ reserves the right to publish new versions (including revisions) of
+ this Agreement from time to time. No one other than the Agreement
+ Steward has the right to modify this Agreement. The Eclipse Foundation
+ is the initial Agreement Steward. The Eclipse Foundation may assign the
+ responsibility to serve as the Agreement Steward to a suitable separate
+ entity. Each new version of the Agreement will be given a distinguishing
+ version number. The Program (including Contributions) may always be
+ Distributed subject to the version of the Agreement under which it was
+ received. In addition, after a new version of the Agreement is published,
+ Contributor may elect to Distribute the Program (including its
+ Contributions) under the new version.
+
+ Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+
+ Exhibit A - Form of Secondary Licenses Notice
+
+ "This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}."
+
+ Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+
+ If it is not possible or desirable to put the notice in a particular
+ file, then You may include the notice in a location (such as a LICENSE
+ file in a relevant directory) where a recipient would be likely to
+ look for such a notice.
+
+ You may add additional accurate notices of copyright ownership.
+
+---
+
+## The GNU General Public License (GPL) Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor
+ Boston, MA 02110-1335
+ USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your freedom to
+ share and change it. By contrast, the GNU General Public License is
+ intended to guarantee your freedom to share and change free software--to
+ make sure the software is free for all its users. This General Public
+ License applies to most of the Free Software Foundation's software and
+ to any other program whose authors commit to using it. (Some other Free
+ Software Foundation software is covered by the GNU Library General
+ Public License instead.) You can apply it to your programs, too.
+
+ When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this
+ service if you wish), that you receive source code or can get it if you
+ want it, that you can change the software or use pieces of it in new
+ free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights. These
+ restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you have.
+ You must make sure that they, too, receive or can get the source code.
+ And you must show them these terms so they know their rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+ (2) offer you this license which gives you legal permission to copy,
+ distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+ that everyone understands that there is no warranty for this free
+ software. If the software is modified by someone else and passed on, we
+ want its recipients to know that what they have is not the original, so
+ that any problems introduced by others will not reflect on the original
+ authors' reputations.
+
+ Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program
+ proprietary. To prevent this, we have made it clear that any patent must
+ be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+ modification follow.
+
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains a
+ notice placed by the copyright holder saying it may be distributed under
+ the terms of this General Public License. The "Program", below, refers
+ to any such program or work, and a "work based on the Program" means
+ either the Program or any derivative work under copyright law: that is
+ to say, a work containing the Program or a portion of it, either
+ verbatim or with modifications and/or translated into another language.
+ (Hereinafter, translation is included without limitation in the term
+ "modification".) Each licensee is addressed as "you".
+
+ Activities other than copying, distribution and modification are not
+ covered by this License; they are outside its scope. The act of running
+ the Program is not restricted, and the output from the Program is
+ covered only if its contents constitute a work based on the Program
+ (independent of having been made by running the Program). Whether that
+ is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's source
+ code as you receive it, in any medium, provided that you conspicuously
+ and appropriately publish on each copy an appropriate copyright notice
+ and disclaimer of warranty; keep intact all the notices that refer to
+ this License and to the absence of any warranty; and give any other
+ recipients of the Program a copy of this License along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and
+ you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion of
+ it, thus forming a work based on the Program, and copy and distribute
+ such modifications or work under the terms of Section 1 above, provided
+ that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third parties
+ under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this License.
+ (Exception: if the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program
+ is not required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the Program, and
+ can be reasonably considered independent and separate works in
+ themselves, then this License, and its terms, do not apply to those
+ sections when you distribute them as separate works. But when you
+ distribute the same sections as part of a whole which is a work based on
+ the Program, the distribution of the whole must be on the terms of this
+ License, whose permissions for other licensees extend to the entire
+ whole, and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest
+ your rights to work written entirely by you; rather, the intent is to
+ exercise the right to control the distribution of derivative or
+ collective works based on the Program.
+
+ In addition, mere aggregation of another work not based on the Program
+ with the Program (or with a work based on the Program) on a volume of a
+ storage or distribution medium does not bring the other work under the
+ scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+ under Section 2) in object code or executable form under the terms of
+ Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your cost
+ of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed
+ only for noncommercial distribution and only if you received the
+ program in object code or executable form with such an offer, in
+ accord with Subsection b above.)
+
+ The source code for a work means the preferred form of the work for
+ making modifications to it. For an executable work, complete source code
+ means all the source code for all modules it contains, plus any
+ associated interface definition files, plus the scripts used to control
+ compilation and installation of the executable. However, as a special
+ exception, the source code distributed need not include anything that is
+ normally distributed (in either source or binary form) with the major
+ components (compiler, kernel, and so on) of the operating system on
+ which the executable runs, unless that component itself accompanies the
+ executable.
+
+ If distribution of executable or object code is made by offering access
+ to copy from a designated place, then offering equivalent access to copy
+ the source code from the same place counts as distribution of the source
+ code, even though third parties are not compelled to copy the source
+ along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+ except as expressly provided under this License. Any attempt otherwise
+ to copy, modify, sublicense or distribute the Program is void, and will
+ automatically terminate your rights under this License. However, parties
+ who have received copies, or rights, from you under this License will
+ not have their licenses terminated so long as such parties remain in
+ full compliance.
+
+ 5. You are not required to accept this License, since you have not
+ signed it. However, nothing else grants you permission to modify or
+ distribute the Program or its derivative works. These actions are
+ prohibited by law if you do not accept this License. Therefore, by
+ modifying or distributing the Program (or any work based on the
+ Program), you indicate your acceptance of this License to do so, and all
+ its terms and conditions for copying, distributing or modifying the
+ Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+ Program), the recipient automatically receives a license from the
+ original licensor to copy, distribute or modify the Program subject to
+ these terms and conditions. You may not impose any further restrictions
+ on the recipients' exercise of the rights granted herein. You are not
+ responsible for enforcing compliance by third parties to this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+ infringement or for any other reason (not limited to patent issues),
+ conditions are imposed on you (whether by court order, agreement or
+ otherwise) that contradict the conditions of this License, they do not
+ excuse you from the conditions of this License. If you cannot distribute
+ so as to satisfy simultaneously your obligations under this License and
+ any other pertinent obligations, then as a consequence you may not
+ distribute the Program at all. For example, if a patent license would
+ not permit royalty-free redistribution of the Program by all those who
+ receive copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely from
+ distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under
+ any particular circumstance, the balance of the section is intended to
+ apply and the section as a whole is intended to apply in other
+ circumstances.
+
+ It is not the purpose of this section to induce you to infringe any
+ patents or other property right claims or to contest validity of any
+ such claims; this section has the sole purpose of protecting the
+ integrity of the free software distribution system, which is implemented
+ by public license practices. Many people have made generous
+ contributions to the wide range of software distributed through that
+ system in reliance on consistent application of that system; it is up to
+ the author/donor to decide if he or she is willing to distribute
+ software through any other system and a licensee cannot impose that choice.
+
+ This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+ certain countries either by patents or by copyrighted interfaces, the
+ original copyright holder who places the Program under this License may
+ add an explicit geographical distribution limitation excluding those
+ countries, so that distribution is permitted only in or among countries
+ not thus excluded. In such case, this License incorporates the
+ limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new
+ versions of the General Public License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the Program
+ specifies a version number of this License which applies to it and "any
+ later version", you have the option of following the terms and
+ conditions either of that version or of any later version published by
+ the Free Software Foundation. If the Program does not specify a version
+ number of this License, you may choose any version ever published by the
+ Free Software Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+ programs whose distribution conditions are different, write to the
+ author to ask for permission. For software which is copyrighted by the
+ Free Software Foundation, write to the Free Software Foundation; we
+ sometimes make exceptions for this. Our decision will be guided by the
+ two goals of preserving the free status of all derivatives of our free
+ software and of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+ WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+ OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
+ EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+ AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+ DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+ (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+ INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+ possible use to the public, the best way to achieve this is to make it
+ free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest to
+ attach them to the start of each source file to most effectively convey
+ the exclusion of warranty; and each file should have at least the
+ "copyright" line and a pointer to where the full notice is found.
+
+ One line to give the program's name and a brief idea of what it does.
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+ Also add information on how to contact you by electronic and paper mail.
+
+ If the program is interactive, make it output a short notice like this
+ when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
+ `show w'. This is free software, and you are welcome to redistribute
+ it under certain conditions; type `show c' for details.
+
+ The hypothetical commands `show w' and `show c' should show the
+ appropriate parts of the General Public License. Of course, the commands
+ you use may be called something other than `show w' and `show c'; they
+ could even be mouse-clicks or menu items--whatever suits your program.
+
+ You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if
+ necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (which makes passes at compilers) written by
+ James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+ This General Public License does not permit incorporating your program
+ into proprietary programs. If your program is a subroutine library, you
+ may consider it more useful to permit linking proprietary applications
+ with the library. If this is what you want to do, use the GNU Library
+ General Public License instead of this License.
+
+---
+
+## CLASSPATH EXCEPTION
+
+ Linking this library statically or dynamically with other modules is
+ making a combined work based on this library. Thus, the terms and
+ conditions of the GNU General Public License version 2 cover the whole
+ combination.
+
+ As a special exception, the copyright holders of this library give you
+ permission to link this library with independent modules to produce an
+ executable, regardless of the license terms of these independent
+ modules, and to copy and distribute the resulting executable under
+ terms of your choice, provided that you also meet, for each linked
+ independent module, the terms and conditions of the license of that
+ module. An independent module is a module which is not derived from or
+ based on this library. If you modify this library, you may extend this
+ exception to your version of the library, but you are not obligated to
+ do so. If you do not wish to do so, delete this exception statement
+ from your version.
diff --git a/plugins/org.eclipse.glassfish.tools.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.glassfish.tools.ui/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..b9c0dfd
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,40 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.glassfish.tools.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-Localization: plugin
+Bundle-Vendor: %providerName
+Bundle-ClassPath: .
+Require-Bundle: org.eclipse.debug.ui,
+ org.eclipse.wst.server.ui,
+ org.eclipse.jdt.debug.ui,
+ org.eclipse.wst.server.core,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.datatools.connectivity,
+ org.eclipse.datatools.connectivity.ui,
+ org.eclipse.ui.forms,
+ org.eclipse.jem.util,
+ org.eclipse.ui.ide,
+ org.eclipse.jst.j2ee,
+ org.eclipse.jst.j2ee.web,
+ org.eclipse.wst.common.frameworks.ui,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.codegen,
+ org.eclipse.jst.servlet.ui,
+ org.eclipse.jst.j2ee.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.ui,
+ org.eclipse.jdt.launching,
+ org.eclipse.jst.jee.ui,
+ org.eclipse.ui.console,
+ org.eclipse.jst.common.project.facet.ui,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.text,
+ org.eclipse.sapphire.modeling,
+ org.eclipse.sapphire.ui,
+ org.eclipse.glassfish.tools
+Bundle-Activator: org.eclipse.glassfish.tools.ui.GlassfishToolsUIPlugin
diff --git a/plugins/org.eclipse.glassfish.tools.ui/about.html b/plugins/org.eclipse.glassfish.tools.ui/about.html
new file mode 100644
index 0000000..32577c0
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 22, 2017</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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> \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.ui/build.properties b/plugins/org.eclipse.glassfish.tools.ui/build.properties
new file mode 100644
index 0000000..060c911
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ icons/
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/create.png b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/create.png
new file mode 100644
index 0000000..3468c88
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/create.png
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ear.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ear.gif
new file mode 100644
index 0000000..b5630b3
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ear.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ejb_module.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ejb_module.gif
new file mode 100644
index 0000000..f8b5c0a
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/ejb_module.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/folder_open.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/folder_open.gif
new file mode 100644
index 0000000..21322e0
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/folder_open.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/glassfishserver.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/glassfishserver.gif
new file mode 100644
index 0000000..c1763ce
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/glassfishserver.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/logfile.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/logfile.gif
new file mode 100644
index 0000000..f1ec2dc
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/logfile.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/resources.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/resources.gif
new file mode 100644
index 0000000..dd25160
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/resources.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/sunappsrv.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/sunappsrv.gif
new file mode 100644
index 0000000..c562d3a
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/sunappsrv.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/updateCenter.png b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/updateCenter.png
new file mode 100644
index 0000000..c9ab236
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/updateCenter.png
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/web_module.gif b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/web_module.gif
new file mode 100644
index 0000000..bf20f70
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/web_module.gif
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/webservice.png b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/webservice.png
new file mode 100644
index 0000000..05ad731
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/obj16/webservice.png
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/icons/wizard75x66.png b/plugins/org.eclipse.glassfish.tools.ui/icons/wizard75x66.png
new file mode 100644
index 0000000..f0f52c1
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/icons/wizard75x66.png
Binary files differ
diff --git a/plugins/org.eclipse.glassfish.tools.ui/plugin.properties b/plugins/org.eclipse.glassfish.tools.ui/plugin.properties
new file mode 100644
index 0000000..bb59d08
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/plugin.properties
@@ -0,0 +1,31 @@
+pluginName = GlassFish Tools UI
+providerName = Eclipse.org - GlassFish Tools
+
+menu.updatecenter=GlassFish Update Center
+menu.viewlogfile=View Log File
+menu.viewadminconsole=View Admin Console
+menu.openserverhome=Server Home Directory
+menu.opendomainhome=Domain Directory
+menu.glassfishtopmenu=GlassFish
+
+sunappserver.wizardcategory=GlassFish
+sunappserver.sunresourceslabel=JDBC Resource
+sunappserver.sunresources.BeanWebRegionWizard.description=Create a new JDBC Resource
+sunappserver.mailresourceslabel=JavaMail Session Resource
+sunappserver.mailresources.BeanWebRegionWizard.description=Create a new JavaMail Session Resource
+sunappserver.jmsresourceslabel=JMS Resource
+sunappserver.jmsresources.BeanWebRegionWizard.description=Create a new JMS Resource
+sunappserver.webservletlabel=Web Servlet (Java EE 6)
+sunappserver.webservlet.BeanWebRegionWizard.description=Create a new Java EE 6 Servlet
+sunappserver.sessionbeanlabel=Session Bean (Java EE 6)
+sunappserver.sessionbean.BeanWebRegionWizard.description=Create a new Java EE 6 Session Bean
+sunappserver.ejbtimerlabel=EJB Timer (Java EE 6)
+sunappserver.ejbtimer.BeanWebRegionWizard.description=Create a new Java EE 6 EJB Timer
+sunappserver.webfilterlabel=Web Filter (Java EE 6)
+sunappserver.webfilter.BeanWebRegionWizard.description=Create a new Java EE 6 Web Filter
+sunappserver.weblistenerlabel=Web Listener (Java EE 6)
+sunappserver.weblistener.BeanWebRegionWizard.description=Create a new Java EE 6 Web Listener
+sunappserver.xhtmllabel=XHTML Page
+sunappserver.xhtml.BeanWebRegionWizard.description=Create a new XHTML Page
+sunappserver.restfulfrompatternlabel=RESTful Web Service from Pattern (Java EE 6)
+sunappserver.restfulfrompattern.BeanWebRegionWizard.description=Create RESTful Web Service from Pattern
diff --git a/plugins/org.eclipse.glassfish.tools.ui/plugin.xml b/plugins/org.eclipse.glassfish.tools.ui/plugin.xml
new file mode 100644
index 0000000..cbcceac
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/plugin.xml
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="org.eclipse.glassfish.tools.ui.SunAppServerLaunchConfigurationTabGroup"
+ id="org.glassfish.jst.server.launchConfigurationTabGroup"
+ type="org.glassfish.jst.server.GlassfishServerLaunchConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension>
+
+ <extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage id="org.eclipse.glassfish.tools.ui.launchConfigurationTypeImage"
+ configTypeID="org.glassfish.jst.server.GlassfishServerLaunchConfigurationType"
+ icon="icons/obj16/glassfishserver.gif">
+ </launchConfigurationTypeImage>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ class="org.eclipse.glassfish.tools.ui.wizards.GlassfishSapphireRuntimeWizardFragment"
+ id="org.eclipse.glassfish.tools.runtime"
+ typeIds="glassfish">
+ </fragment>
+ <fragment
+ class="org.eclipse.glassfish.tools.ui.wizards.GlassfishSapphireServerWizardFragment"
+ id="org.eclipse.glassfish.tools.runtime"
+ typeIds="glassfish.server">
+ </fragment>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.server.ui.serverImages">
+ <image
+ typeIds="glassfish,glassfish.server"
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.jst.server.glassfish.image">
+ </image>
+ </extension>
+
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component id="glassfish"/>
+ <factory class="org.eclipse.glassfish.tools.ui.internal.GlassFishRuntimeComponentLabelProviderFactory"/>
+ <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+ </adapter>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.common.project.facet.ui.images">
+ <image
+ path="icons/obj16/glassfishserver.gif"
+ runtime-component-type="glassfish">
+ </image>
+ </extension>
+
+ <extension
+ point="org.eclipse.wst.server.ui.editorPageSections">
+ <section
+ class="org.eclipse.glassfish.tools.ui.editorsections.ServerSection"
+ id="com.sun.enterprise.jst.server.runtime.sunappsrv"
+ insertionId="org.eclipse.wst.server.editor.overview.left"
+ order="10"
+ typeIds="glassfish.server">
+ </section>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ id="org.eclipse.glassfish.tools"
+ name="%sunappserver.wizardcategory">
+ </category>
+ <wizard
+ category="org.eclipse.glassfish.tools"
+ class="org.eclipse.glassfish.tools.ui.resources.wizards.JDBCWizard"
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.glassfish.tools.ui.resources.wizards.JDBCWizard"
+ name="%sunappserver.sunresourceslabel">
+ <description>
+ %sunappserver.sunresources.BeanWebRegionWizard.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ <wizard
+ category="org.eclipse.glassfish.tools"
+ class="org.eclipse.glassfish.tools.ui.resources.wizards.MailWizard"
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.glassfish.tools.ui.resources.wizards.MailWizard"
+ name="%sunappserver.mailresourceslabel">
+ <description>
+ %sunappserver.mailresources.BeanWebRegionWizard.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ <wizard
+ category="org.eclipse.glassfish.tools"
+ class="org.eclipse.glassfish.tools.ui.resources.wizards.JMSWizard"
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.glassfish.tools.ui.resources.wizards.JMSWizard"
+ name="%sunappserver.jmsresourceslabel">
+ <description>
+ %sunappserver.jmsresources.BeanWebRegionWizard.description
+ </description>
+ <selection
+ class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ <wizard
+ category="org.eclipse.glassfish.tools"
+ class="org.eclipse.glassfish.tools.ui.rest.wizards.AddGenericResourceWizard"
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.glassfish.tools.v3.wizards.AddGenericResourceWizard"
+ name="%sunappserver.restfulfrompatternlabel">
+ <description>
+ %sunappserver.restfulfrompattern.BeanWebRegionWizard.description
+ </description>
+ </wizard>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ class="org.eclipse.glassfish.tools.ui.preferences.GlassFishPreferencePage"
+ id="org.eclipse.glassfish.tools.preferences.GlassFishPreferencePage"
+ name="GlassFish Preferences">
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.console.consolePageParticipants">
+ <consolePageParticipant
+ class="org.eclipse.glassfish.tools.ui.log.GlassFishLogPageParticipant"
+ id="org.eclipse.glassfish.tools.log.GlassFishLogPageParticipant">
+ <enablement>
+ <instanceof
+ value="org.eclipse.glassfish.tools.log.GlassfishConsole">
+ </instanceof>
+ </enablement>
+ </consolePageParticipant>
+ </extension>
+
+ <extension
+ point="org.eclipse.jst.common.project.facet.ui.libraryProviderActionPanels">
+ <panel
+ class="org.eclipse.glassfish.tools.ui.JAXRSActionPanels"
+ provider="org.eclipse.glassfish.tools.jaxrsLibraryproviderID">
+ </panel>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.wst.server.ui.ServersView">
+ <includes>
+ <contentExtension
+ pattern="glassfish31.serverview.contentprovider">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ activeByDefault="true"
+ contentProvider="org.eclipse.glassfish.tools.ui.serverview.ServerViewContentProvider"
+ icon="icons/obj16/sunappsrv.gif"
+ id="glassfish31.serverview.contentprovider"
+ labelProvider="org.eclipse.glassfish.tools.ui.serverview.ServerViewLabelProvider"
+ name="GlassFish Management Nodes"
+ priority="highest">
+ <triggerPoints>
+ <or>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ </or>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof
+ value="org.eclipse.glassfish.tools.ui.serverview.TreeNode">
+ </instanceof>
+ </or>
+ </possibleChildren>
+ <actionProvider
+ class="org.eclipse.glassfish.tools.ui.serverview.ServerViewActionProvider"
+ id="org.eclipse.glassfish.tools.ui.serverview.ServerViewActionProvider"
+ priority="highest">
+ <enablement>
+ <or>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.glassfish.tools.ui.serverview.TreeNode">
+ </instanceof>
+ <adapt
+ type="java.util.Collection">
+ <count
+ value="0">
+ </count>
+ </adapt>
+ </or>
+ </enablement>
+ </actionProvider>
+ <commonSorter
+ class="org.eclipse.glassfish.tools.ui.serverview.ServerViewViewerSorter">
+ </commonSorter>
+ </navigatorContent>
+ <commonWizard
+ menuGroupId="org.eclipse.glassfish.tools.v3.wizards"
+ type="new"
+ wizardId="org.eclipse.glassfish.tools.v3.wizards.AddGenericResourceWizard">
+ <enablement>
+ <adapt
+ type="org.eclipse.core.resources.IResource">
+ <test
+ property="org.eclipse.wst.common.project.facet.core.projectFacet"
+ value="glassfish.web">
+ </test>
+ </adapt>
+ </enablement>
+ </commonWizard>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ id="org.eclipse.glassfish.tools.commands.category"
+ name="glassfish-commands">
+ </category>
+ <command
+ description="%menu.viewlogfile"
+ id="org.eclipse.glassfish.tools.commands.ViewLogCommand"
+ name="%menu.viewlogfile">
+ </command>
+ <command
+ description="%menu.viewadminconsole"
+ id="org.eclipse.glassfish.tools.commands.ViewAdminConsoleCommand"
+ name="%menu.viewadminconsole">
+ </command>
+ <command
+ description="%menu.updatecenter"
+ id="org.eclipse.glassfish.tools.commands.UpdateCenterCommand"
+ name="%menu.updatecenter">
+ </command>
+ <command
+ id="org.eclipse.glassfish.tools.commands.OpenUrlCommand"
+ name="OpenUrlCommand">
+ <commandParameter
+ id="org.eclipse.glassfish.tools.commands.urlParam"
+ name="url"
+ optional="false">
+ </commandParameter>
+ </command>
+ <command
+ id="org.eclipse.glassfish.tools.commands.OpenServerHomeCommand"
+ name="OpenServerHomeCommand">
+ </command>
+ <command
+ id="org.eclipse.glassfish.tools.commands.OpenDomainHomeCommand"
+ name="OpenDomainHomeCommand">
+ </command>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.UpdateCenterHandler"
+ commandId="org.eclipse.glassfish.tools.commands.UpdateCenterCommand">
+ <activeWhen>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneGlassfishSelected">
+ </reference>
+ </activeWhen>
+ <enabledWhen>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneGlassfishSelected">
+ </reference>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.ViewLogHandler"
+ commandId="org.eclipse.glassfish.tools.commands.ViewLogCommand">
+ <enabledWhen>
+ <or>
+ <not>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.isRemoteGlassfish">
+ </reference>
+ </not>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneRunningGlassfishSelected">
+ </reference>
+ </or>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.ViewAdminConsoleHandler"
+ commandId="org.eclipse.glassfish.tools.commands.ViewAdminConsoleCommand">
+ <enabledWhen>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneRunningGlassfishSelected">
+ </reference>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.ShowURLHandler"
+ commandId="org.eclipse.glassfish.tools.commands.OpenUrlCommand">
+ </handler>
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.OpenServerHomeHandler"
+ commandId="org.eclipse.glassfish.tools.commands.OpenServerHomeCommand">
+ <enabledWhen>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneGlassfishSelected">
+ </reference>
+ </enabledWhen>
+ </handler>
+ <handler
+ class="org.eclipse.glassfish.tools.handlers.OpenDomainHomeHandler"
+ commandId="org.eclipse.glassfish.tools.commands.OpenDomainHomeCommand">
+ <enabledWhen>
+ <and>
+ <not>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.isRemoteGlassfish">
+ </reference>
+ </not>
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneGlassfishSelected">
+ </reference>
+ </and>
+ </enabledWhen>
+ </handler>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.menus">
+ <!--menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.wst.server.ui.ServersView">
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.UpdateCenterCommand"
+ icon="icons/obj16/updateCenter.png"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.ViewAdminConsoleCommand"
+ icon="icons/obj16/glassfishserver.gif"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.ViewLogCommand"
+ icon="icons/obj16/logfile.gif"
+ style="push">
+ </command>
+ </menuContribution-->
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.wst.server.ui.ServersView?after=additions">
+ <menu
+ icon="icons/obj16/glassfishserver.gif"
+ id="org.eclipse.glassfish.tools.actions.subMenu"
+ label="%menu.glassfishtopmenu">
+ <separator
+ name="group1">
+ </separator>
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.glassfish.tools.moreGlassfishSelected">
+ </reference>
+ </visibleWhen>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.UpdateCenterCommand"
+ icon="icons/obj16/updateCenter.png"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.ViewAdminConsoleCommand"
+ icon="icons/obj16/glassfishserver.gif"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.ViewLogCommand"
+ icon="icons/obj16/logfile.gif"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.OpenServerHomeCommand"
+ icon="icons/obj16/folder_open.gif"
+ label="%menu.openserverhome"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <reference
+ definitionId="org.eclipse.glassfish.tools.oneGlassfishSelected">
+ </reference>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.glassfish.tools.commands.OpenDomainHomeCommand"
+ icon="icons/obj16/folder_open.gif"
+ label="%menu.opendomainhome"
+ style="push">
+ </command>
+ </menu>
+ </menuContribution>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.perspectiveExtensions">
+ <perspectiveExtension
+ targetID="org.eclipse.jst.j2ee.J2EEPerspective">
+ <newWizardShortcut
+ id="org.eclipse.glassfish.tools.v3.wizards.AddGenericResourceWizard">
+ </newWizardShortcut>
+ </perspectiveExtension>
+ </extension>
+
+ <extension point="org.eclipse.ui.propertyPages">
+ <page
+ id="oorg.eclipse.glassfish.tools.ui.server.properties.glassfish"
+ name="GlassFish"
+ class="org.eclipse.glassfish.tools.ui.properties.ServerPropertyPage">
+ <enabledWhen>
+ <and>
+ <adapt type="org.eclipse.wst.server.core.IServer" />
+ <!--systemTest property="org.eclipse.glassfish.tools.ui.IS_GLASSFISH_SERVER" value="true" /-->
+ <reference
+ definitionId="org.eclipse.glassfish.tools.isGlassfish">
+ </reference>
+ </and>
+ </enabledWhen>
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.ui.console.consolePatternMatchListeners">
+ <consolePatternMatchListener
+ class="org.eclipse.glassfish.tools.ui.log.GlassfishConsoleTracker"
+ id="org.eclipse.glassfish.tools.ui.consolePatternMatchListener"
+ qualifier="${java_extensions_regex}"
+ regex="\(\S*${java_extensions_regex}\S*\)">
+ <enablement></enablement>
+ </consolePatternMatchListener>
+ </extension>
+
+ <extension point="org.eclipse.wst.server.core.runtimeLocators">
+ <runtimeLocator
+ id="org.eclipse.glassfish.tools"
+ class="org.eclipse.glassfish.tools.ui.internal.GlassFishRuntimeLocatorDelegate"
+ typeIds="glassfish"/>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishToolsUIPlugin.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishToolsUIPlugin.java
new file mode 100644
index 0000000..a760940
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishToolsUIPlugin.java
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerLifecycleListener;
+import org.eclipse.wst.server.core.internal.ResourceManager;
+import org.eclipse.wst.server.core.internal.UpdateServerJob;
+
+import org.eclipse.glassfish.tools.GlassFishServer;
+
+@SuppressWarnings("restriction")
+public class GlassfishToolsUIPlugin extends AbstractUIPlugin {
+
+ public static final String PLUGIN_ID = "org.eclipse.glassfish.tools.ui";
+
+ public static final String EAR_MODULE_IMG = "ear.img";
+ public static final String EJB_MODULE_IMG = "ejb.img";
+ public static final String GF_SERVER_IMG = "gf-server.img";
+ public static final String LOG_FILE_IMG = "log-file.img";
+ public static final String UPDATE_CENTER_IMG = "update-center.img";
+ public static final String WEB_MODULE_IMG = "web.img";
+ public static final String WEBSERVICE_IMG = "webservice.img";
+ public static final String RESOURCES_IMG = "resources.img";
+ public static final String GF_WIZARD = "wizard.img";
+
+ private static GlassfishToolsUIPlugin instance;
+
+ public GlassfishToolsUIPlugin() {
+ instance = this;
+ addServerLifecycleListener();
+ }
+
+ /**
+ * Start a UpdateServerJob to update status when GF server is added
+ */
+ private void addServerLifecycleListener() {
+
+ IServerLifecycleListener serverLifecycleListener = new IServerLifecycleListener() {
+ public void serverAdded(IServer server) {
+ if (server.loadAdapter(GlassFishServer.class, new NullProgressMonitor())!=null) {
+ if (server.getServerState() == IServer.STATE_UNKNOWN) {
+ UpdateServerJob job = new UpdateServerJob(new IServer[] { server });
+ job.schedule();
+ }
+ }
+ }
+
+ public void serverChanged(IServer server) {
+ }
+
+ public void serverRemoved(IServer server) {
+ }
+ };
+
+ ResourceManager.getInstance().addServerLifecycleListener(
+ serverLifecycleListener);
+ }
+
+ public static final GlassfishToolsUIPlugin getInstance() {
+ return instance;
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+
+ reg.put(EAR_MODULE_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/ear.gif")));
+ reg.put(EJB_MODULE_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/ejb_module.gif")));
+ reg.put(GF_SERVER_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/glassfishserver.gif")));
+ reg.put(LOG_FILE_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/logfile.gif")));
+ reg.put(UPDATE_CENTER_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/updateCenter.png")));
+ reg.put(WEB_MODULE_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/web_module.gif")));
+ reg.put(WEBSERVICE_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/webservice.png")));
+ reg.put(RESOURCES_IMG, ImageDescriptor.createFromURL(getBundle().getEntry("icons/obj16/resources.gif")));
+ reg.put(GF_WIZARD, ImageDescriptor.createFromURL(getBundle().getEntry("icons/wizard75x66.png")));
+ }
+
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishUI.sdef b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishUI.sdef
new file mode 100644
index 0000000..c7f4c5e
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/GlassfishUI.sdef
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definition>
+ <import>
+ <package>org.eclipse.glassfish.tools</package>
+ </import>
+ <composite>
+ <id>glassfish.server</id>
+ <content>
+ <property-editor>Name</property-editor>
+ <property-editor>HostName</property-editor>
+ <property-editor>
+ <visible-when>${ Enabled }</visible-when>
+ <property>DomainPath</property>
+ <action>
+ <id>CreateNewDomain</id>
+ <label>New Domain</label>
+ <location>after:Sapphire.Browse</location>
+ <image>icons/obj16/create.png</image>
+ </action>
+ <action-handler>
+ <action>CreateNewDomain</action>
+ <id>CreateNewDomain.Handler</id>
+ <impl>org.eclipse.glassfish.tools.ui.wizards.NewGlassfishDomainAction</impl>
+ <label>new domain</label>
+ </action-handler>
+ </property-editor>
+ <separator></separator>
+ <property-editor>AdminName</property-editor>
+ <property-editor>AdminPassword</property-editor>
+ <property-editor>
+ <visible-when>${ Enabled }</visible-when>
+ <property>AdminPort</property>
+ </property-editor>
+ <property-editor>DebugPort</property-editor>
+ <composite>
+ <indent>true</indent>
+ <content>
+ <actuator>
+ <visible-when>${Remote}</visible-when>
+ <action-id>Glassfish.Server.TestConnection</action-id>
+ <label>test connection</label>
+ <style>Sapphire.Actuator.Button</style>
+ <action>
+ <id>Glassfish.Server.TestConnection</id>
+ <label>test connection</label>
+ </action>
+ <action-handler>
+ <action>Glassfish.Server.TestConnection</action>
+ <impl>org.eclipse.glassfish.tools.ui.wizards.GlassfishTestConnectionAction</impl>
+ <id>Glassfish.Server.TestConnection.handler</id>
+ </action-handler>
+ </actuator>
+ </content>
+ </composite>
+ <separator></separator>
+ <property-editor>PreserveSessions</property-editor>
+ <property-editor>
+ <visible-when>${ Enabled }</visible-when>
+ <property>UseJarDeployment</property>
+ </property-editor>
+ </content>
+ </composite>
+ <composite>
+ <id>glassfish.runtime</id>
+ <content>
+ <property-editor>Name</property-editor>
+ <property-editor>ServerRoot</property-editor>
+ <property-editor>JavaRuntimeEnvironment</property-editor>
+ </content>
+ </composite>
+ <wizard>
+ <id>new-domain-wizard</id>
+ <label>New GlassFish Server Domain</label>
+ <page>
+ <id>main.page</id>
+ <label>Create New GlassFish Server Domain</label>
+ <description>Create a GlassFish server domain with default admin user, no password, administration port: portbase + 48 and HTTP port: portbase + 80. </description>
+ <image>icons/wizard75x66.png</image>
+ <content>
+ <property-editor>Name</property-editor>
+ <property-editor>DomainDir</property-editor>
+ <property-editor>PortBase</property-editor>
+ </content>
+ </page>
+ <element-type>org.eclipse.glassfish.tools.ICreateGlassfishDomainOp</element-type>
+ </wizard>
+</definition> \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/JAXRSActionPanels.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/JAXRSActionPanels.java
new file mode 100644
index 0000000..2837d32
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/JAXRSActionPanels.java
@@ -0,0 +1,24 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui;
+
+import org.eclipse.jst.common.project.facet.ui.libprov.LibraryProviderOperationPanel;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class JAXRSActionPanels extends LibraryProviderOperationPanel {
+
+ @Override
+ public Control createControl(Composite c) {
+ return new Composite(c, SWT.NONE);
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/SunAppServerLaunchConfigurationTabGroup.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/SunAppServerLaunchConfigurationTabGroup.java
new file mode 100644
index 0000000..234254f
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/SunAppServerLaunchConfigurationTabGroup.java
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
+import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
+import org.eclipse.wst.server.ui.ServerLaunchConfigurationTab;
+
+public class SunAppServerLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[7];
+ tabs[0] = new ComboServerLaunchConfigurationTab(new String[] {"glassfish.server"});
+ tabs[0].setLaunchConfigurationDialog(dialog);
+ tabs[1] = new JavaArgumentsTab();
+ tabs[1].setLaunchConfigurationDialog(dialog);
+ tabs[2] = new JavaClasspathTab();
+ tabs[2].setLaunchConfigurationDialog(dialog);
+ tabs[3] = new SourceLookupTab();
+ tabs[3].setLaunchConfigurationDialog(dialog);
+ tabs[4] = new EnvironmentTab();
+ tabs[4].setLaunchConfigurationDialog(dialog);
+ tabs[5] = new JavaJRETab();
+ tabs[5].setLaunchConfigurationDialog(dialog);
+ tabs[6] = new CommonTab();
+ tabs[6].setLaunchConfigurationDialog(dialog);
+ setTabs(tabs);
+ }
+
+ private static class ComboServerLaunchConfigurationTab extends ServerLaunchConfigurationTab {
+ public ComboServerLaunchConfigurationTab(String[] ids) {
+ super(ids);
+ }
+
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ super.initializeFrom(configuration);
+ handleServerSelection();
+ }
+ }
+}
+
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/editorsections/ServerSection.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/editorsections/ServerSection.java
new file mode 100644
index 0000000..fa760e3
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/editorsections/ServerSection.java
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.editorsections;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.internal.dialogs.PropertyDialog;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+
+import org.eclipse.glassfish.tools.Messages;
+
+/**
+ *
+ * @author ludo
+ */
+@SuppressWarnings("restriction")
+public class ServerSection extends ServerEditorSection implements
+ PropertyChangeListener {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#dispose()
+ */
+ @Override
+ public void dispose() {
+ server.removePropertyChangeListener(this);
+ super.dispose();
+ }
+
+ public void createSection(Composite parent) {
+ super.createSection(parent);
+
+ FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+ Section section = toolkit.createSection(parent,
+ ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+ | ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED
+ | ExpandableComposite.FOCUS_TITLE);
+
+ section.setText(Messages.wizardSectionTitle);
+
+ section.setDescription(Messages.wizardSectionDescription);
+ section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+ Composite comp = toolkit.createComposite(section);
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 3;
+ gl.verticalSpacing = 5;
+ gl.marginWidth = 10;
+ gl.marginHeight = 5;
+ comp.setLayout(gl);
+ comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+ section.setClient(comp);
+
+ Hyperlink link = toolkit.createHyperlink(comp, "Open server properties page...", SWT.UNDERLINE_LINK);
+ link.addHyperlinkListener(new IHyperlinkListener() {
+
+ @Override
+ public void linkExited(HyperlinkEvent e) {
+ }
+
+ @Override
+ public void linkEntered(HyperlinkEvent e) {
+ }
+
+ @Override
+ public void linkActivated(HyperlinkEvent e) {
+ String id = "org.eclipse.wst.server.ui.properties";//$NON-NLS-1$
+ PropertyDialog dialog = PropertyDialog.createDialogOn(Display.getDefault().getActiveShell(), id, server);
+ dialog.open();
+ }
+ });
+
+ GridDataFactory txtGDF = GridDataFactory.fillDefaults()
+ .grab(true, false).span(3, 1).hint(50, SWT.DEFAULT);
+
+ txtGDF.applyTo(link);
+
+ }
+
+ // note that this is currently not working due to issue 140
+ public void propertyChange(PropertyChangeEvent evt) {
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.java
new file mode 100644
index 0000000..2afdbd3
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.java
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponentVersion;
+import org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider;
+
+/**
+ * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
+ */
+
+public final class GlassFishRuntimeComponentLabelProvider implements IRuntimeComponentLabelProvider
+{
+ private final IRuntimeComponent rc;
+
+ public GlassFishRuntimeComponentLabelProvider( final IRuntimeComponent rc )
+ {
+ this.rc = rc;
+ }
+
+ public String getLabel()
+ {
+ final IRuntimeComponentVersion rcv = this.rc.getRuntimeComponentVersion();
+ final String verstr = rcv.getVersionString();
+
+ return Resources.bind( Resources.label, verstr );
+ }
+
+ private static final class Resources extends NLS
+ {
+ public static String label;
+
+ static
+ {
+ initializeMessages( GlassFishRuntimeComponentLabelProvider.class.getName(), Resources.class );
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.properties b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.properties
new file mode 100644
index 0000000..38aa2f8
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProvider.properties
@@ -0,0 +1 @@
+label = GlassFish {0}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProviderFactory.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProviderFactory.java
new file mode 100644
index 0000000..09105e5
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeComponentLabelProviderFactory.java
@@ -0,0 +1,35 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.internal;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
+import org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider;
+
+/**
+ * @author <a href="mailto:konstantin.komissarchik@oracle.com">Konstantin Komissarchik</a>
+ */
+
+public final class GlassFishRuntimeComponentLabelProviderFactory implements IAdapterFactory
+{
+ private static final Class<?>[] ADAPTER_TYPES = { IRuntimeComponentLabelProvider.class };
+
+ public <T> T getAdapter( final Object adaptable, final Class<T> adapterType )
+ {
+ final IRuntimeComponent rc = (IRuntimeComponent) adaptable;
+ return adapterType.cast( new GlassFishRuntimeComponentLabelProvider( rc ) );
+ }
+
+ public Class<?>[] getAdapterList()
+ {
+ return ADAPTER_TYPES;
+ }
+
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.java
new file mode 100644
index 0000000..9d6c43c
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.java
@@ -0,0 +1,174 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.internal;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.sapphire.Value;
+import org.eclipse.sapphire.ui.def.DefinitionLoader;
+import org.eclipse.sapphire.ui.forms.swt.SapphireDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.internal.ResourceManager;
+import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
+import org.eclipse.wst.server.core.model.RuntimeLocatorDelegate;
+
+import org.eclipse.glassfish.tools.GlassFishInstall;
+import org.eclipse.glassfish.tools.GlassFishRuntime;
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+import org.eclipse.glassfish.tools.IGlassfishRuntimeModel;
+
+@SuppressWarnings("restriction")
+public final class GlassFishRuntimeLocatorDelegate extends RuntimeLocatorDelegate {
+
+ private static final IRuntimeType RUNTIME_TYPE = ServerCore.findRuntimeType("glassfish");
+
+ @Override
+ public void searchForRuntimes( final IPath path, final IRuntimeSearchListener listener, final IProgressMonitor monitor )
+ {
+ search( path.toFile(), listener, monitor );
+ }
+
+ private void search( final File f, final IRuntimeSearchListener listener, final IProgressMonitor monitor )
+ {
+ if( monitor.isCanceled() || ! f.isDirectory() || f.isHidden() )
+ {
+ return;
+ }
+
+ try
+ {
+ IRuntime rt = create( f );
+ if( rt!=null ){
+ IRuntimeWorkingCopy wc = rt.createWorkingCopy();
+ listener.runtimeFound(wc);
+ return;
+ }
+ }
+ catch( final CoreException e )
+ {
+ GlassfishToolsPlugin.log( e );
+ return;
+ }
+
+ final File[] children = f.listFiles();
+
+ if( children != null )
+ {
+ for( final File child : children )
+ {
+ search( child, listener, monitor );
+ }
+ }
+ }
+
+ private static IRuntime create( final File gfhome ) throws CoreException
+ {
+ GlassFishInstall install = GlassFishInstall.find(gfhome);
+ if( install==null )
+ return null;
+
+ if( findRuntime( gfhome ) != null )
+ {
+ return null;
+ }
+
+ final String name = GlassFishRuntime.createDefaultRuntimeName( install.version() );
+
+ final IRuntimeWorkingCopy created = RUNTIME_TYPE.createRuntime( name, null );
+ created.setLocation(new Path(gfhome.getAbsolutePath()));
+ created.setName( name );
+
+ final RuntimeWorkingCopy rwc = (RuntimeWorkingCopy) created;
+
+ //rwc.setAttribute("server_definition_id", rtype.getId());
+ //<map key="generic_server_instance_properties"
+ // sunappserver.adminname="admin"
+ // sunappserver.adminpassword=""
+ // sunappserver.adminserverportnumber="4848"
+ // sunappserver.domainpath="D:\glassfish4\glassfish\domains\domain1"
+ // sunappserver.keepSessions="true"
+ // sunappserver.serveraddress="localhost"/>
+
+ final Map<String, String> props = new HashMap<String, String>();
+ props.put("sunappserver.rootdirectory", rwc.getLocation().toPortableString() );
+ rwc.setAttribute("generic_server_instance_properties", props);
+
+ final GlassFishRuntime gf = (GlassFishRuntime) rwc.loadAdapter( GlassFishRuntime.class, null );
+ final IGlassfishRuntimeModel gfmodel = gf.getModel();
+ final Value<org.eclipse.sapphire.modeling.Path> javaRuntimeEnvironmentProperty = gfmodel.getJavaRuntimeEnvironment();
+
+ if( javaRuntimeEnvironmentProperty.content() == null )
+ {
+ final Display display = Display.getDefault();
+
+ display.syncExec
+ (
+ new Runnable()
+ {
+ public void run()
+ {
+ new SapphireDialog( display.getActiveShell(), gfmodel, DefinitionLoader.sdef( GlassFishRuntimeLocatorDelegate.class ).dialog() ).open();
+ }
+ }
+ );
+
+ if( javaRuntimeEnvironmentProperty.content() == null )
+ {
+ rwc.dispose();
+ return null;
+ }
+ else
+ {
+ // Force JVM definition to be created
+
+ gf.getVMInstall();
+
+ // Clear the explicit JVM location as the DefaultValueService will now pick it up
+
+ javaRuntimeEnvironmentProperty.clear();
+ }
+ }
+
+ final IStatus validationResult = created.validate(null);
+
+ if( validationResult.getSeverity() != IStatus.ERROR )
+ {
+ created.save( true, null );
+ return created.getOriginal();
+ }
+
+ return null;
+ }
+
+ private static IRuntime findRuntime( final File location )
+ {
+ for( final IRuntime runtime : ResourceManager.getInstance().getRuntimes() )
+ {
+ if( RUNTIME_TYPE == runtime.getRuntimeType() && location.equals( runtime.getLocation().toFile() ) )
+ {
+ return runtime;
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.sdef b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.sdef
new file mode 100644
index 0000000..93ef071
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/internal/GlassFishRuntimeLocatorDelegate.sdef
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definition>
+ <dialog>
+ <id>FindJavaDialog</id>
+ <label>Locate JDK for GlassFish</label>
+ <content>
+ <label>GlassFish has been detected. A compatible JDK is needed in order to define this runtime.</label>
+ <spacer></spacer>
+ <property-editor>
+ <hint>
+ <name>read.only</name>
+ <value>true</value>
+ </hint>
+ <property>ServerRoot</property>
+ </property-editor>
+ <property-editor>JavaRuntimeEnvironment</property-editor>
+ </content>
+ <width>400</width>
+ <initial-focus>JavaRuntimeEnvironment</initial-focus>
+ </dialog>
+</definition> \ No newline at end of file
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassFishLogPageParticipant.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassFishLogPageParticipant.java
new file mode 100644
index 0000000..59350a0
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassFishLogPageParticipant.java
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.log;
+
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsolePageParticipant;
+import org.eclipse.ui.console.TextConsole;
+import org.eclipse.ui.part.IPageBookViewPage;
+
+public class GlassFishLogPageParticipant implements IConsolePageParticipant {
+
+ public void activated() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void deactivated() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void dispose() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void init(IPageBookViewPage page, IConsole console) {
+ if(page.getControl() instanceof StyledText) {
+ StyledText viewer = (StyledText)(page.getControl());
+ viewer.addLineStyleListener(new LogStyle(((TextConsole)console).getDocument()));
+ }
+ }
+
+ public <T> T getAdapter(Class<T> adapter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassfishConsoleTracker.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassfishConsoleTracker.java
new file mode 100644
index 0000000..d2e3cb9
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/GlassfishConsoleTracker.java
@@ -0,0 +1,47 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.log;
+
+import org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.ui.console.IHyperlink;
+import org.eclipse.ui.console.IPatternMatchListenerDelegate;
+import org.eclipse.ui.console.PatternMatchEvent;
+import org.eclipse.ui.console.TextConsole;
+
+public class GlassfishConsoleTracker implements IPatternMatchListenerDelegate {
+
+ /**
+ * The console associated with this line tracker
+ */
+ private TextConsole gfConsole;
+
+ @Override
+ public void connect(TextConsole console) {
+ gfConsole = console;
+ }
+
+ @Override
+ public void disconnect() {
+ gfConsole = null;
+ }
+
+ @Override
+ public void matchFound(PatternMatchEvent event) {
+ try {
+ int offset = event.getOffset();
+ int length = event.getLength();
+ IHyperlink link = new JavaStackTraceHyperlink(gfConsole);
+ gfConsole.addHyperlink(link, offset+1, length-2);
+ } catch (BadLocationException e) {
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/LogStyle.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/LogStyle.java
new file mode 100644
index 0000000..8925c4e
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/log/LogStyle.java
@@ -0,0 +1,110 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.log;
+
+import java.util.Arrays;
+import java.util.logging.Level;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.LineStyleEvent;
+import org.eclipse.swt.custom.LineStyleListener;
+import org.eclipse.swt.custom.StyleRange;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+import org.eclipse.glassfish.tools.PreferenceConstants;
+
+public class LogStyle implements LineStyleListener, IPropertyChangeListener {
+ Display display = Display.getCurrent();
+
+ IPreferenceStore store = GlassfishToolsPlugin.getInstance().getPreferenceStore();
+ boolean colorInConsole = store.getBoolean(PreferenceConstants.ENABLE_COLORS_CONSOLE);
+
+ //private IDocument document;
+
+ public LogStyle(IDocument document) {
+ //this.document = document;
+ store.addPropertyChangeListener(this);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#finalize()
+ */
+ @Override
+ protected void finalize() throws Throwable {
+ store.removePropertyChangeListener(this);
+ super.finalize();
+ }
+
+ public void lineGetStyle(LineStyleEvent event) {
+ StyleRange styleRange = null;
+ String buf = event.lineText;
+ int start;
+
+ if (colorInConsole){
+ if ((start = buf.indexOf(Level.WARNING.getName())) != -1) {
+ styleRange = new StyleRange();
+ styleRange.start = event.lineOffset + start;
+ styleRange.length = 6;
+ styleRange.foreground = display.getSystemColor(SWT.COLOR_DARK_YELLOW);
+ } else if ((start = buf.indexOf(Level.SEVERE.getName())) != -1) {
+ //Makr severe error and exception stack trace as error color
+ styleRange = new StyleRange();
+ String errorColorName = org.eclipse.jface.preference.JFacePreferences.ERROR_COLOR;
+ styleRange.foreground = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry().get(errorColorName);
+ styleRange.start = event.lineOffset + start;
+ styleRange.length = 5;
+ styleRange.fontStyle = SWT.BOLD;
+ } else if ((start = buf.indexOf("FATAL")) != -1) {
+ styleRange = new StyleRange();
+ String errorColorName = org.eclipse.jface.preference.JFacePreferences.ERROR_COLOR;
+ styleRange.foreground = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry().get(errorColorName);
+ styleRange.start = event.lineOffset + start;
+ styleRange.length = 4;
+ styleRange.fontStyle = SWT.BOLD;
+ }
+
+ if (styleRange!=null) {
+ StyleRange[] styles;
+ if (event.styles != null) {
+ styles = Arrays.copyOf(event.styles, event.styles.length + 1);
+ } else {
+ styles = new StyleRange[1];
+ }
+ styles[styles.length - 1] = styleRange;
+
+ // Set the styles for the line
+ event.styles = styles;
+ }
+ }
+ }
+
+
+// private Color getLevelColor(Level logLevel) {
+// if (Level.SEVERE.equals(logLevel)) {
+// String errorColorName = org.eclipse.jface.preference.JFacePreferences.ERROR_COLOR;
+// return PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry().get(errorColorName);
+// } else if (Level.WARNING.equals(logLevel)) {
+// return display.getSystemColor(SWT.COLOR_DARK_YELLOW);
+// }
+// return display.getSystemColor(SWT.DEFAULT);
+// }
+
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(PreferenceConstants.ENABLE_COLORS_CONSOLE)) {
+ colorInConsole= store.getBoolean(PreferenceConstants.ENABLE_COLORS_CONSOLE);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/preferences/GlassFishPreferencePage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/preferences/GlassFishPreferencePage.java
new file mode 100644
index 0000000..e3cc9ca
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/preferences/GlassFishPreferencePage.java
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+import org.eclipse.glassfish.tools.PreferenceConstants;
+
+
+
+/**
+ * This class represents a preference page that
+ * is contributed to the Preferences dialog. By
+ * subclassing <samp>FieldEditorPreferencePage</samp>, we
+ * can use the field support built into JFace that allows
+ * us to create a page that is small and knows how to
+ * save, restore and apply itself.
+ * <p>
+ * This page is used to modify preferences only. They
+ * are stored in the preference store that belongs to
+ * the main plug-in class. That way, preferences can
+ * be accessed directly via the preference store.
+ * @author Ludovic Champenois
+ */
+
+public class GlassFishPreferencePage extends FieldEditorPreferencePage
+ implements IWorkbenchPreferencePage {
+
+ public GlassFishPreferencePage() {
+ super(GRID);
+ setPreferenceStore(GlassfishToolsPlugin.getInstance().getPreferenceStore());
+ setDescription("You can configure GlassFish Enterprise Server Plugin global preferences");
+ }
+
+ /**
+ * Creates the field editors. Field editors are abstractions of
+ * the common GUI blocks needed to manipulate various types
+ * of preferences. Each field editor knows how to save and
+ * restore itself.
+ */
+ public void createFieldEditors() {
+ addField(
+ new BooleanFieldEditor(
+ PreferenceConstants.ENABLE_LOG,
+ "&Enable GlassFish Plugin Log information in IDE log file",
+ getFieldEditorParent()));
+ addField(
+ new BooleanFieldEditor(
+ PreferenceConstants.ENABLE_START_VERBOSE,
+ "&Start the GlassFish Enterprise Server in verbose mode (Eclipse console can be used)",
+ getFieldEditorParent()));
+
+ addField(
+ new BooleanFieldEditor(
+ PreferenceConstants.ENABLE_COLORS_CONSOLE,
+ "Enable colored rendering in the GlassFish Log Viewer",
+ getFieldEditorParent()));
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/properties/ServerPropertyPage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/properties/ServerPropertyPage.java
new file mode 100644
index 0000000..28be693
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/properties/ServerPropertyPage.java
@@ -0,0 +1,169 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.properties;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.sapphire.FilteredListener;
+import org.eclipse.sapphire.PropertyValidationEvent;
+import org.eclipse.sapphire.modeling.Status;
+import org.eclipse.sapphire.modeling.Status.Severity;
+import org.eclipse.sapphire.ui.def.DefinitionLoader;
+import org.eclipse.sapphire.ui.forms.swt.SapphireForm;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.internal.Server;
+
+import org.eclipse.glassfish.tools.GlassFishServer;
+import org.eclipse.glassfish.tools.GlassFishServerBehaviour;
+import org.eclipse.glassfish.tools.IGlassfishServerModel;
+import org.eclipse.glassfish.tools.ui.wizards.GlassfishSapphireWizardFragment;
+
+@SuppressWarnings("restriction")
+public class ServerPropertyPage extends PropertyPage {
+
+ IServerWorkingCopy serverWC = null;
+ GlassFishServer sunserver;
+ IGlassfishServerModel model;
+
+ FilteredListener<PropertyValidationEvent> listener = new FilteredListener<PropertyValidationEvent>() {
+ @Override
+ protected void handleTypedEvent(final PropertyValidationEvent event) {
+ refreshStatus();
+ }
+ };
+
+
+ @Override
+ protected Control createContents(Composite parent) {
+
+ IServer server = (IServer) getElement();
+ if (server instanceof IServerWorkingCopy)
+ serverWC = (IServerWorkingCopy) server;
+ else
+ serverWC = server.createWorkingCopy();
+
+ sunserver = (GlassFishServer) serverWC.loadAdapter(GlassFishServer.class,
+ new NullProgressMonitor());
+ model = sunserver.getModel();
+
+ model.attach(listener, "*");
+
+ final SapphireForm control = new SapphireForm(parent, model, DefinitionLoader
+ .context(GlassfishSapphireWizardFragment.class).sdef("org.eclipse.glassfish.tools.ui.GlassfishUI").form("glassfish.server"));
+
+ control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ refreshStatus();
+
+ return control;
+
+ }
+
+ private void refreshStatus() {
+ final Status status = model.validation();
+
+ if (status.severity() == Severity.ERROR) {
+ setMessage(status.message(), IMessageProvider.ERROR);
+ setValid(false);
+ } else if (status.severity() == Severity.WARNING) {
+ setMessage(status.message(), IMessageProvider.WARNING);
+ setValid(true);
+ } else {
+ setMessage(null, IMessageProvider.NONE);
+ setValid(true);
+ }
+
+ }
+
+
+
+ // note that this is currently not working due to issue 140
+// public void propertyChange(PropertyChangeEvent evt) {
+// if (AbstractGlassfishServer.DOMAINUPDATE == evt.getPropertyName()) {
+// username.setText(sunserver.getAdminUser());
+// password.setText(sunserver.getAdminPassword());
+// adminServerPortNumber.setText(Integer.toString(sunserver.getAdminPort()));
+// serverPortNumber.setText(Integer.toString(sunserver.getPort()));
+// }
+// }
+
+ @Override
+ public boolean isValid() {
+ return super.isValid();
+ }
+
+ @Override
+ public boolean performCancel() {
+ model.detach(listener, "*");
+ return super.performCancel();
+ }
+
+ @Override
+ protected void performApply() {
+ IProgressMonitor monitor = new NullProgressMonitor();
+ try {
+ final IServer server = serverWC.save(true, monitor);
+ // sunserver.saveConfiguration(monitor);
+ // oldProps = new HashMap<String, String>(sunserver.getProps());
+ Job job = new Job("Update Glassfish server state") { //$NON-NLS-1$
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ GlassFishServerBehaviour serverBehavior = (GlassFishServerBehaviour) serverWC
+ .loadAdapter(GlassFishServerBehaviour.class, monitor);
+ serverBehavior.updateServerStatus();
+
+ Server gfServer = (Server)server;
+ gfServer.setServerPublishState(IServer.PUBLISH_CLEAN);
+
+ } catch (Exception e) {
+ ((Server) server).setServerState(IServer.STATE_STOPPED);
+ }
+ return org.eclipse.core.runtime.Status.OK_STATUS;
+ }
+ };
+
+ job.schedule();
+ } catch (CoreException e) {
+ // no-op
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public boolean performOk() {
+ model.detach(listener, "*");
+ performApply();
+ return true;
+ }
+
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ serverWC.setAttribute(GlassFishServer.ATTR_ADMIN, "");
+ serverWC.setAttribute(GlassFishServer.ATTR_ADMINPASS, "");
+ serverWC.setAttribute(GlassFishServer.ATTR_DOMAINPATH, GlassFishServer.getDefaultDomainDir(
+ serverWC.getRuntime().getLocation()).toString());
+ serverWC.setAttribute(GlassFishServer.ATTR_ADMINPORT, "");
+ serverWC.setAttribute(GlassFishServer.ATTR_DEBUG_PORT, "");
+ model.refresh();
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/DriverMaps.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/DriverMaps.java
new file mode 100644
index 0000000..b83b124
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/DriverMaps.java
@@ -0,0 +1,355 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * From DatabaseUtils in the V2 plugin
+ *
+ * XXX This primarily code does linear searchs through map keys because of extra
+ * logic on key comparisons. Find a way to use the maps properly.
+ *
+ * NOTE: This is a copy of the file used in the NB V3 plugin, though it's
+ * in a different package there (org.netbeans.modules.glassfish.javaee.db).
+ *
+ * @author Nitya Doraisamy
+ * @author Peter Williams
+ */
+public class DriverMaps {
+
+ private static final int INITIAL_MAP_SIZE = 107;
+
+ private static Map<String, String> driverMap;
+ private static Map<String, String> dsClassMap;
+ private static Map<String, String> cpClassMap;
+
+ private DriverMaps() {
+ }
+
+ /**
+ * Returns the driver name for the given url
+ *
+ * @param url url of this connection
+ * @return driver name required
+ */
+ public static final String getDriverName(String url) {
+ return getValueForUrl(driverMap, url);
+ }
+
+ /**
+ * Returns driver class name for the given url
+ *
+ * @param url url of this connection
+ * @return driver class name required
+ */
+ public static final String getDSClassName(String url) {
+ return getValueForUrl(dsClassMap, url);
+ }
+
+ private static final String getValueForUrl(Map<String, String> mapping, String url) {
+ for( final Map.Entry<String,String> entry : mapping.entrySet() ) {
+ final String urlPrefix = entry.getKey();
+ if(url.startsWith(urlPrefix)){
+ return entry.getValue();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Gets the URL prefix fiven a Datasource Classname
+ * @param inClass Datasource Classname
+ * @return URL prefix for given Datasource Classname
+ */
+ public static final String getUrlPrefix(String inClass, String resType) {
+ return resType.equals("javax.sql.ConnectionPoolDataSource") ?
+ getPrefix(cpClassMap, inClass) : getPrefix(dsClassMap, inClass);
+ }
+
+ private static final String getPrefix(Map<String, String> classMap, String inClass) {
+ for( final Map.Entry<String,String> entry : classMap.entrySet() ) {
+ final String urlPrefix = entry.getKey();
+ final String dsClass = entry.getValue();
+ if(dsClass.equalsIgnoreCase(inClass)) {
+ return urlPrefix;
+ }
+ }
+ return null;
+ }
+
+ static {
+ driverMap = new HashMap<String, String>(INITIAL_MAP_SIZE);
+
+ //IBM DB2
+ driverMap.put("jdbc:db2:", "COM.ibm.db2.jdbc.net.DB2Driver");
+ //JDBC-ODBC Bridge
+ driverMap.put("jdbc:odbc:", "sun.jdbc.odbc.JdbcOdbcDriver");
+ //Microsoft SQL Server (Weblogic driver)
+ driverMap.put("jdbc:weblogic:mssqlserver4:", "weblogic.jdbc.mssqlserver4.Driver");
+
+ //Oracle-thin
+ driverMap.put("jdbc:oracle:thin:", "oracle.jdbc.driver.OracleDriver");
+ //Oracle //OCI 8i
+ driverMap.put("jdbc:oracle:oci8:", "oracle.jdbc.driver.OracleDriver");
+ //Oracle //OCI 9i
+ driverMap.put("jdbc:oracle:oci:", "oracle.jdbc.driver.OracleDriver");
+
+ //PointBase
+ driverMap.put("jdbc:pointbase:", "com.pointbase.jdbc.jdbcUniversalDriver");
+ //Cloudscape
+ driverMap.put("jdbc:cloudscape:", "COM.cloudscape.core.JDBCDriver");
+ //Java DB (Net)
+ driverMap.put("jdbc:derby:", "org.apache.derby.jdbc.ClientDriver");
+ //Firebird (JCA/JDBC driver)
+ driverMap.put("jdbc:firebirdsql:", "org.firebirdsql.jdbc.FBDriver");
+ //FirstSQL/J //Enterprise Server Edition
+ driverMap.put("jdbc:dbcp:", "COM.FirstSQL.Dbcp.DbcpDriver");
+ //FirstSQL/J //Professional Edition
+ driverMap.put("jdbc:dbcp:", "COM.FirstSQL.Dbcp.DbcpDriver");
+
+ //IBM DB2 (DataDirect Connect for JDBC)
+ driverMap.put("jdbc:datadirect:db2:", "com.ddtek.jdbc.db2.DB2Driver");
+ //Informix Dynamic Server (DataDirect Connect for JDBC)
+ driverMap.put("jdbc:datadirect:informix:", "com.ddtek.jdbc.informix.InformixDriver");
+ //Oracle (DataDirect Connect for JDBC)
+ driverMap.put("jdbc:datadirect:oracle:", "com.ddtek.jdbc.oracle.OracleDriver");
+ //Microsoft SQL Server (DataDirect Connect for JDBC)
+ driverMap.put("jdbc:datadirect:sqlserver:", "com.ddtek.jdbc.sqlserver.SQLServerDriver");
+ //Sybase (DataDirect Connect for JDBC)
+ driverMap.put("jdbc:datadirect:sybase:", "com.ddtek.jdbc.sybase.SybaseDriver");
+
+ //IDS Server
+ driverMap.put("jdbc:ids:", "ids.sql.IDSDriver");
+ //Informix Dynamic Server
+ driverMap.put("jdbc:informix-sqli:", "com.informix.jdbc.IfxDriver");
+ //InstantDB (v3.13 and earlier)
+ driverMap.put("jdbc:idb:", "jdbc.idbDriver");
+ //InstantDB (v3.14 and later)
+ driverMap.put("jdbc:idb:", "org.enhydra.instantdb.jdbc.idbDriver");
+ //Interbase (InterClient driver)
+ driverMap.put("jdbc:interbase:", "interbase.interclient.Driver");
+ //HSQLDB //(server)
+ driverMap.put("jdbc:hsqldb:hsql:", "org.hsqldb.jdbcDriver");
+ //HSQLDB //(webserver)
+ driverMap.put("jdbc:hsqldb:http:", "org.hsqldb.jdbcDriver");
+ //Hypersonic SQL (v1.2 and earlier)
+ driverMap.put("jdbc:HypersonicSQL:", "hSql.hDriver");
+ //Hypersonic SQL (v1.3 and later)
+ driverMap.put("jdbc:HypersonicSQL:", "org.hsql.jdbcDriver");
+ //jTDS
+ driverMap.put("jdbc:jtds:sqlserver:", "net.sourceforge.jtds.jdbc.Driver");
+ //jTDS
+ driverMap.put("jdbc:jtds:sybase:", "net.sourceforge.jtds.jdbc.Driver");
+ //Mckoi SQL Database //(server)
+ driverMap.put("jdbc:mckoi:", "com.mckoi.JDBCDriver");
+ //Mckoi SQL Database //(standalone)
+ driverMap.put("jdbc:mckoi:local:", "com.mckoi.JDBCDriver");
+ //Microsoft SQL Server (JTurbo driver)
+ driverMap.put("jdbc:JTurbo:", "com.ashna.jturbo.driver.Driver");
+ //Microsoft SQL Server (JTurbo driver 3.0)
+ //driverMap.put("jdbc:JTurbo:", "com.newatlanta.jturbo.driver.Driver");
+ //Microsoft SQL Server (Sprinta driver)
+ driverMap.put("jdbc:inetdae:", "com.inet.tds.TdsDriver");
+ //Microsoft SQL Server 2005 (Microsoft driver)
+ //driverMap.put("jdbc:microsoft:sqlserver:", "com.microsoft.jdbc.sqlserver.SQLServerDriver");
+ driverMap.put("jdbc:sqlserver:", "com.microsoft.sqlserver.jdbc.SQLServerDriver"); //NOI18N
+ //MySQL (Connector/J driver)
+ driverMap.put("jdbc:mysql:", "com.mysql.jdbc.Driver");
+ //MySQL (MM.MySQL driver)
+ //driverMap.put("jdbc:mysql:", "org.gjt.mm.mysql.Driver");
+
+ //PostgreSQL (v6.5 and earlier)
+ //driverMap.put("jdbc:postgresql:", "postgresql.Driver");
+ //PostgreSQL (v7.0 and later)
+ driverMap.put("jdbc:postgresql:", "org.postgresql.Driver");
+ //Quadcap Embeddable Database
+ driverMap.put("jdbc:qed:", "com.quadcap.jdbc.JdbcDriver");
+ //Sybase (jConnect 4.2 and earlier)
+ //driverMap.put("jdbc:sybase:Tds:", "com.sybase.jdbc.SybDriver");
+ //Sybase (jConnect 5.2)
+ driverMap.put("jdbc:sybase:Tds:", "com.sybase.jdbc2.jdbc.SybDriver");
+
+ // Following four entries for drivers to be included in Java Studio Enterprise 7 (Bow)
+ //Microsoft SQL Server Driver
+ driverMap.put("jdbc:sun:sqlserver:", "com.sun.sql.jdbc.sqlserver.SQLServerDriver");
+ //DB2 Driver
+ driverMap.put("jdbc:sun:db2:", "com.sun.sql.jdbc.db2.DB2Driver");
+ //Oracle Driver
+ driverMap.put("jdbc:sun:oracle:", "com.sun.sql.jdbc.oracle.OracleDriver");
+ //Sybase Driver
+ driverMap.put("jdbc:sun:sybase:", "com.sun.sql.jdbc.sybase.SybaseDriver");
+
+ //AS400 Driver
+ driverMap.put("jdbc:as400:", "com.ibm.as400.access.AS400JDBCDriver");
+ }
+
+ static {
+ dsClassMap = new HashMap<String, String>(INITIAL_MAP_SIZE);
+
+ //IBM DB2
+ dsClassMap.put("jdbc:db2:", "com.ibm.db2.jcc.DB2DataSource");
+ //JDBC-ODBC Bridge
+ dsClassMap.put("jdbc:odbc:", "sun.jdbc.odbc.JdbcOdbcDriver");
+ //Microsoft SQL Server (Weblogic driver)
+ //dsClassMap.put("jdbc:weblogic:mssqlserver4:", "weblogic.jdbc.mssqlserver4.Driver");
+
+ //Oracle-thin
+ dsClassMap.put("jdbc:oracle:thin:", "oracle.jdbc.pool.OracleDataSource");
+ //Oracle //OCI 8i
+ dsClassMap.put("jdbc:oracle:oci8:", "oracle.jdbc.pool.OracleDataSource");
+ //Oracle //OCI 9i
+ dsClassMap.put("jdbc:oracle:oci:", "oracle.jdbc.pool.OracleDataSource");
+
+ //PointBase
+ dsClassMap.put("jdbc:pointbase:", "com.pointbase.jdbc.jdbcDataSource");
+ //Cloudscape
+ dsClassMap.put("jdbc:cloudscape:", "com.cloudscape.core.BasicDataSource");
+ //Java DB (Net)
+ dsClassMap.put("jdbc:derby:", "org.apache.derby.jdbc.ClientDataSource");
+ //Firebird (JCA/JDBC driver)
+ //dsClassMap.put("jdbc:firebirdsql:", "org.firebirdsql.jdbc.FBDriver");
+ //FirstSQL/J //Enterprise Server Edition
+ //dsClassMap.put("jdbc:dbcp:", "COM.FirstSQL.Dbcp.DbcpDriver");
+ //FirstSQL/J //Professional Edition
+ //dsClassMap.put("jdbc:dbcp:", "COM.FirstSQL.Dbcp.DbcpDriver");
+
+ //IBM DB2 (DataDirect Connect for JDBC)
+ dsClassMap.put("jdbc:datadirect:db2:", "com.ddtek.jdbcx.db2.DB2DataSource");
+ //Informix Dynamic Server (DataDirect Connect for JDBC)
+ dsClassMap.put("jdbc:datadirect:informix:", "com.ddtek.jdbcx.informix.InformixDataSource");
+ //Oracle (DataDirect Connect for JDBC)
+ dsClassMap.put("jdbc:datadirect:oracle:", "com.ddtek.jdbcx.oracle.OracleDataSource");
+ //Microsoft SQL Server (DataDirect Connect for JDBC)
+ dsClassMap.put("jdbc:datadirect:sqlserver:", "com.ddtek.jdbcx.sqlserver.SQLServerDataSource");
+ //Sybase (DataDirect Connect for JDBC)
+ dsClassMap.put("jdbc:datadirect:sybase:", "com.ddtek.jdbcx.sybase.SybaseDataSource");
+
+ //IDS Server
+ dsClassMap.put("jdbc:ids:", "ids.sql.IDSDriver");
+ //Informix Dynamic Server
+ dsClassMap.put("jdbc:informix-sqli:", "com.informix.jdbcx.IfxDataSource");
+ //InstantDB (v3.13 and earlier)
+ //dsClassMap.put("jdbc:idb:", "jdbc.idbDriver");
+ //InstantDB (v3.14 and later)
+ //dsClassMap.put("jdbc:idb:", "org.enhydra.instantdb.jdbc.idbDriver");
+ //Interbase (InterClient driver)
+ //dsClassMap.put("jdbc:interbase:", "interbase.interclient.Driver");
+ //HSQLDB //(server)
+ //dsClassMap.put("jdbc:hsqldb:hsql:", "org.hsqldb.jdbcDriver");
+ //HSQLDB //(webserver)
+ //dsClassMap.put("jdbc:hsqldb:http:", "org.hsqldb.jdbcDriver");
+ //Hypersonic SQL (v1.2 and earlier)
+ //dsClassMap.put("jdbc:HypersonicSQL:", "hSql.hDriver");
+ //Hypersonic SQL (v1.3 and later)
+ //dsClassMap.put("jdbc:HypersonicSQL:", "org.hsql.jdbcDriver");
+ //jTDS
+ dsClassMap.put("jdbc:jtds:sqlserver:", "net.sourceforge.jtds.jdbcx.JtdsDataSource");
+ //jTDS
+ dsClassMap.put("jdbc:jtds:sybase:", "net.sourceforge.jtds.jdbcx.JtdsDataSource");
+ //Mckoi SQL Database //(server)
+ //dsClassMap.put("jdbc:mckoi:", "com.mckoi.JDBCDriver");
+ //Mckoi SQL Database //(standalone)
+ //dsClassMap.put("jdbc:mckoi:local:", "com.mckoi.JDBCDriver");
+ //Microsoft SQL Server (JTurbo driver old version)
+ //dsClassMap.put("jdbc:JTurbo:", "com.ashna.jturbo.driver.DataSource");
+ //Microsoft SQL Server (JTurbo driver 3.0)
+ dsClassMap.put("jdbc:JTurbo:", "com.newatlanta.jturbo.driver.DataSource");
+ //Microsoft SQL Server (Sprinta driver)
+ dsClassMap.put("jdbc:inetdae:", "com.inet.tds.TdsDataSource");
+ //Microsoft SQL Server 2005 (Microsoft driver)
+ //dsClassMap.put("jdbc:microsoft:sqlserver:", "com.microsoft.jdbc.sqlserver.SQLServerDataSource");
+ dsClassMap.put("jdbc:sqlserver:", "com.microsoft.sqlserver.jdbc.SQLServerDataSource"); //NOI18N
+ //MySQL (Connector/J driver)
+ //dsClassMap.put("jdbc:mysql:", "com.mysql.jdbc.Driver");
+ //MySQL (MM.MySQL driver)
+ dsClassMap.put("jdbc:mysql:", "com.mysql.jdbc.jdbc2.optional.MysqlDataSource");
+
+ //PostgreSQL (v6.5 and earlier)
+ //dsClassMap.put("jdbc:postgresql:", "postgresql.Driver");
+ //PostgreSQL (v7.0 and later)
+ dsClassMap.put("jdbc:postgresql:", "org.postgresql.ds.PGSimpleDataSource");
+ //Quadcap Embeddable Database
+ //dsClassMap.put("jdbc:qed:", "com.quadcap.jdbc.JdbcDriver");
+ //Sybase (jConnect 4.2 and earlier)
+ //dsClassMap.put("jdbc:sybase:Tds:", "com.sybase.jdbc.SybDriver");
+ //Sybase (jConnect 5.2)
+ dsClassMap.put("jdbc:sybase:Tds:", "com.sybase.jdbc2.jdbc.SybDataSource");
+
+ // Following four entries for drivers to be included in Java Studio Enterprise 7 (Bow)
+ //Microsoft SQL Server Driver
+ dsClassMap.put("jdbc:sun:sqlserver:", "com.sun.sql.jdbcx.sqlserver.SQLServerDataSource");
+ //DB2 Driver
+ dsClassMap.put("jdbc:sun:db2:", "com.sun.sql.jdbcx.db2.DB2DataSource");
+ //Oracle Driver
+ dsClassMap.put("jdbc:sun:oracle:", "com.sun.sql.jdbcx.oracle.OracleDataSource");
+ //Sybase
+ dsClassMap.put("jdbc:sun:sybase:", "com.sun.sql.jdbcx.sybase.SybaseDataSource");
+
+ //AS400
+ dsClassMap.put("jdbc:as400:", "com.ibm.as400.access.AS400JDBCDataSource");
+ }
+
+ static {
+ cpClassMap = new HashMap<String, String>(INITIAL_MAP_SIZE);
+ //Java DB (Net)
+ cpClassMap.put("jdbc:derby:", "org.apache.derby.jdbc.ClientConnectionPoolDataSource");
+ //DB2 Driver
+ cpClassMap.put("jdbc:sun:db2:", "com.sun.sql.jdbcx.db2.DB2DataSource");
+ //Microsoft SQL Server Driver
+ cpClassMap.put("jdbc:sun:sqlserver:", "com.sun.sql.jdbcx.sqlserver.SQLServerDataSource");
+ //Oracle Driver
+ cpClassMap.put("jdbc:sun:oracle:", "com.sun.sql.jdbcx.oracle.OracleDataSource");
+ //Sybase Driver
+ cpClassMap.put("jdbc:sun:sybase:", "com.sun.sql.jdbcx.sybase.SybaseDataSource");
+ //PostgreSQL (v7.0 and later)
+ cpClassMap.put("jdbc:postgresql:", "org.postgresql.ds.PGConnectionPoolDataSource");
+ //Microsoft SQL Server 2000 (Microsoft driver)
+ cpClassMap.put("jdbc:sqlserver:", "com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource");
+ //jTDS
+ cpClassMap.put("jdbc:jtds:sqlserver:", "net.sourceforge.jtds.jdbcx.JtdsDataSource");
+ //jTDS
+ cpClassMap.put("jdbc:jtds:sybase:", "net.sourceforge.jtds.jdbcx.JtdsDataSource");
+ //Oracle //OCI 8i
+ cpClassMap.put("jdbc:oracle:oci8:", "oracle.jdbc.pool.OracleConnectionPoolDataSource");
+ //Oracle-thin
+ cpClassMap.put("jdbc:oracle:thin:", "oracle.jdbc.pool.OracleConnectionPoolDataSource");
+ //IBM DB2
+ cpClassMap.put("jdbc:db2:", "com.ibm.db2.jcc.DB2ConnectionPoolDataSource");
+ //Microsoft SQL Server (DataDirect Connect for JDBC)
+ cpClassMap.put("jdbc:datadirect:sqlserver:", "com.ddtek.jdbcx.sqlserver.SQLServerDataSource");
+ //Oracle (DataDirect Connect for JDBC)
+ cpClassMap.put("jdbc:datadirect:oracle:", "com.ddtek.jdbcx.oracle.OracleDataSource");
+ //IBM DB2 (DataDirect Connect for JDBC)
+ cpClassMap.put("jdbc:datadirect:db2:", "com.ddtek.jdbcx.db2.DB2DataSource");
+ //Informix Dynamic Server (DataDirect Connect for JDBC)
+ cpClassMap.put("jdbc:datadirect:informix:", "com.ddtek.jdbcx.informix.InformixDataSource");
+ //Sybase (DataDirect Connect for JDBC)
+ cpClassMap.put("jdbc:datadirect:sybase:", "com.ddtek.jdbcx.sybase.SybaseDataSource");
+ //Sybase (jConnect 5.2)
+ cpClassMap.put("jdbc:sybase:Tds:", "com.sybase.jdbc2.jdbc.SybConnectionPoolDataSource");
+ //PointBase
+ cpClassMap.put("jdbc:pointbase:", "com.pointbase.jdbc.jdbcDataSource");
+ //Cloudscape
+ cpClassMap.put("jdbc:cloudscape:", "COM.cloudscape.core.LocalConnectionPoolDataSource");
+ //Informix Dynamic Server
+ cpClassMap.put("jdbc:informix-sqli:", "com.informix.jdbcx.IfxConnectionPoolDataSource");
+ //MySQL (MM.MySQL driver)
+ cpClassMap.put("jdbc:mysql:", "com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource");
+ //JDBC-ODBC Bridge
+ cpClassMap.put("jdbc:odbc:", "sun.jdbc.odbc.JdbcOdbcDriver");
+
+ //AS400
+ cpClassMap.put("jdbc:as400:", "com.ibm.as400.access.AS400JDBCConnectionPoolDataSource");
+
+ }
+}
+
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JDBCInfo.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JDBCInfo.java
new file mode 100644
index 0000000..ba84569
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JDBCInfo.java
@@ -0,0 +1,74 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources;
+
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCDriverDefinitionConstants;
+
+public class JDBCInfo {
+ private IConnectionProfile connectionProfile;
+ private UrlData urlDataParser;
+
+ /**
+ * Constructor for JDBCInfo.
+ *
+ * @param profile
+ */
+ public JDBCInfo(IConnectionProfile profile) {
+ connectionProfile = profile;
+ urlDataParser = new UrlData(getURL());
+ }
+
+ private String getProperty(String propName) {
+ if (connectionProfile != null) {
+ return connectionProfile.getBaseProperties().getProperty(propName);
+ }
+ return null;
+ }
+ public String getUserName() {
+ return getProperty(IJDBCDriverDefinitionConstants.USERNAME_PROP_ID);
+ }
+
+ public String getUserPassword() {
+ return getProperty(IJDBCDriverDefinitionConstants.PASSWORD_PROP_ID);
+ }
+
+ public String getURL() {
+ return getProperty(IJDBCDriverDefinitionConstants.URL_PROP_ID);
+ }
+
+ public String getDriverClass() {
+ return getProperty(IJDBCDriverDefinitionConstants.DRIVER_CLASS_PROP_ID);
+ }
+
+ public String getDatasourceClass() {
+ return DriverMaps.getDSClassName(getURL());
+ }
+
+ public String getDatabaseVendor() {
+ return getProperty(IJDBCDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID);
+ }
+
+ public String getPort() {
+ return urlDataParser.getPort();
+ }
+
+ public String getServerName() {
+ return urlDataParser.getHostName();
+ }
+
+ public String getDatabaseName() {
+ return getProperty(IJDBCDriverDefinitionConstants.DATABASE_NAME_PROP_ID);
+ }
+
+ public String getAlternateDatabaseName() {
+ return urlDataParser.getAlternateDBName();
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JMSInfo.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JMSInfo.java
new file mode 100644
index 0000000..65936ab
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/JMSInfo.java
@@ -0,0 +1,72 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources;
+
+/**
+ * @author Nitya Doraisamy
+ *
+ */
+public class JMSInfo {
+
+ public static final String QUEUE = "javax.jms.Queue"; //$NON-NLS-1$
+ public static final String TOPIC = "javax.jms.Topic"; //$NON-NLS-1$
+ public static final String QUEUE_CONNECTION = "javax.jms.QueueConnectionFactory"; //$NON-NLS-1$
+ public static final String TOPIC_CONNECTION = "javax.jms.TopicConnectionFactory"; //$NON-NLS-1$
+ public static final String CONNECTION_FACTORY = "javax.jms.ConnectionFactory"; //$NON-NLS-1$
+
+ private String jndiName;
+ private String resourceType;
+ private boolean isConnector;
+
+ public JMSInfo() {
+
+ }
+
+ /**
+ * @param jndiName the jndiName to set
+ */
+ public void setJndiName(String jndiName) {
+ this.jndiName = jndiName;
+ }
+
+ /**
+ * @return the jndiName
+ */
+ public String getJndiName() {
+ return jndiName;
+ }
+
+ /**
+ * @param resourceType the resourceType to set
+ */
+ public void setResourceType(String resourceType) {
+ this.resourceType = resourceType;
+ }
+
+ /**
+ * @return the resourceType
+ */
+ public String getResourceType() {
+ return resourceType;
+ }
+
+ /**
+ * @return the isConnector
+ */
+ public boolean isConnector() {
+ if(resourceType.equals(QUEUE) || resourceType.equals(QUEUE)){
+ isConnector = false;
+ } else {
+ isConnector = true;
+ }
+ return isConnector;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/MailInfo.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/MailInfo.java
new file mode 100644
index 0000000..8eba7a5
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/MailInfo.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources;
+
+public class MailInfo {
+
+ private String jndiName;
+ private String mailHost;
+ private String mailFrom;
+ private String mailUser;
+
+ public MailInfo() {
+
+ }
+
+ /**
+ * @param jndiName the jndiName to set
+ */
+ public void setJndiName(String jndiName) {
+ this.jndiName = jndiName;
+ }
+
+ /**
+ * @return the jndiName
+ */
+ public String getJndiName() {
+ return jndiName;
+ }
+
+ /**
+ * @param mailHost the mailHost to set
+ */
+ public void setMailHost(String mailHost) {
+ this.mailHost = mailHost;
+ }
+
+ /**
+ * @return the mailHost
+ */
+ public String getMailHost() {
+ return mailHost;
+ }
+
+ /**
+ * @param mailFrom the mailFrom to set
+ */
+ public void setMailFrom(String mailFrom) {
+ this.mailFrom = mailFrom;
+ }
+
+ /**
+ * @return the mailFrom
+ */
+ public String getMailFrom() {
+ return mailFrom;
+ }
+
+ /**
+ * @param mailUser the mailUser to set
+ */
+ public void setMailUser(String mailUser) {
+ this.mailUser = mailUser;
+ }
+
+ /**
+ * @return the mailUser
+ */
+ public String getMailUser() {
+ return mailUser;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/UrlData.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/UrlData.java
new file mode 100644
index 0000000..3ff811b
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/UrlData.java
@@ -0,0 +1,254 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * For converting NetBeans DB Urls to their component parts or back.
+ * NOTE: This is a copy of the file used in the NB V3 plugin, though it's
+ * in a different package there (org.netbeans.modules.glassfish.eecommon.api).
+ *
+ * @author Peter Williams
+ */
+public class UrlData {
+
+ // Replaced Unicode safe character classes with ASCII equivalents to
+ // avoid JDK bug 5088563, for which a fix is not available on Mac as of
+ // this writing - !PW 7/31/08
+ private static String DBURL_PATTERN =
+ "((?:[^:\\n]+:){2,3})" + // prefix (mandatory)
+ "(?://|@|([^ \\t]+)@)" + // alternate db name (optional)
+ "([^:;/\\\\ \\t]+)" + // hostname (mandatory)
+ "(?:\\\\([^ \\t:/;]+)|)" + // instance name (optional)
+ "(?::([0-9]+)|)" + // port (optional)
+ "(?:(?:/|:)([^:/;?&]+)|)((?:(?:;|\\?|&|:)" + // database (optional)
+ "(?:[^;&]+)|)+)"; // delimited properties (optional)
+
+
+ // Indices for regular expression match capture blocks
+ private static final int DB_PREFIX = 0;
+ private static final int DB_ALT_DBNAME = 1;
+ private static final int DB_HOST = 2;
+ private static final int DB_INSTANCE_NAME = 3;
+ private static final int DB_PORT = 4;
+ private static final int DB_PRIMARY_DBNAME = 5;
+ private static final int DB_PROPERTIES = 6;
+ private static final int NUM_PARTS = 7;
+
+ private static Pattern urlPattern = Pattern.compile(DBURL_PATTERN);
+
+ private final String url;
+ private final String [] parts = new String[NUM_PARTS];
+ private final Map<String, String> props = new LinkedHashMap<String, String>();
+
+ public UrlData(String newUrl) {
+ url = newUrl;
+ parseUrl();
+ }
+
+ public UrlData(final String prefix, final String host, final String port,
+ final String dbname, String sid) {
+ this(prefix, host, port, dbname, null, null, parseProperties(sid));
+ }
+
+ public UrlData(final String prefix, final String host, final String port,
+ final String dbname, Map<String, String> properties) {
+ this(prefix, host, port, dbname, null, null, properties);
+ }
+
+ public UrlData(final String prefix, final String host, final String port,
+ final String dbname, final String altdbname, final String instancename,
+ Map<String, String> properties) {
+
+ parts[DB_PREFIX] = prefix;
+ parts[DB_ALT_DBNAME] = altdbname;
+ parts[DB_HOST] = host;
+ parts[DB_INSTANCE_NAME] = instancename;
+ parts[DB_PORT] = port;
+ parts[DB_PRIMARY_DBNAME] = dbname;
+ parts[DB_PROPERTIES] = null; // reconstruct?
+ props.putAll(properties);
+ url = constructUrl();
+ }
+
+ private void parseUrl() {
+ Logger.getLogger("glassfish.javaee").log(Level.FINEST, "Parsing DB Url: " + url);
+ Matcher matcher = urlPattern.matcher(url);
+ if(matcher.matches()) {
+ for(int i = 1; i <= matcher.groupCount(); i++) {
+ String part = matcher.group(i);
+ Logger.getLogger("glassfish.javaee").log(Level.FINEST, " Part " + i + " is " + part);
+ parts[i-1] = part;
+ }
+ props.putAll(parseProperties(parts[DB_PROPERTIES]));
+ } else {
+ Logger.getLogger("glassfish.javaee").log(Level.FINE, "Url parsing failed for " + url);
+ }
+ }
+
+ private static Map<String, String> parseProperties(final String data) {
+ Map<String, String> result = new LinkedHashMap<String, String>();
+ if(data != null && data.length() > 0) {
+ String [] properties = data.split("[;?&:]");
+ for(int i = 0; i < properties.length; i++) {
+ if(properties[i] != null && properties[i].length() > 0) {
+ int eqIndex = properties[i].indexOf("=");
+ if(eqIndex != -1) {
+ result.put(properties[i].substring(0, eqIndex), properties[i].substring(eqIndex+1));
+ } else {
+ // not sure if we should keep this. Possibly invalid property
+ result.put(properties[i], "");
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * package protected for testing purposes only.
+ */
+ String constructUrl() {
+ StringBuilder builder = new StringBuilder(256);
+ builder.append(parts[DB_PREFIX]);
+
+ if(notEmpty(parts[DB_ALT_DBNAME])) {
+ builder.append(parts[DB_ALT_DBNAME]);
+ builder.append('@');
+ } else if("jdbc:oracle:thin:".equals(parts[DB_PREFIX])) {
+ builder.append('@');
+ } else {
+ // most formats
+ builder.append("//"); // NOI18N
+ }
+
+ builder.append(parts[DB_HOST]);
+
+ if(notEmpty(parts[DB_INSTANCE_NAME])) {
+ builder.append('\\');
+ builder.append(parts[DB_INSTANCE_NAME]);
+ }
+
+ if(notEmpty(parts[DB_PORT])) {
+ builder.append(':'); // NOI18N
+ builder.append(parts[DB_PORT]);
+ }
+
+ if(notEmpty(parts[DB_PRIMARY_DBNAME])) {
+ if("jdbc:oracle:thin:".equals(parts[DB_PREFIX])) {
+ builder.append(':'); // NOI18N
+ } else {
+ builder.append('/'); // NOI18N
+ }
+ builder.append(parts[DB_PRIMARY_DBNAME]);
+ }
+
+ char propertyInitialSeparator = ';';
+ char propertySeparator = ';';
+ if("jdbc:mysql:".equals(parts[DB_PREFIX])) {
+ propertyInitialSeparator = '?';
+ propertySeparator = '&';
+ } else if("jdbc:informix-sqli:".equals(parts[DB_PREFIX])) {
+ propertyInitialSeparator = ':';
+ }
+
+ Set<Map.Entry<String, String>> entries = props.entrySet();
+ Iterator<Map.Entry<String, String>> entryIterator = entries.iterator();
+ if(entryIterator.hasNext()) {
+ builder.append(propertyInitialSeparator);
+ Map.Entry<String, String> entry = entryIterator.next();
+ builder.append(entry.getKey());
+ String value = entry.getValue();
+ if(notEmpty(value)) {
+ builder.append('=');
+ builder.append(value);
+ }
+ }
+
+ while(entryIterator.hasNext()) {
+ builder.append(propertySeparator);
+ Map.Entry<String, String> entry = entryIterator.next();
+ builder.append(entry.getKey());
+ String value = entry.getValue();
+ if(notEmpty(value)) {
+ builder.append('=');
+ builder.append(value);
+ }
+ }
+
+ return builder.toString();
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public String getPrefix() {
+ return parts[DB_PREFIX];
+ }
+
+ public String getHostName() {
+ return parts[DB_HOST];
+ }
+
+ public String getPort() {
+ return parts[DB_PORT];
+ }
+
+ public String getInstanceName() {
+ return parts[DB_INSTANCE_NAME];
+ }
+
+ public String getDatabaseName() {
+ String dbname = parts[DB_PRIMARY_DBNAME];
+ if(dbname == null) {
+ dbname = parts[DB_ALT_DBNAME];
+ if(dbname == null) {
+ dbname = props.get("databaseName");
+ if(dbname == null) {
+ dbname = props.get("databasename");
+ if(dbname == null) {
+ dbname = props.get("SID");
+ if(dbname == null) {
+ dbname = props.get("database name");
+ }
+ }
+ }
+ }
+ }
+ return dbname;
+ }
+
+ public String getAlternateDBName() {
+ return parts[DB_ALT_DBNAME];
+ }
+
+ public String getSid() {
+ return props.get("SID");
+ }
+
+ public Map<String, String> getProperties() {
+ return Collections.unmodifiableMap(props);
+ }
+
+ private static boolean notEmpty(String s) {
+ return s != null && s.length() > 0;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCResourceWizardPage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCResourceWizardPage.java
new file mode 100644
index 0000000..e06d7c7
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCResourceWizardPage.java
@@ -0,0 +1,316 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.datatools.connectivity.ICategory;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.IProfileListener;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.internal.ConnectionProfileManager;
+import org.eclipse.datatools.connectivity.internal.ui.wizards.CPWizardNode;
+import org.eclipse.datatools.connectivity.internal.ui.wizards.NewCPWizard;
+import org.eclipse.datatools.connectivity.internal.ui.wizards.ProfileWizardProvider;
+import org.eclipse.datatools.connectivity.ui.wizards.IWizardCategoryProvider;
+import org.eclipse.glassfish.tools.sdk.server.parser.ResourcesReader.ResourceType;
+import org.eclipse.glassfish.tools.ui.resources.JDBCInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ *
+ */
+
+public class JDBCResourceWizardPage extends WizardPage {
+ private static final String DATABASE_CATEGORY_ID = "org.eclipse.datatools.connectivity.db.category"; //$NON-NLS-1$
+
+ private Text jndiText;
+ private IConnectionProfile connectionProfile;
+ private IProject selectedProject;
+ private List<IProject> candidateProjects;
+
+ private Combo combo;
+ private Combo projectNameCombo;
+
+ private NewCPWizard wizard;
+
+ private WizardDialog wizardDialog;
+
+ private List<String> resources = new ArrayList<String>();
+ private String defaultJndiName = "jdbc/myDatasource"; //$NON-NLS-1$
+
+ /**
+ * Constructor for JDBCResourceWizardPage.
+ *
+ * @param selection
+ */
+ public JDBCResourceWizardPage(IProject project, List<IProject> projects) {
+ super("wizardPage"); //$NON-NLS-1$
+ setTitle(Messages.wizardTitle);
+ setDescription(Messages.wizardDescription);
+ selectedProject = project;
+ candidateProjects = projects;
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ container.setLayout(layout);
+ Label label = new Label(container, SWT.NULL);
+ label.setText(Messages.ProjectName);
+
+ projectNameCombo = new Combo(container, SWT.READ_ONLY | SWT.SINGLE);
+ GridDataFactory.defaultsFor(projectNameCombo).span(2, 1).applyTo(projectNameCombo);
+ projectNameCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected( SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ @Override
+ public void widgetSelected( SelectionEvent e) {
+ String newSelection = projectNameCombo.getText();
+ if (newSelection != null) {
+ selectedProject = ProjectUtilities.getProject(newSelection);
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.JDBC_RESOURCE);
+ dialogChanged();
+ }
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.JNDIName);
+
+ jndiText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(jndiText).span(2, 1).applyTo(jndiText);
+ jndiText.setText(defaultJndiName);
+ jndiText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.Connection);
+
+ combo = new Combo(container, SWT.READ_ONLY | SWT.SINGLE);
+ combo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected( SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ @Override
+ public void widgetSelected( SelectionEvent e) {
+ String newSelection = combo.getText();
+ if (newSelection != null) {
+ connectionProfile = ProfileManager.getInstance().
+ getProfileByName(newSelection);
+ }
+ }
+ });
+ GridDataFactory.defaultsFor(combo).align(SWT.FILL, SWT.CENTER).applyTo(combo);
+
+ Button button = new Button(container, SWT.PUSH);
+ button.setText(Messages.Create);
+ button.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ IConnectionProfile newProfile = showCPWizard();
+ if (newProfile != null) {
+ connectionProfile = newProfile;
+ String newName = connectionProfile.getName();
+
+ combo.add(newName);
+ combo.select(combo.indexOf(newName));
+ combo.pack();
+ }
+ dialogChanged();
+ }
+ });
+ GridDataFactory.defaultsFor(button).align(SWT.END, SWT.CENTER).applyTo(button);
+
+ initialize();
+ setControl(container);
+ }
+
+ private void initialize() {
+ populateCombos();
+ dialogChanged();
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.JDBC_RESOURCE);
+ if(resources.contains(defaultJndiName)){
+ String jndiName = ResourceUtils.getUniqueResourceName(defaultJndiName, resources);
+ jndiText.setText(jndiName);
+ }
+ }
+
+ private void dialogChanged() {
+ setPageComplete(false);
+ boolean hasProject = (projectNameCombo.getSelectionIndex() != -1);
+ boolean hasConnection = (combo.getSelectionIndex() != -1);
+
+ if (!hasProject) {
+ setErrorMessage(Messages.errorProjectMissing);
+ return;
+ }
+ String jndiName = getJNDIName();
+ if ((jndiName == null) || (jndiName.length() == 0 )) {
+ setErrorMessage(Messages.errorJndiNameMissing);
+ return;
+ }else {
+ if(ResourceUtils.isDuplicate(jndiName, resources)) {
+ setErrorMessage(NLS.bind(Messages.errorDuplicateName, jndiName));
+ return;
+ }
+ }
+ if (!hasConnection) {
+ setErrorMessage(Messages.errorConnectionMissing);
+ return;
+ }
+ if(connectionProfile == null){
+ setErrorMessage(Messages.errorConnectionInvalid);
+ return;
+ }
+
+ setErrorMessage(null);
+ setPageComplete(true);
+ }
+
+ public String getJNDIName() {
+ return jndiText.getText();
+ }
+
+ public IProject getSelectedProject() {
+ return selectedProject;
+ }
+
+ private IConnectionProfile showCPWizard () {
+ // Filter datasource category
+ ViewerFilter viewerFilter = new ViewerFilter() {
+
+ @Override
+ public boolean select( Viewer viewer, Object parentElement, Object element) {
+
+ CPWizardNode wizardNode = ( CPWizardNode) element;
+ if( !( wizardNode.getProvider() instanceof IWizardCategoryProvider)) {
+ ICategory cat = ConnectionProfileManager.getInstance().getProvider(
+ (( ProfileWizardProvider) wizardNode.getProvider()).getProfile()).getCategory();
+
+ // Only display wizards belong to database category
+ while( cat != null) {
+ if( cat.getId().equals(DATABASE_CATEGORY_ID))
+ return true;
+ cat = cat.getParent();
+ }
+ }
+ return false;
+ }
+ };
+ wizard = new NewCPWizard( viewerFilter, null);
+ Shell currentShell = Display.getCurrent().getActiveShell();
+ wizardDialog = new WizardDialog( currentShell, wizard);
+ wizardDialog.setBlockOnOpen( true);
+
+ ProfileManager profileManager = ProfileManager.getInstance();
+ ProfileListener listener = new ProfileListener();
+ profileManager.addProfileListener(listener);
+ int result = wizardDialog.open();
+ profileManager.removeProfileListener(listener);
+
+ return ((result != Window.CANCEL) ? listener.newProfile : null);
+ }
+
+ private IConnectionProfile[] getConnectionProfiles () {
+ return ProfileManager.getInstance().getProfilesByCategory(DATABASE_CATEGORY_ID);
+ }
+
+ private void populateCombos() {
+ combo.removeAll();
+ for (IConnectionProfile profile : getConnectionProfiles()) {
+ if (connectionProfile == null) {
+ connectionProfile = profile;
+ }
+ combo.add(profile.getName());
+ }
+
+ if (combo.getItemCount() > 0) {
+ combo.select(0);
+ }
+
+ projectNameCombo.removeAll();
+ String selectProjectName = ((selectedProject != null) ? selectedProject.getName() : null);
+ int selectionIndex = -1;
+ for (int i = 0; i < candidateProjects.size(); i++) {
+ IProject nextProject = candidateProjects.get(i);
+ String projectName = nextProject.getName();
+ projectNameCombo.add(projectName);
+ if (projectName.equals(selectProjectName)) {
+ selectionIndex = i;
+ }
+ }
+ if ((selectionIndex != -1) && (projectNameCombo.getItemCount() > 0)) {
+ projectNameCombo.select(selectionIndex);
+ } else { // selectedProject is not a valid candidate project
+ selectedProject = null;
+ }
+ }
+
+ JDBCInfo getJDBCInfo() {
+ return new JDBCInfo(connectionProfile);
+ }
+
+ static class ProfileListener implements IProfileListener {
+ IConnectionProfile newProfile;
+
+ public void profileAdded( IConnectionProfile profile) {
+ newProfile = profile;
+ }
+
+ public void profileChanged( IConnectionProfile profile) {
+ // do nothing
+ }
+
+ public void profileDeleted( IConnectionProfile profile) {
+ // do nothing
+ }
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCWizard.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCWizard.java
new file mode 100644
index 0000000..e0d30f5
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JDBCWizard.java
@@ -0,0 +1,249 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.glassfish.tools.sdk.server.parser.ResourcesReader.ResourceType;
+
+import org.eclipse.glassfish.tools.ui.resources.JDBCInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ * This is a wizard that creates a new JDBC resource.
+ */
+
+public class JDBCWizard extends ResourceWizard {
+ private JDBCResourceWizardPage page;
+
+ /**
+ * Constructor for JDBC Wizard.
+ */
+ public JDBCWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ @Override
+ public void addPages() {
+ IContainer containerResource = getContainerResource();
+ IProject selectedProject = ((containerResource != null) ? containerResource.getProject() : null);
+ page = new JDBCResourceWizardPage(selectedProject, getGlassFishAndSailfinProjects());
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in
+ * the wizard. We will create an operation and run it
+ * using wizard as execution context.
+ */
+ @Override
+ public boolean performFinish() {
+ final String jndiName = page.getJNDIName();
+ final JDBCInfo jdbcInfo = page.getJDBCInfo();
+ final IProject selectedProject = page.getSelectedProject();
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ doFinish(jndiName, jdbcInfo, selectedProject, monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ Throwable realException = e.getTargetException();
+ String message = realException.getMessage();
+ if (message == null) {
+ message = Messages.errorUnknown;
+ }
+ MessageDialog.openError(getShell(), Messages.ErrorTitle, message);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The worker method. It will find the container, create the
+ * file and open the editor on the newly created file. If the
+ * file already exists, show an error
+ */
+
+ private void doFinish(String jndiName, JDBCInfo jdbcInfo, IProject selectedProject,
+ IProgressMonitor monitor) throws CoreException {
+ checkDir(selectedProject);
+
+ monitor.beginTask("Creating " + ResourceUtils.RESOURCE_FILE_NAME, 2);
+
+ final IFile file = folder.getFile(new Path(ResourceUtils.RESOURCE_FILE_NAME));
+
+ try {
+ String fragment = createFragment(jndiName, jdbcInfo, selectedProject);
+ InputStream stream = ResourceUtils.appendResource(file, fragment);
+ if (!folder.exists()) {
+ folder.create(true, true, monitor);
+ }
+ if (file.exists()) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName("Opening file for editing...");
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ IWorkbenchPage page =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditor(page, file, true);
+ } catch (PartInitException e) {
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ /**
+ * Initialize the file contents to contents of the given resource.
+ */
+ public static String createFragment(String jndiName, JDBCInfo jdbcInfo, IProject selectedProject)
+ throws CoreException {
+
+ /* We want to be truly OS-agnostic */
+ final String newline = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ String line;
+ StringBuilder sb = new StringBuilder();
+ final String serverName = jdbcInfo.getServerName();
+ final String portNumber = jdbcInfo.getPort();
+ final String databaseName = getDatabaseName(jdbcInfo);
+ final String vendorName = jdbcInfo.getDatabaseVendor();
+ final String user = jdbcInfo.getUserName();
+ final String poolName = constructPoolName(vendorName, databaseName, user);
+ final String driverClass = jdbcInfo.getDriverClass();
+ final String datasourceClass = jdbcInfo.getDatasourceClass();
+ final String password = jdbcInfo.getUserPassword();
+ final String url = jdbcInfo.getURL();
+ boolean matchStart = false;
+ boolean matchEnd = false;
+ boolean createConnPool = true;
+
+ //Check if pool already exists for this vendor, database and user
+ //If present, don't add another connection pool
+ //TODO
+ //Extend this to do a complete check of the pool attributes like url, driverClass, datasourceClass etc
+ if(ResourceUtils.isDuplicate(poolName, ResourceType.JDBC_CONNECTION_POOL, selectedProject)) {
+ createConnPool = false;
+ }
+
+ try {
+ InputStream input = JDBCInfo.class.getResourceAsStream(ResourceUtils.RESOURCE_FILE_TEMPLATE);
+ BufferedReader reader = new BufferedReader( new InputStreamReader( input, StandardCharsets.UTF_8 ) );
+ try {
+ while ((line = reader.readLine()) != null) {
+ if( line.indexOf("<jdbc-resource") != -1) { //$NON-NLS-1$
+ matchStart = true;
+ }
+ if ( (matchStart) && (! matchEnd) ) {
+ if(createConnPool) {
+ if(line.indexOf("</jdbc-connection-pool>") != -1) { //$NON-NLS-1$
+ matchEnd = true;
+ }
+ } else {
+ if(line.indexOf("/>") != -1) { //$NON-NLS-1$
+ matchEnd = true;
+ }
+ }
+ line = line.replaceAll("\\$\\{jndiName\\}", jndiName); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{poolName\\}", poolName); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{serverName\\}", serverName); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{port\\}", portNumber); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{databaseName\\}", databaseName); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{driverClass\\}", driverClass); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{datasourceClass\\}", datasourceClass); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{user\\}", user); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{password\\}", password); //$NON-NLS-1$
+ line = replaceOrRemove(line, "\\$\\{url\\}", url); //$NON-NLS-1$
+ if (line != null) {
+ sb.append(line);
+ sb.append(newline);
+ }
+ }
+ }
+
+ } finally {
+ reader.close();
+ }
+
+ } catch (IOException ioe) {
+ IStatus status = new Status(IStatus.ERROR, "JDBCWizard", IStatus.OK, //$NON-NLS-1$
+ ioe.getLocalizedMessage(), null);
+ throw new CoreException(status);
+ }
+ return sb.toString();
+
+ }
+
+ private static String getDatabaseName(JDBCInfo jdbcInfo) {
+ String databaseName = jdbcInfo.getDatabaseName();
+
+ if (databaseName == null) {
+ databaseName = jdbcInfo.getAlternateDatabaseName();
+ }
+
+ return databaseName;
+ }
+
+ private static String constructPoolName(String vendorName, String dbName, String userName) {
+ StringBuilder poolName = new StringBuilder(vendorName);
+
+ if (dbName != null) {
+ poolName.append("_" + dbName); //$NON-NLS-1$
+ }
+ if (userName != null) {
+ poolName.append("_" + userName); //$NON-NLS-1$
+ }
+ poolName.append("Pool"); //$NON-NLS-1$
+
+ return poolName.toString();
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSResourceWizardPage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSResourceWizardPage.java
new file mode 100644
index 0000000..db51ac7
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSResourceWizardPage.java
@@ -0,0 +1,256 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.glassfish.tools.sdk.server.parser.ResourcesReader.ResourceType;
+
+import org.eclipse.glassfish.tools.ui.resources.JMSInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ * @author Nitya Doraisamy
+ */
+
+public class JMSResourceWizardPage extends WizardPage {
+
+ private Text jndiText;
+ private Button queueRButton;
+ private Button topicRButton;
+ private Button queueConnectionRButton;
+ private Button topicConnectionRButton;
+ private Button connectionRButton;
+
+ private IProject selectedProject;
+ private List<IProject> candidateProjects;
+ private JMSInfo jmsInfo;
+
+ private Combo projectNameCombo;
+
+ private List<String> resources = new ArrayList<String>();
+ private String defaultJndiName = "jms/myQueue"; //$NON-NLS-1$
+
+ /**
+ * Constructor for JMSResourceWizardPage.
+ *
+ * @param selection
+ */
+ public JMSResourceWizardPage(IProject project, List<IProject> projects) {
+ super("wizardPage"); //$NON-NLS-1$
+ setTitle(Messages.jmsWizardTitle);
+ setDescription(Messages.jmsWizardDescription);
+ selectedProject = project;
+ candidateProjects = projects;
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ container.setLayout(layout);
+ Label label = new Label(container, SWT.NULL);
+ label.setText(Messages.ProjectName);
+
+ projectNameCombo = new Combo(container, SWT.READ_ONLY | SWT.SINGLE);
+ GridDataFactory.defaultsFor(projectNameCombo).span(2, 1).applyTo(projectNameCombo);
+ projectNameCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected( SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ @Override
+ public void widgetSelected( SelectionEvent e) {
+ String newSelection = projectNameCombo.getText();
+ if (newSelection != null) {
+ selectedProject = ProjectUtilities.getProject(newSelection);
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.JDBC_RESOURCE);
+ dialogChanged();
+ }
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.JNDIName);
+
+ jndiText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(jndiText).span(2, 1).applyTo(jndiText);
+ jndiText.setText(defaultJndiName);
+ jndiText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ //Dummy Label for spacing
+ label = new Label(container, SWT.NULL);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.lblChooseType);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ //Dummy Label for spacing
+ label = new Label(container, SWT.NULL);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.lblAdminObject);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ GridData gridData = new GridData();
+ gridData.horizontalIndent = 40;
+ gridData.horizontalSpan = 3;
+ gridData.horizontalAlignment = GridData.FILL;
+
+ queueRButton = new Button(container, SWT.RADIO);
+ queueRButton.setText(Messages.lblQueue);
+ queueRButton.setLayoutData(gridData);
+ queueRButton.setSelection(true);
+
+ topicRButton = new Button(container, SWT.RADIO);
+ topicRButton.setText(Messages.lblTopic);
+ topicRButton.setLayoutData(gridData);
+
+ //Dummy Label for spacing
+ label = new Label(container, SWT.NULL);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.lblConnector);
+ GridDataFactory.defaultsFor(label).span(3, 1).applyTo(label);
+
+ queueConnectionRButton = new Button(container, SWT.RADIO);
+ queueConnectionRButton.setText(Messages.lblQueueConnectionFactory);
+ queueConnectionRButton.setLayoutData(gridData);
+
+ topicConnectionRButton = new Button(container, SWT.RADIO);
+ topicConnectionRButton.setText(Messages.lblTopicConnectionFactory);
+ topicConnectionRButton.setLayoutData(gridData);
+
+ connectionRButton = new Button(container, SWT.RADIO);
+ connectionRButton.setText(Messages.lblConnectionFactory);
+ connectionRButton.setLayoutData(gridData);
+
+ initialize();
+ dialogChanged();
+ setControl(container);
+ }
+
+ private void initialize() {
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.CONNECTOR_RESOURCE, ResourceType.ADMIN_OBJECT_RESOURCE);
+ if(resources.contains(defaultJndiName)){
+ String jndiName = ResourceUtils.getUniqueResourceName(defaultJndiName, resources);
+ jndiText.setText(jndiName);
+ }
+ populateCombos();
+ dialogChanged();
+ }
+
+ public String getJNDIName() {
+ return jndiText.getText();
+ }
+
+ public String getResourceType(){
+ String resourceType = null;
+ if(queueRButton.getSelection()){
+ resourceType = JMSInfo.QUEUE;
+ }else if(topicRButton.getSelection()){
+ resourceType = JMSInfo.TOPIC;
+ }else if(queueConnectionRButton.getSelection()){
+ resourceType = JMSInfo.QUEUE_CONNECTION;
+ }else if(topicConnectionRButton.getSelection()){
+ resourceType = JMSInfo.TOPIC_CONNECTION;
+ }else if(connectionRButton.getSelection()){
+ resourceType = JMSInfo.CONNECTION_FACTORY;
+ }
+ return resourceType;
+ }
+
+ public IProject getSelectedProject() {
+ return selectedProject;
+ }
+
+ private void dialogChanged() {
+ setPageComplete(false);
+ boolean hasProject = (projectNameCombo.getSelectionIndex() != -1);
+ if (!hasProject) {
+ setErrorMessage(Messages.errorProjectMissing);
+ return;
+ }
+ String jndiName = getJNDIName();
+ if (jndiName.length() == 0 ) {
+ setErrorMessage(Messages.errorJndiNameMissing);
+ return;
+ } else {
+ if(ResourceUtils.isDuplicate(jndiName, resources)) {
+ setErrorMessage(NLS.bind(Messages.errorDuplicateName, jndiName));
+ return;
+ }
+ }
+
+ if ((getResourceType() == null) || (getResourceType().length() == 0 )) {
+ setErrorMessage(Messages.errorResourceTypeMissing);
+ return;
+ }
+ setPageComplete(true);
+ setErrorMessage(null);
+ }
+
+ private void populateCombos() {
+ projectNameCombo.removeAll();
+ String selectProjectName = ((selectedProject != null) ? selectedProject.getName() : null);
+ int selectionIndex = -1;
+ for (int i = 0; i < candidateProjects.size(); i++) {
+ IProject nextProject = candidateProjects.get(i);
+ String projectName = nextProject.getName();
+ projectNameCombo.add(projectName);
+ if (projectName.equals(selectProjectName)) {
+ selectionIndex = i;
+ }
+ }
+ if ((selectionIndex != -1) && (projectNameCombo.getItemCount() > 0)) {
+ projectNameCombo.select(selectionIndex);
+ } else { // selectedProject is not a valid candidate project
+ selectedProject = null;
+ }
+ }
+
+ public JMSInfo getJMSInfo() {
+ jmsInfo = new JMSInfo();
+ jmsInfo.setJndiName(getJNDIName());
+ jmsInfo.setResourceType(getResourceType());
+ return jmsInfo;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSWizard.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSWizard.java
new file mode 100644
index 0000000..bfce573
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/JMSWizard.java
@@ -0,0 +1,216 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.glassfish.tools.ui.resources.JMSInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ * @author Nitya Doraisamy
+ *
+ * This is a wizard that creates a new JMS resource.
+ */
+
+public class JMSWizard extends ResourceWizard {
+ private JMSResourceWizardPage page;
+
+ /**
+ * Constructor for JMSWizard.
+ */
+ public JMSWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ @Override
+ public void addPages() {
+ IContainer containerResource = getContainerResource();
+ IProject selectedProject = ((containerResource != null) ? containerResource.getProject() : null);
+ page = new JMSResourceWizardPage(selectedProject, getGlassFishAndSailfinProjects());
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in
+ * the wizard. We will create an operation and run it
+ * using wizard as execution context.
+ */
+ @Override
+ public boolean performFinish() {
+ final String jndiName = page.getJNDIName();
+ final JMSInfo jmsInfo = page.getJMSInfo();
+ final IProject selectedProject = page.getSelectedProject();
+
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ doFinish(jndiName, jmsInfo, selectedProject, monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ Throwable realException = e.getTargetException();
+ String message = realException.getMessage();
+ if (message == null) {
+ message = Messages.errorUnknown;
+ }
+ MessageDialog.openError(getShell(), Messages.ErrorTitle, message);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The worker method. It will find the container, create the
+ * file and open the editor on the newly created file. If the
+ * file already exists, show an error
+ */
+
+ private void doFinish(String jndiName, JMSInfo jmsInfo, IProject selectedProject, IProgressMonitor monitor) throws CoreException {
+ checkDir(selectedProject);
+
+ monitor.beginTask("Creating " + ResourceUtils.RESOURCE_FILE_NAME, 2);
+
+ final IFile file = folder.getFile(new Path(ResourceUtils.RESOURCE_FILE_NAME));
+
+ try {
+ String fragment = createFragment(jndiName, jmsInfo);
+ InputStream stream = ResourceUtils.appendResource(file, fragment);
+ if (!folder.exists()) {
+ folder.create(true, true, monitor);
+ }
+ if (file.exists()) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName("Opening file for editing...");
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ IWorkbenchPage page =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditor(page, file, true);
+ } catch (PartInitException e) {
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ /**
+ * Initialize the file contents to contents of the given resource.
+ */
+ public static String createFragment(String jndiName, JMSInfo jmsInfo)
+ throws CoreException {
+
+ /* We want to be truly OS-agnostic */
+ final String newline = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ String line;
+ StringBuilder sb = new StringBuilder();
+ final boolean isConnector = jmsInfo.isConnector();
+ final String resourceType = jmsInfo.getResourceType();
+ boolean matchStart = false;
+ boolean matchEnd = false;
+
+ try {
+ InputStream input = JMSInfo.class.getResourceAsStream(ResourceUtils.RESOURCE_FILE_TEMPLATE);
+ BufferedReader reader = new BufferedReader( new InputStreamReader( input, StandardCharsets.UTF_8 ) );
+ try {
+ while ((line = reader.readLine()) != null) {
+ if (isConnector) {
+ if( line.indexOf("<connector-resource") != -1) { //$NON-NLS-1$
+ matchStart = true;
+ }
+ if ( (matchStart) && (! matchEnd) ) {
+ line = line.replaceAll("\\$\\{jndiName\\}", jndiName); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{connectorPoolName\\}", jndiName); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{resourceType\\}", resourceType); //$NON-NLS-1$
+
+ if (line != null) {
+ sb.append(line);
+ sb.append(newline);
+ }
+ if(line.indexOf("<connector-connection-pool") != -1) { //$NON-NLS-1$
+ matchEnd = true;
+ }
+ }
+ } else {
+ if( line.indexOf("<admin-object-resource") != -1) { //$NON-NLS-1$
+ matchStart = true;
+ }
+ if ( (matchStart) && (! matchEnd) ) {
+ line = line.replaceAll("\\$\\{jndiName\\}", jndiName); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{resourceType\\}", resourceType); //$NON-NLS-1$
+
+ if (line != null) {
+ sb.append(line);
+ sb.append(newline);
+ }
+ if(line.indexOf("</admin-object-resource>") != -1) { //$NON-NLS-1$
+ matchEnd = true;
+ }
+ }
+ }
+ }
+
+ } finally {
+ reader.close();
+ }
+ } catch (IOException ioe) {
+ IStatus status = new Status(IStatus.ERROR, "JMSWizard", IStatus.OK, //$NON-NLS-1$
+ ioe.getLocalizedMessage(), null);
+ throw new CoreException(status);
+ }
+
+ return sb.toString();
+
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailResourceWizardPage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailResourceWizardPage.java
new file mode 100644
index 0000000..2f51442
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailResourceWizardPage.java
@@ -0,0 +1,242 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.glassfish.tools.sdk.server.parser.ResourcesReader.ResourceType;
+
+import org.eclipse.glassfish.tools.ui.resources.MailInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ *
+ */
+
+public class MailResourceWizardPage extends WizardPage {
+ private Text jndiText;
+ private Text hostText;
+ private Text userText;
+ private Text fromText;
+
+ private IProject selectedProject;
+ private List<IProject> candidateProjects;
+ private MailInfo mailInfo;
+
+ private Combo projectNameCombo;
+
+ private List<String> resources = new ArrayList<String>();
+ private String defaultJndiName = "mail/mymailSession"; //$NON-NLS-1$
+
+ /**
+ * Constructor for MailResourceWizardPage.
+ *
+ * @param selection
+ */
+ public MailResourceWizardPage(IProject project, List<IProject> projects) {
+ super("wizardPage"); //$NON-NLS-1$
+ setTitle(Messages.mailWizardTitle);
+ setDescription(Messages.mailWizardDescription);
+ selectedProject = project;
+ candidateProjects = projects;
+ }
+
+ /**
+ * @see IDialogPage#createControl(Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 3;
+ container.setLayout(layout);
+ Label label = new Label(container, SWT.NULL);
+ label.setText(Messages.ProjectName);
+
+ projectNameCombo = new Combo(container, SWT.READ_ONLY | SWT.SINGLE);
+ GridDataFactory.defaultsFor(projectNameCombo).span(2, 1).applyTo(projectNameCombo);
+ projectNameCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetDefaultSelected( SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ @Override
+ public void widgetSelected( SelectionEvent e) {
+ String newSelection = projectNameCombo.getText();
+ if (newSelection != null) {
+ selectedProject = ProjectUtilities.getProject(newSelection);
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.JDBC_RESOURCE);
+ dialogChanged();
+ }
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.JNDIName);
+
+ jndiText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(jndiText).span(2, 1).applyTo(jndiText);
+ jndiText.setText(defaultJndiName);
+ jndiText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.MailHost);
+
+ hostText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(hostText).span(2, 1).applyTo(hostText);
+ hostText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.MailUser);
+
+ userText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(userText).span(2, 1).applyTo(userText);
+ userText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ label = new Label(container, SWT.NULL);
+ label.setText(Messages.MailFrom);
+
+ fromText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ GridDataFactory.defaultsFor(fromText).span(2, 1).applyTo(fromText);
+ fromText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ dialogChanged();
+ }
+ });
+
+ initialize();
+ dialogChanged();
+ setControl(container);
+ }
+
+ private void initialize() {
+ resources = ResourceUtils.getResources(selectedProject, ResourceType.JAVA_MAIL);
+ if(resources.contains(defaultJndiName)){
+ String jndiName = ResourceUtils.getUniqueResourceName(defaultJndiName, resources);
+ jndiText.setText(jndiName);
+ }
+ populateCombos();
+ dialogChanged();
+ }
+
+ public String getJNDIName() {
+ return jndiText.getText();
+ }
+
+ public String getMailHost(){
+ return hostText.getText();
+ }
+
+ public String getMailUser(){
+ return userText.getText();
+ }
+
+ public String getMailFrom(){
+ return fromText.getText();
+ }
+
+ public IProject getSelectedProject() {
+ return selectedProject;
+ }
+
+ private void dialogChanged() {
+ setPageComplete(false);
+ boolean hasProject = (projectNameCombo.getSelectionIndex() != -1);
+ if (!hasProject) {
+ setErrorMessage(Messages.errorProjectMissing);
+ return;
+ }
+ String jndiName = getJNDIName();
+ if ((jndiName == null) || (jndiName.length() == 0 )) {
+ setErrorMessage(Messages.errorJndiNameMissing);
+ return;
+ }else {
+ if(ResourceUtils.isDuplicate(jndiName, resources)) {
+ setErrorMessage(NLS.bind(Messages.errorDuplicateName, jndiName));
+ return;
+ }
+ }
+ String mailHost = getMailHost();
+ if ((mailHost == null) || (mailHost.length() == 0 )) {
+ setErrorMessage(Messages.errorMailHostNameMissing);
+ return;
+ }
+ String mailUser = getMailUser();
+ if ((mailUser == null) || (mailUser.length() == 0 )) {
+ setErrorMessage(Messages.errorMailUserNameMissing);
+ return;
+ }
+ String mailFrom = getMailFrom();
+ if ((mailFrom == null) || (mailFrom.length() == 0 )) {
+ setErrorMessage(Messages.errorMailReturnAddrMissing);
+ return;
+ }
+ setPageComplete(true);
+ setErrorMessage(null);
+ }
+
+ private void populateCombos() {
+ projectNameCombo.removeAll();
+ String selectProjectName = ((selectedProject != null) ? selectedProject.getName() : null);
+ int selectionIndex = -1;
+ for (int i = 0; i < candidateProjects.size(); i++) {
+ IProject nextProject = candidateProjects.get(i);
+ String projectName = nextProject.getName();
+ projectNameCombo.add(projectName);
+ if (projectName.equals(selectProjectName)) {
+ selectionIndex = i;
+ }
+ }
+ if ((selectionIndex != -1) && (projectNameCombo.getItemCount() > 0)) {
+ projectNameCombo.select(selectionIndex);
+ } else { // selectedProject is not a valid candidate project
+ selectedProject = null;
+ }
+ }
+
+ public MailInfo getMailInfo() {
+ mailInfo = new MailInfo();
+ mailInfo.setJndiName(getJNDIName());
+ mailInfo.setMailFrom(getMailFrom());
+ mailInfo.setMailHost(getMailHost());
+ mailInfo.setMailUser(getMailUser());
+ return mailInfo;
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailWizard.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailWizard.java
new file mode 100644
index 0000000..e74f8de
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/MailWizard.java
@@ -0,0 +1,199 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+
+import org.eclipse.glassfish.tools.ui.resources.MailInfo;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ * This is a wizard that creates a new JavaMail Session resource.
+ */
+
+public class MailWizard extends ResourceWizard {
+ private MailResourceWizardPage page;
+
+ /**
+ * Constructor for MailWizard.
+ */
+ public MailWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ }
+
+ /**
+ * Adding the page to the wizard.
+ */
+
+ @Override
+ public void addPages() {
+ IContainer containerResource = getContainerResource();
+ IProject selectedProject = ((containerResource != null) ? containerResource.getProject() : null);
+ page = new MailResourceWizardPage(selectedProject, getGlassFishAndSailfinProjects());
+ addPage(page);
+ }
+
+ /**
+ * This method is called when 'Finish' button is pressed in
+ * the wizard. We will create an operation and run it
+ * using wizard as execution context.
+ */
+ @Override
+ public boolean performFinish() {
+ final String jndiName = page.getJNDIName();
+ final MailInfo mailInfo = page.getMailInfo();
+ final IProject selectedProject = page.getSelectedProject();
+
+ IRunnableWithProgress op = new IRunnableWithProgress() {
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ doFinish(jndiName, mailInfo, selectedProject, monitor);
+ } catch (CoreException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+ };
+ try {
+ getContainer().run(true, false, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ Throwable realException = e.getTargetException();
+ String message = realException.getMessage();
+ if (message == null) {
+ message = Messages.errorUnknown;
+ }
+ MessageDialog.openError(getShell(), Messages.ErrorTitle, message);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The worker method. It will find the container, create the
+ * file and open the editor on the newly created file. If the
+ * file already exists, show an error
+ */
+
+ private void doFinish(String jndiName, MailInfo mailInfo, IProject selectedProject, IProgressMonitor monitor) throws CoreException {
+ checkDir(selectedProject);
+
+ monitor.beginTask("Creating " + ResourceUtils.RESOURCE_FILE_NAME, 2);
+
+ final IFile file = folder.getFile(new Path(ResourceUtils.RESOURCE_FILE_NAME));
+
+ try {
+ String fragment = createFragment(jndiName, mailInfo);
+ InputStream stream = ResourceUtils.appendResource(file, fragment);
+ if (!folder.exists()) {
+ folder.create(true, true, monitor);
+ }
+ if (file.exists()) {
+ file.setContents(stream, true, true, monitor);
+ } else {
+ file.create(stream, true, monitor);
+ }
+ stream.close();
+ } catch (IOException e) {
+ }
+ monitor.worked(1);
+ monitor.setTaskName("Opening file for editing...");
+ getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ IWorkbenchPage page =
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ try {
+ IDE.openEditor(page, file, true);
+ } catch (PartInitException e) {
+ }
+ }
+ });
+ monitor.worked(1);
+ }
+
+ /**
+ * Initialize the file contents to contents of the given resource.
+ */
+ public static String createFragment(String jndiName, MailInfo mailInfo)
+ throws CoreException {
+
+ /* We want to be truly OS-agnostic */
+ final String newline = System.getProperty("line.separator"); //$NON-NLS-1$
+
+ String line;
+ StringBuilder sb = new StringBuilder();
+ final String mailHost = mailInfo.getMailHost();
+ final String mailUser = mailInfo.getMailUser();
+ final String mailFrom = mailInfo.getMailFrom();
+
+ boolean matchStart = false;
+ boolean matchEnd = false;
+
+ try {
+ InputStream input = MailInfo.class.getResourceAsStream(ResourceUtils.RESOURCE_FILE_TEMPLATE);
+ BufferedReader reader = new BufferedReader( new InputStreamReader( input, StandardCharsets.UTF_8 ) );
+ try {
+ while ((line = reader.readLine()) != null) {
+ if( line.indexOf("<mail-resource") != -1) { //$NON-NLS-1$
+ matchStart = true;
+ }
+ if ( (matchStart) && (! matchEnd) ) {
+ line = line.replaceAll("\\$\\{jndiName\\}", jndiName); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{mailHost\\}", mailHost); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{mailUser\\}", mailUser); //$NON-NLS-1$
+ line = line.replaceAll("\\$\\{mailFrom\\}", mailFrom); //$NON-NLS-1$
+
+ if (line != null) {
+ sb.append(line);
+ sb.append(newline);
+ }
+ if(line.indexOf("</mail-resource>") != -1) { //$NON-NLS-1$
+ matchEnd = true;
+ }
+ }
+ }
+
+ } finally {
+ reader.close();
+ }
+ } catch (IOException ioe) {
+ IStatus status = new Status(IStatus.ERROR, "MailWizard", IStatus.OK, //$NON-NLS-1$
+ ioe.getLocalizedMessage(), null);
+ throw new CoreException(status);
+ }
+
+ return sb.toString();
+
+ }
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.java
new file mode 100644
index 0000000..30febfc
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.java
@@ -0,0 +1,61 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+
+
+public class Messages extends org.eclipse.osgi.util.NLS {
+ static {
+ org.eclipse.osgi.util.NLS.initializeMessages(
+ "org.eclipse.glassfish.tools.ui.resources.wizards.Messages", Messages.class);
+ }
+
+ public static String Connection;
+ public static String Create;
+ public static String JNDIName;
+ public static String ProjectName;
+ public static String wizardTitle;
+ public static String wizardDescription;
+ public static String ErrorTitle;
+ public static String errorUnknown;
+ public static String errorFileExists;
+ public static String errorFolderMissing;
+ public static String errorProjectMissing;
+ public static String errorConnectionMissing;
+ public static String errorConnectionInvalid;
+
+ //JavaMail Wizard
+ public static String mailWizardTitle;
+ public static String mailWizardDescription;
+ public static String MailHost;
+ public static String MailUser;
+ public static String MailFrom;
+ public static String errorMailHostNameMissing;
+ public static String errorMailUserNameMissing;
+ public static String errorMailReturnAddrMissing;
+
+ //JMS Wizard
+ public static String jmsWizardTitle;
+ public static String jmsWizardDescription;
+ public static String lblChooseType;
+ public static String lblAdminObject;
+ public static String lblConnector;
+ public static String lblQueue;
+ public static String lblTopic;
+ public static String lblQueueConnectionFactory;
+ public static String lblTopicConnectionFactory;
+ public static String lblConnectionFactory;
+
+ //Common
+ public static String errorJndiNameMissing;
+ public static String errorResourceTypeMissing;
+ public static String errorFolderNull;
+ public static String errorDuplicateName;
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.properties b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.properties
new file mode 100644
index 0000000..81b58c7
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/Messages.properties
@@ -0,0 +1,40 @@
+JNDIName=&JNDI Name:
+ProjectName=Project:
+wizardTitle=Sun Resources File
+wizardDescription=Create a sun-resources.xml file from an existing JDBC connection. Note that target project must contain the Sun Deployment Descriptors Files Facet.
+Connection=&Connection:
+Create=Create...
+
+mailWizardTitle=JavaMail Session Sun Resource
+mailWizardDescription=Create/Update a sun-resources.xml file with a JavaMail Session resource. Note that target project must contain the Sun Deployment Descriptors Files Facet.
+MailHost=&Mail Host:
+MailUser=Default &User:
+MailFrom=Default Return &Address:
+
+errorMailHostNameMissing=Mail Host must be specified
+errorMailUserNameMissing=Default User must be specified
+errorMailReturnAddrMissing=Default Return Address must be specified
+
+jmsWizardTitle=JMS Sun Resource
+jmsWizardDescription=Create/Update a sun-resources.xml file with a JMS resource. Note that target project must contain the Sun Deployment Descriptors Files Facet.
+
+lblChooseType=Choose Resource Type:
+lblAdminObject=Admin Object Resource
+lblConnector=Connector Resource
+lblQueue=javax.jms.&Queue
+lblTopic=javax.jms.&Topic
+lblQueueConnectionFactory=javax.jms.Queue&ConnectionFactory
+lblTopicConnectionFactory=javax.jms.T&opicConnectionFactory
+lblConnectionFactory=javax.jms.Co&nnectionFactory
+errorResourceTypeMissing=Resource Type must be specified
+
+ErrorTitle=Error
+errorUnknown=Unknown error creating file
+errorFileExists=File already exists
+errorFolderNull=Cannot create sun-resources.xml file in project of this type.
+errorFolderMissing=Cannot create this type of resource in a project which does not contain a {0} folder
+errorProjectMissing=Project must be specified. Note that target project must contain the Sun Deployment Descriptors Files Facet.
+errorConnectionMissing=Connection must be specified
+errorConnectionInvalid=Invalid Database Connection. Please specify a valid connection.
+errorJndiNameMissing=JNDI Name must be specified
+errorDuplicateName=A resource with name {0} already exists. Please provide a unique value.
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/ResourceWizard.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/ResourceWizard.java
new file mode 100644
index 0000000..37ba7b5
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/resources/wizards/ResourceWizard.java
@@ -0,0 +1,137 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.resources.wizards;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+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.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jem.util.emf.workbench.ProjectUtilities;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
+import org.eclipse.wst.server.core.IRuntime;
+
+import org.eclipse.glassfish.tools.GlassFishRuntime;
+import org.eclipse.glassfish.tools.utils.ResourceUtils;
+
+/**
+ * This is a superclass for wizards to create resources
+ */
+
+@SuppressWarnings("restriction")
+public abstract class ResourceWizard extends Wizard implements INewWizard {
+
+ protected IStructuredSelection selection;
+ protected String dirName;
+ protected IFolder folder;
+
+ /**
+ * Constructor
+ */
+ public ResourceWizard() {
+ super();
+ setNeedsProgressMonitor(true);
+ }
+
+ protected void checkDir(IProject selectedProject) throws CoreException {
+ dirName = ResourceUtils.getResourceLocation(selectedProject);
+ if(dirName == null) {
+ IStatus status = new Status(IStatus.ERROR, getClass().getName(), IStatus.OK,
+ NLS.bind(Messages.errorFolderNull, dirName), null);
+ throw new CoreException(status);
+ }
+ IContainer containerResource = selectedProject;
+ folder = containerResource.getFolder(new Path(dirName));
+ if (!folder.exists()) {
+ IStatus status = new Status(IStatus.ERROR, getClass().getName(), IStatus.OK,
+ NLS.bind(Messages.errorFolderMissing, dirName), null);
+ throw new CoreException(status);
+ }
+ }
+
+
+ protected static String replaceOrRemove(String originalLine, String pattern, String value) {
+ String containsPattern = ".*" + pattern + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
+ if ((originalLine != null) && Pattern.matches(containsPattern, originalLine)) {
+ return (((value == null) || (value.length() == 0)) ? null :
+ originalLine.replaceAll(pattern, value));
+ }
+ return originalLine;
+ }
+
+ protected IContainer getContainerResource() {
+ if (selection != null && selection.isEmpty() == false) {
+ IStructuredSelection ssel = selection;
+ if (ssel.size() > 1)
+ return null;
+ Object obj = ssel.getFirstElement();
+ if (obj instanceof IResource) {
+ IContainer containerResource;
+ if (obj instanceof IContainer)
+ containerResource = (IContainer) obj;
+ else
+ containerResource = ((IResource) obj).getParent();
+
+ return ((containerResource != null) ? containerResource.getProject() : null);
+ }
+ }
+ return null;
+ }
+
+ protected List<IProject> getGlassFishAndSailfinProjects() {
+ IProject[] allProjects = ProjectUtilities.getAllProjects();
+ List<IProject> returnProjects = new ArrayList<IProject>();
+
+ for (IProject project2 : allProjects) {
+ try {
+ if (FacetedProjectFramework.hasProjectFacet(project2, "sun.facet")) { //$NON-NLS-1$
+ returnProjects.add(project2);
+ } else {
+ IRuntime runtime = J2EEProjectUtilities.getServerRuntime(project2);
+ if (runtime != null) {
+ String runtimeId = runtime.getRuntimeType().getId();
+
+ if( runtimeId.equals( GlassFishRuntime.TYPE_ID ) )
+ {
+ returnProjects.add(project2);
+ }
+ }
+ }
+ } catch (CoreException e) {
+ // just skip from list
+ }
+ }
+ return returnProjects;
+ }
+
+
+ /**
+ * We will accept the selection in the workbench to see if
+ * we can initialize from it.
+ * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.selection = selection;
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceClassOperation.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceClassOperation.java
new file mode 100644
index 0000000..2c086bd
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceClassOperation.java
@@ -0,0 +1,107 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.codegen.jet.JETException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jst.j2ee.internal.web.operations.NewWebClassOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.internal.enablement.nonui.WFTWrappedException;
+
+@SuppressWarnings("restriction")
+public class AddGenericResourceClassOperation extends NewWebClassOperation {
+
+ /**
+ * folder location of the Generic Resource creation templates directory
+ */
+ protected static final String TEMPLATE_FILE = "/templates/genericresource.javajet"; //$NON-NLS-1$
+
+ public AddGenericResourceClassOperation(IDataModel dataModel) {
+ super(dataModel);
+ }
+
+ protected void generateUsingTemplates(IProgressMonitor monitor,
+ IPackageFragment fragment) throws WFTWrappedException,
+ CoreException {
+ // Create the template model
+ AddGenericResourceTemplateModel tempModel = new AddGenericResourceTemplateModel(model);
+ // Using the WTPJetEmitter, generate the java source
+ // template model
+ try {
+ if (fragment != null) {
+ // Create the Generic Resource java file
+ doGeneration(monitor, fragment, GenericResourceTemplate.create(null), tempModel);
+ // also generate the second class if necessary
+ if (!tempModel.isSimplePattern()) {
+ tempModel.setIsContainerClass();
+ doGeneration(monitor, fragment, ContainerResourceTemplate.create(null), tempModel);
+ }
+ }
+ } catch (Exception e) {
+ throw new WFTWrappedException(e);
+ }
+ }
+
+ private void doGeneration(IProgressMonitor monitor, IPackageFragment fragment,
+ Object tempImpl, AddGenericResourceTemplateModel tempModel) throws JavaModelException, JETException {
+ try {
+ Method method = tempImpl.getClass().getMethod("generate", //$NON-NLS-1$
+ new Class[] { Object.class });
+ String source = (String) method.invoke(tempImpl, tempModel);
+ String javaFileName = tempModel.getClassName() + ".java"; //$NON-NLS-1$
+ createJavaFile(monitor, fragment, source, javaFileName);
+ } catch (SecurityException e) {
+ throw new JETException(e);
+ } catch (NoSuchMethodException e) {
+ throw new JETException(e);
+ } catch (IllegalArgumentException e) {
+ throw new JETException(e);
+ } catch (IllegalAccessException e) {
+ throw new JETException(e);
+ } catch (InvocationTargetException e) {
+ throw new JETException(e);
+ }
+ }
+
+ protected IFile createJavaFile(IProgressMonitor monitor, IPackageFragment fragment, String source, String className) throws JavaModelException {
+ if (fragment != null) {
+ ICompilationUnit cu = fragment.getCompilationUnit(className);
+ // Add the compilation unit to the java file
+ if (cu == null || !cu.exists())
+ cu = fragment.createCompilationUnit(className, source,
+ true, monitor);
+ return (IFile) cu.getResource();
+ }
+ return null;
+ }
+
+ @Override
+ protected AddGenericResourceTemplateModel createTemplateModel() {
+ return new AddGenericResourceTemplateModel(model);
+ }
+
+ @Override
+ protected String getTemplateFile() {
+ return TEMPLATE_FILE;
+ }
+
+ @Override
+ protected Object getTemplateImplementation() {
+ return GenericResourceTemplate.create(null);
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceDataModelProvider.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceDataModelProvider.java
new file mode 100644
index 0000000..4052512
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceDataModelProvider.java
@@ -0,0 +1,246 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
+import org.eclipse.jst.j2ee.internal.common.operations.NewJavaClassDataModelProvider;
+import org.eclipse.jst.j2ee.internal.common.operations.NewJavaEEArtifactClassOperation;
+import org.eclipse.jst.j2ee.internal.web.operations.AddWebClassOperation;
+import org.eclipse.jst.j2ee.internal.web.operations.NewWebClassDataModelProvider;
+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;
+
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+
+@SuppressWarnings("restriction")
+public class AddGenericResourceDataModelProvider extends
+ NewWebClassDataModelProvider {
+
+ public static final String PATTERN = "AddGenericResource.PATTERN"; //$NON-NLS-1$
+ public static final String PATH = "AddGenericResource.PATH"; //$NON-NLS-1$
+ public static final String MIME_TYPE = "AddGenericResource.MIME_TYPE"; //$NON-NLS-1$
+ public static final String REPRESENTATION_CLASS = "AddGenericResource.REPRESENTATION_CLASS"; //$NON-NLS-1$
+ public static final String CONTAINER_REPRESENTATION_CLASS = "AddGenericResource.CONTAINER_REPRESENTATION_CLASS"; //$NON-NLS-1$
+ public static final String CONTAINER_PATH = "AddGenericResource.CONTAINER_PATH"; //$NON-NLS-1$
+ public static final String IN_CONTAINER_CLASS = "AddGenericResource.IN_CONTAINER_CLASS"; //$NON-NLS-1$
+ public static final String ORIGINAL_CLASS_NAME = "AddGenericResource.ORIGINAL_CLASS_NAME"; //$NON-NLS-1$
+
+ public IDataModelOperation getDefaultOperation() {
+ return new AddWebClassOperation(getDataModel()) {
+
+ @Override
+ protected NewJavaEEArtifactClassOperation getNewClassOperation() {
+ return new AddGenericResourceClassOperation(getDataModel());
+ }
+ protected void generateMetaData(IDataModel aModel, String qualifiedClassName) {
+ // for now, do nothing here - data model should be ok as is
+ }
+ };
+ }
+
+ /**
+ * 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()
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Set<String> getPropertyNames() {
+ // Add Resource specific properties defined in this data model
+ Set<String> propertyNames = super.getPropertyNames();
+
+ propertyNames.add(REPRESENTATION_CLASS);
+ propertyNames.add(MIME_TYPE);
+ propertyNames.add(CONTAINER_REPRESENTATION_CLASS);
+ propertyNames.add(CONTAINER_PATH);
+ propertyNames.add(PATH);
+ propertyNames.add(PATTERN);
+ propertyNames.add(IN_CONTAINER_CLASS);
+ propertyNames.add(ORIGINAL_CLASS_NAME);
+
+ 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.
+ *
+ * @see NewJavaClassDataModelProvider#getDefaultProperty(String)
+ * @see IDataModelProvider#getDefaultProperty(String)
+ *
+ * @param propertyName
+ * @return Object default value of property
+ */
+ @Override
+ public Object getDefaultProperty(String propertyName) {
+ if (REPRESENTATION_CLASS.equals(propertyName) || CONTAINER_REPRESENTATION_CLASS.equals(propertyName)) {
+ return "java.lang.String"; //$NON-NLS-1$
+ }
+
+ if (PATTERN.equals(propertyName)) {
+ return AddGenericResourceTemplateModel.SIMPLE_PATTERN;
+ }
+
+ if (PATH.equals(propertyName)) {
+ return (isSimplePattern() ? "generic" : (isClientControlledPattern() ? "{name}" : "{id}")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ if (CONTAINER_PATH.equals(propertyName)) {
+ String className = getStringProperty(INewJavaClassDataModelProperties.CLASS_NAME);
+ if ((className != null) && (className.length() > 0)) {
+ return "/" + className.substring(0, 1).toLowerCase() + className.substring(1) + "s"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ if (IN_CONTAINER_CLASS.equals(propertyName)) {
+ return Boolean.FALSE;
+ }
+
+ // Otherwise check super for default value for property
+ return super.getDefaultProperty(propertyName);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.j2ee.internal.web.operations.NewWebClassDataModelProvider#isPropertyEnabled(java.lang.String)
+ */
+ @Override
+ public boolean isPropertyEnabled(String propertyName) {
+ if (CONTAINER_REPRESENTATION_CLASS.equals(propertyName) || CONTAINER_PATH.equals(propertyName)) {
+ return !isSimplePattern();
+ }
+ return super.isPropertyEnabled(propertyName);
+ }
+
+ public IStatus validate(String propertyName) {
+ if (MIME_TYPE.equals(propertyName)) {
+ String value = (String) getProperty(MIME_TYPE);
+ if (value == null || value.trim().length() == 0) {
+ return GlassfishToolsPlugin.createErrorStatus(
+ Messages.errorMimeTypeMissing, null);
+ }
+ }
+ if (REPRESENTATION_CLASS.equals(propertyName)) {
+ return validateRepClass(REPRESENTATION_CLASS, Messages.errorRepresentationClassMissing,
+ Messages.errorRepresentationClassInvalid);
+ }
+
+ if (PATH.equals(propertyName)) {
+ return validatePath((String) getProperty(PATH));
+ }
+
+ // these only need validation in the case of pattern != simple
+ if (isPropertyEnabled(propertyName)) {
+ if (CONTAINER_PATH.equals(propertyName)) {
+ String value = (String) getProperty(CONTAINER_PATH);
+ if (value == null || value.trim().length() == 0) {
+ return GlassfishToolsPlugin.createErrorStatus(
+ Messages.errorContainerPathMissing, null);
+ }
+ }
+ if (CONTAINER_REPRESENTATION_CLASS.equals(propertyName)) {
+ return validateRepClass(CONTAINER_REPRESENTATION_CLASS, Messages.errorContainerRepresentationClassMissing,
+ Messages.errorContainerRepresentationClassInvalid);
+ }
+ }
+ IStatus status = super.validate(propertyName);
+ return status;
+ }
+
+ private boolean isSimplePattern() {
+ return AddGenericResourceTemplateModel.SIMPLE_PATTERN.equals(getStringProperty(PATTERN));
+ }
+
+ private boolean isClientControlledPattern() {
+ return AddGenericResourceTemplateModel.CLIENT_CONTAINER_PATTERN.equals(getStringProperty(PATTERN));
+ }
+
+ protected IStatus validateRepClass(String propertyName, String errorMessageKeyMissing, String errorMessageKeyInvalid) {
+ String value = (String) getProperty(propertyName);
+ if (value == null || value.trim().length() == 0) {
+ return GlassfishToolsPlugin.createErrorStatus(errorMessageKeyMissing, null);
+ }
+ // Check that unqualified class name is valid by standard java conventions
+ String className = value;
+ int index = value.lastIndexOf("."); //$NON-NLS-1$
+ if (index != -1) {
+ className = value.substring(index + 1);
+ }
+ IStatus javaStatus = validateJavaClassName(className);
+ if (javaStatus.getSeverity() != IStatus.ERROR) {
+ // If the class does not exist, throw an error
+ IJavaProject javaProject = JavaCore.create(getTargetProject());
+ IType type = null;
+ try {
+ type = javaProject.findType(value);
+ } catch (Exception e) {
+ // Just throw error below
+ }
+ if (type == null) {
+ return WTPCommonPlugin.createErrorStatus(errorMessageKeyInvalid);
+ }
+ return WTPCommonPlugin.OK_STATUS;
+ }
+ return javaStatus;
+ }
+
+ private IStatus validatePath(String path) {
+ if (path == null || path.trim().length() == 0) {
+ return GlassfishToolsPlugin.createErrorStatus(
+ Messages.errorPathMissing, null);
+ }
+ if (!isSimplePattern()) {
+ StringTokenizer segments = new StringTokenizer(path, "/ "); //$NON-NLS-1$
+ Set<String> pathParts = new HashSet<String>();
+ while (segments.hasMoreTokens()) {
+ String segment = segments.nextToken();
+ if (segment.startsWith("{")) { //$NON-NLS-1$
+ if (segment.length() > 2 && segment.endsWith("}")) { //$NON-NLS-1$
+ String pathPart = segment.substring(1, segment.length() - 1);
+ IStatus javaStatus = JavaConventions.validateIdentifier(pathPart,
+ CompilerOptions.VERSION_1_3,CompilerOptions.VERSION_1_3);
+ if (javaStatus.getSeverity() == IStatus.ERROR) {
+ String msg = javaStatus.getMessage();
+ return WTPCommonPlugin.createErrorStatus(msg);
+ } else if (javaStatus.getSeverity() == IStatus.WARNING) {
+ String msg = javaStatus.getMessage();
+ return WTPCommonPlugin.createWarningStatus(msg);
+ }
+ if (pathParts.contains(pathPart)) {
+ return WTPCommonPlugin.createErrorStatus(Messages.errorPathInvalid);
+ } else {
+ pathParts.add(pathPart);
+ }
+ } else {
+ return WTPCommonPlugin.createErrorStatus(Messages.errorPathInvalid);
+ }
+ } else {
+ if (segment.contains("{") || segment.contains("}")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return WTPCommonPlugin.createErrorStatus(Messages.errorPathInvalid);
+ }
+ }
+ }
+ }
+ return WTPCommonPlugin.OK_STATUS;
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceTemplateModel.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceTemplateModel.java
new file mode 100644
index 0000000..cf1a0ce
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceTemplateModel.java
@@ -0,0 +1,228 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.TreeSet;
+
+import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
+import org.eclipse.jst.j2ee.internal.web.operations.CreateWebClassTemplateModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+@SuppressWarnings("restriction")
+public class AddGenericResourceTemplateModel extends CreateWebClassTemplateModel {
+
+ public static final String QUALIFIED_CONTEXT = "javax.ws.rs.core.Context"; //$NON-NLS-1$
+ public static final String QUALIFIED_URI_INFO = "javax.ws.rs.core.UriInfo"; //$NON-NLS-1$
+ public static final String QUALIFIED_CONSUMES = "javax.ws.rs.Consumes"; //$NON-NLS-1$
+ public static final String QUALIFIED_PUT = "javax.ws.rs.PUT"; //$NON-NLS-1$
+ public static final String QUALIFIED_PATH = "javax.ws.rs.Path"; //$NON-NLS-1$
+ public static final String QUALIFIED_GET = "javax.ws.rs.GET"; //$NON-NLS-1$
+ public static final String QUALIFIED_DELETE = "javax.ws.rs.DELETE"; //$NON-NLS-1$
+ public static final String QUALIFIED_PRODUCES = "javax.ws.rs.Produces"; //$NON-NLS-1$
+ public static final String QUALIFIED_PATH_PARAM = "javax.ws.rs.PathParam"; //$NON-NLS-1$
+ public static final String QUALIFIED_POST = "javax.ws.rs.POST"; //$NON-NLS-1$
+ public static final String QUALIFIED_RESPONSE = "javax.ws.rs.core.Response"; //$NON-NLS-1$
+
+ protected static final String TYPE_APP_JSON = "application/json"; //$NON-NLS-1$
+ protected static final String TYPE_APP_XML = "application/xml"; //$NON-NLS-1$
+ protected static final String TYPE_TEXT_HTML = "text/html"; //$NON-NLS-1$
+ protected static final String TYPE_TEXT_PLAIN = "text/plain"; //$NON-NLS-1$
+
+ protected static final String SUFFIX_JSON = "Json"; //$NON-NLS-1$
+ protected static final String SUFFIX_XML = "Xml"; //$NON-NLS-1$
+ protected static final String SUFFIX_HTML = "Html"; //$NON-NLS-1$
+ protected static final String SUFFIX_TEXT = "Text"; //$NON-NLS-1$
+
+ protected static final String SIMPLE_PATTERN = "Simple"; //$NON-NLS-1$
+ protected static final String CONTAINER_PATTERN = "Container"; //$NON-NLS-1$
+ protected static final String CLIENT_CONTAINER_PATTERN = "Client"; //$NON-NLS-1$
+
+ private static final Map<String, String> typeToSuffix;
+
+ static {
+ typeToSuffix= new HashMap<String, String>();
+ typeToSuffix.put(TYPE_APP_JSON, SUFFIX_JSON);
+ typeToSuffix.put(TYPE_APP_XML, SUFFIX_XML);
+ typeToSuffix.put(TYPE_TEXT_HTML, SUFFIX_HTML);
+ typeToSuffix.put(TYPE_TEXT_PLAIN, SUFFIX_TEXT);
+ }
+
+ public AddGenericResourceTemplateModel(IDataModel dataModel) {
+ super(dataModel);
+ }
+
+ @Override
+ public Collection<String> getImports() {
+ Collection<String> collection = super.getImports();
+ boolean isContainerClass = isContainerClass();
+ boolean isClientPattern = isClientControlledPattern();
+ boolean usesContext = isSimplePattern() || isContainerClass;
+
+ collection.add(QUALIFIED_CONSUMES);
+ collection.add(QUALIFIED_GET);
+ collection.add(QUALIFIED_PRODUCES);
+
+ if (usesContext) {
+ collection.add(QUALIFIED_CONTEXT);
+ collection.add(QUALIFIED_URI_INFO);
+ collection.add(QUALIFIED_PATH);
+ } else {
+ collection.add(QUALIFIED_DELETE);
+ }
+ if (isContainerClass) {
+ if (!isClientPattern) {
+ collection.add(QUALIFIED_POST);
+ collection.add(QUALIFIED_RESPONSE);
+ } else {
+ collection.remove(QUALIFIED_CONSUMES);
+ }
+ if (getParamList() != null) {
+ collection.add(QUALIFIED_PATH_PARAM);
+ }
+ } else {
+ collection.add(QUALIFIED_PUT);
+ }
+
+ // if repClass is not in java.lang, add an import for it as well
+ // actually, the return from super.getImports returns a collection which is
+ // smart enough to skip adding java.lang classes
+ String repPropName = (isContainerClass ? AddGenericResourceDataModelProvider.CONTAINER_REPRESENTATION_CLASS :
+ AddGenericResourceDataModelProvider.REPRESENTATION_CLASS);
+ String repClass = getProperty(repPropName);
+
+ if (repClass != null) {
+ // so, this is all we should need to do
+ collection.add(repClass);
+ // however, ImportsCollection has a bug that also skips adding
+ // classes like java.lang.reflect.Method, so we need to do this as
+ // a workaround (for eclipse bug 294688)
+ int index = repClass.lastIndexOf("."); //$NON-NLS-1$
+ if (index != -1) {
+ String packageName = repClass.substring(0, index);
+ if (repClass.startsWith("java.lang.") && //$NON-NLS-1$
+ !packageName.equals("java.lang")) { //$NON-NLS-1$
+ Collection<String> myCollection = new TreeSet<String>();
+ myCollection.addAll(collection);
+ myCollection.add(repClass);
+ return myCollection;
+ }
+ } // end workaround
+ }
+
+ return collection;
+ }
+
+ protected boolean isSimplePattern() {
+ String patternProp = getProperty(AddGenericResourceDataModelProvider.PATTERN);
+ return patternProp.equals(SIMPLE_PATTERN);
+ }
+
+ protected boolean isClientControlledPattern() {
+ String patternProp = getProperty(AddGenericResourceDataModelProvider.PATTERN);
+ return patternProp.equals(CLIENT_CONTAINER_PATTERN);
+ }
+
+ public String getProperty(String propertyName) {
+ return dataModel.getStringProperty(propertyName);
+ }
+
+ protected String getMethodNameSuffixFromMimeType() {
+ String mimeType = getProperty(AddGenericResourceDataModelProvider.MIME_TYPE);
+
+ return ((mimeType != null) ? typeToSuffix.get(mimeType) : null);
+ }
+
+ protected String getUnqualifiedRepresentationClass() {
+ return getUnqualifiedRepresentationClass(AddGenericResourceDataModelProvider.REPRESENTATION_CLASS);
+ }
+
+ protected String getUnqualifiedContainerRepresentationClass() {
+ return getUnqualifiedRepresentationClass(AddGenericResourceDataModelProvider.CONTAINER_REPRESENTATION_CLASS);
+ }
+
+ protected String getUnqualifiedRepresentationClass(String propertyName) {
+ String repClass = getProperty(propertyName);
+
+ if (repClass != null) {
+ int index = repClass.lastIndexOf("."); //$NON-NLS-1$
+ if (index != -1) {
+ return repClass.substring(index + 1);
+ }
+ }
+ return null;
+ }
+
+ // assumes that it has passed validation
+ protected String[] getParamList() {
+ if (!isSimplePattern()) {
+ String path = getProperty(AddGenericResourceDataModelProvider.PATH);
+ StringTokenizer segments = new StringTokenizer(path, "/ "); //$NON-NLS-1$
+ List<String> pathParts = new ArrayList<String>();
+ while (segments.hasMoreTokens()) {
+ String segment = segments.nextToken();
+ if (segment.startsWith("{")) { //$NON-NLS-1$
+ if (segment.length() > 2 && segment.endsWith("}")) { //$NON-NLS-1$
+ pathParts.add(segment.substring(1, segment.length() - 1));
+ }
+ }
+ }
+ return (pathParts.isEmpty() ? null : (String[])pathParts.toArray(new String[]{}));
+ }
+ return null;
+ }
+
+ protected String getCommaSeparatedParamList() {
+ return buildCommaSeparatedParamList(null);
+ }
+
+ protected String getCommaSeparatedParamListWithTypes() {
+ return buildCommaSeparatedParamList("String"); //$NON-NLS-1$
+ }
+
+ private String buildCommaSeparatedParamList(String additionalString) {
+ String[] paramList = getParamList();
+ StringBuilder buffer = new StringBuilder();
+
+ if (paramList != null) {
+ int count = paramList.length;
+
+ for (int i = 0; i < count; i++) {
+ String string = paramList[i];
+ if (additionalString != null) {
+ buffer.append(additionalString);
+ buffer.append(" "); //$NON-NLS-1$
+ }
+ buffer.append(string);
+ if (i < count - 1) {
+ buffer.append(", "); //$NON-NLS-1$
+ }
+ }
+ return buffer.toString();
+ }
+ return null;
+ }
+
+ protected void setIsContainerClass() {
+ String existingClassName = getProperty(INewJavaClassDataModelProperties.CLASS_NAME);
+ dataModel.setBooleanProperty(AddGenericResourceDataModelProvider.IN_CONTAINER_CLASS, Boolean.TRUE);
+ dataModel.setProperty(INewJavaClassDataModelProperties.CLASS_NAME, existingClassName + CONTAINER_PATTERN);
+ dataModel.setProperty(AddGenericResourceDataModelProvider.ORIGINAL_CLASS_NAME, existingClassName);
+ }
+
+ private boolean isContainerClass() {
+ return dataModel.getBooleanProperty(AddGenericResourceDataModelProvider.IN_CONTAINER_CLASS);
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizard.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizard.java
new file mode 100644
index 0000000..a445de5
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizard.java
@@ -0,0 +1,97 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.JAVA_PACKAGE;
+import static org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties.PROJECT;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEEditorUtility;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.jst.servlet.ui.internal.plugin.ServletUIPlugin;
+import org.eclipse.jst.servlet.ui.internal.wizard.NewWebArtifactWizard;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
+
+@SuppressWarnings("restriction")
+public class AddGenericResourceWizard extends NewWebArtifactWizard {
+
+ public AddGenericResourceWizard() {
+ this(null);
+ }
+
+ public AddGenericResourceWizard(IDataModel model) {
+ super(model);
+ setWindowTitle(Messages.genericResourceWizardTitle);
+ }
+
+ @Override
+ protected void doAddPages() {
+ AddGenericResourceWizardPage page1 = new AddGenericResourceWizardPage(getDataModel(),
+ "page1", Messages.genericResourceWizardDescription, //$NON-NLS-1$
+ Messages.genericResourceWizardTitle, J2EEProjectUtilities.DYNAMIC_WEB);
+ addPage(page1);
+ }
+
+ @Override
+ protected IDataModelProvider getDefaultProvider() {
+ return (IDataModelProvider) new AddGenericResourceDataModelProvider();
+ }
+
+ @Override
+ protected ImageDescriptor getImage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected String getTitle() {
+ return Messages.genericResourceWizardTitle;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard#postPerformFinish()
+ */
+ @Override
+ protected void postPerformFinish() throws InvocationTargetException {
+ openJavaClass();
+ super.postPerformFinish();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jst.servlet.ui.internal.wizard.NewWebArtifactWizard#openJavaClass()
+ */
+ @Override
+ protected void openJavaClass() {
+ IDataModel model = getDataModel();
+ if (model.getBooleanProperty(AddGenericResourceDataModelProvider.IN_CONTAINER_CLASS)) {
+ try {
+ String className = model.getStringProperty(AddGenericResourceDataModelProvider.ORIGINAL_CLASS_NAME);
+ String packageName = model.getStringProperty(JAVA_PACKAGE);
+
+ if (packageName != null && packageName.trim().length() > 0)
+ className = packageName + "." + className; //$NON-NLS-1$
+
+ IProject p = (IProject) model.getProperty(PROJECT);
+ IJavaProject javaProject = J2EEEditorUtility.getJavaProject(p);
+ IFile file = (IFile) javaProject.findType(className).getResource();
+ openEditor(file);
+ } catch (Exception cantOpen) {
+ ServletUIPlugin.log(cantOpen);
+ }
+ }
+ super.openJavaClass();
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizardPage.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizardPage.java
new file mode 100644
index 0000000..38dccff
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/AddGenericResourceWizardPage.java
@@ -0,0 +1,318 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.search.IJavaSearchConstants;
+import org.eclipse.jdt.core.search.IJavaSearchScope;
+import org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jst.j2ee.internal.common.operations.INewJavaClassDataModelProperties;
+import org.eclipse.jst.j2ee.internal.dialogs.TypeSearchEngine;
+import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
+import org.eclipse.jst.j2ee.internal.web.operations.INewWebClassDataModelProperties;
+import org.eclipse.jst.jee.ui.internal.navigator.web.WebAppProvider;
+import org.eclipse.jst.servlet.ui.internal.wizard.NewWebClassWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelEvent;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+
+import org.eclipse.glassfish.tools.utils.WizardUtil;
+
+@SuppressWarnings("restriction")
+public class AddGenericResourceWizardPage extends NewWebClassWizardPage {
+
+ private Combo patternTypeCombo;
+ private Text pathText;
+ private Combo mimeTypeCombo;
+ private Text repText;
+ private Text containerRepText;
+ private Button containerRepButton;
+ private Text containerPathText;
+
+ private static final Map<String, String> patternStringToObject;
+
+ static {
+ patternStringToObject= new HashMap<String, String>();
+ patternStringToObject.put(Messages.patternTypeSimpleValue, AddGenericResourceTemplateModel.SIMPLE_PATTERN);
+ patternStringToObject.put(Messages.patternTypeContainerValue, AddGenericResourceTemplateModel.CONTAINER_PATTERN);
+ patternStringToObject.put(Messages.patternTypeClientContainerValue, AddGenericResourceTemplateModel.CLIENT_CONTAINER_PATTERN);
+ }
+
+ public AddGenericResourceWizardPage(IDataModel model, String pageName,
+ String pageDesc, String pageTitle, String moduleType) {
+ super(model, pageName, pageDesc, pageTitle, moduleType);
+ }
+
+ protected Composite createTopLevelComposite(Composite parent) {
+ Composite composite = super.createTopLevelComposite(parent);
+ Label typeLabel = new Label(composite, SWT.NONE);
+ GridData data = new GridData();
+
+ typeLabel.setText(Messages.patternTypeLabel);
+ typeLabel.setLayoutData(data);
+ patternTypeCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ patternTypeCombo.setLayoutData(data);
+ patternTypeCombo.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ Combo combo = (Combo) e.getSource();
+ String patternName = combo.getItem(combo.getSelectionIndex());
+ String patternObject = patternStringToObject.get(patternName);
+
+ model.setProperty(AddGenericResourceDataModelProvider.PATTERN,
+ patternObject);
+ model.setProperty(AddGenericResourceDataModelProvider.PATH,
+ model.getDefaultProperty(AddGenericResourceDataModelProvider.PATH));
+ model.notifyPropertyChange(AddGenericResourceDataModelProvider.PATTERN, DataModelEvent.ENABLE_CHG);
+ updateEnablementFromPattern();
+ validatePage();
+ }
+
+ });
+ new Label(composite, SWT.NONE); // placeholder so layout is correct
+
+ typeLabel = new Label(composite, SWT.NONE);
+ typeLabel.setText(Messages.pathLabel);
+ data = new GridData();
+ typeLabel.setLayoutData(data);
+ pathText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ pathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ synchHelper.synchText(pathText, AddGenericResourceDataModelProvider.PATH, null);
+ new Label(composite, SWT.NONE); // placeholder so layout is correct
+
+ typeLabel = new Label(composite, SWT.NONE);
+ typeLabel.setText(Messages.mimeTypeLabel);
+ data = new GridData();
+ typeLabel.setLayoutData(data);
+ mimeTypeCombo = new Combo(composite, SWT.BORDER | SWT.READ_ONLY);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.widthHint = 300;
+ data.horizontalSpan = 1;
+ mimeTypeCombo.setLayoutData(data);
+ synchHelper.synchCombo(mimeTypeCombo,
+ AddGenericResourceDataModelProvider.MIME_TYPE, null);
+ populateCombos();
+ new Label(composite, SWT.NONE); // placeholder so layout is correct
+
+ addRepresentationClassGroup(composite);
+ addContainerRepresentationClassGroup(composite);
+
+ typeLabel = new Label(composite, SWT.NONE);
+ typeLabel.setText(Messages.containerPathLabel);
+ data = new GridData();
+ typeLabel.setLayoutData(data);
+ containerPathText = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ containerPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ synchHelper.synchText(containerPathText, AddGenericResourceDataModelProvider.CONTAINER_PATH, null);
+ classText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ model.setProperty(AddGenericResourceDataModelProvider.CONTAINER_PATH,
+ model.getDefaultProperty(AddGenericResourceDataModelProvider.CONTAINER_PATH));
+ }
+ });
+
+ // remove entire existing class section
+ hideControl(existingClassButton);
+ hideControl(existingClassLabel);
+ hideControl(existingClassText);
+ hideControl(existingButton);
+
+ updateEnablementFromPattern();
+
+ return composite;
+ }
+
+ /**
+ * Add representation class group to the composite
+ */
+ private void addRepresentationClassGroup(Composite composite) {
+ repText = addRepresentationClassLabelAndTextGroup(composite, Messages.representationClassLabel,
+ AddGenericResourceDataModelProvider.REPRESENTATION_CLASS);
+ addRepresentationClassButton(composite, Messages.representationClassDialogTitle,
+ Messages.representationClassDialogLabel, repText);
+ }
+
+ /**
+ * Add container representation class group to the composite
+ */
+ private void addContainerRepresentationClassGroup(Composite composite) {
+ containerRepText = addRepresentationClassLabelAndTextGroup(composite, Messages.containerRepresentationClassLabel,
+ AddGenericResourceDataModelProvider.CONTAINER_REPRESENTATION_CLASS);
+ containerRepButton = addRepresentationClassButton(composite, Messages.containerRepresentationClassDialogTitle,
+ Messages.containerRepresentationClassDialogLabel, containerRepText);
+ }
+
+ /**
+ * Utility method for adding representation class groups
+ */
+ private Text addRepresentationClassLabelAndTextGroup(Composite composite, String repLabelString, String propertyName) {
+ Label repLabel = new Label(composite, SWT.LEFT);
+ repLabel.setText(repLabelString);
+ repLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+
+ Text repTextField = new Text(composite, SWT.SINGLE | SWT.BORDER);
+ repTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ synchHelper.synchText(repTextField, propertyName, null);
+
+ return repTextField;
+ }
+
+ /**
+ * Utility method for adding representation class groups
+ */
+ private Button addRepresentationClassButton(Composite composite, final String dialogTitle, final String dialogLabel,
+ final Text repTextField) {
+ Button repButton = new Button(composite, SWT.PUSH);
+ repButton.setText(J2EEUIMessages.BROWSE_BUTTON_LABEL);
+ repButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
+ repButton.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ handleRepButtonPressed(dialogTitle, dialogLabel, repTextField);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // Do nothing
+ }
+ });
+ return repButton;
+ }
+
+ protected void handleRepButtonPressed(String dialogTitle, String dialogLabel, Text repTextField) {
+ getControl().setCursor(new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT));
+ IPackageFragmentRoot packRoot = (IPackageFragmentRoot) model.getProperty(INewJavaClassDataModelProperties.JAVA_PACKAGE_FRAGMENT_ROOT);
+ if (packRoot == null)
+ return;
+
+ // this eliminates the non-exported classpath entries
+ final IJavaSearchScope scope = TypeSearchEngine.createJavaSearchScopeForAProject(packRoot.getJavaProject(), true, true);
+
+ FilteredTypesSelectionDialog dialog = new FilteredTypesSelectionDialog(getShell(),false, getWizard().getContainer(), scope, IJavaSearchConstants.CLASS);
+ dialog.setTitle(dialogTitle);
+ dialog.setMessage(dialogLabel);
+
+ if (dialog.open() == Window.OK) {
+ IType type = (IType) dialog.getFirstResult();
+ String repClassFullPath = J2EEUIMessages.EMPTY_STRING;
+ if (type != null) {
+ repClassFullPath = type.getFullyQualifiedName();
+ }
+ repTextField.setText(repClassFullPath);
+ getControl().setCursor(null);
+ return;
+ }
+ getControl().setCursor(null);
+ }
+
+ private void updateEnablementFromPattern() {
+ boolean enableExtras = !model.getProperty(AddGenericResourceDataModelProvider.PATTERN).equals(
+ AddGenericResourceTemplateModel.SIMPLE_PATTERN);
+
+ containerPathText.setEnabled(enableExtras);
+ containerRepText.setEnabled(enableExtras);
+ containerRepButton.setEnabled(enableExtras);
+ }
+
+ private void populateCombos() {
+ mimeTypeCombo.add(AddGenericResourceTemplateModel.TYPE_APP_XML);
+ mimeTypeCombo.add(AddGenericResourceTemplateModel.TYPE_APP_JSON);
+ mimeTypeCombo.add(AddGenericResourceTemplateModel.TYPE_TEXT_PLAIN);
+ mimeTypeCombo.add(AddGenericResourceTemplateModel.TYPE_TEXT_HTML);
+ mimeTypeCombo.select(0);
+
+ patternTypeCombo.add(Messages.patternTypeSimpleValue);
+ patternTypeCombo.add(Messages.patternTypeContainerValue);
+ patternTypeCombo.add(Messages.patternTypeClientContainerValue);
+ patternTypeCombo.select(0);
+ }
+
+ @Override
+ protected String[] getValidationPropertyNames() {
+ String[] base = super.getValidationPropertyNames();
+ String[] result = new String[base.length + 5];
+ System.arraycopy(base, 0, result, 0, base.length);
+ result[base.length] = AddGenericResourceDataModelProvider.PATH;
+ result[base.length + 1] = AddGenericResourceDataModelProvider.MIME_TYPE;
+ result[base.length + 2] = AddGenericResourceDataModelProvider.REPRESENTATION_CLASS;
+ result[base.length + 3] = AddGenericResourceDataModelProvider.CONTAINER_REPRESENTATION_CLASS;
+ result[base.length + 4] = AddGenericResourceDataModelProvider.CONTAINER_PATH;
+
+ return result;
+ }
+
+ @Override
+ protected boolean isProjectValid(IProject project) {
+ if (super.isProjectValid(project)) {
+ return WizardUtil.hasGF3Runtime(project);
+ }
+ return false;
+ }
+
+ @Override
+ protected IProject getExtendedSelectedProject(Object selection) {
+ if (selection instanceof WebAppProvider) {
+ return ((WebAppProvider) selection).getProject();
+ }
+
+ return super.getExtendedSelectedProject(selection);
+ }
+
+ @Override
+ protected String getUseExistingCheckboxText() {
+ // this is for the existing class browse button, which we have hidden
+ return "Unused"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected String getUseExistingProperty() {
+ // this is for the existing class browse button, which we have hidden
+ return INewWebClassDataModelProperties.USE_EXISTING_CLASS;
+ }
+
+ @Override
+ protected void handleClassButtonSelected() {
+ // this is for the existing class browse button, which we have hidden
+ }
+
+ private void hideControl(Control control) {
+ if (control != null) {
+ control.setVisible(false);
+ GridData data = new GridData();
+ data.exclude = true;
+ data.horizontalSpan = 2;
+ data.horizontalAlignment = SWT.FILL;
+ control.setLayoutData(data);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/ContainerResourceTemplate.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/ContainerResourceTemplate.java
new file mode 100644
index 0000000..0820314
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/ContainerResourceTemplate.java
@@ -0,0 +1,343 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.jst.j2ee.internal.common.operations.Constructor;
+import org.eclipse.jst.j2ee.internal.common.operations.CreateJavaEEArtifactTemplateModel;
+import org.eclipse.jst.j2ee.internal.common.operations.Method;
+
+/*
+ * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sun Microsystems
+ * Oracle
+ */
+
+@SuppressWarnings("restriction")
+public class ContainerResourceTemplate {
+ static String nl;
+ public static synchronized ContainerResourceTemplate create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ ContainerResourceTemplate result = new ContainerResourceTemplate();
+ nl = null;
+ return result;
+ }
+
+ public static final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected static final String TEXT_1 = "package ";
+ protected static final String TEXT_2 = ";";
+ protected static final String TEXT_3 = NL;
+ protected static final String TEXT_4 = NL + "import ";
+ protected static final String TEXT_5 = ";";
+ protected static final String TEXT_6 = NL + NL + "@Path(\"";
+ protected static final String TEXT_7 = "\")";
+ protected static final String TEXT_8 = NL + "public ";
+ protected static final String TEXT_9 = "abstract ";
+ protected static final String TEXT_10 = "final ";
+ protected static final String TEXT_11 = "class ";
+ protected static final String TEXT_12 = " extends ";
+ protected static final String TEXT_13 = " implements ";
+ protected static final String TEXT_14 = ", ";
+ protected static final String TEXT_15 = " {";
+ protected static final String TEXT_16 = NL + " @SuppressWarnings(\"unused\")";
+ protected static final String TEXT_17 = NL + " @Context" + NL + " private UriInfo context;";
+ protected static final String TEXT_18 = NL + NL + " /**" + NL + " * Default constructor. " + NL + " */" + NL + " public ";
+ protected static final String TEXT_19 = "() {" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
+ protected static final String TEXT_20 = NL + " " + NL + " /**" + NL + " * @see ";
+ protected static final String TEXT_21 = "#";
+ protected static final String TEXT_22 = "(";
+ protected static final String TEXT_23 = ")" + NL + " */" + NL + " public ";
+ protected static final String TEXT_24 = "(";
+ protected static final String TEXT_25 = ") {" + NL + " super(";
+ protected static final String TEXT_26 = ");" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
+ protected static final String TEXT_27 = NL + NL + "\t/**" + NL + " * @see ";
+ protected static final String TEXT_28 = "#";
+ protected static final String TEXT_29 = "(";
+ protected static final String TEXT_30 = ")" + NL + " */" + NL + " public ";
+ protected static final String TEXT_31 = " ";
+ protected static final String TEXT_32 = "(";
+ protected static final String TEXT_33 = ") {" + NL + " // TODO Auto-generated method stub";
+ protected static final String TEXT_34 = NL + "\t\t\treturn ";
+ protected static final String TEXT_35 = ";";
+ protected static final String TEXT_36 = NL + " }";
+ protected static final String TEXT_37 = NL + NL + " /**" + NL + " * Retrieves representation of an instance of ";
+ protected static final String TEXT_38 = NL + " * @return an instance of ";
+ protected static final String TEXT_39 = NL + " */" + NL + " @GET" + NL + " @Produces(\"";
+ protected static final String TEXT_40 = "\")" + NL + " public ";
+ protected static final String TEXT_41 = " get";
+ protected static final String TEXT_42 = "() {" + NL + " // TODO return proper representation object" + NL + " throw new UnsupportedOperationException();" + NL + " }" + NL;
+ protected static final String TEXT_43 = NL + " /**" + NL + " * POST method for creating an instance of ";
+ protected static final String TEXT_44 = NL + " * @param content representation for the new resource" + NL + " * @return an HTTP response with content of the created resource" + NL + " */" + NL + " @POST" + NL + " @Consumes(\"";
+ protected static final String TEXT_45 = "\")" + NL + " @Produces(\"";
+ protected static final String TEXT_46 = "\")" + NL + " public Response post";
+ protected static final String TEXT_47 = "(";
+ protected static final String TEXT_48 = " content) {" + NL + " // TODO" + NL + " return Response.created(context.getAbsolutePath()).build();" + NL + " }" + NL;
+ protected static final String TEXT_49 = NL + "\t/**" + NL + " * Sub-resource locator method for ";
+ protected static final String TEXT_50 = NL + " */" + NL + " @Path(\"";
+ protected static final String TEXT_51 = "\")" + NL + " public ";
+ protected static final String TEXT_52 = " get";
+ protected static final String TEXT_53 = "(";
+ protected static final String TEXT_54 = ") {" + NL + " return ";
+ protected static final String TEXT_55 = ".getInstance(";
+ protected static final String TEXT_56 = ");" + NL + " }" + NL + "}";
+
+ public String generate(Object argument)
+ {
+ final StringBuilder stringBuffer = new StringBuilder();
+
+ AddGenericResourceTemplateModel model = (AddGenericResourceTemplateModel) argument;
+ String containerRepresentationClass = model.getUnqualifiedContainerRepresentationClass();
+ String mimeType = model.getProperty(AddGenericResourceDataModelProvider.MIME_TYPE).trim();
+ String path = model.getProperty(AddGenericResourceDataModelProvider.PATH).trim();
+ String containerPath = model.getProperty(AddGenericResourceDataModelProvider.CONTAINER_PATH).trim();
+ String methodNameFromMimeType = model.getMethodNameSuffixFromMimeType();
+ String originalClassName = model.getProperty(AddGenericResourceDataModelProvider.ORIGINAL_CLASS_NAME).trim();
+ String[] paramListStrings = model.getParamList();
+ String paramList = model.getCommaSeparatedParamList();
+ boolean hasParam = (paramListStrings != null);
+ String paramListNoTypes = (hasParam ? paramList : "");
+ StringBuilder pathParams = new StringBuilder();
+ boolean isClientPattern = model.isClientControlledPattern();
+
+ if (hasParam) {
+ for (int i=0;i<paramListStrings.length;i++) {
+ pathParams.append("@PathParam(\"" + paramListStrings[i] + "\") String " + paramListStrings[i]);
+ if (i < paramListStrings.length - 1) {
+ pathParams.append( ", " );
+ }
+ }
+ }
+
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
+
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( model.getJavaPackageName() );
+ stringBuffer.append(TEXT_2);
+
+ }
+
+ stringBuffer.append(TEXT_3);
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ 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( containerPath );
+ stringBuffer.append(TEXT_7);
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.isPublic()) {
+
+ stringBuffer.append(TEXT_8);
+
+ }
+
+ if (model.isAbstract()) {
+
+ stringBuffer.append(TEXT_9);
+
+ }
+
+ if (model.isFinal()) {
+
+ stringBuffer.append(TEXT_10);
+
+ }
+
+ stringBuffer.append(TEXT_11);
+ stringBuffer.append( model.getClassName() );
+
+ String superClass = model.getSuperclassName();
+ if (superClass != null && superClass.length() > 0) {
+
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append( superClass );
+
+ }
+
+ List<String> interfaces = model.getInterfaces();
+ if ( interfaces.size() > 0) {
+
+ stringBuffer.append(TEXT_13);
+
+ }
+
+ for (int i = 0; i < interfaces.size(); i++) {
+ String INTERFACE = (String) interfaces.get(i);
+ if (i > 0) {
+
+ stringBuffer.append(TEXT_14);
+
+ }
+
+ stringBuffer.append( INTERFACE );
+
+ }
+
+ stringBuffer.append(TEXT_15);
+ if (isClientPattern) {
+ stringBuffer.append(TEXT_16);
+ }
+ stringBuffer.append(TEXT_17);
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (!model.hasEmptySuperclassConstructor()) {
+
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_19);
+
+ }
+
+ if (model.shouldGenSuperclassConstructors()) {
+ List<Constructor> constructors = model.getConstructors();
+ for (Constructor constructor : constructors) {
+ if (constructor.isPublic() || constructor.isProtected()) {
+
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append( model.getSuperclassName() );
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append( model.getSuperclassName() );
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append( constructor.getParamsForJavadoc() );
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_24);
+ stringBuffer.append( constructor.getParamsForDeclaration() );
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append( constructor.getParamsForCall() );
+ stringBuffer.append(TEXT_26);
+
+ }
+ }
+ }
+
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.shouldImplementAbstractMethods()) {
+ for (Method method : model.getUnimplementedMethods()) {
+
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append( method.getContainingJavaClass() );
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append( method.getName() );
+ stringBuffer.append(TEXT_29);
+ stringBuffer.append( method.getParamsForJavadoc() );
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append( method.getReturnType() );
+ stringBuffer.append(TEXT_31);
+ stringBuffer.append( method.getName() );
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append( method.getParamsForDeclaration() );
+ stringBuffer.append(TEXT_33);
+
+ String defaultReturnValue = method.getDefaultReturnValue();
+ if (defaultReturnValue != null) {
+
+ stringBuffer.append(TEXT_34);
+ stringBuffer.append( defaultReturnValue );
+ stringBuffer.append(TEXT_35);
+
+ }
+
+ stringBuffer.append(TEXT_36);
+
+ }
+ }
+
+ stringBuffer.append(TEXT_37);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_38);
+ stringBuffer.append( containerRepresentationClass );
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append( mimeType );
+ stringBuffer.append(TEXT_40);
+ stringBuffer.append( containerRepresentationClass );
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append( methodNameFromMimeType );
+ stringBuffer.append(TEXT_42);
+ if (!isClientPattern) {
+ stringBuffer.append(TEXT_43);
+ stringBuffer.append( originalClassName );
+ stringBuffer.append(TEXT_44);
+ stringBuffer.append( mimeType );
+ stringBuffer.append(TEXT_45);
+ stringBuffer.append( mimeType );
+ stringBuffer.append(TEXT_46);
+ stringBuffer.append( methodNameFromMimeType );
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append( model.getUnqualifiedRepresentationClass() );
+ stringBuffer.append(TEXT_48);
+ }
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append( path );
+ stringBuffer.append(TEXT_50);
+ stringBuffer.append( path );
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append( originalClassName );
+ stringBuffer.append(TEXT_52);
+ stringBuffer.append( originalClassName );
+ stringBuffer.append(TEXT_53);
+ stringBuffer.append( pathParams );
+ stringBuffer.append(TEXT_54);
+ stringBuffer.append( originalClassName );
+ stringBuffer.append(TEXT_55);
+ stringBuffer.append( paramListNoTypes );
+ stringBuffer.append(TEXT_56);
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/GenericResourceTemplate.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/GenericResourceTemplate.java
new file mode 100644
index 0000000..4aaec32
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/GenericResourceTemplate.java
@@ -0,0 +1,368 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.jst.j2ee.internal.common.operations.Constructor;
+import org.eclipse.jst.j2ee.internal.common.operations.CreateJavaEEArtifactTemplateModel;
+import org.eclipse.jst.j2ee.internal.common.operations.Method;
+
+/*
+ * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sun Microsystems
+ * Oracle
+ */
+
+@SuppressWarnings("restriction")
+public class GenericResourceTemplate {
+ protected static String nl;
+ public static synchronized GenericResourceTemplate create(String lineSeparator)
+ {
+ nl = lineSeparator;
+ GenericResourceTemplate result = new GenericResourceTemplate();
+ nl = null;
+ return result;
+ }
+
+ public static final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
+ protected static final String TEXT_1 = "package ";
+ protected static final String TEXT_2 = ";";
+ protected static final String TEXT_3 = NL;
+ protected static final String TEXT_4 = NL + "import ";
+ protected static final String TEXT_5 = ";";
+ protected static final String TEXT_6 = NL;
+ protected static final String TEXT_7 = NL + "@Path(\"";
+ protected static final String TEXT_8 = "\")";
+ protected static final String TEXT_9 = NL + "public ";
+ protected static final String TEXT_10 = "abstract ";
+ protected static final String TEXT_11 = "final ";
+ protected static final String TEXT_12 = "class ";
+ protected static final String TEXT_13 = " extends ";
+ protected static final String TEXT_14 = " implements ";
+ protected static final String TEXT_15 = ", ";
+ protected static final String TEXT_16 = " {";
+ protected static final String TEXT_17 = NL + " @SuppressWarnings(\"unused\")" + NL + " @Context" + NL + " private UriInfo context;";
+ protected static final String TEXT_18 = NL + "\t@SuppressWarnings(\"unused\")" + NL + "\tprivate String ";
+ protected static final String TEXT_19 = ";" + NL;
+ protected static final String TEXT_20 = NL + " /** Creates a new instance of ";
+ protected static final String TEXT_21 = " */" + NL + " private ";
+ protected static final String TEXT_22 = "(";
+ protected static final String TEXT_23 = ") {" + NL + "\t\t";
+ protected static final String TEXT_24 = NL + " }";
+ protected static final String TEXT_25 = NL + NL + " /**" + NL + " * Default constructor. " + NL + " */" + NL + " public ";
+ protected static final String TEXT_26 = "() {" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
+ protected static final String TEXT_27 = NL + " " + NL + " /**" + NL + " * @see ";
+ protected static final String TEXT_28 = "#";
+ protected static final String TEXT_29 = "(";
+ protected static final String TEXT_30 = ")" + NL + " */" + NL + " public ";
+ protected static final String TEXT_31 = "(";
+ protected static final String TEXT_32 = ") {" + NL + " super(";
+ protected static final String TEXT_33 = ");" + NL + " // TODO Auto-generated constructor stub" + NL + " }";
+ protected static final String TEXT_34 = NL + NL + "\t/**" + NL + " * @see ";
+ protected static final String TEXT_35 = "#";
+ protected static final String TEXT_36 = "(";
+ protected static final String TEXT_37 = ")" + NL + " */" + NL + " public ";
+ protected static final String TEXT_38 = " ";
+ protected static final String TEXT_39 = "(";
+ protected static final String TEXT_40 = ") {" + NL + " // TODO Auto-generated method stub";
+ protected static final String TEXT_41 = NL + "\t\t\treturn ";
+ protected static final String TEXT_42 = ";";
+ protected static final String TEXT_43 = NL + " }";
+ protected static final String TEXT_44 = NL + NL + " /** Get instance of the ";
+ protected static final String TEXT_45 = " */" + NL + " public static ";
+ protected static final String TEXT_46 = " getInstance(";
+ protected static final String TEXT_47 = ") {" + NL + " // The user may use some kind of persistence mechanism" + NL + " // to store and restore instances of ";
+ protected static final String TEXT_48 = " class." + NL + " return new ";
+ protected static final String TEXT_49 = "(";
+ protected static final String TEXT_50 = ");" + NL + " }";
+ protected static final String TEXT_51 = NL + NL + " /**" + NL + " * Retrieves representation of an instance of ";
+ protected static final String TEXT_52 = NL + " * @return an instance of ";
+ protected static final String TEXT_53 = NL + " */" + NL + " @GET" + NL + " @Produces(\"";
+ protected static final String TEXT_54 = "\")" + NL + " public ";
+ protected static final String TEXT_55 = " get";
+ protected static final String TEXT_56 = "() {" + NL + " // TODO return proper representation object" + NL + " throw new UnsupportedOperationException();" + NL + " }" + NL + "" + NL + " /**" + NL + " * PUT method for updating or creating an instance of ";
+ protected static final String TEXT_57 = NL + " * @param content representation for the resource" + NL + " * @return an HTTP response with content of the updated or created resource." + NL + " */" + NL + " @PUT" + NL + " @Consumes(\"";
+ protected static final String TEXT_58 = "\")" + NL + " public void put";
+ protected static final String TEXT_59 = "(";
+ protected static final String TEXT_60 = " content) {" + NL + " }" + NL;
+ protected static final String TEXT_61 = NL + " /**" + NL + " * DELETE method for resource ";
+ protected static final String TEXT_62 = NL + " */" + NL + " @DELETE" + NL + " public void delete() {" + NL + " }";
+ protected static final String TEXT_63 = NL + "}";
+
+ public String generate(Object argument)
+ {
+ final StringBuilder stringBuffer = new StringBuilder();
+
+ AddGenericResourceTemplateModel model = (AddGenericResourceTemplateModel) argument;
+ String representationClass = model.getUnqualifiedRepresentationClass();
+ String mimeType = model.getProperty(AddGenericResourceDataModelProvider.MIME_TYPE).trim();
+ String path = model.getProperty(AddGenericResourceDataModelProvider.PATH).trim();
+ String methodNameFromMimeType = model.getMethodNameSuffixFromMimeType();
+ boolean isSimplePattern = model.isSimplePattern();
+ String[] paramListStrings = model.getParamList();
+ String paramList = model.getCommaSeparatedParamList();
+ boolean hasParam = (paramListStrings != null);
+ String paramListNoTypes = (hasParam ? paramList : "");
+ String paramListWithTypes = (hasParam ? model.getCommaSeparatedParamListWithTypes() : "");
+ final StringBuilder assignmentStmts = new StringBuilder();
+
+ if (hasParam) {
+ for (int i=0;i<paramListStrings.length;i++) {
+ assignmentStmts.append( "this." ).append( paramListStrings[i] ).append( " = " ).append( paramListStrings[i] ).append( ';' );
+ if (i < paramListStrings.length - 1) {
+ assignmentStmts.append( "\n " );
+ }
+ }
+ }
+
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ model.removeFlags(CreateJavaEEArtifactTemplateModel.FLAG_QUALIFIED_SUPERCLASS_NAME);
+
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.getJavaPackageName() != null && model.getJavaPackageName().length() > 0) {
+
+ stringBuffer.append(TEXT_1);
+ stringBuffer.append( model.getJavaPackageName() );
+ stringBuffer.append(TEXT_2);
+
+ }
+
+ stringBuffer.append(TEXT_3);
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ Collection<String> imports = model.getImports();
+ for (String anImport : imports) {
+
+ stringBuffer.append(TEXT_4);
+ stringBuffer.append( anImport );
+ stringBuffer.append(TEXT_5);
+
+ }
+
+ stringBuffer.append(TEXT_6);
+ if (isSimplePattern) {
+ stringBuffer.append(TEXT_7);
+ stringBuffer.append( path );
+ stringBuffer.append(TEXT_8);
+ }
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.isPublic()) {
+
+ stringBuffer.append(TEXT_9);
+
+ }
+
+ if (model.isAbstract()) {
+
+ stringBuffer.append(TEXT_10);
+
+ }
+
+ if (model.isFinal()) {
+
+ stringBuffer.append(TEXT_11);
+
+ }
+
+ stringBuffer.append(TEXT_12);
+ stringBuffer.append( model.getClassName() );
+
+ String superClass = model.getSuperclassName();
+ if (superClass != null && superClass.length() > 0) {
+
+ stringBuffer.append(TEXT_13);
+ stringBuffer.append( superClass );
+
+ }
+
+ List<String> interfaces = model.getInterfaces();
+ if ( interfaces.size() > 0) {
+
+ stringBuffer.append(TEXT_14);
+
+ }
+
+ for (int i = 0; i < interfaces.size(); i++) {
+ String INTERFACE = (String) interfaces.get(i);
+ if (i > 0) {
+
+ stringBuffer.append(TEXT_15);
+
+ }
+
+ stringBuffer.append( INTERFACE );
+
+ }
+
+ stringBuffer.append(TEXT_16);
+ if (isSimplePattern) {
+ stringBuffer.append(TEXT_17);
+ } else if (hasParam) {
+ stringBuffer.append(TEXT_18);
+ stringBuffer.append( paramList );
+ stringBuffer.append(TEXT_19);
+ }
+ if (!isSimplePattern) {
+ stringBuffer.append(TEXT_20);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_21);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_22);
+ stringBuffer.append( paramListWithTypes );
+ stringBuffer.append(TEXT_23);
+ stringBuffer.append( assignmentStmts );
+ stringBuffer.append(TEXT_24);
+ } else {
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (!model.hasEmptySuperclassConstructor()) {
+
+ stringBuffer.append(TEXT_25);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_26);
+
+ }
+
+ if (model.shouldGenSuperclassConstructors()) {
+ List<Constructor> constructors = model.getConstructors();
+ for (Constructor constructor : constructors) {
+ if (constructor.isPublic() || constructor.isProtected()) {
+
+ stringBuffer.append(TEXT_27);
+ stringBuffer.append( model.getSuperclassName() );
+ stringBuffer.append(TEXT_28);
+ stringBuffer.append( model.getSuperclassName() );
+ stringBuffer.append(TEXT_29);
+ stringBuffer.append( constructor.getParamsForJavadoc() );
+ stringBuffer.append(TEXT_30);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_31);
+ stringBuffer.append( constructor.getParamsForDeclaration() );
+ stringBuffer.append(TEXT_32);
+ stringBuffer.append( constructor.getParamsForCall() );
+ stringBuffer.append(TEXT_33);
+
+ }
+ }
+ }
+
+ }
+ /* This Content is provided under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at http://www.eclipse.org/org/documents/epl-v10.php
+For purposes of the EPL, "Program" will mean the Content.
+
+Copied from org.eclipse.jst.j2ee.ejb plugin. */
+
+ if (model.shouldImplementAbstractMethods()) {
+ for (Method method : model.getUnimplementedMethods()) {
+
+ stringBuffer.append(TEXT_34);
+ stringBuffer.append( method.getContainingJavaClass() );
+ stringBuffer.append(TEXT_35);
+ stringBuffer.append( method.getName() );
+ stringBuffer.append(TEXT_36);
+ stringBuffer.append( method.getParamsForJavadoc() );
+ stringBuffer.append(TEXT_37);
+ stringBuffer.append( method.getReturnType() );
+ stringBuffer.append(TEXT_38);
+ stringBuffer.append( method.getName() );
+ stringBuffer.append(TEXT_39);
+ stringBuffer.append( method.getParamsForDeclaration() );
+ stringBuffer.append(TEXT_40);
+
+ String defaultReturnValue = method.getDefaultReturnValue();
+ if (defaultReturnValue != null) {
+
+ stringBuffer.append(TEXT_41);
+ stringBuffer.append( defaultReturnValue );
+ stringBuffer.append(TEXT_42);
+
+ }
+
+ stringBuffer.append(TEXT_43);
+
+ }
+ }
+
+ if (!isSimplePattern) {
+ stringBuffer.append(TEXT_44);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_45);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_46);
+ stringBuffer.append( paramListWithTypes );
+ stringBuffer.append(TEXT_47);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_48);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_49);
+ stringBuffer.append( paramListNoTypes );
+ stringBuffer.append(TEXT_50);
+ }
+ stringBuffer.append(TEXT_51);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_52);
+ stringBuffer.append( representationClass );
+ stringBuffer.append(TEXT_53);
+ stringBuffer.append( mimeType );
+ stringBuffer.append(TEXT_54);
+ stringBuffer.append( representationClass );
+ stringBuffer.append(TEXT_55);
+ stringBuffer.append( methodNameFromMimeType );
+ stringBuffer.append(TEXT_56);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_57);
+ stringBuffer.append( mimeType );
+ stringBuffer.append(TEXT_58);
+ stringBuffer.append( methodNameFromMimeType );
+ stringBuffer.append(TEXT_59);
+ stringBuffer.append( representationClass );
+ stringBuffer.append(TEXT_60);
+ if (!isSimplePattern) {
+ stringBuffer.append(TEXT_61);
+ stringBuffer.append( model.getClassName() );
+ stringBuffer.append(TEXT_62);
+ }
+ stringBuffer.append(TEXT_63);
+ return stringBuffer.toString();
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.java
new file mode 100644
index 0000000..e373b06
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.java
@@ -0,0 +1,54 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.rest.wizards;
+
+
+
+public class Messages extends org.eclipse.osgi.util.NLS {
+ static {
+ org.eclipse.osgi.util.NLS.initializeMessages(
+ "org.eclipse.glassfish.tools.ui.rest.wizards.Messages", Messages.class);
+ }
+
+ public static String ProjectName;
+ public static String sessionWizardTitle;
+ public static String errorBusinessInterfaceMissing;
+
+ public static String timerWizardTitle;
+ public static String timerWizardDescription;
+ public static String timerScheduleLabel;
+ public static String timerScheduleDefault;
+ public static String errorTimerScheduleMissing;
+
+ public static String genericResourceWizardTitle;
+ public static String genericResourceWizardDescription;
+ public static String patternTypeLabel;
+ public static String patternTypeSimpleValue;
+ public static String patternTypeContainerValue;
+ public static String patternTypeClientContainerValue;
+ public static String mimeTypeLabel;
+ public static String errorMimeTypeMissing;
+ public static String representationClassLabel;
+ public static String representationClassDialogTitle;
+ public static String representationClassDialogLabel;
+ public static String errorRepresentationClassMissing;
+ public static String errorRepresentationClassInvalid;
+
+ public static String containerRepresentationClassLabel;
+ public static String containerRepresentationClassDialogTitle;
+ public static String containerRepresentationClassDialogLabel;
+ public static String errorContainerRepresentationClassMissing;
+ public static String errorContainerRepresentationClassInvalid;
+ public static String pathLabel;
+ public static String errorPathMissing;
+ public static String errorPathInvalid;
+ public static String containerPathLabel;
+ public static String errorContainerPathMissing;
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.properties b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.properties
new file mode 100644
index 0000000..1b1d786
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/rest/wizards/Messages.properties
@@ -0,0 +1,33 @@
+ProjectName=Java EE 6 Project:
+sessionWizardTitle=Create EJB 3.1 Session Bean
+errorBusinessInterfaceMissing=At least one checkbox must be selected in Create business interface section
+
+timerWizardTitle=Create EJB Timer Callback
+timerWizardDescription=Create Java class with an added EJB Timer Callback method.
+timerScheduleLabel=Schedule:
+timerScheduleDefault=second="*/10", minute="*", hour="8-23", dayOfWeek="Mon-Fri", dayOfMonth="*", month="*", year="*", info="MyTimer"
+errorTimerScheduleMissing=The schedule cannot be empty.
+
+genericResourceWizardTitle=RESTful Web Service from Pattern
+genericResourceWizardDescription=Create RESTful Web Service from Pattern.
+patternTypeLabel=Pattern type:
+patternTypeSimpleValue=Simple Root Resource
+patternTypeContainerValue=Container-Item
+patternTypeClientContainerValue=Client-Controlled Container-Item
+mimeTypeLabel=MIME type:
+errorMimeTypeMissing=The MIME type cannot be empty.
+representationClassLabel=Representation class:
+representationClassDialogTitle=Representation Class Selection
+representationClassDialogLabel=Choose a representation class
+errorRepresentationClassMissing=The Representation class cannot be empty.
+errorRepresentationClassInvalid=The Representation class does not exist.
+containerRepresentationClassLabel=Container representation class:
+containerRepresentationClassDialogTitle=Container representation Class Selection
+containerRepresentationClassDialogLabel=Choose a container representation class
+errorContainerRepresentationClassMissing=The Container representation class cannot be empty.
+errorContainerRepresentationClassInvalid=The Container representation class does not exist.
+pathLabel=Path:
+errorPathMissing=The Path cannot be empty.
+errorPathInvalid=The Path must contain a list of unique java identifiers surrounded by braces, or string literals, separated by slashes.
+containerPathLabel=Container path:
+errorContainerPathMissing=The Container path cannot be empty.
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ApplicationNode.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ApplicationNode.java
new file mode 100644
index 0000000..f0cfba7
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/ApplicationNode.java
@@ -0,0 +1,82 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.serverview;
+
+import java.util.ArrayList;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.PropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+import org.eclipse.glassfish.tools.GlassFishServer;
+import org.eclipse.glassfish.tools.serverview.AppDesc;
+
+/**
+ * A deployed app node in the server view
+ *
+ * @author Ludovic Champenois
+ *
+ */
+public class ApplicationNode extends TreeNode{
+
+ DeployedApplicationsNode parent;
+ GlassFishServer server = null;
+ TreeNode[] modules = null;
+ AppDesc app = null;
+ public ApplicationNode(DeployedApplicationsNode root, GlassFishServer server, AppDesc app) {
+ super(app.getName(), null, root);
+ this.server = server;
+ this.app = app;
+ }
+
+ public GlassFishServer getServer(){
+ return this.server;
+ }
+
+ public AppDesc getApplicationInfo(){
+ return this.app;
+ }
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ ArrayList< IPropertyDescriptor > properties = new ArrayList< IPropertyDescriptor >();
+ PropertyDescriptor pd;
+
+
+ pd = new TextPropertyDescriptor( "contextroot", "context root" );
+ pd.setCategory( "GlassFish Applications" );
+ properties.add( pd );
+ pd = new TextPropertyDescriptor( "name", "name" );
+ pd.setCategory( "GlassFish Applications" );
+ properties.add( pd );
+ pd = new TextPropertyDescriptor( "path", "path" );
+ pd.setCategory( "GlassFish Applications" );
+ properties.add( pd );
+ pd = new TextPropertyDescriptor( "engine", "engine" );
+ pd.setCategory( "GlassFish Applications" );
+ properties.add( pd );
+
+ return properties.toArray( new IPropertyDescriptor[ 0 ] );
+ }
+ @Override
+ public Object getPropertyValue(Object id) {
+ if ( id.equals( "contextroot" ))
+ return app.getContextRoot();
+ if ( id.equals( "name" ))
+ return app.getName();
+ if ( id.equals( "path" ))
+ return app.getPath();
+ if ( id.equals( "engine" ))
+ return app.getType();
+
+
+
+ return null;
+ }
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedApplicationsNode.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedApplicationsNode.java
new file mode 100644
index 0000000..05e6f44
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedApplicationsNode.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.serverview;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map.Entry;
+
+import org.eclipse.glassfish.tools.GlassFishServer;
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+import org.eclipse.glassfish.tools.serverview.AppDesc;
+import org.eclipse.glassfish.tools.utils.NodesUtils;
+
+public class DeployedApplicationsNode extends TreeNode {
+
+ GlassFishServer server = null;
+ ApplicationNode[] deployedapps = null;
+
+ public DeployedApplicationsNode(GlassFishServer server) {
+ super("Deployed Applications", null, null);
+ this.server = server;
+
+ }
+
+ public GlassFishServer getServer() {
+ return this.server;
+ }
+
+ public Object[] getChildren() {
+
+ ArrayList<ApplicationNode> appsList = new ArrayList<ApplicationNode>();
+ if (this.deployedapps == null) {
+
+ try {
+ if (server == null) {
+ this.deployedapps = appsList
+ .toArray(new ApplicationNode[appsList
+ .size()]);
+ return this.deployedapps;
+ }
+
+ try {
+ java.util.Map<String, List<AppDesc>> appMap = NodesUtils.getApplications(server, null);
+ for (Entry<String, List<AppDesc>> entry : appMap.entrySet()) {
+ List<AppDesc> apps = entry.getValue();
+ for (AppDesc app : apps) {
+ ApplicationNode t = new ApplicationNode(this, server,
+ app);
+
+ appsList.add(t);
+ }
+ }
+ } catch (Exception ex) {
+ GlassfishToolsPlugin.logError("get Applications is failing=", ex); //$NON-NLS-1$
+
+ }
+ } catch (Exception e) {
+ }
+ this.deployedapps = appsList
+ .toArray(new ApplicationNode[appsList.size()]);
+ }
+
+ return this.deployedapps;
+ }
+
+ public void refresh() {
+ this.deployedapps = null;
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedWebServicesNode.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedWebServicesNode.java
new file mode 100644
index 0000000..a2d22ee
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/DeployedWebServicesNode.java
@@ -0,0 +1,77 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.serverview;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.glassfish.tools.GlassFishServer;
+import org.eclipse.glassfish.tools.GlassfishToolsPlugin;
+import org.eclipse.glassfish.tools.serverview.WSDesc;
+import org.eclipse.glassfish.tools.utils.NodesUtils;
+
+public class DeployedWebServicesNode extends TreeNode {
+
+ GlassFishServer server = null;
+ WebServiceNode[] deployedapps = null;
+
+ public DeployedWebServicesNode(GlassFishServer server) {
+ super("Deployed Web Services", null, null);
+ this.server = server;
+
+ }
+
+ public GlassFishServer getServer() {
+ return this.server;
+ }
+
+ public Object[] getChildren() {
+
+ ArrayList<WebServiceNode> appsList = new ArrayList<WebServiceNode>();
+ if (this.deployedapps == null) {
+ try {
+ if (server == null) {
+ this.deployedapps = appsList
+ .toArray(new WebServiceNode[appsList
+ .size()]);
+ return this.deployedapps;
+ }
+
+ try {
+ List<WSDesc> wss = NodesUtils.getWebServices(server);
+
+
+ for (WSDesc app : wss) {
+ WebServiceNode t = new WebServiceNode(this, server,
+ app);
+
+ appsList.add(t);
+ }
+
+ } catch (Exception ex) {
+ GlassfishToolsPlugin.logError("get Applications is failing=", ex); //$NON-NLS-1$
+
+ }
+ } catch (Exception e) {
+ }
+ this.deployedapps = appsList
+ .toArray(new WebServiceNode[appsList.size()]);
+ }
+
+ return this.deployedapps;
+ }
+
+ public void refresh() {
+ this.deployedapps = null;
+ }
+
+
+
+}
diff --git a/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/GenericActionProvider.java b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/GenericActionProvider.java
new file mode 100644
index 0000000..58550af
--- /dev/null
+++ b/plugins/org.eclipse.glassfish.tools.ui/src/org/eclipse/glassfish/tools/ui/serverview/GenericActionProvider.java
@@ -0,0 +1,116 @@
+/******************************************************************************
+ * Copyright (c) 2018 Oracle
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ * SPDX-License-Identifier: EPL-2.0
+ ******************************************************************************/
+
+package org.eclipse.glassfish.tools.ui.serverview;
+
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+
+public abstract class GenericActionProvider extends CommonActionProvider{
+ Action refreshAction ;
+ protected ICommonActionExtensionSite actionSite;
+
+ public GenericActionProvider() {
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ CommonViewer cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ makeActions(cv, wsSite.getSelectionProvider());
+ }
+ }
+ }
+
+ private void makeActions(CommonViewer cv,
+ ISelectionProvider selectionProvider) {
+ ISelection sel = selectionProvider.getSelection(); <