JBIDE-1494 was fixed.
Here some results of fixing this bug:
- for tag vpe:textFormatting was added attribute use-default-formats
- 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
- 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>
- 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