mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-05 04:05:34 +00:00
Merge pull request #3 from nfi/cooja-messagelist-ui
Fixed more MessageListUI to respect visualized in Cooja
This commit is contained in:
commit
fb0607f0f8
@ -63,8 +63,6 @@ import org.contikios.cooja.avrmote.interfaces.MicaZLED;
|
||||
import org.contikios.cooja.avrmote.interfaces.MicaZRadio;
|
||||
import org.contikios.cooja.dialogs.CompileContiki;
|
||||
import org.contikios.cooja.dialogs.MessageList;
|
||||
import org.contikios.cooja.dialogs.MessageListText;
|
||||
import org.contikios.cooja.dialogs.MessageListUI;
|
||||
import org.contikios.cooja.dialogs.MessageContainer;
|
||||
import org.contikios.cooja.interfaces.Mote2MoteRelations;
|
||||
import org.contikios.cooja.interfaces.MoteAttributes;
|
||||
@ -366,7 +364,7 @@ public class MicaZMoteType implements MoteType {
|
||||
throw new MoteTypeCreationException("No identifier");
|
||||
}
|
||||
|
||||
final MessageList compilationOutput = visAvailable ? new MessageListUI() : new MessageListText();
|
||||
final MessageList compilationOutput = MessageContainer.createMessageList(visAvailable);
|
||||
|
||||
if (getCompileCommands() != null) {
|
||||
/* Handle multiple compilation commands one by one */
|
||||
|
@ -118,7 +118,7 @@ public abstract class AbstractMspMoteType extends MspMoteType {
|
||||
throw new MoteTypeCreationException("No identifier");
|
||||
}
|
||||
|
||||
final MessageList compilationOutput = visAvailable ? new MessageListUI() : new MessageListText();
|
||||
final MessageList compilationOutput = MessageContainer.createMessageList(visAvailable);
|
||||
|
||||
if (getCompileCommands() != null) {
|
||||
/* Handle multiple compilation commands one by one */
|
||||
|
@ -127,7 +127,7 @@ public class CompileContiki {
|
||||
/* TODO Fix me */
|
||||
final MessageList messageDialog;
|
||||
if (compilationOutput == null) {
|
||||
messageDialog = new MessageListUI();
|
||||
messageDialog = MessageContainer.createMessageList(true);
|
||||
} else {
|
||||
messageDialog = compilationOutput;
|
||||
}
|
||||
@ -138,8 +138,8 @@ public class CompileContiki {
|
||||
cmd += c + " ";
|
||||
}
|
||||
logger.info("> " + cmd);
|
||||
messageDialog.addMessage("", MessageListUI.NORMAL);
|
||||
messageDialog.addMessage("> " + cmd, MessageListUI.NORMAL);
|
||||
messageDialog.addMessage("", MessageList.NORMAL);
|
||||
messageDialog.addMessage("> " + cmd, MessageList.NORMAL);
|
||||
}
|
||||
|
||||
final Process compileProcess;
|
||||
@ -170,7 +170,7 @@ public class CompileContiki {
|
||||
String readLine;
|
||||
while ((readLine = processNormal.readLine()) != null) {
|
||||
if (messageDialog != null) {
|
||||
messageDialog.addMessage(readLine, MessageListUI.NORMAL);
|
||||
messageDialog.addMessage(readLine, MessageList.NORMAL);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
@ -203,7 +203,7 @@ public class CompileContiki {
|
||||
compileProcess.waitFor();
|
||||
} catch (Exception e) {
|
||||
messageDialog.addMessage(e.getMessage(), MessageList.ERROR);
|
||||
syncException.setCompilationOutput(new MessageListUI());
|
||||
syncException.setCompilationOutput(MessageContainer.createMessageList(true));
|
||||
syncException.fillInStackTrace();
|
||||
return;
|
||||
}
|
||||
@ -214,7 +214,7 @@ public class CompileContiki {
|
||||
if (onFailure != null) {
|
||||
onFailure.actionPerformed(null);
|
||||
}
|
||||
syncException.setCompilationOutput(new MessageListUI());
|
||||
syncException.setCompilationOutput(MessageContainer.createMessageList(true));
|
||||
syncException.fillInStackTrace();
|
||||
return;
|
||||
}
|
||||
@ -232,13 +232,13 @@ public class CompileContiki {
|
||||
if (onFailure != null) {
|
||||
onFailure.actionPerformed(null);
|
||||
}
|
||||
syncException.setCompilationOutput(new MessageListUI());
|
||||
syncException.setCompilationOutput(MessageContainer.createMessageList(true));
|
||||
syncException.fillInStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
messageDialog.addMessage("", MessageListUI.NORMAL);
|
||||
messageDialog.addMessage("Compilation succeded", MessageListUI.NORMAL);
|
||||
messageDialog.addMessage("", MessageList.NORMAL);
|
||||
messageDialog.addMessage("Compilation succeded", MessageList.NORMAL);
|
||||
if (onSuccess != null) {
|
||||
onSuccess.actionPerformed(null);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user