aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrajesh K Rathore2014-01-31 05:34:49 (EST)
committerRodrigo Fraxino Araujo2014-02-04 10:49:23 (EST)
commit809270d66397f3d17e5db2aec27e1dcb76be4da6 (patch)
tree5da1e6d99182398787c0d4674e8bbdf79e38773e
parentdb676a61a756e662bb00c81ec59d92b105a4eb26 (diff)
downloadorg.eclipse.linuxtools-809270d66397f3d17e5db2aec27e1dcb76be4da6.zip
org.eclipse.linuxtools-809270d66397f3d17e5db2aec27e1dcb76be4da6.tar.gz
org.eclipse.linuxtools-809270d66397f3d17e5db2aec27e1dcb76be4da6.tar.bz2
oprofile: add sorting feature in oprofile viewrefs/changes/76/21376/4
this patch enable sorting capability in oprofile tree. it's support sort the tree by events,session,function library or line number. Change-Id: I733c9fe30c53c30e1931a9f1dd9aeb119cb0205c Signed-off-by: Brajesh K Rathore <brrathor@linux.vnet.ibm.com> Reviewed-on: https://git.eclipse.org/r/21376 Tested-by: Hudson CI Reviewed-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com> IP-Clean: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com> Tested-by: Rodrigo Fraxino Araujo <rfaraujo@linux.vnet.ibm.com>
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java2
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties20
-rwxr-xr-xoprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java42
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java10
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java9
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java34
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java2
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java7
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java63
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java7
11 files changed, 192 insertions, 16 deletions
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
index a1c18f3..e1b987b 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
@@ -179,7 +179,7 @@ public class SessionManager {
if (list.item(i) instanceof Element) {
Element session = (Element) list.item(i);
if (session.getAttribute(NAME).equals(sessionName)) {
- Element event = find((Element) list.item(0), EVENT, NAME,
+ Element event = find((Element) list.item(i), EVENT, NAME,
eventName);
if (event != null) {
removeSessionHelper(sessionName, event);
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
index db07240..a8f24cd 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
@@ -8,7 +8,7 @@
# Contributors:
# Keith Seitz <keiths@redhat.com> - initial implementation
# Kent Sebastian <ksebasti@redhat.com>
-######################################################################
+######################################################################
savedialog.title=Save Session
savedialog.message=Enter the new name of the default session
savedialog.initial=
@@ -23,19 +23,27 @@ view.dialog.parsing.text=Parsing OProfile Data
view.actions.refresh.label=Refresh View
view.actions.logreader.label=Open OProfile Daemon Log
view.actions.savedefaultsession.label=Save Default Session
+view.menu.sortby.label=Sort By
+view.actions.default.label=Default
+view.actions.event.label=Event
+view.actions.session.label=Session
+view.actions.function.label=Function
+view.actions.lib.label=Library
+view.actions.line.label=Line number
+
oprofiled.logreader.dialog.title=OProfiled Log
oprofiled.logreader.error.fileNotFound=Log file empty or does not exist.
oprofiled.logreader.error.io=Error reading log file.
-uimodel.percentage.in=in
-uimodel.sample.on.line=on line
+uimodel.percentage.in=in
+uimodel.sample.on.line=on line
uimodel.dependent.dependent.images=dependent images
UiModelSession_current=current
opxmlParse.error.multipleImages=Error: samples not created from Eclipse-OProfile plugin. Please remove this session.
-annotation.text.from=from event
-annotation.text.in=in session
+annotation.text.from=from event
+annotation.text.in=in session
-root.error.nosamples=No profiling data is on the system.
+root.error.nosamples=No profiling data is on the system.
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
index f4ff3b6..8f744ee 100755
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
@@ -15,6 +15,7 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -90,6 +91,16 @@ public class OprofileView extends ViewPart implements ISelectionChangedListener
manager.add(saveDefaultSessionAction);
deleteSessionAction = new OprofileViewDeleteSessionAction(getTreeViewer());
manager.add(deleteSessionAction);
+
+ MenuManager sortMenu = new MenuManager(
+ OprofileUiMessages.getString("view.menu.sortby.label"));
+
+ for (UiModelRoot.SORT_TYPE s : UiModelRoot.SORT_TYPE.values()) {
+ sortMenu.add(new OprofileViewSortAction(s,
+ OprofileViewSortAction.sortTypeMap.get(s)));
+ }
+ manager.add(sortMenu);
+
}
private TreeViewer getTreeViewer() {
@@ -175,5 +186,4 @@ public class OprofileView extends ViewPart implements ISelectionChangedListener
super.dispose();
viewer.removeSelectionChangedListener(this);
}
-
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java
new file mode 100644
index 0000000..2c913ef
--- /dev/null
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java
@@ -0,0 +1,42 @@
+package org.eclipse.linuxtools.internal.oprofile.ui.view;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiMessages;
+import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiPlugin;
+import org.eclipse.linuxtools.oprofile.ui.model.UiModelRoot;
+
+/**
+ *
+ * Action handler for tree sorting.
+ * tree can be sort by session,event,Lib,function and line number.
+ * @since 3.0
+ *
+ */
+public class OprofileViewSortAction extends Action {
+
+ public static Map<UiModelRoot.SORT_TYPE, String> sortTypeMap = new HashMap<>();
+ static{
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.DEFAULT, OprofileUiMessages.getString("view.actions.default.label"));
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.SESSION, OprofileUiMessages.getString("view.actions.session.label"));
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.EVENT, OprofileUiMessages.getString("view.actions.event.label"));
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.LIB, OprofileUiMessages.getString("view.actions.lib.label"));
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.FUNCTION, OprofileUiMessages.getString("view.actions.function.label"));
+ sortTypeMap.put(UiModelRoot.SORT_TYPE.LINE_NO, OprofileUiMessages.getString("view.actions.line.label"));
+ }
+ private UiModelRoot.SORT_TYPE sortType;
+
+ public OprofileViewSortAction(UiModelRoot.SORT_TYPE sortType, String text) {
+ super(text);
+ this.sortType = sortType;
+ }
+
+ @Override
+ public void run() {
+ UiModelRoot.setSortingType(sortType);
+ OprofileUiPlugin.getDefault().getOprofileView().refreshView();
+ }
+
+}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
index ab2e17b..adaeb95 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.oprofile.ui.model;
+import java.util.Arrays;
+
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelImage;
import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiMessages;
import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiPlugin;
@@ -54,7 +56,7 @@ public class UiModelDependent implements IUiModelElement {
double countPercentage = (double)depCount / (double)totalCount;
String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
- return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + OprofileUiMessages.getString("uimodel.dependent.dependent.images"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in")+" " + OprofileUiMessages.getString("uimodel.dependent.dependent.images"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
/** IUiModelElement functions **/
@@ -69,6 +71,12 @@ public class UiModelDependent implements IUiModelElement {
*/
@Override
public IUiModelElement[] getChildren() {
+
+ if (UiModelRoot.SORT_TYPE.LIB == UiModelRoot.getSortingType()) {
+ Arrays.sort(dependents, UiModelSorting.getInstance());
+ return dependents;
+ }
+
return dependents;
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
index 5c06cb7..0d44908 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.oprofile.ui.model;
+import java.util.Arrays;
+
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelImage;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSymbol;
import org.eclipse.linuxtools.internal.oprofile.ui.OprofileUiMessages;
@@ -67,7 +69,7 @@ public class UiModelImage implements IUiModelElement {
double countPercentage = (double)(image.getCount() ) / (double)totalCount;
String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
- return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + image.getName(); //$NON-NLS-1$ //$NON-NLS-2$
+ return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in")+" " + image.getName(); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -92,7 +94,10 @@ public class UiModelImage implements IUiModelElement {
children[i] = symbols[i];
}
}
-
+ if (UiModelRoot.SORT_TYPE.FUNCTION == UiModelRoot.getSortingType()) {
+ Arrays.sort(children, UiModelSorting.getInstance());
+ return children;
+ }
return children;
}
/**
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
index 97a24a4..abbbb7c 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.oprofile.ui.model;
+import java.util.Arrays;
+
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelRoot;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSession;
import org.eclipse.swt.graphics.Image;
@@ -78,9 +80,17 @@ public class UiModelRoot implements IUiModelElement {
*/
@Override
public IUiModelElement[] getChildren() {
- if (session != null && session.length != 0)
- return session;
- else
+ if (session != null && session.length != 0) {
+ if (UiModelRoot.SORT_TYPE.SESSION == UiModelRoot.getSortingType()) {
+ Arrays.sort(session, UiModelSorting.getInstance());
+ return session;
+ }
+
+ else {
+ return session;
+ }
+
+ } else
return new IUiModelElement[] { rootError };
}
/**
@@ -105,4 +115,22 @@ public class UiModelRoot implements IUiModelElement {
public Image getLabelImage() {
return null;
}
+
+ /**
+ *
+ * adding sorting feature in tree.
+ * @since 3.0
+ *
+ */
+ public static enum SORT_TYPE{DEFAULT,SESSION,EVENT,LIB,FUNCTION,LINE_NO};
+ private static SORT_TYPE sortType;
+ public static void setSortingType(SORT_TYPE sortType)
+ {
+ UiModelRoot.sortType = sortType;
+ }
+
+ public static SORT_TYPE getSortingType()
+ {
+ return UiModelRoot.sortType;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
index e35ced4..ab3bcad 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
@@ -40,7 +40,7 @@ public class UiModelSample implements IUiModelElement {
double countPercentage = (double)sample.getCount() / (double)totalCount;
String percentage = OprofileUiPlugin.getPercentageString(countPercentage);
- return percentage + " " + OprofileUiMessages.getString("uimodel.sample.on.line") + Integer.toString(sample.getLine()); //$NON-NLS-1$ //$NON-NLS-2$
+ return percentage + " " + OprofileUiMessages.getString("uimodel.sample.on.line")+" " + Integer.toString(sample.getLine()); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
index 3223ffa..cdd7a64 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.oprofile.ui.model;
+import java.util.Arrays;
+
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelEvent;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelRoot;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSession;
@@ -93,6 +95,11 @@ public class UiModelSession implements IUiModelElement {
*/
@Override
public IUiModelElement[] getChildren() {
+ if (UiModelRoot.SORT_TYPE.EVENT == UiModelRoot.getSortingType()) {
+ Arrays.sort(events, UiModelSorting.getInstance());
+ return events;
+ }
+
return events;
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java
new file mode 100644
index 0000000..4709fad
--- /dev/null
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java
@@ -0,0 +1,63 @@
+package org.eclipse.linuxtools.oprofile.ui.model;
+
+import java.text.Collator;
+import java.util.Comparator;
+
+/**
+ *
+ * Comparator for sorting tree elements.
+ * @since 3.0
+ */
+public class UiModelSorting implements Comparator<IUiModelElement> {
+ private static UiModelSorting instance = new UiModelSorting();
+
+ private Collator collator;
+
+ private UiModelSorting() {
+ collator = Collator.getInstance();
+ }
+
+ public static UiModelSorting getInstance()
+ {
+ return instance;
+ }
+
+ @Override
+ public int compare(IUiModelElement o1, IUiModelElement o2) {
+
+ // compare line no.
+ if(o1 instanceof UiModelSample && o2 instanceof UiModelSample)
+ {
+ return ((UiModelSample)o1).getLine() - ((UiModelSample)o2).getLine();
+ }
+ // compare function name
+ else if(o1 instanceof UiModelSymbol && o2 instanceof UiModelSymbol)
+ {
+ return collator.compare(((UiModelSymbol)o1).getFunctionName(),((UiModelSymbol)o2).getFunctionName());
+ }
+ // comapre lib name
+ else if(o1 instanceof UiModelImage && o2 instanceof UiModelImage)
+ {
+ return collator.compare(getLibraryName(o1.getLabelText()),getLibraryName(o2.getLabelText()));
+ }
+ // default comparison based on display label
+ return collator.compare(o1.getLabelText(), o2.getLabelText());
+ }
+
+ private String getLibraryName(String lib)
+ {
+ // /lib64/libc-2.12.so - libc-2.12.s0
+ String libName = "";
+ int index = 0;
+ if(null != lib && lib.trim().length() !=0)
+ {
+ index = lib.lastIndexOf("/");
+ if(index != -1)
+ {
+ libName = lib.substring(index+1, lib.length());
+ }
+
+ }
+ return libName;
+ }
+}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
index fca3941..d1a4e4c 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
@@ -12,6 +12,7 @@ package org.eclipse.linuxtools.oprofile.ui.model;
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSample;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSymbol;
@@ -71,7 +72,7 @@ public class UiModelSymbol implements IUiModelElement {
//a hack to get `basename` type functionality
String fileName = (new File(symbol.getFilePath())).getName();
- return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in") + symbol.getName() + (fileName.length() == 0 ? "" : " [" + fileName + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ return percentage + " " + OprofileUiMessages.getString("uimodel.percentage.in")+" " + symbol.getName() + (fileName.length() == 0 ? "" : " [" + fileName + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
/**
* Return the file path for the current debugging symbol
@@ -112,6 +113,10 @@ public class UiModelSymbol implements IUiModelElement {
*/
@Override
public IUiModelElement[] getChildren() {
+ if (UiModelRoot.SORT_TYPE.LINE_NO == UiModelRoot.getSortingType()) {
+ Arrays.sort(samples, UiModelSorting.getInstance());
+ return samples;
+ }
return samples;
}