import org.eclipse.tracecompass.analysis.timing.ui.swtbot.tests.table.SegmentTableTest;
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableView;
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableViewer;
+import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.SegmentStoreTableView;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCall;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
-import org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.SystemCallLatencyView;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.testtraces.ctf.CtfTestTrace;
import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.ConditionHelpers;
private static final String TRACE_TYPE = "org.eclipse.linuxtools.lttng2.kernel.tracetype";
private static final String PROJECT_NAME = "test";
- static final String VIEW_ID = SystemCallLatencyView.ID;
+
+ private static final String PRIMARY_VIEW_ID = SegmentStoreTableView.ID;
+ private static final String SECONDARY_VIEW_ID = SystemCallLatencyAnalysis.ID;
private static final SystemCallLatencyAnalysis fSystemCallLatencyAnalysis = new SystemCallLatencyAnalysis();
@Override
/*
* Open latency view
*/
- SWTBotUtils.openView(VIEW_ID);
+ SWTBotUtils.openView(PRIMARY_VIEW_ID, SECONDARY_VIEW_ID);
SWTWorkbenchBot bot = new SWTWorkbenchBot();
- SWTBotView viewBot = bot.viewById(VIEW_ID);
+ SWTBotView viewBot = bot.viewById(PRIMARY_VIEW_ID);
final IViewReference viewReference = viewBot.getViewReference();
IViewPart viewPart = UIThreadRunnable.syncExec(new Result<IViewPart>() {
@Override
}
});
assertNotNull(viewPart);
- if (!(viewPart instanceof SystemCallLatencyView)) {
+ if (!(viewPart instanceof SegmentStoreTableView)) {
fail("Could not instanciate view");
}
- return (SystemCallLatencyView) viewPart;
+ return (SegmentStoreTableView) viewPart;
}
@Override
String tracePath;
tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath();
SWTWorkbenchBot bot = new SWTWorkbenchBot();
- SWTBotView view = bot.viewById(VIEW_ID);
+ SWTBotView view = bot.viewById(PRIMARY_VIEW_ID);
view.close();
bot.waitUntil(ConditionHelpers.ViewIsClosed(view));
SWTBotUtils.createProject(PROJECT_NAME);
resources.view.name = Resources
cpuusage.view.name = CPU Usage
-latency.view.name = System Call Latencies
+latency.table.view.name = System Call Latencies
latency.scatter.view.name = System Call Latency vs Time
latency.stats.view.name = System Call Latency Statistics
latency.density.view.name = System Call Density
restorable="true">
</view>
<view
- allowMultiple="false"
category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency.SystemCallLatencyView"
+ class="org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.SegmentStoreTableView"
icon="icons/eview16/latency.png"
- id="org.eclipse.tracecompass.analysis.os.linux.views.latency"
- name="%latency.view.name"
+ id="org.eclipse.tracecompass.analysis.timing.ui.segstore.table:org.eclipse.tracecompass.analysis.os.linux.latency.syscall"
+ name="%latency.table.view.name"
restorable="true">
</view>
<view
</output>
<output
class="org.eclipse.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.tracecompass.analysis.os.linux.views.latency">
+ id="org.eclipse.tracecompass.analysis.timing.ui.segstore.table:org.eclipse.tracecompass.analysis.os.linux.latency.syscall">
<analysisModuleClass
class="org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis">
</analysisModuleClass>
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.density.AbstractSegmentStoreDensityView;
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.density.AbstractSegmentStoreDensityViewer;
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableViewer;
+import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.SegmentStoreTableViewer;
+import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
/**
* System Call Density view
@Override
protected AbstractSegmentStoreTableViewer createSegmentStoreTableViewer(Composite parent) {
- return new SystemCallLatencyTableViewer(new TableViewer(parent, SWT.FULL_SELECTION | SWT.VIRTUAL)) {
+ return new SegmentStoreTableViewer(new TableViewer(parent, SWT.FULL_SELECTION | SWT.VIRTUAL), SystemCallLatencyAnalysis.ID) {
@Override
protected void createProviderColumns() {
super.createProviderColumns();
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015, 2016 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * France Lapointe Nguyen - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.tracecompass.analysis.timing.core.segmentstore.ISegmentStoreProvider;
-import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableViewer;
-import org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.SystemCallLatencyAnalysis;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-
-/**
- * Displays the latency analysis data in a column table
- *
- * @author France Lapointe Nguyen
- */
-public class SystemCallLatencyTableViewer extends AbstractSegmentStoreTableViewer {
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param tableViewer
- * The table viewer
- */
- public SystemCallLatencyTableViewer(TableViewer tableViewer) {
- super(tableViewer);
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected @Nullable ISegmentStoreProvider getSegmentStoreProvider(ITmfTrace trace) {
- return TmfTraceUtils.getAnalysisModuleOfClass(trace, SystemCallLatencyAnalysis.class, SystemCallLatencyAnalysis.ID);
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2015, 2016 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * France Lapointe Nguyen - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.latency;
-
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableView;
-import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.table.AbstractSegmentStoreTableViewer;
-
-/**
- * View for the latency analysis
- *
- * @author France Lapointe Nguyen
- */
-public class SystemCallLatencyView extends AbstractSegmentStoreTableView {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /** The view's ID */
- public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.views.latency"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- @Override
- protected AbstractSegmentStoreTableViewer createSegmentStoreViewer(TableViewer tableViewer) {
- return new SystemCallLatencyTableViewer(tableViewer);
- }
-}
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jface.bindings.keys.IKeyLookup;
import org.eclipse.jface.bindings.keys.KeyStroke;
import org.eclipse.jface.bindings.keys.ParseException;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
* view id.
*/
public static void openView(final String id) {
+ openView(id, null);
+ }
+
+ /**
+ * Open a view by id and secondary id
+ *
+ * @param id
+ * view id.
+ * @param secondaryId
+ * The secondary ID
+ */
+ public static void openView(final String id, final @Nullable String secondaryId) {
final PartInitException res[] = new PartInitException[1];
UIThreadRunnable.syncExec(new VoidResult() {
@Override
public void run() {
try {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+ if (secondaryId == null) {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id);
+ } else {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(id, secondaryId, IWorkbenchPage.VIEW_ACTIVATE);
+ }
} catch (PartInitException e) {
res[0] = e;
}