Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TraceTypeHelper.java31
-rw-r--r--org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java4
-rw-r--r--org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/project/model/TmfTraceTypeUIUtils.java8
3 files changed, 22 insertions, 21 deletions
diff --git a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TraceTypeHelper.java b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TraceTypeHelper.java
index f432ea0dd9..3ba07e4b46 100644
--- a/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TraceTypeHelper.java
+++ b/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TraceTypeHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 Ericsson
+ * Copyright (c) 2013, 2015 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
@@ -10,6 +10,7 @@
* Matthew Khouzam - Initial API and implementation
* Bernd Hufmann - Handling of directory traces types
* Geneviève Bastien - Added support of experiment types
+ * Patrick Tasse - Renamed trace type id
*******************************************************************************/
package org.eclipse.tracecompass.tmf.core.project.model;
@@ -31,34 +32,34 @@ public class TraceTypeHelper {
private final String fName;
private final String fCategoryName;
- private final String fCanonicalName;
+ private final String fTraceTypeId;
private final TraceElementType fElementType;
@NonNull
private final ITmfTrace fTrace;
private final boolean fIsDirectory;
/**
- * Constructor for a trace type helper. It is a link between a canonical
- * (hard to read) name, a category name, a name and a trace object. It is
- * used for trace validation.
+ * Constructor for a trace type helper. It is a link between a trace type
+ * id, a category name, a name and a trace object.
*
- * @param canonicalName
- * The "path" of the tracetype
+ * @param traceTypeId
+ * the trace type id
* @param categoryName
* the category of the trace type
* @param name
- * the name of the trace
+ * the name of the trace type
* @param trace
* an object of the trace type
* @param isDir
- * flag indicating whether the trace type is for a directory or file trace
+ * flag indicating whether the trace type is for a directory or
+ * file trace
* @param elementType
* True if this helper is for an experiment type
*/
- public TraceTypeHelper(String canonicalName, String categoryName, String name, @NonNull ITmfTrace trace, boolean isDir, TraceElementType elementType) {
+ public TraceTypeHelper(String traceTypeId, String categoryName, String name, @NonNull ITmfTrace trace, boolean isDir, TraceElementType elementType) {
fName = name;
fCategoryName = categoryName;
- fCanonicalName = canonicalName;
+ fTraceTypeId = traceTypeId;
fTrace = trace;
fIsDirectory = isDir;
fElementType = elementType;
@@ -83,12 +84,12 @@ public class TraceTypeHelper {
}
/**
- * Get the canonical name
+ * Get the trace type id
*
- * @return the canonical Name
+ * @return the trace type id
*/
- public String getCanonicalName() {
- return fCanonicalName;
+ public String getTraceTypeId() {
+ return fTraceTypeId;
}
/**
diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
index 8cf8415883..0a134d9171 100644
--- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
+++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/ImportTraceWizardSelectTraceTypePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2014 Ericsson
+ * Copyright (c) 2013, 2015 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
@@ -133,7 +133,7 @@ public class ImportTraceWizardSelectTraceTypePage extends AbstractImportTraceWiz
if (children != null) {
for (TraceTypeHelper traceType : children) {
if (fTreeView.getChecked(traceType)) {
- tracesToScan.add(traceType.getCanonicalName());
+ tracesToScan.add(traceType.getTraceTypeId());
}
}
}
diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/project/model/TmfTraceTypeUIUtils.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/project/model/TmfTraceTypeUIUtils.java
index 5859ba3b2b..3a4271d18b 100644
--- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/project/model/TmfTraceTypeUIUtils.java
+++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/project/model/TmfTraceTypeUIUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 Ericsson
+ * Copyright (c) 2014, 2015 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
@@ -137,7 +137,7 @@ public final class TmfTraceTypeUIUtils {
Button b = new Button(shellToShow, SWT.RADIO);
final String displayName = candidate.getCategoryName() + ':' + candidate.getName();
b.setText(displayName);
- names.put(displayName, candidate.getCanonicalName());
+ names.put(displayName, candidate.getTraceTypeId());
b.addSelectionListener(new SelectionListener() {
@@ -219,7 +219,7 @@ public final class TmfTraceTypeUIUtils {
List<Pair<Integer, TraceTypeHelper>> reducedCandidates = reduce(candidates);
for (Pair<Integer, TraceTypeHelper> candidatePair : reducedCandidates) {
TraceTypeHelper candidate = candidatePair.getSecond();
- if (candidate.getCanonicalName().equals(traceTypeHint)) {
+ if (candidate.getTraceTypeId().equals(traceTypeHint)) {
traceTypeToSet = candidate;
break;
}
@@ -276,7 +276,7 @@ public final class TmfTraceTypeUIUtils {
* @since 3.1
*/
public static IStatus setTraceType(IResource resource, TraceTypeHelper traceType, boolean refresh) throws CoreException {
- String traceTypeId = traceType.getCanonicalName();
+ String traceTypeId = traceType.getTraceTypeId();
resource.setPersistentProperty(TmfCommonConstants.TRACETYPE, traceTypeId);

Back to the top