[jbosstools-dev] TextFormatting tag should have default behavior, now it is used as copy everywhere(JBIDE-1494)

Max Areshkau mareshkau at exadel.com
Fri Mar 28 15:31:57 EDT 2008


JBIDE-1494 was fixed.
Here some results of fixing this bug:

   1.  for tag *vpe:textFormatting* was added attribute
      /use-default-formats/

   2.  if user specify /<vpe:textFormatting use-default-formats="yes">,/
      than formats which    specified in file
      org.jboss.tools.vpe/resources/textFormatting.xml will be added as
      formats for template
   3. Now in org.jboss.tools.vpe/resources/textFormatting.xml are
      specified following formats as default:

    /   <vpe:format type="UnderlineFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="BoldFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="ItalicFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="FontNameFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="FontSizeFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="BackgroundColorFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
    <vpe:format type="ForegroundColorFormat">
        <vpe:formatAttribute type="style" />
    </vpe:format>
/

   4. Some Examples of using:

    *              <!--Simply adds to template default formats -->

/                <vpe:textFormatting use-default-formats="yes">
                </vpe:textFormatting>/

    *              <!-- Doesn't uses default formats, here simply will
      be available only one format -->

/                 <vpe:textFormatting>
               <vpe:format type="UnderlineFormat">
                    <vpe:formatAttribute type="style" />
                </vpe:format>
                </vpe:textFormatting>/

    *           <!--Uses default format  and adds own formats you can
      see template for 'span'-->

/            <vpe:textFormatting use-default-formats="yes">
                <vpe:format type="BlockFormat" addChildren="allow" 
handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" 
/>
                <vpe:format type="BoldFormat">
                    <vpe:formatAttribute type="style" />
                </vpe:format>
             </vpe:textFormatting>/

    *           <!--  If use-default-formats="yes" and format with some
      type exist in local definition, than will be used format from
      local definition of formats-->

              <vpe:textFormatting use-default-formats="yes">
                <vpe:format type="BlockFormat" addChildren="allow" 
handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" 
/>
                <vpe:format type="BoldFormat">
                    <vpe:formatAttribute type="style" />
                </vpe:format>
                <vpe:format type="UnderlineFormat" addChildren="allow" 
handler="org.jboss.tools.vpe.editor.toolbar.format.handler.UnderlineFormatHandler" 
/>
                <vpe:format type="UnderlineFormat"> *<!-- will be used 
this definition but not  format from default formats -->*
                    <vpe:formatAttribute type="style" />
                </vpe:format>
                <vpe:format type="ItalicFormat" addChildren="allow" 
handler="org.jboss.tools.vpe.editor.toolbar.format.handler.ItalicFormatHandler" 
/>               
                <vpe:format type="ItalicFormat">
                    <vpe:formatAttribute type="style" />
                </vpe:format>
            </vpe:textFormatting>

    * For mare examples you can see tempates configuration files like
      vpe-templates-html.xml


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20080328/59bbb342/attachment.html 


More information about the jbosstools-dev mailing list