Skip to content
Snippets Groups Projects
Commit c728c339 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Refactoring

parent c0e8becd
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.wb.swt.SWTResourceManager;
public class AggregatedTracesSubView implements Observer {
public class AggregatedTracesSubView implements Observer, ISubView {
private final AggregatedTracesSubViewModel aggregatedTracesSubViewModel;
private final AggregatedTracesSubViewController controller;
......@@ -61,6 +61,7 @@ public class AggregatedTracesSubView implements Observer {
/**
* @wbp.parser.entryPoint
*/
@Override
public void createComposite(final Composite parent) {
if (this.composite != null) {
this.composite.dispose();
......@@ -191,6 +192,7 @@ public class AggregatedTracesSubView implements Observer {
this.tree.addListener(SWT.SetData, new DataProvider());
}
@Override
public Composite getComposite() {
return this.composite;
}
......@@ -296,7 +298,7 @@ public class AggregatedTracesSubView implements Observer {
item.setText(new String[] { executionEntry.getContainer(), componentName, operationString, "", minDuration, avgDuration, maxDuration });
} else {
item.setText(new String[] { executionEntry.getContainer(), componentName, operationString, Integer.toString(executionEntry.getCalls()), minDuration, avgDuration,
maxDuration });
maxDuration });
}
if (executionEntry.isFailed()) {
......
package kieker.gui.view;
import org.eclipse.swt.widgets.Composite;
public interface ISubView {
public void createComposite(final Composite parent);
public Composite getComposite();
}
......@@ -24,10 +24,11 @@ public class MainView implements Observer {
private final DataModel dataModel;
private final MainViewModel mainViewModel;
private final RecordsSubView recordsSubView;
private final TracesSubView tracesSubView;
private final TracesSubView failedTracesSubView;
private final AggregatedTracesSubView aggregatedTracesSubView;
private final ISubView recordsSubView;
private final ISubView tracesSubView;
private final ISubView failedTracesSubView;
private final ISubView aggregatedTracesSubView;
private final ISubView failureContainingTracesSubView;
private final MainViewController controller;
private Shell shell;
......@@ -46,12 +47,11 @@ public class MainView implements Observer {
private DirectoryDialog dialog;
private TreeItem trtmAggregatedTraces;
private TreeItem trtmJustFailedTraces;
private final TracesSubView failureContainingTracesSubView;
private TreeItem trtmJustTracesContaining;
public MainView(final DataModel dataModel, final MainViewModel mainViewModel, final MainViewController controller, final RecordsSubView recordsSubView,
final TracesSubView tracesSubView, final TracesSubView failedTracesSubView, final AggregatedTracesSubView aggregatedTracesSubView,
final TracesSubView failureContainingTracesSubView) {
public MainView(final DataModel dataModel, final MainViewModel mainViewModel, final MainViewController controller, final ISubView recordsSubView, final ISubView tracesSubView,
final ISubView failedTracesSubView, final ISubView aggregatedTracesSubView, final ISubView failureContainingTracesSubView) {
this.dataModel = dataModel;
this.mainViewModel = mainViewModel;
this.recordsSubView = recordsSubView;
......@@ -71,7 +71,7 @@ public class MainView implements Observer {
this.shell.open();
this.shell.layout();
this.dataModel.loadMonitoringLogFromFS("example/monitoring log");
this.dataModel.loadMonitoringLogFromFS("kieker-20141209-135930886-UTC-SE-Nils-Ehmke-KIEKER");
while (!this.shell.isDisposed()) {
if (!display.readAndDispatch()) {
......
......@@ -21,7 +21,7 @@ import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
public final class RecordsSubView implements Observer {
public final class RecordsSubView implements Observer, ISubView {
private final DataModel model;
private Composite composite;
......@@ -36,6 +36,7 @@ public final class RecordsSubView implements Observer {
/**
* @wbp.parser.entryPoint
*/
@Override
public void createComposite(final Composite parent) {
if (this.composite != null) {
this.composite.dispose();
......@@ -72,6 +73,7 @@ public final class RecordsSubView implements Observer {
return this.table;
}
@Override
public Composite getComposite() {
return this.composite;
}
......
......@@ -31,7 +31,7 @@ import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.wb.swt.SWTResourceManager;
public class TracesSubView implements Observer {
public class TracesSubView implements Observer, ISubView {
private final DataModel model;
private final TracesSubViewModel tracesSubViewModel;
......@@ -68,6 +68,7 @@ public class TracesSubView implements Observer {
/**
* @wbp.parser.entryPoint
*/
@Override
public void createComposite(final Composite parent) {
if (this.composite != null) {
this.composite.dispose();
......@@ -190,6 +191,7 @@ public class TracesSubView implements Observer {
return this.tree;
}
@Override
public Composite getComposite() {
return this.composite;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment