Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r164 - trunk: . src/config src/ise/antelope/common src/ise/antelope/plugin

antelope
Discussion topic

Error loading Ant:

" + e.getMessage() + "

Do you want to try again?", "Error Loading Ant", JOptionPane.YES_NO_OPTION ); Modified: trunk/src/ise/antelope/plugin/ConsolePluginHandler.java Url: http://antelope.tigris.org/source/browse/antelope/trunk/src/ise/antelope/plugin/ConsolePluginHandler.java?view=diff&pathrev=164&r1=163&r2=164 ============================================================================== --- trunk/src/ise/antelope/plugin/ConsolePluginHandler.java (original) +++ trunk/src/ise/antelope/plugin/ConsolePluginHandler.java 2009-05-18 05:40:17-0700 @@ -5,6 +5,7 @@ import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; +import javax.swing.SwingUtilities; import console.*; import errorlist.*; import org.gjt.sp.jedit.jEdit; @@ -25,8 +26,8 @@ private Console console = null; private AntelopeShell shell = null; private Color GREEN = new Color( 0, 153, 51 ); - private Color YELLOW = new Color(0xefef8f); - private Color RED = new Color(0xff4444); + private Color YELLOW = new Color( 0xefef8f ); + private Color RED = new Color( 0xff4444 ); private Color foreground; public ConsolePluginHandler( AntelopePluginPanel panel ) { @@ -34,7 +35,7 @@ view = panel.getView(); error_source = panel.getErrorSource(); setupConsole(); - foreground = jEdit.getColorProperty("view.fgColor"); + foreground = jEdit.getColorProperty( "view.fgColor" ); } public ConsolePluginHandler( View view, DefaultErrorSource es ) { @@ -54,7 +55,7 @@ } console.setShell( shell ); Font font = view.getEditPane().getTextArea().getPainter().getFont(); - console.getConsolePane().setFont(font); + console.getConsolePane().setFont( font ); } @@ -69,8 +70,8 @@ Ant writes to, so those messages end up here mixed with the Ant output. This may not be sufficient, but all I've seen so far are DockableWindowUpdate and ErrorSourceUpdate messages, so this regex works for now. */ - if (record.getMessage().matches("(.*)?(Update\\[)(.*)")) { - return; + if ( record.getMessage().matches( "(.*)?(Update\\[)(.*)" ) ) { + return ; } if ( _panel.getBuildFile() == null ) { return ; @@ -97,7 +98,7 @@ if ( _panel.useErrorParsing() ) { int type = ConsolePlugin.parseLine( view, parseline, dir, error_source ); - Output output = console.getOutput("Antelope"); + Output output = console.getOutput( "Antelope" ); switch ( type ) { case ErrorSource.ERROR: output.print( console.getErrorColor(), parseline ); @@ -109,12 +110,18 @@ // fall through on purpose } } - console.getOutput("Antelope").print( getColorForLevel( record.getLevel() ), parseline ); + console.getOutput( "Antelope" ).print( getColorForLevel( record.getLevel() ), parseline ); } public void showConsole( ) { - DockableWindowManager mgr = view.getDockableWindowManager(); - mgr.showDockableWindow( "console" ); + SwingUtilities.invokeLater( + new Runnable() { + public void run() { + DockableWindowManager mgr = view.getDockableWindowManager(); + mgr.showDockableWindow( "console" ); + } + } + ); } public AntelopeShell getShell() { @@ -144,4 +151,4 @@ public void close() { // does nothing } -} +} \ No newline at end of file

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r164 - trunk: . src/config src/ise/antelope/common src/ise/antelope/plugin danson Dale Anson 2009-05-18 05:40:18 PDT
Messages per page: