public void modifyText(ModifyEvent e) { Object oSource = e.getSource(); this.bEnableEvents = false; if (oSource.equals(txtDatePattern)) { if (!(formatspecifier instanceof JavaDateFormatSpecifier)) { formatspecifier = JavaDateFormatSpecifierImpl.create(""); } ((JavaDateFormatSpecifier) formatspecifier).setPattern(txtDatePattern.getText()); } else if (oSource.equals(txtPrefix)) { if (!(formatspecifier instanceof NumberFormatSpecifier)) { formatspecifier = NumberFormatSpecifierImpl.create(); ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText()); ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue()); try { String str = txtMultiplier.getText(); if (str.length() > 0) { ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(str).doubleValue()); } else { ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE .getNumberFormatSpecifier_Multiplier()); } } catch (NumberFormatException e1 ) {  e1.printStackTrace(); } } ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText()); } else if (oSource.equals(txtSuffix)) { if (!(formatspecifier instanceof NumberFormatSpecifier)) { formatspecifier = NumberFormatSpecifierImpl.create(); ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText()); ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue()); try { String str = txtMultiplier.getText(); if (str.length() > 0) { ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(str).doubleValue()); } else { ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE .getNumberFormatSpecifier_Multiplier()); } } catch (NumberFormatException e1 ) {  e1.printStackTrace(); } } ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText()); } else if (oSource.equals(txtMultiplier)) { if (!(formatspecifier instanceof NumberFormatSpecifier)) { formatspecifier = NumberFormatSpecifierImpl.create(); ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText()); ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText()); ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue()); } try { if ("".equals(txtMultiplier.getText())) { ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE .getNumberFormatSpecifier_Multiplier()); } else { ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(txtMultiplier.getText()) .doubleValue()); } } catch (NumberFormatException e1 ) {  e1.printStackTrace(); } } else if (oSource.equals(txtAdvMultiplier)) { if (!(formatspecifier instanceof JavaNumberFormatSpecifier)) { formatspecifier = JavaNumberFormatSpecifierImpl.create(txtNumberPattern.getText()); } try { if ("".equals(txtAdvMultiplier.getText())) { ((JavaNumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE .getJavaNumberFormatSpecifier_Multiplier()); } else { ((JavaNumberFormatSpecifier) formatspecifier).setMultiplier(new Double(txtAdvMultiplier.getText()) .doubleValue()); } } catch (NumberFormatException e1 ) {  e1.printStackTrace(); } } else if (oSource.equals(txtNumberPattern)) { if (!(formatspecifier instanceof JavaNumberFormatSpecifier)) { formatspecifier = JavaNumberFormatSpecifierImpl.create(""); } ((JavaNumberFormatSpecifier) formatspecifier).setPattern(txtNumberPattern.getText()); } this.bEnableEvents = true; }
public void modifyText( ModifyEvent e ) { Object oSource = e.getSource( ); this.bEnableEvents = false; if ( oSource.equals( txtDatePattern ) ) { if ( !( formatspecifier instanceof JavaDateFormatSpecifier ) ) { formatspecifier = JavaDateFormatSpecifierImpl.create( "" ); } ( (JavaDateFormatSpecifier) formatspecifier ).setPattern( txtDatePattern.getText( ) ); } else if ( oSource.equals( txtPrefix ) ) { if ( !( formatspecifier instanceof NumberFormatSpecifier ) ) { formatspecifier = NumberFormatSpecifierImpl.create( ); ( (NumberFormatSpecifier) formatspecifier ).setSuffix( txtSuffix.getText( ) ); ( (NumberFormatSpecifier) formatspecifier ).setFractionDigits( iscFractionDigits.getValue( ) ); try { String str = txtMultiplier.getText( ); if ( str.length( ) > 0 ) { ( (NumberFormatSpecifier) formatspecifier ).setMultiplier( new Double( str ).doubleValue( ) ); } else { ( (NumberFormatSpecifier) formatspecifier ).eUnset( AttributePackage.eINSTANCE.getNumberFormatSpecifier_Multiplier( ) ); } } catch ( NumberFormatException e1 ) { handleFormatError( txtMultiplier.getText( ) ); } } ( (NumberFormatSpecifier) formatspecifier ).setPrefix( txtPrefix.getText( ) ); } else if ( oSource.equals( txtSuffix ) ) { if ( !( formatspecifier instanceof NumberFormatSpecifier ) ) { formatspecifier = NumberFormatSpecifierImpl.create( ); ( (NumberFormatSpecifier) formatspecifier ).setPrefix( txtPrefix.getText( ) ); ( (NumberFormatSpecifier) formatspecifier ).setFractionDigits( iscFractionDigits.getValue( ) ); try { String str = txtMultiplier.getText( ); if ( str.length( ) > 0 ) { ( (NumberFormatSpecifier) formatspecifier ).setMultiplier( new Double( str ).doubleValue( ) ); } else { ( (NumberFormatSpecifier) formatspecifier ).eUnset( AttributePackage.eINSTANCE.getNumberFormatSpecifier_Multiplier( ) ); } } catch ( NumberFormatException e1 ) { handleFormatError( txtMultiplier.getText( ) ); } } ( (NumberFormatSpecifier) formatspecifier ).setSuffix( txtSuffix.getText( ) ); } else if ( oSource.equals( txtMultiplier ) ) { if ( !( formatspecifier instanceof NumberFormatSpecifier ) ) { formatspecifier = NumberFormatSpecifierImpl.create( ); ( (NumberFormatSpecifier) formatspecifier ).setPrefix( txtPrefix.getText( ) ); ( (NumberFormatSpecifier) formatspecifier ).setSuffix( txtSuffix.getText( ) ); ( (NumberFormatSpecifier) formatspecifier ).setFractionDigits( iscFractionDigits.getValue( ) ); } try { if ( "".equals( txtMultiplier.getText( ) ) ) { ( (NumberFormatSpecifier) formatspecifier ).eUnset( AttributePackage.eINSTANCE.getNumberFormatSpecifier_Multiplier( ) ); } else { ( (NumberFormatSpecifier) formatspecifier ).setMultiplier( new Double( txtMultiplier.getText( ) ).doubleValue( ) ); } } catch ( NumberFormatException e1 ) { handleFormatError( txtMultiplier.getText( ) ); } } else if ( oSource.equals( txtAdvMultiplier ) ) { if ( !( formatspecifier instanceof JavaNumberFormatSpecifier ) ) { formatspecifier = JavaNumberFormatSpecifierImpl.create( txtNumberPattern.getText( ) ); } try { if ( "".equals( txtAdvMultiplier.getText( ) ) ) { ( (JavaNumberFormatSpecifier) formatspecifier ).eUnset( AttributePackage.eINSTANCE.getJavaNumberFormatSpecifier_Multiplier( ) ); } else { ( (JavaNumberFormatSpecifier) formatspecifier ).setMultiplier( new Double( txtAdvMultiplier.getText( ) ).doubleValue( ) ); } } catch ( NumberFormatException e1 ) { handleFormatError( txtAdvMultiplier.getText( ) ); } } else if ( oSource.equals( txtNumberPattern ) ) { if ( !( formatspecifier instanceof JavaNumberFormatSpecifier ) ) { formatspecifier = JavaNumberFormatSpecifierImpl.create( "" ); } ( (JavaNumberFormatSpecifier) formatspecifier ).setPattern( txtNumberPattern.getText( ) ); } this.bEnableEvents = true; }
    public void modifyText(ModifyEvent e)    {        Object oSource = e.getSource();        this.bEnableEvents = false;        if (oSource.equals(txtDatePattern))        {            if (!(formatspecifier instanceof JavaDateFormatSpecifier))            {                formatspecifier = JavaDateFormatSpecifierImpl.create(""); //$NON-NLS-1$            }            ((JavaDateFormatSpecifier) formatspecifier).setPattern(txtDatePattern.getText());        }        else if (oSource.equals(txtPrefix))        {            if (!(formatspecifier instanceof NumberFormatSpecifier))            {                formatspecifier = NumberFormatSpecifierImpl.create();                ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText());                ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue());                try                {                    String str = txtMultiplier.getText();                    if (str.length() > 0)                    {                        ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(str).doubleValue());                    }                    else                    {                        ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE                            .getNumberFormatSpecifier_Multiplier());                    }                }                catch (NumberFormatException e1 )                {                    // TODO Auto-generated catch block                    e1.printStackTrace();                }            }            ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText());        }        else if (oSource.equals(txtSuffix))        {            if (!(formatspecifier instanceof NumberFormatSpecifier))            {                formatspecifier = NumberFormatSpecifierImpl.create();                ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText());                ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue());                try                {                    String str = txtMultiplier.getText();                    if (str.length() > 0)                    {                        ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(str).doubleValue());                    }                    else                    {                        ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE                            .getNumberFormatSpecifier_Multiplier());                    }                }                catch (NumberFormatException e1 )                {                    // TODO Auto-generated catch block                    e1.printStackTrace();                }            }            ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText());        }        else if (oSource.equals(txtMultiplier))        {            if (!(formatspecifier instanceof NumberFormatSpecifier))            {                formatspecifier = NumberFormatSpecifierImpl.create();                ((NumberFormatSpecifier) formatspecifier).setPrefix(txtPrefix.getText());                ((NumberFormatSpecifier) formatspecifier).setSuffix(txtSuffix.getText());                ((NumberFormatSpecifier) formatspecifier).setFractionDigits(iscFractionDigits.getValue());            }            try            {                if ("".equals(txtMultiplier.getText())) //$NON-NLS-1$                {                    ((NumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE                        .getNumberFormatSpecifier_Multiplier());                }                else                {                    ((NumberFormatSpecifier) formatspecifier).setMultiplier(new Double(txtMultiplier.getText())                        .doubleValue());                }            }            catch (NumberFormatException e1 )            {                // TODO Auto-generated catch block                e1.printStackTrace();            }        }        else if (oSource.equals(txtAdvMultiplier))        {            if (!(formatspecifier instanceof JavaNumberFormatSpecifier))            {                formatspecifier = JavaNumberFormatSpecifierImpl.create(txtNumberPattern.getText());            }            try            {                if ("".equals(txtAdvMultiplier.getText())) //$NON-NLS-1$                {                    ((JavaNumberFormatSpecifier) formatspecifier).eUnset(AttributePackage.eINSTANCE                        .getJavaNumberFormatSpecifier_Multiplier());                }                else                {                    ((JavaNumberFormatSpecifier) formatspecifier).setMultiplier(new Double(txtAdvMultiplier.getText())                        .doubleValue());                }            }            catch (NumberFormatException e1 )            {                // TODO Auto-generated catch block                e1.printStackTrace();            }        }        else if (oSource.equals(txtNumberPattern))        {            if (!(formatspecifier instanceof JavaNumberFormatSpecifier))            {                formatspecifier = JavaNumberFormatSpecifierImpl.create(""); //$NON-NLS-1$            }            ((JavaNumberFormatSpecifier) formatspecifier).setPattern(txtNumberPattern.getText());        }        this.bEnableEvents = true;    }