tmf: lttngControl: show error output first when handling error
authorJonathan Rajotte Julien <jonathan.rajotte-julien@ericsson.com>
Mon, 11 Aug 2014 17:07:35 +0000 (13:07 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Wed, 27 Aug 2014 15:35:03 +0000 (11:35 -0400)
This make sure that event in machine interface mode the error are
positioned first and are visible. Mi generate a lot of data and can
saturate the information dialog.

This also cut the need to do after execution checkup and error processing into the
new MI service Controller. If in the future post processing is necessary
one could override the function and do the post-processing.

Change-Id: I96f4f1a97745ed6048a180bfde3681ebc1ac0351
Signed-off-by: Jonathan Rajotte Julien <jonathan.rajotte-julien@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/31395
Tested-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/service/LTTngControlService.java
org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/service/LTTngControlServiceConstants.java
org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/service/LTTngControlServiceMI.java

index 9a85d2fe2b550cf4e88935d39a0dcab5734196b2..75a87ab01367a5a23eda9474f6698cc3fdc67f27 100644 (file)
@@ -1112,16 +1112,16 @@ public class LTTngControlService implements ILttngControlService {
         String[] output = result.getOutput();
         String[] errorOutput = result.getErrorOutput();
         StringBuffer ret = new StringBuffer();
+        ret.append("Error Ouptut:\n"); //$NON-NLS-1$
+        for (int i = 0; i < errorOutput.length; i++) {
+           ret.append(errorOutput[i]).append("\n"); //$NON-NLS-1$
+        }
         ret.append("Return Value: "); //$NON-NLS-1$
         ret.append(result.getResult());
         ret.append("\n"); //$NON-NLS-1$
         for (int i = 0; i < output.length; i++) {
             ret.append(output[i]).append("\n"); //$NON-NLS-1$
         }
-        ret.append("Error stream:\n"); //$NON-NLS-1$
-        for (int i = 0; i < errorOutput.length; i++) {
-            ret.append(errorOutput[i]).append("\n"); //$NON-NLS-1$
-        }
         return ret.toString();
     }
 
index f4b6d10d7873e6403ddf42cf1d87db5f6a518371..328e751a1999142b559b4d056512dcc6802092c3 100644 (file)
@@ -426,7 +426,7 @@ public interface LTTngControlServiceConstants {
     /**
      * Pattern to match for session command output for "session name not found".
      */
-    static final Pattern SESSION_NOT_FOUND_ERROR_PATTERN = Pattern.compile("\\s*Error:\\s+Session\\s+name\\s+not\\s+found"); //$NON-NLS-1$
+    static final Pattern SESSION_NOT_FOUND_ERROR_PATTERN = Pattern.compile("\\s*Error:\\s+Session\\s+name\\s.*not\\s+found"); //$NON-NLS-1$
     /**
      * Pattern to match introduction line of context list.
      */
index 9d115426efcd744fa0a7ae3fc31a16d7216ef0a3..9fb3ea9751368be04b044a5a306e55f594f203e5 100644 (file)
@@ -715,78 +715,6 @@ public class LTTngControlServiceMI extends LTTngControlService {
         }
     }
 
-    @Override
-    public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contexts, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void recordSnapshot(String sessionName, IProgressMonitor monitor) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void runCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
-        // TODO Auto-generated method stub
-
-    }
-
     /**
      * @param strings
      *            array of string that make up a command line
@@ -890,12 +818,12 @@ public class LTTngControlServiceMI extends LTTngControlService {
                         // TODO
                         // See bug 334 http://bugs.lttng.org/issues/334 from
                         // LTTng
-                        // For now we emulate the a behavior, and simply put
+                        // For now we emulate the non-mi behavior and simply put
                         // "with filter"
                         eventInfo.setFilterExpression("with filter"); //$NON-NLS-1$
                         break;
                     case MIStrings.EXCLUSION:
-                        // TODO:Currently not supported by tmf
+                        // TODO: Currently not supported by tmf
                         // ExclusionS element is ignored
                         break;
                     default:
This page took 0.02764 seconds and 5 git commands to generate.