summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorBernd Hufmann2012-11-26 12:47:33 (EST)
committer Bernd Hufmann2012-11-26 14:40:24 (EST)
commitac28ea296942591eb89a361e3dbf857d0e1bf905 (patch)
tree26a565fb0380937c9c7c6ae0efd53fbe2f6883f9
parentc96affc5decabb138fa9e439c7e249818a434e14 (diff)
downloadorg.eclipse.linuxtools-ac28ea296942591eb89a361e3dbf857d0e1bf905.zip
org.eclipse.linuxtools-ac28ea296942591eb89a361e3dbf857d0e1bf905.tar.gz
org.eclipse.linuxtools-ac28ea296942591eb89a361e3dbf857d0e1bf905.tar.bz2
Use threads in open experiment/trace for long init operationsrefs/changes/36/8836/3
Additionally, the error handling in open experiment/trace is changed to dispose the trace object in an error case. Also some error print-outs are updated. Change-Id: I49c9d8fbf04a83b2b7d3c36acbc52c1daa831998 Reviewed-on: https://git.eclipse.org/r/8836 Tested-by: Hudson CI Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/Messages.java5
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenExperimentHandler.java187
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java153
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties5
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java6
5 files changed, 217 insertions, 139 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/Messages.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/Messages.java
index 227d866..33d90c7 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/Messages.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/Messages.java
@@ -27,10 +27,13 @@ public class Messages extends NLS {
public static String OpenTraceHandler_Title;
public static String OpenTraceHandler_NoTraceType;
- public static String OpenTraceHandler_NoTrace;
+ public static String OpenTraceHandler_InitError;
+ public static String OpenTraceHandler_Error;
public static String OpenExperimentHandler_Title;
public static String OpenExperimentHandler_NoTraceType;
+ public static String OpenExperimentHandler_InitError;
+ public static String OpenExperimentHandler_Error;
public static String DeleteDialog_Title;
public static String DeleteTraceHandler_Message;
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenExperimentHandler.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenExperimentHandler.java
index 3c1c4ef..dc8740f 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenExperimentHandler.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenExperimentHandler.java
@@ -25,6 +25,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.linuxtools.internal.tmf.ui.Activator;
import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
@@ -34,6 +35,7 @@ import org.eclipse.linuxtools.tmf.ui.editors.TmfEditorInput;
import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;
import org.eclipse.linuxtools.tmf.ui.project.model.TmfExperimentElement;
import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -97,7 +99,6 @@ public class OpenExperimentHandler extends AbstractHandler {
// Execution
// ------------------------------------------------------------------------
- @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
@@ -107,88 +108,128 @@ public class OpenExperimentHandler extends AbstractHandler {
return false;
}
- try {
- final IFile bookmarksFile = fExperiment.getProject().getExperimentsFolder().getResource().getFile(BOOKMARKS_HIDDEN_FILE);
- if (!bookmarksFile.exists()) {
- final InputStream source = new ByteArrayInputStream(new byte[0]);
- bookmarksFile.create(source, true, null);
- }
- bookmarksFile.setHidden(true);
+ final TmfExperimentElement experimentElement = fExperiment;
+
+ Thread thread = new Thread() {
+ @Override
+ public void run() {
+
+ final IFile file;
- final IFile file = fExperiment.getResource().getFile(fExperiment.getName() + '_');
- if (!file.exists()) {
- file.createLink(bookmarksFile.getLocation(), IResource.REPLACE, null);
- }
- file.setHidden(true);
- file.setPersistentProperty(TmfCommonConstants.TRACETYPE, TmfExperiment.class.getCanonicalName());
-
- // Instantiate the experiment's traces
- final List<TmfTraceElement> traceEntries = fExperiment.getTraces();
- final int nbTraces = traceEntries.size();
- int cacheSize = Integer.MAX_VALUE;
- String commonEditorId = null;
- final ITmfTrace[] traces = new ITmfTrace[nbTraces];
- for (int i = 0; i < nbTraces; i++) {
- TmfTraceElement element = traceEntries.get(i);
-
- // Since trace is under an experiment, use the original trace from the traces folder
- element = element.getElementUnderTraceFolder();
-
- final ITmfTrace trace = element.instantiateTrace();
- final ITmfEvent traceEvent = element.instantiateEvent();
- if ((trace == null) || (traceEvent == null)) {
- displayErrorMsg(Messages.OpenExperimentHandler_NoTraceType);
- for (int j = 0; j < i; j++) {
- traces[j].dispose();
- }
- return null;
- }
try {
- trace.initTrace(element.getResource(), element.getLocation().getPath(), traceEvent.getClass());
- } catch (final TmfTraceException e) {
- displayErrorMsg(""); //$NON-NLS-1$
- }
- cacheSize = Math.min(cacheSize, trace.getCacheSize());
-
- // If all traces use the same editorId, use it, otherwise use the default
- final String editorId = element.getEditorId();
- if (commonEditorId == null) {
- commonEditorId = (editorId != null) ? editorId : TmfEventsEditor.ID;
- } else if (!commonEditorId.equals(editorId)) {
- commonEditorId = TmfEventsEditor.ID;
- }
- traces[i] = trace;
- }
+ final IFile bookmarksFile = experimentElement.getProject().getExperimentsFolder().getResource().getFile(BOOKMARKS_HIDDEN_FILE);
+ if (!bookmarksFile.exists()) {
+ final InputStream source = new ByteArrayInputStream(new byte[0]);
+ bookmarksFile.create(source, true, null);
+ }
+ bookmarksFile.setHidden(true);
+
+ file = experimentElement.getResource().getFile(experimentElement.getName() + '_');
+ if (!file.exists()) {
+ file.createLink(bookmarksFile.getLocation(), IResource.REPLACE, null);
+ }
+ file.setHidden(true);
+ file.setPersistentProperty(TmfCommonConstants.TRACETYPE, TmfExperiment.class.getCanonicalName());
- // Create the experiment
- TmfExperiment experiment = new TmfExperiment(ITmfEvent.class, fExperiment.getName(), traces, cacheSize);
- experiment.setBookmarksFile(file);
+ } catch (final CoreException e) {
+ Activator.getDefault().logError("Error opening experiment " + experimentElement.getName(), e); //$NON-NLS-1$
+ displayErrorMsg(Messages.OpenExperimentHandler_Error + "\n\n" + e.getMessage()); //$NON-NLS-1$
+ return;
+ }
- final IEditorInput editorInput = new TmfEditorInput(file, experiment);
- final IWorkbench wb = PlatformUI.getWorkbench();
- final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();
+ // Instantiate the experiment's traces
+ final List<TmfTraceElement> traceEntries = experimentElement.getTraces();
+ final int nbTraces = traceEntries.size();
+ int cacheSize = Integer.MAX_VALUE;
+ String commonEditorId = null;
+ final ITmfTrace[] traces = new ITmfTrace[nbTraces];
+ for (int i = 0; i < nbTraces; i++) {
+ TmfTraceElement element = traceEntries.get(i);
+
+ // Since trace is under an experiment, use the original trace from the traces folder
+ element = element.getElementUnderTraceFolder();
+
+ final ITmfTrace trace = element.instantiateTrace();
+ final ITmfEvent traceEvent = element.instantiateEvent();
+ if ((trace == null) || (traceEvent == null)) {
+ displayErrorMsg(Messages.OpenExperimentHandler_NoTraceType);
+ for (int j = 0; j < i; j++) {
+ traces[j].dispose();
+ }
+ if (trace != null) {
+ trace.dispose();
+ }
+ return;
+ }
+ try {
+ trace.initTrace(element.getResource(), element.getLocation().getPath(), traceEvent.getClass());
+ } catch (final TmfTraceException e) {
+ displayErrorMsg(Messages.OpenTraceHandler_InitError + "\n\n" + e); //$NON-NLS-1$
+ for (int j = 0; j < i; j++) {
+ traces[j].dispose();
+ }
+ trace.dispose();
+ return;
+ }
+ cacheSize = Math.min(cacheSize, trace.getCacheSize());
+
+ // If all traces use the same editorId, use it, otherwise use the default
+ final String editorId = element.getEditorId();
+ if (commonEditorId == null) {
+ commonEditorId = (editorId != null) ? editorId : TmfEventsEditor.ID;
+ } else if (!commonEditorId.equals(editorId)) {
+ commonEditorId = TmfEventsEditor.ID;
+ }
+ traces[i] = trace;
+ }
- final IEditorPart editor = activePage.findEditor(new FileEditorInput(file));
- if ((editor != null) && (editor instanceof IReusableEditor)) {
- activePage.reuseEditor((IReusableEditor) editor, editorInput);
- activePage.activate(editor);
- } else {
- activePage.openEditor(editorInput, commonEditorId);
+ // Create the experiment
+ final TmfExperiment experiment = new TmfExperiment(ITmfEvent.class, experimentElement.getName(), traces, cacheSize);
+ experiment.setBookmarksFile(file);
+
+ final String finalCommonEditorId = commonEditorId;
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ final IEditorInput editorInput = new TmfEditorInput(file, experiment);
+ final IWorkbench wb = PlatformUI.getWorkbench();
+ final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();
+
+ final IEditorPart editor = activePage.findEditor(new FileEditorInput(file));
+ if ((editor != null) && (editor instanceof IReusableEditor)) {
+ activePage.reuseEditor((IReusableEditor) editor, editorInput);
+ activePage.activate(editor);
+ } else {
+ activePage.openEditor(editorInput, finalCommonEditorId);
+ }
+ IDE.setDefaultEditor(file, finalCommonEditorId);
+ // editor should dispose the experiment on close
+ } catch (final CoreException e) {
+ Activator.getDefault().logError("Error opening experiment " + experimentElement.getName(), e); //$NON-NLS-1$
+ displayErrorMsg(Messages.OpenExperimentHandler_Error + "\n\n" + e.getMessage()); //$NON-NLS-1$
+ experiment.dispose();
+ return;
+ }
+ }
+ });
}
- IDE.setDefaultEditor(file, commonEditorId);
- // editor should dispose the experiment on close
- } catch (final CoreException e) {
- displayErrorMsg(e.getMessage());
- }
+ };
+
+ thread.start();
return null;
}
private static void displayErrorMsg(final String errorMsg) {
- final MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- mb.setText(Messages.OpenExperimentHandler_Title);
- mb.setMessage(errorMsg);
- mb.open();
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ final MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ mb.setText(Messages.OpenExperimentHandler_Title);
+ mb.setMessage(errorMsg);
+ mb.open();
+ }
+ });
}
-
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java
index 25c9a8d..340f236 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/OpenTraceHandler.java
@@ -34,6 +34,7 @@ import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
import org.eclipse.linuxtools.tmf.ui.editors.TmfEditorInput;
import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;
import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -118,78 +119,108 @@ public class OpenTraceHandler extends AbstractHandler {
}
// If trace is under an experiment, use the original trace from the traces folder
- fTrace = fTrace.getElementUnderTraceFolder();
-
- final ITmfTrace trace = fTrace.instantiateTrace();
- final ITmfEvent traceEvent = fTrace.instantiateEvent();
- if ((trace == null) || (traceEvent == null)) {
- displayErrorMsg(Messages.OpenTraceHandler_NoTraceType);
- return null;
- }
-
- // Get the editor_id from the extension point
- String traceEditorId = fTrace.getEditorId();
- final String editorId = (traceEditorId != null) ? traceEditorId : TmfEventsEditor.ID;
-
- try {
- trace.initTrace(fTrace.getResource(), fTrace.getLocation().getPath(), traceEvent.getClass());
- } catch (final TmfTraceException e) {
- displayErrorMsg(Messages.OpenTraceHandler_NoTrace + "\n\n" + e); //$NON-NLS-1$
- return null;
- }
-
- final IResource resource = fTrace.getResource();
- IFile file = null;
- if (resource instanceof IFile) {
- file = (IFile) resource;
- } else if (resource instanceof IFolder) {
- try {
- final IFile bookmarksFile = fTrace.getProject().getTracesFolder().getResource().getFile(BOOKMARKS_HIDDEN_FILE);
- if (!bookmarksFile.exists()) {
- final InputStream source = new ByteArrayInputStream(new byte[0]);
- bookmarksFile.create(source, true, null);
+ final TmfTraceElement traceElement = fTrace.getElementUnderTraceFolder();
+
+ Thread thread = new Thread() {
+ @Override
+ public void run() {
+
+ final ITmfTrace trace = traceElement.instantiateTrace();
+ final ITmfEvent traceEvent = traceElement.instantiateEvent();
+ if ((trace == null) || (traceEvent == null)) {
+ displayErrorMsg(Messages.OpenTraceHandler_NoTraceType);
+ if (trace != null) {
+ trace.dispose();
+ }
+ return;
}
- bookmarksFile.setHidden(true);
- final IFolder folder = (IFolder) resource;
- file = folder.getFile(fTrace.getName() + '_');
- if (!file.exists()) {
- file.createLink(bookmarksFile.getLocation(), IResource.REPLACE, null);
+ // Get the editor_id from the extension point
+ String traceEditorId = traceElement.getEditorId();
+ final String editorId = (traceEditorId != null) ? traceEditorId : TmfEventsEditor.ID;
+
+ try {
+ trace.initTrace(traceElement.getResource(), traceElement.getLocation().getPath(), traceEvent.getClass());
+ } catch (final TmfTraceException e) {
+ displayErrorMsg(Messages.OpenTraceHandler_InitError + "\n\n" + e); //$NON-NLS-1$
+ trace.dispose();
+ return;
}
- file.setHidden(true);
- file.setPersistentProperty(TmfCommonConstants.TRACETYPE, TmfTrace.class.getCanonicalName());
- IDE.setDefaultEditor(file, editorId);
- } catch (final CoreException e) {
- Activator.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
- }
- }
- try {
- final IEditorInput editorInput = new TmfEditorInput(file, trace);
- final IWorkbench wb = PlatformUI.getWorkbench();
- final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();
-
- final IEditorPart editor = activePage.findEditor(new FileEditorInput(file));
- if ((editor != null) && (editor instanceof IReusableEditor)) {
- activePage.reuseEditor((IReusableEditor) editor, editorInput);
- activePage.activate(editor);
- } else {
- activePage.openEditor(editorInput, editorId);
+ final IResource resource = traceElement.getResource();
+ IFile file = null;
if (resource instanceof IFile) {
- IDE.setDefaultEditor((IFile) resource, editorId);
+ file = (IFile) resource;
+ } else if (resource instanceof IFolder) {
+ try {
+ final IFile bookmarksFile = traceElement.getProject().getTracesFolder().getResource().getFile(BOOKMARKS_HIDDEN_FILE);
+ if (!bookmarksFile.exists()) {
+ final InputStream source = new ByteArrayInputStream(new byte[0]);
+ bookmarksFile.create(source, true, null);
+ }
+ bookmarksFile.setHidden(true);
+
+ final IFolder folder = (IFolder) resource;
+ file = folder.getFile(traceElement.getName() + '_');
+ if (!file.exists()) {
+ file.createLink(bookmarksFile.getLocation(), IResource.REPLACE, null);
+ }
+ file.setHidden(true);
+ file.setPersistentProperty(TmfCommonConstants.TRACETYPE, TmfTrace.class.getCanonicalName());
+ IDE.setDefaultEditor(file, editorId);
+ // editor should dispose the experiment on close
+ } catch (final CoreException e) {
+ Activator.getDefault().logError("Error opening trace " + traceElement.getName(), e); //$NON-NLS-1$
+ displayErrorMsg(Messages.OpenTraceHandler_Error + "\n\n" + e.getMessage()); //$NON-NLS-1$
+ trace.dispose();
+ return;
+ }
}
+
+ final IFile editorFile = file;
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ final IEditorInput editorInput = new TmfEditorInput(editorFile, trace);
+ final IWorkbench wb = PlatformUI.getWorkbench();
+ final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();
+
+ final IEditorPart editor = activePage.findEditor(new FileEditorInput(editorFile));
+ if ((editor != null) && (editor instanceof IReusableEditor)) {
+ activePage.reuseEditor((IReusableEditor) editor, editorInput);
+ activePage.activate(editor);
+ } else {
+ activePage.openEditor(editorInput, editorId);
+ if (resource instanceof IFile) {
+ IDE.setDefaultEditor((IFile) resource, editorId);
+ }
+ }
+ } catch (final PartInitException e) {
+ displayErrorMsg(Messages.OpenTraceHandler_Error + "\n\n" + e.getMessage()); //$NON-NLS-1$
+ Activator.getDefault().logError("Error opening trace " + traceElement.getName(), e); //$NON-NLS-1$
+ trace.dispose();
+ }
+ }
+ });
+
}
- } catch (final PartInitException e) {
- Activator.getDefault().logError("Error opening trace " + fTrace.getName(), e); //$NON-NLS-1$
- }
+ };
+
+ thread.start();
return null;
}
private static void displayErrorMsg(final String errorMsg) {
- final MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- mb.setText(Messages.OpenTraceHandler_Title);
- mb.setMessage(errorMsg);
- mb.open();
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ final MessageBox mb = new MessageBox(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ mb.setText(Messages.OpenTraceHandler_Title);
+ mb.setMessage(errorMsg);
+ mb.open();
+ }
+ });
}
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties
index e00c819..fb72198 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/messages.properties
@@ -1,11 +1,14 @@
# Open trace error messages
OpenTraceHandler_Title = Open Trace
OpenTraceHandler_NoTraceType = No trace type associated to that trace\nPlease select a valid type
-OpenTraceHandler_NoTrace = Trace not found. Moved or deleted?
+OpenTraceHandler_InitError = Error initializing trace.
+OpenTraceHandler_Error = Error opening trace.
# Open experiment error messages
OpenExperimentHandler_Title = Open Experiment
OpenExperimentHandler_NoTraceType = No trace type associated to an experiment trace\nPlease select a valid type
+OpenExperimentHandler_InitError = Error initializing experiment.
+OpenExperimentHandler_Error = Error opening experiment.
# Delete message
DeleteDialog_Title = Confirm Delete
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java
index 2204b9a..5cb4713 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/editors/TmfEventsEditor.java
@@ -152,7 +152,7 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
try {
trace.initTrace(traceElement.getResource(), traceElement.getLocation().getPath(), traceEvent.getClass());
} catch (final TmfTraceException e) {
- throw new PartInitException(Messages.OpenTraceHandler_NoTrace, e);
+ throw new PartInitException(Messages.OpenTraceHandler_InitError, e);
}
cacheSize = Math.min(cacheSize, trace.getCacheSize());
traces[i] = trace;
@@ -181,7 +181,7 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
try {
trace.initTrace(traceElement.getResource(), traceElement.getLocation().getPath(), traceEvent.getClass());
} catch (final TmfTraceException e) {
- throw new PartInitException(Messages.OpenTraceHandler_NoTrace, e);
+ throw new PartInitException(Messages.OpenTraceHandler_InitError, e);
}
fTrace = trace;
break;
@@ -203,7 +203,7 @@ public class TmfEventsEditor extends TmfEditor implements ITmfTraceEditor, IReus
try {
trace.initTrace(traceElement.getResource(), traceElement.getLocation().getPath(), traceEvent.getClass());
} catch (final TmfTraceException e) {
- throw new PartInitException(Messages.OpenTraceHandler_NoTrace, e);
+ throw new PartInitException(Messages.OpenTraceHandler_InitError, e);
}
fTrace = trace;
break;