Package org.eclipse.jst.jsf.context.symbol

Examples of org.eclipse.jst.jsf.context.symbol.IComponentSymbol


        final Map mapSource = ResourceBundleMapSourceFactory
            .getResourceBundleMapSource(project, basename);
        final IMapTypeDescriptor typeDesc =
            SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
        typeDesc.setMapSource(mapSource);
        final IComponentSymbol symbol =
            SymbolFactory.eINSTANCE.createIComponentSymbol();
        symbol.setName(name);
        symbol.setTypeDescriptor(typeDesc);
        symbol.setDetailedDescription(Messages.getString("ResourceBundleSymbolSourceProvider.DetailedDescription")+basename+"</i>")//$NON-NLS-1$//$NON-NLS-2$
        return symbol;
    }
View Full Code Here


        return symbol;
    }

    //Bug 306811 - Invalid error "messages not found in classpath for project"
    private ISymbol createSymbolForResourceBundleInJAR(IProject project, final String name, final String basename) {
      IComponentSymbol symbol = null;
      InputStream in = null;
      try {
        final IStorage storage = LoadBundleUtil.getLoadBundleResource(project, basename);
        if (storage != null) {
          in = storage.getContents();
          Properties props = new Properties();
          props.load(in);
          final IMapTypeDescriptor typeDesc = SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
          typeDesc.setMapSource(props);
          symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
          symbol.setName(name);
          symbol.setTypeDescriptor(typeDesc);
          symbol.setDetailedDescription(Messages.getString("ResourceBundleSymbolSourceProvider.DetailedDescription") + basename + "</i>"); //$NON-NLS-1$ //$NON-NLS-2$
        }
      } catch(CoreException cex) {
        //fall through with null symbol
      } catch(IOException ioex) {
        //fall through with null symbol
View Full Code Here

                        ResourceBundleMapSourceFactory
                            .getResourceBundleMapSource(project, baseNameNode.getNodeValue());
                    final IMapTypeDescriptor typeDesc =
                        SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
                    typeDesc.setMapSource(source);
                    final IComponentSymbol symbol =
                        SymbolFactory.eINSTANCE.createIComponentSymbol();
                    symbol.setName(symbolName);
                    symbol.setTypeDescriptor(typeDesc);
                    symbol.setDetailedDescription(Messages.getString("JSPDefaultSymbolFactory.Resource.bundle.map.detailedDescription")+baseNameNode.getNodeValue()+"</i>"); //$NON-NLS-1$ //$NON-NLS-2$
                   
                    return symbol;
                }
                catch (IOException ioe)
                {
                    problems.add(new Status(IStatus.ERROR, JSFCorePlugin.PLUGIN_ID, 0,Messages.getString("JSPDefaultSymbolFactory.Problem.ErrorCreatingVariable"), ioe)); //$NON-NLS-1$
                }
                catch (JavaModelException jme)
                {
                    problems.add(new Status(IStatus.ERROR, JSFCorePlugin.PLUGIN_ID, 0,Messages.getString("JSPDefaultSymbolFactory.Problem.ErrorCreatingVariable"), jme)); //$NON-NLS-1$
                }
                catch (CoreException ce)
                {
                    problems.add(new Status(IStatus.ERROR, JSFCorePlugin.PLUGIN_ID, 0,Messages.getString("JSPDefaultSymbolFactory.Problem.ErrorCreatingVariable"), ce)); //$NON-NLS-1$
                }
               
                final IBoundedJavaTypeDescriptor typeDesc = SymbolFactory.eINSTANCE.createIBoundedJavaTypeDescriptor();
                typeDesc.setTypeSignatureDelegate( TypeConstants.TYPE_JAVAOBJECT );
                final IComponentSymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
                symbol.setName(symbolName);
                symbol.setTypeDescriptor(typeDesc);
                symbol.setDetailedDescription(Messages.getString("JSPDefaultSymbolFactory.Resource.bundle.map.detailedDescription")+baseNameNode.getNodeValue()+"</i>"); //$NON-NLS-1$ //$NON-NLS-2$
               
                return symbol;
            }
        }
        return null;
View Full Code Here

        final Map mapSource = ResourceBundleMapSourceFactory
            .getResourceBundleMapSource(project, basename);
        final IMapTypeDescriptor typeDesc =
            SymbolFactory.eINSTANCE.createIMapTypeDescriptor();
        typeDesc.setMapSource(mapSource);
        final IComponentSymbol symbol =
            SymbolFactory.eINSTANCE.createIComponentSymbol();
        symbol.setName(name);
        symbol.setTypeDescriptor(typeDesc);
        symbol.setDetailedDescription(Messages.getString("ResourceBundleSymbolSourceProvider.DetailedDescription")+basename+"</i>")//$NON-NLS-1$//$NON-NLS-2$
        return symbol;
    }
View Full Code Here

                    }
                }
            }
            else
            {
                final IComponentSymbol componentSymbol =
                    SymbolFactory.eINSTANCE.createIComponentSymbol();
                componentSymbol.setName(symbolName);

                updateMap(componentSymbol, aggregator.getScope());
            }
        }
    }
View Full Code Here

        {
            desc.setTypeSignatureDelegate(Signature.getTypeErasure(signature));
        }
        desc.getTypeParameterSignatures().addAll(Arrays.asList(Signature.getTypeArguments(signature)));

        IComponentSymbol symbol = SymbolFactory.eINSTANCE.createIComponentSymbol();
        symbol.setName(symbolName);
        symbol.setTypeDescriptor(desc);
        symbol.setRuntimeSource(ERuntimeSource.TAG_INSTANTIATED_SYMBOL_LITERAL);
        return symbol;
    }
View Full Code Here

       
        final IMapTypeDescriptor typeDesc =
            SymbolFactory.eINSTANCE.createIBoundedMapTypeDescriptor();
        // empty map source
        typeDesc.setMapSource(new HashMap());
        final IComponentSymbol symbol =
            SymbolFactory.eINSTANCE.createIComponentSymbol();
        symbol.setName(symbolName);
        symbol.setTypeDescriptor(typeDesc);
        symbol.setDetailedDescription(description);
        symbol.setRuntimeSource(source);
        return symbol;
    }
View Full Code Here

                    }
                }
            }
            else
            {
                final IComponentSymbol componentSymbol =
                    SymbolFactory.eINSTANCE.createIComponentSymbol();
                componentSymbol.setName(symbolName);

                updateMap(componentSymbol, aggregator.getScope());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.jsf.context.symbol.IComponentSymbol

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.