</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="stubs"/>
<classpathentry kind="output" path="bin"/>
</classpath>
org.junit,
org.eclipse.tracecompass.common.core,
org.eclipse.tracecompass.tmf.chart.core
+Export-Package: org.eclipse.tracecompass.internal.tmf.chart.core.tests;x-internal:=true,
+ org.eclipse.tracecompass.tmf.chart.core.tests.chart,
+ org.eclipse.tracecompass.tmf.chart.core.tests.resolver,
+ org.eclipse.tracecompass.tmf.chart.core.tests.stubs
# http://www.eclipse.org/legal/epl-v10.html
###############################################################################
-source.. = src/
+source.. = src/,\
+ stubs/
output.. = bin/
bin.includes = META-INF/,\
.,\
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.chart;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart.ChartData;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart.ChartSeries;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.IDataChartDescriptor;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubChartProvider;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubObject;
+import org.junit.Test;
+
+/**
+ * Test the {@link ChartData} class
+ *
+ * @author Geneviève Bastien
+ */
+public class ChartDataTest {
+
+ private final @NonNull StubChartProvider fProvider = new StubChartProvider();
+
+ /**
+ * Test getting the descriptors for x and y series of a chart data
+ */
+ @Test
+ public void testGetDescriptors() {
+ // Create chart data with the string descriptor as x axis and a series
+ // for every other y axis
+ Collection<@NonNull IDataChartDescriptor<StubObject, ?>> dataDescriptors = fProvider.getDataDescriptors();
+ IDataChartDescriptor<StubObject, ?> xDesc = null;
+ for (IDataChartDescriptor<StubObject, ?> desc : dataDescriptors) {
+ if (desc.getName().equals(StubChartProvider.STRING_DESCRIPTOR)) {
+ xDesc = desc;
+ break;
+ }
+ }
+ assertNotNull(xDesc);
+
+ List<@NonNull ChartSeries> list = new ArrayList<>();
+ for (IDataChartDescriptor<StubObject, ?> desc : dataDescriptors) {
+ if (!desc.getName().equals(StubChartProvider.STRING_DESCRIPTOR)) {
+ list.add(new ChartSeries(xDesc, desc));
+ }
+ }
+ assertEquals(3, list.size());
+ ChartData data = new ChartData(fProvider, list);
+
+ // Verify that the series correspond to what has been added
+ Collection<@NonNull ChartSeries> chartSeries = data.getChartSeries();
+ assertEquals(3, chartSeries.size());
+
+ assertEquals(xDesc, data.getX(0));
+ assertEquals(xDesc, data.getX(1));
+ assertEquals(xDesc, data.getX(2));
+
+ assertEquals(list.get(0).getY(), data.getY(0));
+ assertEquals(list.get(1).getY(), data.getY(1));
+ assertEquals(list.get(2).getY(), data.getY(2));
+
+ }
+
+ /**
+ * Test that the series cannot be modified outside the class
+ */
+ @Test
+ public void testImmutableSeries() {
+ // Create chart data with only one series
+ Iterator<@NonNull IDataChartDescriptor<StubObject, ?>> dataDescriptors = fProvider.getDataDescriptors().iterator();
+ IDataChartDescriptor<StubObject, ?> x = dataDescriptors.next();
+ IDataChartDescriptor<StubObject, ?> y = dataDescriptors.next();
+ List<@NonNull ChartSeries> list = new ArrayList<>();
+ list.add(new ChartSeries(x, y));
+ ChartData data = new ChartData(fProvider, list);
+ assertEquals(1, data.getChartSeries().size());
+
+ // Add a new series to the list and make sure it is not in the data
+ // (which should be immutable)
+ y = dataDescriptors.next();
+ list.add(new ChartSeries(x, y));
+ assertEquals(1, data.getChartSeries().size());
+
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.chart;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart.ChartModel;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart.ChartType;
+import org.junit.Test;
+
+/**
+ * Test the {@link ChartModel} class
+ *
+ * @author Geneviève Bastien
+ */
+public class ChartModelTest {
+
+ /**
+ * Test constructor of the class
+ */
+ @Test
+ public void testConstructor() {
+ // Normal title and x and y log scales
+ String title = "title";
+ ChartModel cm = new ChartModel(ChartType.BAR_CHART, title, true, true);
+ assertEquals(ChartType.BAR_CHART, cm.getChartType());
+ assertEquals(title, cm.getTitle());
+ assertTrue(cm.isXLogscale());
+ assertTrue(cm.isYLogscale());
+
+ // Title with accented characters, y log scale, but not x log scale
+ title = "éèëâ\nbla";
+ cm = new ChartModel(ChartType.SCATTER_CHART, title, false, true);
+ assertEquals(ChartType.SCATTER_CHART, cm.getChartType());
+ assertEquals(title, cm.getTitle());
+ assertFalse(cm.isXLogscale());
+ assertTrue(cm.isYLogscale());
+
+ // Title with special characters, no log scale
+ title = "&?%$/\"()";
+ cm = new ChartModel(ChartType.PIE_CHART, title, false, false);
+ assertEquals(ChartType.PIE_CHART, cm.getChartType());
+ assertEquals(title, cm.getTitle());
+ assertFalse(cm.isXLogscale());
+ assertFalse(cm.isYLogscale());
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.chart;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart.ChartSeries;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.IDataChartDescriptor;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubChartProvider;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubObject;
+import org.junit.Test;
+
+/**
+ * Test the {@link ChartSeries} class
+ *
+ * @author Geneviève Bastien
+ */
+public class ChartSeriesTest {
+
+ private final StubChartProvider fProvider = new StubChartProvider();
+
+ /**
+ * Test the constructor
+ */
+ @Test
+ public void testConstructor() {
+ Collection<@NonNull IDataChartDescriptor<StubObject, ?>> dataDescriptors = fProvider.getDataDescriptors();
+ IDataChartDescriptor<StubObject, ?> x = dataDescriptors.iterator().next();
+ IDataChartDescriptor<StubObject, ?> y = dataDescriptors.iterator().next();
+ ChartSeries series = new ChartSeries(x, y);
+ assertEquals(x, series.getX());
+ assertEquals(y, series.getY());
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.consumer;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.function.Predicate;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.IDataChartDescriptor;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.INumericalResolver;
+import org.eclipse.tracecompass.internal.tmf.chart.core.consumer.NumericalConsumer;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubChartProvider;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubObject;
+import org.junit.Test;
+
+/**
+ * Test the {@link NumericalConsumer} class
+ *
+ * @author Geneviève Bastien
+ */
+public class NumericalConsumerTest {
+
+ private final @NonNull StubChartProvider fProvider = new StubChartProvider();
+
+ /**
+ * Test the numerical consumer with only the resolver. It should not accept
+ * null values
+ */
+ @Test
+ public void testResolver() {
+ IDataChartDescriptor<StubObject, ?> descriptor = fProvider.getDataDescriptor(StubChartProvider.LONG_DESCRIPTOR);
+ NumericalConsumer consumer = new NumericalConsumer(INumericalResolver.class.cast(descriptor.getResolver()));
+
+ // Test with a first object
+ StubObject obj = new StubObject("str", 1, 10L, 10.0);
+ assertTrue(consumer.test(obj));
+ consumer.accept(obj);
+ assertEquals(Long.valueOf(10L), consumer.getData().get(0));
+
+ // Test with a second object
+ obj = new StubObject("str", 1, 20L, 10.0);
+ assertTrue(consumer.test(obj));
+ consumer.accept(obj);
+ assertEquals(Long.valueOf(20L), consumer.getData().get(1));
+
+ obj = new StubObject("str", 1, null, 10.0);
+ assertFalse(consumer.test(obj));
+
+ // Test eh minimum and maximum values
+ assertEquals(Long.valueOf(10L), consumer.getMin());
+ assertEquals(Long.valueOf(20L), consumer.getMax());
+ }
+
+ /**
+ * Test the numerical consumer with only the resolver and predicate.
+ */
+ @Test
+ public void testWithPredicate() {
+ IDataChartDescriptor<StubObject, ?> descriptor = fProvider.getDataDescriptor(StubChartProvider.LONG_DESCRIPTOR);
+ Predicate<@Nullable Number> predicate = d -> true;
+ NumericalConsumer consumer = new NumericalConsumer(INumericalResolver.class.cast(descriptor.getResolver()), predicate);
+ StubObject obj = new StubObject("str", 1, 10L, 10.0);
+
+ assertTrue(consumer.test(obj));
+ consumer.accept(obj);
+ assertEquals(Long.valueOf(10L), consumer.getData().get(0));
+
+ obj = new StubObject("str", 1, null, 10.0);
+ assertTrue(consumer.test(obj));
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.resolver;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Function;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.AbstractDoubleResolver;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubObject;
+import org.junit.Test;
+
+/**
+ * Test the {@link AbstractDoubleResolver} class
+ *
+ * @author Geneviève Bastien
+ */
+public class DoubleResolverTest {
+
+ private static final AbstractDoubleResolver<StubObject> DOUBLE_RESOLVER = new AbstractDoubleResolver<StubObject>() {
+ @Override
+ public @NonNull Function<StubObject, @Nullable Double> getMapper() {
+ return o -> o.getDbl();
+ }
+ };
+
+ /**
+ * Test the limit values of the long resolver
+ */
+ @Test
+ public void testLimitValues() {
+ assertEquals(Double.MIN_VALUE, DOUBLE_RESOLVER.getMinValue(), 0.000001);
+ assertEquals(Double.MAX_VALUE, DOUBLE_RESOLVER.getMaxValue(), 0.000001);
+ assertEquals(0.0, DOUBLE_RESOLVER.getZeroValue(), 0.000001);
+ }
+
+ /**
+ * Test the {@link AbstractDoubleResolver#getComparator()} method
+ */
+ @Test
+ public void testComparator() {
+ List<@NonNull Double> list = new ArrayList<>();
+ // Add a few items not ordered naturally
+ list.add(0.0);
+ list.add(1234.1234);
+ list.add(-3.45);
+ Collections.sort(list, DOUBLE_RESOLVER.getComparator());
+ assertEquals(Double.valueOf(-3.45), list.get(0), 0.000001);
+ assertEquals(0.0, list.get(1), 0.000001);
+ assertEquals(1234.1234, list.get(2), 0.000001);
+ }
+
+ /**
+ * Test the {@link AbstractDoubleResolver#getMapper()} method
+ */
+ @Test
+ public void testMapper() {
+ Function<StubObject, @Nullable Double> mapper = DOUBLE_RESOLVER.getMapper();
+
+ StubObject obj = new StubObject("str", 1, 0l, -3.45);
+ Double dbl = mapper.apply(obj);
+ assertNotNull(dbl);
+ assertEquals(Double.valueOf(-3.45), dbl, 0.000001);
+
+ obj = new StubObject("str", 1, 0l, 0.0);
+ dbl = mapper.apply(obj);
+ assertNotNull(dbl);
+ assertEquals(0.0, dbl, 0.000001);
+
+ obj = new StubObject("str", 1, 1234l, 1234.1234);
+ dbl = mapper.apply(obj);
+ assertNotNull(dbl);
+ assertEquals(Double.valueOf(1234.1234), dbl, 0.000001);
+
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.resolver;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.Function;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.AbstractLongResolver;
+import org.eclipse.tracecompass.tmf.chart.core.tests.stubs.StubObject;
+import org.junit.Test;
+
+/**
+ * Test the {@link AbstractLongResolver} class
+ *
+ * @author Geneviève Bastien
+ */
+public class LongResolverTest {
+
+ private static final AbstractLongResolver<StubObject> LONG_RESOLVER = new AbstractLongResolver<StubObject>() {
+ @Override
+ public @NonNull Function<StubObject, @Nullable Long> getMapper() {
+ return o -> o.getLong();
+ }
+ };
+
+ /**
+ * Test the limit values of the long resolver
+ */
+ @Test
+ public void testLimitValues() {
+ assertEquals((Long) Long.MIN_VALUE, LONG_RESOLVER.getMinValue());
+ assertEquals((Long) Long.MAX_VALUE, LONG_RESOLVER.getMaxValue());
+ assertEquals((Long) 0l, LONG_RESOLVER.getZeroValue());
+ }
+
+ /**
+ * Test the {@link AbstractLongResolver#getComparator()} method
+ */
+ @Test
+ public void testComparator() {
+ List<@NonNull Long> list = new ArrayList<>();
+ // Add a few items not ordered naturally
+ list.add(0l);
+ list.add(1234l);
+ list.add(-1234l);
+ Collections.sort(list, LONG_RESOLVER.getComparator());
+ assertEquals(Long.valueOf(-1234l), list.get(0));
+ assertEquals((Long) 0l, list.get(1));
+ assertEquals((Long) 1234l, list.get(2));
+ }
+
+ /**
+ * Test the {@link AbstractLongResolver#getMapper()} method
+ */
+ @Test
+ public void testMapper() {
+ Function<StubObject, @Nullable Long> mapper = LONG_RESOLVER.getMapper();
+
+ StubObject obj = new StubObject("str", 1, -1234l, 0.0);
+ assertEquals(Long.valueOf(-1234l), mapper.apply(obj));
+
+ obj = new StubObject("str", 1, 0l, 0.0);
+ assertEquals(Long.valueOf(0l), mapper.apply(obj));
+
+ obj = new StubObject("str", 1, 1234l, 0.0);
+ assertEquals(Long.valueOf(1234l), mapper.apply(obj));
+
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.stubs;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.DataChartNumericalDescriptor;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.DataChartStringDescriptor;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor.IDataChartDescriptor;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.model.IDataChartProvider;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.AbstractDoubleResolver;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.AbstractLongResolver;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.INumericalResolver;
+import org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver.IStringResolver;
+
+/**
+ * A chart provider that will return a few long values
+ *
+ * @author Geneviève Bastien
+ */
+public class StubChartProvider implements IDataChartProvider<StubObject> {
+
+ /**
+ * Name of this chart provider
+ */
+ public static final @NonNull String NAME = "Long Chart Provider";
+ /**
+ * Name of the String descriptor
+ */
+ public static final @NonNull String STRING_DESCRIPTOR = "String";
+ /**
+ * Name of the Integer descriptor
+ */
+ public static final @NonNull String INTEGER_DESCRIPTOR = "Integer";
+ /**
+ * Name of the Long descriptor
+ */
+ public static final @NonNull String LONG_DESCRIPTOR = "Long";
+ /**
+ * Name of the Double descriptor
+ */
+ public static final @NonNull String DOUBLE_DESCRIPTOR = "Double";
+
+ private final @NonNull List<@NonNull StubObject> fSource = new ArrayList<>();
+
+ @Override
+ public @NonNull String getName() {
+ return NAME;
+ }
+
+ @Override
+ public @NonNull Stream<@NonNull StubObject> getSource() {
+ return NonNullUtils.checkNotNull(fSource.stream());
+ }
+
+ /**
+ * Adds an object to this provider's source. It will be returned with the
+ * stream
+ *
+ * @param obj
+ * an object to add to the data stream
+ */
+ public void addData(@NonNull StubObject obj) {
+ fSource.add(obj);
+ }
+
+ @Override
+ public @NonNull Collection<@NonNull IDataChartDescriptor<StubObject, ?>> getDataDescriptors() {
+ List<@NonNull IDataChartDescriptor<StubObject, ?>> list = new ArrayList<>();
+ list.add(new DataChartStringDescriptor<>(STRING_DESCRIPTOR, new IStringResolver<StubObject>() {
+
+ @Override
+ public @NonNull Function<StubObject, @Nullable String> getMapper() {
+ return o -> o.getString();
+ }
+ }));
+ list.add(new DataChartNumericalDescriptor<>(INTEGER_DESCRIPTOR, new INumericalResolver<StubObject, @NonNull Integer>() {
+
+ @Override
+ public @NonNull Function<StubObject, @Nullable Integer> getMapper() {
+ return o -> o.getInt();
+ }
+
+ @Override
+ public @NonNull Comparator<@NonNull Integer> getComparator() {
+ return NonNullUtils.checkNotNull(Comparator.naturalOrder());
+ }
+
+ @Override
+ public Integer getMinValue() {
+ return Integer.MIN_VALUE;
+ }
+
+ @Override
+ public Integer getMaxValue() {
+ return Integer.MAX_VALUE;
+ }
+
+ @Override
+ public Integer getZeroValue() {
+ return 0;
+ }
+ }));
+ list.add(new DataChartNumericalDescriptor<>(LONG_DESCRIPTOR, new AbstractLongResolver<StubObject>() {
+
+ @Override
+ public @NonNull Function<StubObject, @Nullable Long> getMapper() {
+ return o -> o.getLong();
+ }
+ }));
+ list.add(new DataChartNumericalDescriptor<>(DOUBLE_DESCRIPTOR, new AbstractDoubleResolver<StubObject>() {
+
+ @Override
+ public @NonNull Function<StubObject, @Nullable Double> getMapper() {
+ return o -> o.getDbl();
+ }
+ }));
+ return list;
+ }
+
+ /**
+ * Get a descriptor with the specified name
+ *
+ * @param name
+ * The name of the desired descriptor
+ * @return The descriptor
+ */
+ public IDataChartDescriptor<StubObject, ?> getDataDescriptor(String name) {
+ return getDataDescriptors().stream().filter(d -> d.getName().equals(name))
+ .findFirst().get();
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2017 École Polytechnique de Montréal
+ *
+ * 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
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.chart.core.tests.stubs;
+
+/**
+ * A stub object to use by this stub
+ *
+ * @author Geneviève Bastien
+ */
+public class StubObject {
+ private final String fString;
+ private final Integer fInt;
+ private final Long fLong;
+ private final Double fDbl;
+
+ /**
+ * Constructor
+ *
+ * @param string
+ * A string value
+ * @param intVal
+ * An int value
+ * @param longVal
+ * A long value
+ * @param dblVal
+ * A double value
+ */
+ public StubObject(String string, Integer intVal, Long longVal, Double dblVal) {
+ fString = string;
+ fInt = intVal;
+ fLong = longVal;
+ fDbl = dblVal;
+ }
+
+ /**
+ * Get the string value
+ *
+ * @return The string value
+ */
+ public String getString() {
+ return fString;
+ }
+
+ /**
+ * Get the int value
+ *
+ * @return the int value
+ */
+ public Integer getInt() {
+ return fInt;
+ }
+
+ /**
+ * Get the long value
+ *
+ * @return The long value
+ */
+ public Long getLong() {
+ return fLong;
+ }
+
+ /**
+ * Get the double value
+ *
+ * @return the double value
+ */
+ public Double getDbl() {
+ return fDbl;
+ }
+}
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.tracecompass.common.core
-Export-Package: org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart;x-friends:="org.eclipse.tracecompass.tmf.chart.ui",
- org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor;x-friends:="org.eclipse.tracecompass.tmf.chart.ui",
- org.eclipse.tracecompass.internal.provisional.tmf.chart.core.model;x-friends:="org.eclipse.tracecompass.tmf.chart.ui",
- org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver;x-friends:="org.eclipse.tracecompass.tmf.chart.ui",
+Export-Package: org.eclipse.tracecompass.internal.provisional.tmf.chart.core.chart;x-friends:="org.eclipse.tracecompass.tmf.chart.ui,org.eclipse.tracecompass.tmf.chart.core.tests",
+ org.eclipse.tracecompass.internal.provisional.tmf.chart.core.descriptor;x-friends:="org.eclipse.tracecompass.tmf.chart.ui,org.eclipse.tracecompass.tmf.chart.core.tests",
+ org.eclipse.tracecompass.internal.provisional.tmf.chart.core.model;x-friends:="org.eclipse.tracecompass.tmf.chart.ui,org.eclipse.tracecompass.tmf.chart.core.tests",
+ org.eclipse.tracecompass.internal.provisional.tmf.chart.core.resolver;x-friends:="org.eclipse.tracecompass.tmf.chart.ui,org.eclipse.tracecompass.tmf.chart.core.tests",
org.eclipse.tracecompass.internal.tmf.chart.core;x-internal:=true,
org.eclipse.tracecompass.internal.tmf.chart.core.aggregator;x-friends:="org.eclipse.tracecompass.tmf.chart.ui,org.eclipse.tracecompass.tmf.chart.core.tests",
org.eclipse.tracecompass.internal.tmf.chart.core.chart;x-internal:=true,
return null;
}
+ @Override
+ public String toString() {
+ return "Numerical Descriptor: " + getName(); //$NON-NLS-1$
+ }
+
}
return fName;
}
+ @Override
+ public String toString() {
+ return "String Descriptor: " + getName(); //$NON-NLS-1$
+ }
+
}
<module>org.eclipse.tracecompass.tmf.analysis.xml.ui.tests</module>
<module>org.eclipse.tracecompass.tmf.chart.core</module>
- <!-- <module>org.eclipse.tracecompass.tmf.chart.core.tests</module> -->
+ <module>org.eclipse.tracecompass.tmf.chart.core.tests</module>
<module>org.eclipse.tracecompass.tmf.chart.ui</module>
<module>org.eclipse.tracecompass.tmf.remote</module>