Examples of IStructuredDocumentContext


Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

    }
    return prefix;
  }

  private static boolean isTagDir(final String uri, final IDOMModel model) {
    final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(model.getStructuredDocument(), 0);
    if (context != null) {
      IFile file = StructuredModelUtil.getFileFor(model);
//      IWorkspaceContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context);
//      if (resolver != null) {
      if (file != null) {
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

   * @param model
   * @return true if model is a JSP contenttype
   */
  public static boolean isJSPModel(IDOMModel model) {   
    final IContentTypeManager typeManager = Platform.getContentTypeManager();
    final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(model.getStructuredDocument(), 0);
    final IWorkspaceContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context);
    final IFile file = (IFile)resolver.getResource();
        final IContentType contentType =
            typeManager.findContentTypeFor(file.getName());
       
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext



    private void refreshInternal(final IDOMModel model)
    {
        final IStructuredDocumentContext context =
            IStructuredDocumentContextFactory.INSTANCE.getContext(model.getStructuredDocument(), -1);
        final ITaglibContextResolver taglibResolver =
            IStructuredDocumentContextResolverFactory.INSTANCE.getTaglibContextResolver(context);
        final IDOMDocument document = model.getDocument();
        getApplicationMap().clear();
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

            final String symbolName = attribute.getNodeValue();

            if (factory != null)
            {
//                long curTime = System.currentTimeMillis();
                final IStructuredDocumentContext context =
                    IStructuredDocumentContextFactory.INSTANCE.
                        getContext(model.getStructuredDocument(),
                           attribute);

                if (factory.supports(context))
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

            final IDocument document)
    {
        if (mappedObject != null && _mappingService != null)
        {
            final String uri = _adapter.getNamespace(node, document);
            final IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE
                    .getContext(document, node);
            final ElementData elementData = XMLViewObjectMappingService
                    .createElementData(uri, node.getLocalName(), context,
                            attributeToProperties);
            //Bug 269050 - IllegalArgumentException in createMapping() method
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

        public Image getImage(Object element)
        {
            if (element instanceof ITagConverter)
            {
                final Element hostElement = ((ITagConverter)element).getHostElement();
                IStructuredDocumentContext context = IStructuredDocumentContextFactory2.INSTANCE.getContext(hostElement);
                if (context != null){                 
                  IWorkspaceContextResolver wsResolver  = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context);
                  if (wsResolver != null){
                    return TagImageManager.getInstance().getSmallIconImage((IFile)wsResolver.getResource(),"JSP11", ITLDConstants.URI_JSP + ":"+hostElement.getLocalName()); //$NON-NLS-1$ //$NON-NLS-2$
                  }
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

   * @return
   */
  private static Image getSharedHTMLImage(Element element) {
    Image image = null;
   
        IStructuredDocumentContext context = IStructuredDocumentContextFactory2.INSTANCE.getContext(element);
        if (context != null){  
          IWorkspaceContextResolver wsResolver  = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context);
          if (wsResolver != null){
            image = TagImageManager.getInstance().getSmallIconImage((IFile)wsResolver.getResource(),"HTML", element.getLocalName()); //$NON-NLS-1$
          }
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

  }
 
  private static IProject getProject(WPETabbedPropertySheetPage page) {
    IProject proj = null;
    IDocument doc = ((HTMLEditor)page.getEditor()).getDocument();
    IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(doc, 0);
    if (context != null){
      proj = IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context).getProject();
    }
    return proj;
    
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

      ed = (HTMLEditor)part;
    if (ed == null)
      return null;
   
    if (ed.getEditorInput() instanceof FileEditorInput) {
      IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(ed.getDocument(), node);
      if (context != null){
        ITaglibContextResolver resolver = IStructuredDocumentContextResolverFactory.INSTANCE.getTaglibContextResolver(context);
        if (resolver != null){
          return resolver.getTagURIForNodeName(node);
        }
View Full Code Here

Examples of org.eclipse.jst.jsf.context.structureddocument.IStructuredDocumentContext

   * @return tag entity for this attribute group
   */
  protected Entity getTagEntity() {
    if (_tagEntity == null) {
      if (_ownerElement != null){
        IStructuredDocumentContext context = IStructuredDocumentContextFactory.INSTANCE.getContext(_ownerElement.getStructuredDocument(), 0);
        if (context != null){
          String uri = _uri != null ? _uri : IStructuredDocumentContextResolverFactory.INSTANCE.getDOMContextResolver(context).getNode().getBaseURI();
          String tagName = _tagName != null ? _tagName :  IStructuredDocumentContextResolverFactory.INSTANCE.getDOMContextResolver(context).getNode().getNodeName();
          if (uri != null){
            IFile file = (IFile)IStructuredDocumentContextResolverFactory.INSTANCE.getWorkspaceContextResolver(context).getResource();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.