-
Notifications
You must be signed in to change notification settings - Fork 128
IEP-374: GCOV Reports view and creation #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b60cbf3
228164f
b46d51d
66772dc
a65fa9f
26da993
4fafdd1
506305f
81c1472
6b290bf
aed14f2
5c286e8
05ea147
7ed186c
0ab584f
b5c2381
cdc120a
83b4581
c3a6e21
5af363b
a5b71a6
e9289a8
1076037
4bac3ff
0f1d826
2519d20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/******************************************************************************* | ||
* Copyright 2023 Espressif Systems (Shanghai) PTE LTD. All rights reserved. | ||
* Use is subject to license terms. | ||
*******************************************************************************/ | ||
package com.espressif.idf.core.util; | ||
|
||
import org.eclipse.core.internal.registry.osgi.OSGIUtils; | ||
import org.eclipse.core.resources.IFile; | ||
alirana01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import org.eclipse.core.resources.IProject; | ||
import org.eclipse.jface.dialogs.IDialogSettings; | ||
import org.eclipse.ui.PlatformUI; | ||
import org.osgi.framework.Bundle; | ||
import org.osgi.framework.FrameworkUtil; | ||
|
||
import com.espressif.idf.core.logging.Logger; | ||
|
||
/** | ||
* Gcov utility to handle and manage the selected project for view and also used to setup the dialog settings | ||
* | ||
* @author Ali Azam Rana | ||
* | ||
*/ | ||
@SuppressWarnings("restriction") | ||
public class GcovUtility | ||
{ | ||
private static IProject selectedProject; | ||
|
||
public static void setSelectedProject(IProject project) | ||
{ | ||
selectedProject = project; | ||
} | ||
|
||
public static IProject getSelectedProject() | ||
{ | ||
return selectedProject; | ||
} | ||
|
||
public static void clearSelectedProject() | ||
{ | ||
selectedProject = null; | ||
} | ||
alirana01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
public static void setUpDialog(IFile gcFile, String elfFile) | ||
{ | ||
try | ||
{ | ||
Bundle bundle = OSGIUtils.getDefault().getBundle("org.eclipse.linuxtools.gcov.core"); //$NON-NLS-1$ | ||
Class<?> openGcAction = bundle.loadClass("org.eclipse.linuxtools.internal.gcov.action.OpenGCAction"); //$NON-NLS-1$ | ||
Class<?> openGcDialog = bundle.loadClass("org.eclipse.linuxtools.internal.gcov.dialog.OpenGCDialog"); //$NON-NLS-1$ | ||
IDialogSettings ds = PlatformUI.getDialogSettingsProvider(FrameworkUtil.getBundle(openGcAction)) | ||
.getDialogSettings(); | ||
IDialogSettings defaultMapping = ds.getSection(openGcDialog.getName()); | ||
if (defaultMapping == null) | ||
{ | ||
defaultMapping = ds.addNewSection(openGcDialog.getName()); | ||
} | ||
|
||
ds.put(gcFile.getRawLocation().toOSString(), elfFile); | ||
} | ||
catch (Exception e) | ||
{ | ||
Logger.log(e); | ||
} | ||
alirana01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
alirana01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,17 @@ | |
id="com.espressif.idf.ui.appLvlTracing" | ||
name="%command.name"> | ||
</command> | ||
<command | ||
defaultHandler="com.espressif.idf.debug.gdbjtag.openocd.gcov.GcovDumpHandler" | ||
id="com.espressif.idf.gcov.instant" | ||
name="GCOV Instant"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we follow same convention as esp-idf |
||
</command> | ||
<command | ||
defaultHandler="com.espressif.idf.debug.gdbjtag.openocd.gcov.GcovDumpHandler" | ||
id="com.espressif.idf.gcov.hardcoded" | ||
name="GCOV Hard-coded"> | ||
</command> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
</extension> | ||
<extension | ||
point="org.eclipse.ui.startup"> | ||
|
Uh oh!
There was an error while loading. Please reload this page.