Package org.eclipse.jst.jsf.designtime.internal.view.model.jsp

Examples of org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace


        // so copy them all in. However, preserve anything in our own namespace
        // map not found in namespace
        for (final Map.Entry<String, TLDNamespace> namespaceEntry : namespace
                .entrySet())
        {
            final TLDNamespace ns = namespaceEntry.getValue();
            final String nsName = namespaceEntry.getKey();
            final SerializableTLDNamespace myNs = _namespaces.get(nsName);

            if (myNs == null)
            {
                if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE)
                {
                    JSFCoreTraceOptions.log(String.format(
                            "Adding namespace %s for project", ns.getNSUri(), //$NON-NLS-1$
                            _project.toString()));
                }

                _namespaces.put(nsName, new SerializableTLDNamespace(ns));
            }
            else
            {
                if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE)
                {
                    JSFCoreTraceOptions.log(String.format(
                            "Updating namespace %s for project", ns.getNSUri(), //$NON-NLS-1$
                            _project.toString()));
                }

                for (final Map.Entry<String, ITagElement> elementEntry : ns
                        .getCurrentElements().entrySet())
                {
                    if (JSFCoreTraceOptions.TRACE_JSPTAGPERSISTENCE)
                    {
                        JSFCoreTraceOptions.log(String.format(
View Full Code Here


            final CMDocumentFactoryTLD factory = new CMDocumentFactoryTLD();
            final TLDDocument doc = (TLDDocument) factory
                    .createCMDocument(tagRecord);
            if (doc != null)
            {
                final TLDNamespace ns = new TLDNamespace(doc, _resolver);
                _nsResolved.put(doc.getUri(), ns);
   
                if (fireEvent)
                {
                    fireEvent(new TagRegistryChangeEvent(this,
                            TagRegistryChangeEvent.EventType.ADDED_NAMESPACE,
                            Collections.singletonList(ns)));
                }

                if (JSFCoreTraceOptions.TRACE_JSPTAGREGISTRY_PERF)
                {
                    System.out.printf("Time to update namespace %s was %d\n", //$NON-NLS-1$
                            ns.getNSUri(), Long.valueOf(System.nanoTime()
                                    - startTime));
                }
                return ns;
            }
        }
View Full Code Here

    void remove(final ITaglibRecord tagRecord)
    {
        // this is safer, since we likely fail to create a TLDDocument for
        // a tagRecord that has been removed.
        final String uri = tagRecord.getDescriptor().getURI();
        final TLDNamespace ns = _nsResolved.remove(uri);

        if (ns != null)
        {
            fireEvent(new TagRegistryChangeEvent(this,
                    TagRegistryChangeEvent.EventType.REMOVED_NAMESPACE,
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.designtime.internal.view.model.jsp.TLDNamespace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.