[Rev 05] RFR: 6677: Search to highlight cells in the flame view

Alex Macdonald aptmac at openjdk.java.net
Fri Feb 7 20:22:13 UTC 2020


On Fri, 7 Feb 2020 20:22:12 GMT, Miroslav Wengner <mwengner at openjdk.org> wrote:

>> ticket: https://bugs.openjdk.java.net/browse/JMC-6677
> 
> The pull request has been updated with 1 additional commit.

Nice, the functionality looks good.

Formatting-wise there's some some spacing and indentation to fix in the JavaScript, but nothing outrageous.

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 136:

> 135: const removeSpecialCharacters = function(text) {
> 136: 	//return text.trim().replace(/[&\/\\#,+()$~%'":*?<>{}]/g, '_').toLowerCase();
> 137: 	const map = Array.prototype.map;

leftover comment

EDIT: disregard this, I was looking at the previous commit changes.

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 138:

> 137: 	const map = Array.prototype.map;
> 138:     const resultText = map.call(text.trim().toLowerCase(), element => {
> 139:         if(specialCharactersMap.has(element)){

indent level is off, and the following code block has some spacing to fix up

application/org.openjdk.jmc.flightrecorder.flameview/src/main/js/flameviewColoring.js line 63:

> 62: const packageColorMap = new Map().set("", rootPackageColor);
> 63: const specialCharactersMap = new Map().set('#','\x23').set('$','\x24').set('(', '\x28').set(')','\x29')
> 64: 		.set(',','\x2c').set('-','\x2d').set('.','\x2e').set('<','\x3c').set('>','\x3e').set('[','\x5b')

inconsistencies in spaces after the `,` between the special character and it's alternate value

-------------



PR: https://git.openjdk.java.net/jmc/pull/45


More information about the jmc-dev mailing list