Platform Specific NewLine Character for a SqlDeveloper Extension


 
    oracle.dbtools.util.Util.getIdeNewLineChar();

The Util class (currently located at ...\Oracle Sql Developer 1.5\sqldeveloper\lib\oracle.sqldeveloper.utils.jar) provides this method which essentially gets the Line Terminator from the IDE environment options...

    int i = oracle.ide.config.EnvironOptions.getLineTerminator()

...and based on the result, returns one of the following:

    EOL_PLATFORM:  0 java.lang.System.getProperty("line.separator")
    EOL_WINDOWS:   1 "\r\n"
    EOL_UNIX:      2 "\n"
    EOL_MACINTOSH: 3 "\r"

5/13/2008 | Comments (0) in SqlDeveloper
Email

Related posts