For CTF traces using specification v1.8.2 or above, information can optionally be embedded in the trace to indicate the source of a trace event. This is accessed through the event context menu by right-clicking on an event in the table.
-==== Callsite ====
+==== Source Code ====
-If a callsite is available in the trace for the selected event, the item '''Open Callsite''' is shown in the context menu. Selecting this menu item will attempt to find the callsite source file in all opened projects in the workspace. If multiple candidates exist, a selection dialog will be shown to the user. The selected source file will be opened in its default language editor. If no candidate is found, an error dialog is shown displaying the callsite information.
+If a source file is available in the trace for the selected event, the item '''Open Source Code''' is shown in the context menu. Selecting this menu item will attempt to find the source file in all opened projects in the workspace. If multiple candidates exist, a selection dialog will be shown to the user. The selected source file will be opened, at the correct line, in its default language editor. If no candidate is found, an error dialog is shown displaying the source code information.
==== EMF Model ====
public static String TmfEventsTable_FilterHint;
public static String TmfEventsTable_HideRawActionText;
public static String TmfEventsTable_HideTableActionText;
- public static String TmfEventsTable_OpenCallsiteActionText;
- public static String TmfEventsTable_OpenCallsiteNotFound;
- public static String TmfEventsTable_OpenCallsiteSelectFileDialogTitle;
+ public static String TmfEventsTable_OpenSourceCodeActionText;
+ public static String TmfEventsTable_OpenSourceCodeNotFound;
+ public static String TmfEventsTable_OpenSourceCodeSelectFileDialogTitle;
public static String TmfEventsTable_OpenModelActionText;
public static String TmfEventsTable_OpenModelUnsupportedURI;
public static String TmfEventsTable_ReferenceColumnHeader;
TmfEventsTable_FilterHint=<filter>
TmfEventsTable_HideRawActionText=Hide Raw
TmfEventsTable_HideTableActionText=Hide Table
-TmfEventsTable_OpenCallsiteActionText=Open Callsite
-TmfEventsTable_OpenCallsiteNotFound=can not be found in the workspace.
-TmfEventsTable_OpenCallsiteSelectFileDialogTitle=Select source file for callsite
+TmfEventsTable_OpenSourceCodeActionText=Open Source Code
+TmfEventsTable_OpenSourceCodeNotFound=can not be found in the workspace.
+TmfEventsTable_OpenSourceCodeSelectFileDialogTitle=Select source file for the call site
TmfEventsTable_OpenModelActionText=Open Model Element
TmfEventsTable_OpenModelUnsupportedURI=is not a supported model URI format.
TmfEventsTable_ReferenceColumnHeader=File
}
};
- final IAction openCallsiteAction = new Action(Messages.TmfEventsTable_OpenCallsiteActionText) {
+ final IAction openCallsiteAction = new Action(Messages.TmfEventsTable_OpenSourceCodeActionText) {
@Override
public void run() {
final TableItem items[] = fTable.getSelection();
}
});
dialog.setInput(files);
- dialog.setTitle(Messages.TmfEventsTable_OpenCallsiteSelectFileDialogTitle);
- dialog.setMessage(Messages.TmfEventsTable_OpenCallsiteSelectFileDialogTitle + '\n' + cs.toString());
+ dialog.setTitle(Messages.TmfEventsTable_OpenSourceCodeSelectFileDialogTitle);
+ dialog.setMessage(Messages.TmfEventsTable_OpenSourceCodeSelectFileDialogTitle + '\n' + cs.toString());
dialog.open();
Object[] result = dialog.getResult();
if (result != null && result.length > 0) {
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), marker);
marker.delete();
} else if (files.size() == 0){
- displayException(new FileNotFoundException('\'' + cs.toString() + '\'' + '\n' + Messages.TmfEventsTable_OpenCallsiteNotFound));
+ displayException(new FileNotFoundException('\'' + cs.toString() + '\'' + '\n' + Messages.TmfEventsTable_OpenSourceCodeNotFound));
}
} catch (CoreException e) {
displayException(e);