generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Feature/208-Historical-data-tab
- Loading branch information
Showing
12 changed files
with
323 additions
and
86 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<mxfile host="app.diagrams.net" modified="2024-01-29T14:31:52.935Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" version="21.6.6" etag="9vj5rF4bOk3iyI5yAxp0" type="device"> | ||
<diagram id="P8BQ2W_Xv_uKDQDuA_XK" name="Page-1"> | ||
<mxGraphModel dx="788" dy="751" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0" /> | ||
<mxCell id="1" parent="0" /> | ||
<mxCell id="3" value="" style="rounded=1;whiteSpace=wrap;html=1;fillColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="160" y="80" width="640" height="520" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="4" value="<font style="font-size: 24px;">PIT MutationMate Plugin</font>" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1"> | ||
<mxGeometry x="270" y="110" width="280" height="30" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="5" value="" style="rounded=1;whiteSpace=wrap;html=1;fontSize=24;fillColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="210" y="160" width="540" height="180" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="6" value="<font style="font-size: 18px;">Frontend</font>" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;" parent="1" vertex="1"> | ||
<mxGeometry x="450" y="170" width="60" height="30" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="8" value="" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=none;" parent="1" vertex="1"> | ||
<mxGeometry x="210" y="360" width="540" height="190" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="21" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=14;" parent="1" source="9" target="17" edge="1"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="9" value="" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=#e945a5;strokeColor=none;gradientColor=none;fillStyle=auto;opacity=30;" parent="1" vertex="1"> | ||
<mxGeometry x="240" y="210" width="230" height="100" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="10" value="<font style="font-size: 14px;">Visualizations</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=#e945a5;strokeColor=none;opacity=30;" parent="1" vertex="1"> | ||
<mxGeometry x="490" y="210" width="230" height="100" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="11" value="<font style="font-size: 14px;">Actions</font>" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=18;" parent="1" vertex="1"> | ||
<mxGeometry x="325" y="245" width="60" height="30" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="24" style="edgeStyle=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;fontSize=14;" parent="1" source="15" target="10" edge="1"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="15" value="<font style="font-size: 14px;">Result Parser</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=#e945a5;strokeColor=none;opacity=30;" parent="1" vertex="1"> | ||
<mxGeometry x="590" y="420" width="130" height="100" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="23" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=14;" parent="1" source="16" target="15" edge="1"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="16" value="<font style="font-size: 14px;">PiTest Run</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=#e945a5;strokeColor=none;opacity=30;" parent="1" vertex="1"> | ||
<mxGeometry x="415" y="420" width="130" height="100" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="22" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=14;" parent="1" source="17" target="16" edge="1"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="17" value="<font style="font-size: 14px;">Run Configuration</font>" style="rounded=1;whiteSpace=wrap;html=1;fontSize=18;fillColor=#e945a5;strokeColor=none;opacity=30;" parent="1" vertex="1"> | ||
<mxGeometry x="240" y="420" width="130" height="100" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="20" value="" style="endArrow=classic;startArrow=classic;html=1;fontSize=14;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" target="5" edge="1"> | ||
<mxGeometry width="50" height="50" relative="1" as="geometry"> | ||
<mxPoint x="120" y="250" as="sourcePoint" /> | ||
<mxPoint x="170" y="220" as="targetPoint" /> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="25" value="<font style="font-size: 18px;">Backend</font>" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=14;" parent="1" vertex="1"> | ||
<mxGeometry x="450" y="370" width="60" height="30" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dq8YN8EkuUWX_4TegmMQ-25" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MCA0MDsiIHZpZXdCb3g9IjAgMCA0MCA0MCIgaGVpZ2h0PSI0MHB4IiB3aWR0aD0iNDBweCIgeT0iMHB4IiB4PSIwcHgiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjEiPiYjeGE7PHN0eWxlIHR5cGU9InRleHQvY3NzIj4mI3hhOwkuc3Qwe2ZpbGw6bm9uZTtzdHJva2U6I0Y3NEVBNztzdHJva2UtbWl0ZXJsaW1pdDoxMDt9JiN4YTsJLnN0MXtmaWxsOiNGRkZGRkY7fSYjeGE7CS5zdDJ7ZmlsbDojRjgyNzkwO30mI3hhOwkuc3Qze2ZpbGw6I0Y2MkM4RDt9JiN4YTsJLnN0NHtmaWxsOiNGNTJEOEQ7fSYjeGE7CS5zdDV7ZmlsbDojRjQyRThEO3N0cm9rZTojRjUyRDhEO3N0cm9rZS1taXRlcmxpbWl0OjEwO30mI3hhOwkuc3Q2e29wYWNpdHk6MC41Njg2O3N0cm9rZTojMDAwMDAwO3N0cm9rZS1taXRlcmxpbWl0OjEwO30mI3hhOwkuc3Q3e29wYWNpdHk6MC41Njg2O2ZpbGw6I0ZGRkZGRjtzdHJva2U6I0ZGRkZGRjtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9JiN4YTs8L3N0eWxlPiYjeGE7PGc+JiN4YTsJPGc+JiN4YTsJCTxwYXRoIGQ9Ik02LjYzLDExLjhjMS4xMS0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NTgsMzAuNTksNy4wOSwzMC4xNkw3LjA5LDMwLjE2eiIgY2xhc3M9InN0MyIvPiYjeGE7CTwvZz4mI3hhOzwvZz4mI3hhOzwvc3ZnPg==;" vertex="1" parent="1"> | ||
<mxGeometry x="230" y="105" width="40" height="40" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="Dq8YN8EkuUWX_4TegmMQ-26" value="" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#000000;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.user;strokeWidth=1;" vertex="1" parent="1"> | ||
<mxGeometry x="50" y="211" width="78" height="78" as="geometry" /> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 0 additions & 42 deletions
42
pitmutationmate/src/main/kotlin/com/amos/pitmutationmate/pitmutationmate/RunArchiver.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
...kotlin/com/amos/pitmutationmate/pitmutationmate/execution/ExecutionDoneProcessListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// SPDX-License-Identifier: MIT | ||
// SPDX-FileCopyrightText: 2023-2024 | ||
|
||
package com.amos.pitmutationmate.pitmutationmate.execution | ||
|
||
import com.amos.pitmutationmate.pitmutationmate.editor.PluginState | ||
import com.amos.pitmutationmate.pitmutationmate.services.MutationResultService | ||
import com.amos.pitmutationmate.pitmutationmate.services.RunArchiveService | ||
import com.amos.pitmutationmate.pitmutationmate.services.UdpMessagingServer | ||
import com.amos.pitmutationmate.pitmutationmate.ui.ToolWindowFactory | ||
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer | ||
import com.intellij.execution.process.ProcessAdapter | ||
import com.intellij.execution.process.ProcessEvent | ||
import com.intellij.openapi.application.ApplicationManager | ||
import com.intellij.openapi.components.service | ||
import com.intellij.openapi.diagnostic.Logger | ||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.wm.ToolWindow | ||
import com.intellij.openapi.wm.ToolWindowManager | ||
import com.intellij.psi.JavaPsiFacade | ||
import com.intellij.psi.PsiFile | ||
import com.intellij.psi.search.GlobalSearchScope | ||
|
||
class ExecutionDoneProcessListener(val project: Project, private val classFqdns: String?) : ProcessAdapter() { | ||
private val log: Logger = Logger.getInstance(ExecutionDoneProcessListener::class.java) | ||
|
||
override fun processTerminated(event: ProcessEvent) { | ||
log.debug("BasePitestExecutor: executeTask: processTerminated: event: $event") | ||
project.service<UdpMessagingServer>().stopServer() // Stop the UDP server | ||
if (classFqdns.isNullOrEmpty()) { | ||
return | ||
} | ||
|
||
// save and get latest pitest results | ||
val resultData = project.service<MutationResultService>().updateLastMutationResult() | ||
// update tool window with latest result data | ||
val toolWindowManager = ToolWindowManager.getInstance(project) | ||
val toolWindow: ToolWindow? = toolWindowManager.getToolWindow(ToolWindowFactory.ID) | ||
if (toolWindow != null) { | ||
toolWindowManager.invokeLater { | ||
ToolWindowFactory.Util.updateReport(toolWindow, resultData) | ||
} | ||
} | ||
// restart code highlighting upon new pitest results | ||
ApplicationManager.getApplication().runReadAction { | ||
restartCodeHighlighting() | ||
} | ||
// archive the pitest run | ||
project.service<RunArchiveService>().archiveRun() | ||
} | ||
|
||
private fun restartCodeHighlighting() { | ||
PluginState.isAnnotatorEnabled = true | ||
val analyser = DaemonCodeAnalyzer.getInstance(project) | ||
val psiFiles = classFqdns!!.split(",").map { getPsiFileFromFQN(project, it) } | ||
psiFiles.forEach { file -> | ||
if (file != null) { | ||
analyser.restart(file) | ||
} | ||
} | ||
} | ||
|
||
private fun getPsiFileFromFQN(project: Project, fqdn: String): PsiFile? { | ||
val javaPsiFacade = JavaPsiFacade.getInstance(project) | ||
val psiClass = javaPsiFacade.findClass(fqdn, GlobalSearchScope.allScope(project)) | ||
val psiFile = psiClass?.containingFile | ||
if (psiFile == null) { | ||
log.debug("Could not find PsiFile for classFQN $classFqdns") | ||
} | ||
return psiFile | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.