Examples of LocalizationService


Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

            {
                label = text;
            }
            else if( ! label.equals( text ) )
            {
                final LocalizationService localizationService = part().definition().adapt( LocalizationService.class );
                label = localizationService.transform( label, CapitalizationType.FIRST_WORD_ONLY, false );
            }
           
            if( label == null )
            {
                if( this.columnHandler.isEmptyTextLabelDesired( element ) )
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

    }
   
    private void facts( final SortedSet<String> facts,
                        final Fact fact )
    {
        final LocalizationService localization = context( PropertyDef.class ).getLocalizationService();
        facts.add( localization.text( fact.statement(), CapitalizationType.NO_CAPS, true ) );
    }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

            init( property.getBase(), content, topics );
        }
       
        if( docAnnotation != null )
        {
            final LocalizationService localization = property.getLocalizationService();
            final DocumentationMergeStrategy docMergeStrategy = docAnnotation.mergeStrategy();
            final String docAnnotationContent = localization.text( docAnnotation.content().trim(), CapitalizationType.NO_CAPS, false );
           
            if( docAnnotationContent.length() > 0 )
            {
                if( docMergeStrategy == DocumentationMergeStrategy.REPLACE || content.length() == 0 )
                {
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

        final ElementType type = context( ElementType.class );
        final Documentation docAnnotation = type.getAnnotation( Documentation.class );
       
        if( docAnnotation != null )
        {
            final LocalizationService localization = type.getLocalizationService();
            final String docAnnotationContent = localization.text( docAnnotation.content().trim(), CapitalizationType.NO_CAPS, false );
           
            if( docAnnotationContent.length() > 0 )
            {
                content.append( docAnnotationContent );
            }
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

            formData.top = new FormAttachment( 0, 0 );
            formData.bottom = new FormAttachment( 100, 0 );
           
            tabbedPropertiesComposite.setLayoutData( gdfill() );
           
            final LocalizationService localizationService = this.part.definition().adapt( LocalizationService.class );
            final List<PropertiesViewPagePart> pages = this.part.getPages();
            final List<PropertiesViewPagePart> visiblePages = new ArrayList<PropertiesViewPagePart>();
            final List<TabbedPropertyList.Item> elements = new ArrayList<TabbedPropertyList.Item>( pages.size() );
            final TabbedPropertyList list = tabbedPropertiesComposite.getList();
           
            final Map<PropertiesViewPagePart,TabbedPropertyList.Item> partToTabbedPropertyListItem
                = new HashMap<PropertiesViewPagePart,TabbedPropertyList.Item>();
           
            for( final PropertiesViewPagePart page : pages )
            {
                final int index;
               
                if( page.visible() )
                {
                    visiblePages.add( page );
                   
                    final MutableReference<ImageDescriptor> imageDescriptor = new MutableReference<ImageDescriptor>();
                    final MutableReference<Image> image = new MutableReference<Image>();
                   
                    final TabbedPropertyList.Item item = new TabbedPropertyList.Item()
                    {
                        public String getText()
                        {
                            return localizationService.transform( page.getLabel(), CapitalizationType.TITLE_STYLE, false );
                        }
   
                        public Image getImage()
                        {
                            final ImageDescriptor oldImageDescriptor = imageDescriptor.get();
View Full Code Here

Examples of org.eclipse.sapphire.modeling.localization.LocalizationService

        {
            label = keyword.toDisplayString();
        }
        else if( property.hasAnnotation( NamedValues.class ) )
        {
            final LocalizationService localization = property.getLocalizationService();
           
            for( final NamedValue x : property.getAnnotation( NamedValues.class ).namedValues() )
            {
                if( decoded.equals( x.value() ) )
                {
                    label = localization.text( x.label(), CapitalizationType.NO_CAPS, false ) + " (" + x.value() + ")";
                    break;
                }
            }
        }
       
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.