eclipse / lemminx

XML Language Server
Eclipse Public License 2.0
262 stars 90 forks source link

Doesn't provide correct completion suggestion for web.xml #1196

Closed gayanper closed 2 years ago

gayanper commented 2 years ago

Given the following web.xml file with the content

<web-app 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns="http://java.sun.com/xml/ns/javaee" 
  xmlns:web="http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" 
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" 
  version="4.0">

</web-app>

I don't get the full set of element completions for web-app schema with lemminx editor, even though the correct completions are shown in old Web Tools xml editor in Eclipse

fbricon commented 2 years ago

You have the namespace wrong. Try :

<?xml version="1.0" encoding="UTF-8"?>
<web-app 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
    xmlns:web="http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" 
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" 
    version="4.0">

</web-app> 

I noticed a bug in lemminx when, after an empty file has been opened, if you copy the content above, only http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd will be downloaded and cached locally (under ~/.lemminx/cache/...). Once lemminx restarts (after restarting the IDE), then all included XSDs will be downloaded, completion/validation can then work as expected.

gayanper commented 2 years ago

Yes it worked after restarting IDE with the correct definition. Should we keep this issue to fix the mentioned inconsistency until restart ?

gayanper commented 2 years ago

Ok seems the suggestion didn't worked. I tried a code snippet from oracle documentation as well, which didn't work with lemminx even after restart.

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
   version="2.4">
</web-app>

But completions work fine with old xml editor in eclipse.

fbricon commented 2 years ago

Indeed, it fails with 2.4. However web 2.5 works

<?xml version="1.0" encoding="UTF-8"?>
<web-app 
version="2.5" 
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
</web-app>

I don't know what's really happening, but my guess is the parser fails to load the 2.4 xsd, as, when you open it, there's a ton of errors bubbling up from included XSDs (There are '73' errors in 'http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd'.), like:

s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '"translation": {'. s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '"attribute9": "en-US",'.

Opening the 2.5 xsd shows some errors but no s4s-elt-characters

Anyays, @angelozerr should know better.

fbricon commented 2 years ago

well http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd returns an HTML page, that's what is cached locally and probably messes everything

fbricon commented 2 years ago

@deboer-tim reminds you of https://bugs.eclipse.org/bugs/show_bug.cgi?id=152355 ain't it? ;-)

fbricon commented 2 years ago

As a workaround, you can copy the contents of https://www.jboss.org/j2ee/schema/j2ee_web_services_client_1_1.xsd into your ~/.lemminx/cache/http/www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd

@angelozerr told you we needed to embed a cached catalog ;-)

deboer-tim commented 2 years ago

@deboer-tim reminds you of https://bugs.eclipse.org/bugs/show_bug.cgi?id=152355 ain't it? ;-)

That brings back memories! Let's hope we don't have a similar bug in another IDE 15 years from now. 😂

angelozerr commented 2 years ago

I have tried to understand the problem of this issue and I think there are 2 problems (one from LemMinX and one from LSP4E but I'm not sure).

The first thing that you must know is that WTP uses the WTP XML catalog for http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd (local file in this case). So there are no download. WWD which integrates LemMinx provides the capability to generate a XML catalog from WTP:

You can a system-catalog.xml which is generated from the WTP XML catalog:

image

In this system catalog it defines the http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd with uri:

<uri name="http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" uri="file:///C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd"/>

After debugging LemMinx it seems that the XML catalog resolver of LemMinx cannot takes care of this uri. I will create a PR for that which works good on vscode-xml by using the WTP XML editor catalog. When I use WTP XML editor catalog in vscode-xml , there are no download in .lemminx.

image

But in Eclipse IDE, the completion doesn't appear even with this fix although I can see the JSON response in the Eclipse console:

Perhaps there are some characters which crashes the LSP4E ? //cc @mickaelistria

{
    "jsonrpc": "2.0",
    "id": "10",
    "result": {
        "isIncomplete": false,
        "items": [
            {
                "label": "resource-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The resource-refType contains a declaration of a Deployment Component\u0027s reference to an external resource. It consists of an optional description, the resource manager connection factory reference name, an optional indication of the resource manager connection factory type expected by the Deployment Component code, an optional type of authentication (Application or Container), and an optional specification of the shareability of connections obtained from the resource (Shareable or Unshareable). It also includes optional elements to define injection of the named resource into fields or JavaBeans properties. The connection factory type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target. Example: jdbc/EmployeeAppDB javax.sql.DataSource Container Shareable\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "resource-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cresource-ref\u003e$1\u003c/resource-ref\u003e$0"
                }
            },
            {
                "label": "context-param",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The context-param element contains the declaration of a web application\u0027s servlet context initialization parameters.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "context-param",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003ccontext-param\u003e$1\u003c/context-param\u003e$0"
                }
            },
            {
                "label": "module-name",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "This is a special string datatype that is defined by Java EE as a base type for defining collapsed strings. When schemas require trailing/leading space elimination as well as collapsing the existing whitespace, this base type may be used.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "module-name",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cmodule-name\u003e$1\u003c/module-name\u003e$0"
                }
            },
            {
                "label": "filter-mapping",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Declaration of the filter mappings in this web application is done by using filter-mappingType. The container uses the filter-mapping declarations to decide which filters to apply to a request, and in what order. The container matches the request URI to a Servlet in the normal way. To determine which filters to apply it matches filter-mapping declarations either on servlet-name, or on url-pattern for each filter-mapping element, depending on which style is used. The order in which filters are invoked is the order in which filter-mapping declarations that match a request URI for a servlet appear in the list of filter-mapping elements.The filter-name value must be the value of the filter-name sub-elements of one of the filter declarations in the deployment descriptor.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "filter-mapping",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cfilter-mapping\u003e$1\u003c/filter-mapping\u003e$0"
                }
            },
            {
                "label": "response-character-encoding",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "When specified, this element provides a default response character encoding of the web application.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "response-character-encoding",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cresponse-character-encoding\u003e$1\u003c/response-character-encoding\u003e$0"
                }
            },
            {
                "label": "message-destination",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The message-destinationType specifies a message destination. The logical destination described by this element is mapped to a physical destination by the Deployer. The message destination element contains: - an optional description - an optional display-name - an optional icon - a message destination name which must be unique among message destination names within the same Deployment File. - an optional mapped name - an optional lookup name Example: CorporateStocks\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "message-destination",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cmessage-destination\u003e$1\u003c/message-destination\u003e$0"
                }
            },
            {
                "label": "default-context-path",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "When specified, this element provides a default context path of the web application. An empty value for this element must cause the web application to be deployed at the root for the container. Otherwise, the default context path must start with a “/“ character but not end with a “/“ character. Servlet containers may provide vendor specific configuration options that allows specifying a value that overrides the value specified here.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "default-context-path",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdefault-context-path\u003e$1\u003c/default-context-path\u003e$0"
                }
            },
            {
                "label": "session-config",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The session-configType defines the session parameters for this web application. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "session-config",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003csession-config\u003e$1\u003c/session-config\u003e$0"
                }
            },
            {
                "label": "security-role",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The security-roleType contains the definition of a security role. The definition consists of an optional description of the security role, and the security role name. Example: This role includes all employees who are authorized to access the employee service application. employee\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "security-role",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003csecurity-role\u003e$1\u003c/security-role\u003e$0"
                }
            },
            {
                "label": "post-construct",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The lifecycle-callback type specifies a method on a class to be called when a lifecycle event occurs. Note that each class may have only one lifecycle callback method for any given event and that the method may not be overloaded. If the lifefycle-callback-class element is missing then the class defining the callback is assumed to be the component class in scope at the place in the descriptor in which the callback definition appears.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "post-construct",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cpost-construct\u003e$1\u003c/post-construct\u003e$0"
                }
            },
            {
                "label": "display-name",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The display-name type contains a short name that is intended to be displayed by tools. It is used by display-name elements. The display name need not be unique. Example: ...  Employee Self Service  The value of the xml:lang attribute is \"en\" (English) by default.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "display-name",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdisplay-name\u003e$1\u003c/display-name\u003e$0"
                }
            },
            {
                "label": "absolute-ordering",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Please see section 8.2.2 of the specification for details.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "absolute-ordering",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cabsolute-ordering\u003e$1\u003c/absolute-ordering\u003e$0"
                }
            },
            {
                "label": "description",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The description type is used by a description element to provide text describing the parent element. The elements that use this type should include any information that the Deployment Component\u0027s Deployment File file producer wants to provide to the consumer of the Deployment Component\u0027s Deployment File (i.e., to the Deployer). Typically, the tools used by such a Deployment File consumer will display the description when processing the parent element that contains the description. The lang attribute defines the language that the description is provided in. The default value is \"en\" (English).\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "description",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdescription\u003e$1\u003c/description\u003e$0"
                }
            },
            {
                "label": "filter",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The filterType is used to declare a filter in the web application. The filter is mapped to either a servlet or a URL pattern in the filter-mapping element, using the filter-name value to reference. Filters can access the initialization parameters declared in the deployment descriptor at runtime via the FilterConfig interface. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "filter",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cfilter\u003e$1\u003c/filter\u003e$0"
                }
            },
            {
                "label": "listener",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The listenerType indicates the deployment properties for a web application listener bean.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "listener",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003clistener\u003e$1\u003c/listener\u003e$0"
                }
            },
            {
                "label": "welcome-file-list",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The welcome-file-list contains an ordered list of welcome files elements. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "welcome-file-list",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cwelcome-file-list\u003e$1\u003c/welcome-file-list\u003e$0"
                }
            },
            {
                "label": "persistence-unit-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The persistence-unit-ref element contains a declaration of Deployment Component\u0027s reference to a persistence unit associated within a Deployment Component\u0027s environment. It consists of: - an optional description - the persistence unit reference name - an optional persistence unit name. If not specified, the default persistence unit is assumed. - optional injection targets Examples: myPersistenceUnitmyPersistenceUnit PersistenceUnit1\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "persistence-unit-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cpersistence-unit-ref\u003e$1\u003c/persistence-unit-ref\u003e$0"
                }
            },
            {
                "label": "mime-mapping",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The mime-mappingType defines a mapping between an extension and a mime type. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "mime-mapping",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cmime-mapping\u003e$1\u003c/mime-mapping\u003e$0"
                }
            },
            {
                "label": "jms-connection-factory",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of a JMS Connection Factory.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "jms-connection-factory",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cjms-connection-factory\u003e$1\u003c/jms-connection-factory\u003e$0"
                }
            },
            {
                "label": "request-character-encoding",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "When specified, this element provides a default request character encoding of the web application.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "request-character-encoding",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003crequest-character-encoding\u003e$1\u003c/request-character-encoding\u003e$0"
                }
            },
            {
                "label": "error-page",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The error-pageType contains a mapping between an error code or exception type to the path of a resource in the web application. Error-page declarations using the exception-type element in the deployment descriptor must be unique up to the class name of the exception-type. Similarly, error-page declarations using the error-code element must be unique in the deployment descriptor up to the status code. If an error-page element in the deployment descriptor does not contain an exception-type or an error-code element, the error page is a default error page. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "error-page",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cerror-page\u003e$1\u003c/error-page\u003e$0"
                }
            },
            {
                "label": "mail-session",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of a Mail Session resource.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "mail-session",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cmail-session\u003e$1\u003c/mail-session\u003e$0"
                }
            },
            {
                "label": "service-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The service-ref element declares a reference to a Web service. It contains optional description, display name and icons, a declaration of the required Service interface, an optional WSDL document location, an optional set of JAX-RPC mappings, an optional QName for the service element, an optional set of Service Endpoint Interfaces to be resolved by the container to a WSDL port, and an optional set of handlers.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "service-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cservice-ref\u003e$1\u003c/service-ref\u003e$0"
                }
            },
            {
                "label": "connection-factory",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of a Connector Connection Factory resource.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "connection-factory",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cconnection-factory\u003e$1\u003c/connection-factory\u003e$0"
                }
            },
            {
                "label": "login-config",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The login-configType is used to configure the authentication method that should be used, the realm name that should be used for this application, and the attributes that are needed by the form login mechanism. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "login-config",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003clogin-config\u003e$1\u003c/login-config\u003e$0"
                }
            },
            {
                "label": "jms-destination",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of a JMS Destination.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "jms-destination",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cjms-destination\u003e$1\u003c/jms-destination\u003e$0"
                }
            },
            {
                "label": "resource-env-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The resource-env-refType is used to define resource-env-ref elements. It contains a declaration of a Deployment Component\u0027s reference to an administered object associated with a resource in the Deployment Component\u0027s environment. It consists of an optional description, the resource environment reference name, and an optional indication of the resource environment reference type expected by the Deployment Component code. It also includes optional elements to define injection of the named resource into fields or JavaBeans properties. The resource environment type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target. Example: jms/StockQueue javax.jms.Queue\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "resource-env-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cresource-env-ref\u003e$1\u003c/resource-env-ref\u003e$0"
                }
            },
            {
                "label": "persistence-context-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The persistence-context-ref element contains a declaration of Deployment Component\u0027s reference to a persistence context associated within a Deployment Component\u0027s environment. It consists of: - an optional description - the persistence context reference name - an optional persistence unit name. If not specified, the default persistence unit is assumed. - an optional specification as to whether the persistence context type is Transaction or Extended. If not specified, Transaction is assumed. - an optional specification as to whether the persistence context synchronization with the current transaction is Synchronized or Unsynchronized. If not specified, Synchronized is assumed. - an optional list of persistence properties - optional injection targets Examples: myPersistenceContextmyPersistenceContext PersistenceUnit1 Extended\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "persistence-context-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cpersistence-context-ref\u003e$1\u003c/persistence-context-ref\u003e$0"
                }
            },
            {
                "label": "servlet-mapping",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The servlet-mappingType defines a mapping between a servlet and a url pattern. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "servlet-mapping",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cservlet-mapping\u003e$1\u003c/servlet-mapping\u003e$0"
                }
            },
            {
                "label": "ejb-local-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The ejb-local-refType is used by ejb-local-ref elements for the declaration of a reference to an enterprise bean\u0027s local home or to the local business interface of a 3.0 bean. The declaration consists of: - an optional description - the EJB reference name used in the code of the Deployment Component that\u0027s referencing the enterprise bean. - the optional expected type of the referenced enterprise bean - the optional expected local interface of the referenced enterprise bean or the local business interface of the referenced enterprise bean. - the optional expected local home interface of the referenced enterprise bean. Not applicable if this ejb-local-ref refers to the local business interface of a 3.0 bean. - optional ejb-link information, used to specify the referenced enterprise bean - optional elements to define injection of the named enterprise bean into a component field or property.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "ejb-local-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cejb-local-ref\u003e$1\u003c/ejb-local-ref\u003e$0"
                }
            },
            {
                "label": "ejb-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The ejb-refType is used by ejb-ref elements for the declaration of a reference to an enterprise bean\u0027s home or to the remote business interface of a 3.0 bean. The declaration consists of: - an optional description - the EJB reference name used in the code of the Deployment Component that\u0027s referencing the enterprise bean. - the optional expected type of the referenced enterprise bean - the optional remote interface of the referenced enterprise bean or the remote business interface of the referenced enterprise bean - the optional expected home interface of the referenced enterprise bean. Not applicable if this ejb-ref refers to the remote business interface of a 3.0 bean. - optional ejb-link information, used to specify the referenced enterprise bean - optional elements to define injection of the named enterprise bean into a component field or property\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "ejb-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cejb-ref\u003e$1\u003c/ejb-ref\u003e$0"
                }
            },
            {
                "label": "data-source",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of a DataSource.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "data-source",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdata-source\u003e$1\u003c/data-source\u003e$0"
                }
            },
            {
                "label": "administered-object",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "Configuration of an administered object.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "administered-object",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cadministered-object\u003e$1\u003c/administered-object\u003e$0"
                }
            },
            {
                "label": "message-destination-ref",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "[ The message-destination-ref element contains a declaration of Deployment Component\u0027s reference to a message destination associated with a resource in Deployment Component\u0027s environment. It consists of: - an optional description - the message destination reference name - an optional message destination type - an optional specification as to whether the destination is used for consuming or producing messages, or both. if not specified, \"both\" is assumed. - an optional link to the message destination - optional injection targets The message destination type must be supplied unless an injection target is specified, in which case the type of the target is used. If both are specified, the type must be assignment compatible with the type of the injection target. Examples: jms/StockQueue javax.jms.Queue Consumes CorporateStocks\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "message-destination-ref",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cmessage-destination-ref\u003e$1\u003c/message-destination-ref\u003e$0"
                }
            },
            {
                "label": "servlet",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The servletType is used to declare a servlet. It contains the declarative data of a servlet. If a jsp-file is specified and the load-on-startup element is present, then the JSP should be precompiled and loaded. Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "servlet",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cservlet\u003e$1\u003c/servlet\u003e$0"
                }
            },
            {
                "label": "deny-uncovered-http-methods",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "When specified, this element causes uncovered http methods to be denied. For every url-pattern that is the target of a security-constrant, this element causes all HTTP methods that are NOT covered (by a security constraint) at the url-pattern to be denied.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "deny-uncovered-http-methods",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdeny-uncovered-http-methods /\u003e$0"
                }
            },
            {
                "label": "jsp-config",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The jsp-configType is used to provide global configuration information for the JSP files in a web application. It has two subelements, taglib and jsp-property-group.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "jsp-config",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cjsp-config\u003e$1\u003c/jsp-config\u003e$0"
                }
            },
            {
                "label": "distributable",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "This type is used to designate an empty element when used.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "distributable",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cdistributable /\u003e$0"
                }
            },
            {
                "label": "security-constraint",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The security-constraintType is used to associate security constraints with one or more web resource collections Used in: web-app\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "security-constraint",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003csecurity-constraint\u003e$1\u003c/security-constraint\u003e$0"
                }
            },
            {
                "label": "env-entry",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The env-entryType is used to declare an application\u0027s environment entry. The declaration consists of an optional description, the name of the environment entry, a type (optional if the value is injected, otherwise required), and an optional value. It also includes optional elements to define injection of the named resource into fields or JavaBeans properties. If a value is not specified and injection is requested, no injection will occur and no entry of the specified name will be created. This allows an initial value to be specified in the source code without being incorrectly changed when no override has been specified. If a value is not specified and no injection is requested, a value must be supplied during deployment. This type is used by env-entry elements.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "env-entry",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cenv-entry\u003e$1\u003c/env-entry\u003e$0"
                }
            },
            {
                "label": "pre-destroy",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The lifecycle-callback type specifies a method on a class to be called when a lifecycle event occurs. Note that each class may have only one lifecycle callback method for any given event and that the method may not be overloaded. If the lifefycle-callback-class element is missing then the class defining the callback is assumed to be the component class in scope at the place in the descriptor in which the callback definition appears.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "pre-destroy",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cpre-destroy\u003e$1\u003c/pre-destroy\u003e$0"
                }
            },
            {
                "label": "locale-encoding-mapping-list",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The locale-encoding-mapping-list contains one or more locale-encoding-mapping(s).\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "locale-encoding-mapping-list",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003clocale-encoding-mapping-list\u003e$1\u003c/locale-encoding-mapping-list\u003e$0"
                }
            },
            {
                "label": "icon",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The icon type contains small-icon and large-icon elements that specify the file names for small and large GIF, JPEG, or PNG icon images used to represent the parent element in a GUI tool. The xml:lang attribute defines the language that the icon file names are provided in. Its value is \"en\" (English) by default.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "icon",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cicon\u003e$1\u003c/icon\u003e$0"
                }
            },
            {
                "label": "web:web-app",
                "kind": 10,
                "documentation": {
                    "kind": "markdown",
                    "value": "The web-app element is the root of the deployment descriptor for a web application. Note that the sub-elements of this element can be in the arbitrary order. Because of that, the multiplicity of the elements of distributable, session-config, welcome-file-list, jsp-config, login-config, and locale-encoding-mapping-list was changed from \"?\" to \"*\" in this schema. However, the deployment descriptor instance file must not contain multiple elements of session-config, jsp-config, and login-config. When there are multiple elements of welcome-file-list or locale-encoding-mapping-list, the container must concatenate the element contents. The multiple occurence of the element distributable is redundant and the container treats that case exactly in the same way when there is only one distributable.\r\n\r\nSource: [web-app_4_0.xsd](file:/C:/Users/azerr/eclipse-workspace2/.metadata/.plugins/org.eclipse.pde.core/Eclipse%20Application/org.eclipse.osgi/538/0/.cp/dtdsAndSchemas/web-app_4_0.xsd)"
                },
                "filterText": "web:web-app",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003cweb:web-app version\u003d\"${1|4.0|}\"\u003e$2\u003c/web:web-app\u003e$0"
                }
            },
            {
                "label": "#region",
                "kind": 15,
                "documentation": "Insert Folding Region Start",
                "sortText": "za",
                "filterText": "  ",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003c!-- #region $1--\u003e"
                }
            },
            {
                "label": "#endregion",
                "kind": 15,
                "documentation": "Insert Folding Region End",
                "sortText": "zb",
                "filterText": "  ",
                "insertTextFormat": 1,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003c!-- #endregion--\u003e"
                }
            },
            {
                "label": "\u003c![CDATA[",
                "kind": 15,
                "detail": "Insert CDATA",
                "documentation": {
                    "kind": "markdown",
                    "value": "\r\n```\r\n\u003c![CDATA[ ]]\u003e\r\n```\r\n"
                },
                "sortText": "ZZb",
                "filterText": "\u003c![CDATA[",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003c![CDATA[ $1]]\u003e"
                }
            },
            {
                "label": "\u003c!--",
                "kind": 15,
                "detail": "Insert Comment",
                "documentation": {
                    "kind": "markdown",
                    "value": "\r\n```\r\n\u003c!-- --\u003e\r\n```\r\n"
                },
                "sortText": "ZZa",
                "filterText": "\u003c!--",
                "insertTextFormat": 2,
                "textEdit": {
                    "range": {
                        "start": {
                            "line": 6,
                            "character": 2
                        },
                        "end": {
                            "line": 6,
                            "character": 2
                        }
                    },
                    "newText": "\u003c!-- $1--\u003e"
                }
            }
        ]
    }
}
angelozerr commented 2 years ago

For using WTP XML catalog correctly with completion (in other words no XSD should be downloaded in .lemminx cache folder), see Resolve uri as system with XML catalog #1199

angelozerr commented 2 years ago

@mickaelistria I have the impression that JSON response is too large. I have this statcktrace

java.util.concurrent.ExecutionException: org.eclipse.lsp4j.jsonrpc.MessageIssueException: Message could not be parsed.
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
    at org.eclipse.lsp4e.operations.completion.LSContentAssistProcessor.computeCompletionProposals(LSContentAssistProcessor.java:106)
    at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$10(AsyncCompletionProposalPopup.java:352)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
    at org.eclipse.jface.text.contentassist.AsyncCompletionProposalPopup.lambda$9(AsyncCompletionProposalPopup.java:351)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.eclipse.lsp4j.jsonrpc.MessageIssueException: Message could not be parsed.
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponseIssues(RemoteEndpoint.java:358)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handle(RemoteEndpoint.java:317)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:198)
    at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
    at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:113)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
angelozerr commented 2 years ago

Ok I find the problem, it's a LSP4J problem, I created the issue https://github.com/eclipse/lsp4j/issues/616

By waiting a fix I will replace special character “ with "

UPDATE : it is a problem by using a Launch, so please ignore my comments.

angelozerr commented 2 years ago

My PR https://github.com/eclipse/lemminx/pull/1200 should fix all problems when it will be integrated in WWD:

It is because my PR can use now all XSD / DTD declared in the WTP XML catalog and it should never download those web-app XSD in .lemminx cache.

BUT when you have not this catalog, the issues will exist again:

angelozerr commented 2 years ago

I close this issue because the issue should be fixed (completion should work now) when lemminx uses the WTP XML catalog. This issue should be fixed with https://github.com/eclipse/lemminx/issues/1199.

When XML catalog is not used there are a problem with some download (it is for some web-app XSD version). I created the issue for taht at https://github.com/eclipse/lemminx/issues/1207