[Jsxe-cvs] SF.net SVN: jsxe: [1249] branches/sourceview2
Status: Inactive
Brought to you by:
ian_lewis
From: <ian...@us...> - 2006-09-07 00:14:33
|
Revision: 1249 http://svn.sourceforge.net/jsxe/?rev=1249&view=rev Author: ian_lewis Date: 2006-09-06 17:14:29 -0700 (Wed, 06 Sep 2006) Log Message: ----------- Updated to use new XMLDocument property methods Modified Paths: -------------- branches/sourceview2/Changelog branches/sourceview2/src/sourceview/SourceView.java Modified: branches/sourceview2/Changelog =================================================================== --- branches/sourceview2/Changelog 2006-09-07 00:12:34 UTC (rev 1248) +++ branches/sourceview2/Changelog 2006-09-07 00:14:29 UTC (rev 1249) @@ -1,6 +1,7 @@ 09/06/2006 Ian Lewis <Ian...@me...> * Updated to not use show() method since it's deprecated. + * Updated to use new XMLDocument property methods. 08/31/2006 Ian Lewis <Ian...@me...> Modified: branches/sourceview2/src/sourceview/SourceView.java =================================================================== --- branches/sourceview2/src/sourceview/SourceView.java 2006-09-07 00:12:34 UTC (rev 1248) +++ branches/sourceview2/src/sourceview/SourceView.java 2006-09-07 00:14:29 UTC (rev 1249) @@ -289,7 +289,7 @@ m_textarea.setDocument(new SourceViewDocument(m_document)); m_textarea.setTokenMarker(new XMLTokenMarker()); try { - m_textarea.getDocument().putProperty(PlainDocument.tabSizeAttribute, Integer.valueOf(document.getProperty(XMLDocument.INDENT, "4"))); + m_textarea.getDocument().putProperty(PlainDocument.tabSizeAttribute, new Integer(document.getIntegerProperty(XMLDocument.INDENT, 4))); } catch (NumberFormatException e) { Log.log(Log.WARNING, this, e.getMessage()); } @@ -314,7 +314,7 @@ public void propertyChanged(XMLDocument source, String key, String oldValue) { if (key.equals(XMLDocument.INDENT)) { try { - m_textarea.getDocument().putProperty(PlainDocument.tabSizeAttribute, Integer.valueOf(source.getProperty(XMLDocument.INDENT, "4"))); + m_textarea.getDocument().putProperty(PlainDocument.tabSizeAttribute, new Integer(source.getIntegerProperty(XMLDocument.INDENT, 4))); m_textarea.updateUI(); } catch (NumberFormatException e) { Log.log(Log.WARNING, this, e.getMessage()); @@ -355,7 +355,7 @@ //{{{ getLastIndent() private String getLastIndent() { - boolean softTabs = Boolean.valueOf(m_document.getProperty(XMLDocument.IS_USING_SOFT_TABS, "false")).booleanValue(); + boolean softTabs = m_document.getBooleanProperty(XMLDocument.IS_USING_SOFT_TABS); int tabWidth = Integer.parseInt(m_document.getProperty(XMLDocument.INDENT)); int line = m_textarea.getCaretLine(); @@ -393,7 +393,7 @@ } - boolean softTabs = Boolean.valueOf(m_document.getProperty(XMLDocument.IS_USING_SOFT_TABS, "false")).booleanValue(); + boolean softTabs = m_document.getBooleanProperty(XMLDocument.IS_USING_SOFT_TABS); if (softTabs) { try { int indent = Integer.parseInt(m_document.getProperty(XMLDocument.INDENT)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |