Skip to content

Commit 19cc7b3

Browse files
authored
Bring all package names into line with naming requirements (#368)
1 parent 8403ca0 commit 19cc7b3

File tree

10 files changed

+42
-34
lines changed

10 files changed

+42
-34
lines changed

clion-plugin/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# IntelliJ Platform Artifacts Repositories
22
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
33

4-
pluginGroup = com.huawei.utbot
4+
pluginGroup = org.utbot.cpp.clion.plugin
55
pluginName = UTBotCppClion
66
pluginVersion = 0.0.1
77

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/coverage/UTBotCoverageEngine.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class UTBotCoverageEngine : CoverageEngine() {
135135
* Checks whether coverage should be shown for file based on [CoverageSuitesBundle].
136136
* It is used in [CoverageDataManager.applyInformationToEditor].
137137
*
138-
* For example, see JavaCoverageEngine: We may not want to show com.huawei.utbot.cpp.clion.coverage for files in test
138+
* For example, see JavaCoverageEngine: We may not want to show coverage for files in test
139139
* folders, if suite.isTrackTestFolders == false, we may check it here and return false.
140140
*
141141
* For now all files are accepted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.utbot.cpp.clion.plugin.grpc
22

3+
import org.utbot.cpp.clion.plugin.utils.ourPluginVersion
34
import testsgen.Testgen
45

56
//TODO: when plugin is ready for release, take version from publish github action.
6-
fun getVersionGrpcRequest(): Testgen.VersionInfo = Testgen.VersionInfo.newBuilder().setVersion("0.0.1").build()
7+
fun getVersionGrpcRequest(): Testgen.VersionInfo = Testgen.VersionInfo.newBuilder().setVersion(ourPluginVersion).build()

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/settings/UTBotAllProjectSettings.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ class UTBotAllProjectSettings(val project: Project) {
8282
}
8383

8484
companion object {
85-
const val clientVersion = "0.0.1"
8685
const val DEFAULT_HOST = "localhost"
8786
const val DEFAULT_PORT = 2121
8887
}

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/ui/wizard/steps/ConnectionStep.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import javax.swing.event.DocumentEvent
3535
import org.utbot.cpp.clion.plugin.settings.UTBotProjectStoredSettings
3636
import org.utbot.cpp.clion.plugin.ui.ObservableValue
3737
import org.utbot.cpp.clion.plugin.utils.isWindows
38+
import org.utbot.cpp.clion.plugin.utils.ourPluginVersion
3839

3940
enum class ConnectionStatus {
4041
Connected,
@@ -145,7 +146,7 @@ class ConnectionStep(
145146

146147
val warningMessage: () -> String = {
147148
"⚠️ Warning! Versions are different or not defined:" +
148-
"Client: ${UTBotAllProjectSettings.clientVersion} Server: ${serverVersion ?: "not defined"}"
149+
"Client: ${ourPluginVersion} Server: ${serverVersion ?: "not defined"}"
149150
}
150151
label(warningMessage()).visibleIf(
151152
object : ComponentPredicate() {
@@ -188,7 +189,7 @@ class ConnectionStep(
188189
GrpcClient(port, host, "DummyId").use { client ->
189190
serverVersion = client.stub.handshake(getVersionGrpcRequest()).version
190191

191-
if (serverVersion != UTBotAllProjectSettings.clientVersion)
192+
if (serverVersion != ourPluginVersion)
192193
return ConnectionStatus.Suspicious
193194
return ConnectionStatus.Connected
194195
}
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
package org.utbot.cpp.clion.plugin.utils
22

3+
import com.intellij.ide.plugins.PluginManagerCore
4+
import com.intellij.openapi.extensions.PluginId
5+
36
val isWindows
4-
get() = System.getProperty("os.name").contains("win", ignoreCase = true)
7+
get() = System.getProperty("os.name").contains("win", ignoreCase = true)
8+
9+
val ourPluginVersion: String
10+
get() = PluginManagerCore.getPlugin(PluginId.findId("org.utbot.cpp.clion.plugin"))?.version ?: "dev-version"

clion-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
22
<idea-plugin>
3-
<id>com.github.vol0n.utbotcppclion</id>
3+
<id>org.utbot.cpp.clion.plugin</id>
44
<name>UTBotCppClion</name>
55
<vendor>vol0n</vendor>
6+
<version>0.0.1</version>
67

78
<depends>com.intellij.modules.platform</depends>
89
<depends>com.intellij.modules.clion.ide</depends>
@@ -20,7 +21,7 @@
2021
<coverageEngine implementation="org.utbot.cpp.clion.plugin.coverage.UTBotCoverageEngine"/>
2122
<postStartupActivity implementation="org.utbot.cpp.clion.plugin.UTBotStartupActivity"/>
2223
<projectConfigurable parentId="tools" instance="org.utbot.cpp.clion.plugin.settings.UTBotConfigurable"
23-
id="com.huawei.utbot.cpp.ui.UTBotConfigurable"
24+
id="org.utbot.cpp.clion.plugin.ui.UTBotConfigurable"
2425
displayName="UTBot Settings"
2526
nonDefaultProject="true"/>
2627
<notificationGroup id="Custom Notification Group" displayType="BALLOON"/>
@@ -53,38 +54,38 @@
5354
<add-to-group group-id="ProjectViewPopupMenuModifyGroup" anchor="first"/>
5455
</group>
5556

56-
<action id="com.huawei.utbot.cpp.actions.MarkSourceFolderAction"
57+
<action id="org.utbot.cpp.clion.plugin.actions.MarkSourceFolderAction"
5758
class="org.utbot.cpp.clion.plugin.actions.mark.MarkSourceFolderAction" text="UTBot: Mark As UTBot Folders"
5859
description="Marks selected folders as UTBot folders">
5960
<add-to-group group-id="actions.UTBot.projectTree" anchor="first"/>
6061
</action>
6162

62-
<action id="com.huawei.utbot.cpp.actions.UnmarkSourceFolderAction"
63+
<action id="org.utbot.cpp.clion.plugin.actions.UnmarkSourceFolderAction"
6364
class="org.utbot.cpp.clion.plugin.actions.mark.UnmarkSourceFolderAction" text="UTBot: Unmark UTBot Folders"
6465
description="Unmarks selected folders as UTBot folders">
65-
<add-to-group group-id="actions.UTBot.projectTree" relative-to-action="com.huawei.utbot.cpp.actions.MarkSourceFolderAction"
66+
<add-to-group group-id="actions.UTBot.projectTree" relative-to-action="org.utbot.cpp.clion.plugin.actions.MarkSourceFolderAction"
6667
anchor="after"/>
6768
</action>
6869

69-
<action id="com.huawei.utbot.cpp.actions.AskServerToGenerateBuildDir"
70+
<action id="org.utbot.cpp.clion.plugin.actions.AskServerToGenerateBuildDir"
7071
class="org.utbot.cpp.clion.plugin.actions.AskServerToGenerateBuildDir"
7172
text="Generate Build Directory" description="Ask server to generate build dir"/>
72-
<action id="com.huawei.utbot.cpp.actions.ConfigureProjectAction"
73+
<action id="org.utbot.cpp.clion.plugin.actions.ConfigureProjectAction"
7374
class="org.utbot.cpp.clion.plugin.actions.configure.ConfigureProjectAction" text="Configure Project"
7475
description="Configure project so that server can generate tests"/>
75-
<action id="com.huawei.utbot.cpp.actions.AskServerToGenerateJsonForProjectConfiguration"
76+
<action id="org.utbot.cpp.clion.plugin.actions.AskServerToGenerateJsonForProjectConfiguration"
7677
class="org.utbot.cpp.clion.plugin.actions.AskServerToGenerateJsonForProjectConfiguration"
7778
text="Generate Missing Json Files"
7879
description="Ask server to generate missing json files"/>
79-
<action id="com.huawei.utbot.cpp.actions.ShowWizardAction"
80+
<action id="org.utbot.cpp.clion.plugin.actions.ShowWizardAction"
8081
class="org.utbot.cpp.clion.plugin.actions.ShowWizardAction" text="Quickstart Wizard"
8182
description="Show quickstart wizard"/>
82-
<action id="com.huawei.utbot.cpp.actions.ReconfigureProjectAction"
83+
<action id="org.utbot.cpp.clion.plugin.actions.ReconfigureProjectAction"
8384
class="org.utbot.cpp.clion.plugin.actions.configure.ReconfigureProjectAction" text="Reset Cache and Configure Project"
8485
description="UTBot: Reset cache and configure project"/>
8586

8687

87-
<action id="com.huawei.utbot.cpp.actions.GenerateForFileAction"
88+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForFileAction"
8889
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForFileAction"
8990
text="UTBot: Generate Tests For Current File"
9091
>
@@ -98,62 +99,62 @@
9899
anchor="first"/>
99100
</action>
100101

101-
<action id="com.huawei.utbot.cpp.actions.GenerateForLineAction"
102+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForLineAction"
102103
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForLineAction"
103104
text="UTBot: Generate Tests For Current Line">
104105
<override-text place="EditorPopup" text="for Current Line"/>
105106
<synonym text="UL"/>
106107
<add-to-group
107108
group-id="actions.UTBot.editor"
108109
anchor="after"
109-
relative-to-action="com.huawei.utbot.cpp.actions.GenerateForFileAction"/>
110+
relative-to-action="org.utbot.cpp.clion.plugin.actions.GenerateForFileAction"/>
110111
</action>
111112

112-
<action id="com.huawei.utbot.cpp.actions.GenerateForFunctionAction"
113+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForFunctionAction"
113114
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForFunctionAction"
114115
text="UTBot: Generate Tests For Current Function">
115116
<override-text place="EditorPopup" text="for Current Function"/>
116117
<synonym text="UF"/>
117118
<add-to-group
118119
group-id="actions.UTBot.editor"
119120
anchor="after"
120-
relative-to-action="com.huawei.utbot.cpp.actions.GenerateForLineAction"/>
121+
relative-to-action="org.utbot.cpp.clion.plugin.actions.GenerateForLineAction"/>
121122
</action>
122123

123-
<action id="com.huawei.utbot.cpp.actions.GenerateForClassAction"
124+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForClassAction"
124125
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForClassAction"
125126
text="UTBot: Generate Tests For Current Class">
126127
<override-text place="EditorPopup" text="for Current Class"/>
127128
<synonym text="UC"/>
128129
<add-to-group
129130
group-id="actions.UTBot.editor"
130131
anchor="after"
131-
relative-to-action="com.huawei.utbot.cpp.actions.GenerateForFunctionAction"/>
132+
relative-to-action="org.utbot.cpp.clion.plugin.actions.GenerateForFunctionAction"/>
132133
</action>
133134

134-
<action id="com.huawei.utbot.cpp.actions.GenerateForPredicateAction"
135+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForPredicateAction"
135136
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForPredicateAction"
136137
text="UTBot: Generate Tests With Prompted Result">
137138
<override-text place="EditorPopup" text="with Prompted Result"/>
138139
<synonym text="UR"/>
139140
<add-to-group
140141
group-id="actions.UTBot.editor"
141142
anchor="after"
142-
relative-to-action="com.huawei.utbot.cpp.actions.GenerateForClassAction"/>
143+
relative-to-action="org.utbot.cpp.clion.plugin.actions.GenerateForClassAction"/>
143144
</action>
144145

145-
<action id="com.huawei.utbot.cpp.actions.GenerateForAssertionAction"
146+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForAssertionAction"
146147
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForAssertionAction"
147148
text="UTBot: Generate Tests That Fail Current Assertion">
148149
<override-text place="EditorPopup" text="That Fail Current Assertion"/>
149150
<synonym text="UA"/>
150151
<add-to-group
151152
group-id="actions.UTBot.editor"
152153
anchor="after"
153-
relative-to-action="com.huawei.utbot.cpp.actions.GenerateForClassAction"/>
154+
relative-to-action="org.utbot.cpp.clion.plugin.actions.GenerateForClassAction"/>
154155
</action>
155156

156-
<action id="com.huawei.utbot.cpp.actions.GenerateForProjectAction"
157+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForProjectAction"
157158
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForProjectAction"
158159
text="UTBot: Generate Tests For Project" description="Generate tests for whole project">
159160
<override-text place="EditorPopup" text="For Project"/>
@@ -163,7 +164,7 @@
163164
anchor="last"/>
164165
</action>
165166

166-
<action id="com.huawei.utbot.cpp.actions.GenerateForFolderAction"
167+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForFolderAction"
167168
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForFolderAction"
168169
text="UTBot: Generate Tests For Folder">
169170
<synonym text="UF"/>
@@ -172,7 +173,7 @@
172173
anchor="last"/>
173174
</action>
174175

175-
<action id="com.huawei.utbot.cpp.actions.GenerateForSnippetAction"
176+
<action id="org.utbot.cpp.clion.plugin.actions.GenerateForSnippetAction"
176177
class="org.utbot.cpp.clion.plugin.actions.generate.GenerateForSnippetAction"
177178
text="UTBot: Generate Tests For Code Snippet"
178179
description="Generates tests for file without context of a project">

clion-plugin/src/test/kotlin/org/utbot/cpp/clion/plugin/tests/GenerateForFileTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GenerateForFileTest : BaseGenerationTestCase() {
1717
project.settings.storedSettings.verbose = isVerboseMode
1818

1919
fixture.configureFromTempProjectFile(relativeFilePath)
20-
fixture.performEditorAction("com.huawei.utbot.cpp.actions.GenerateForFileAction")
20+
fixture.performEditorAction("org.utbot.cpp.clion.plugin.actions.GenerateForFileAction")
2121
waitForRequestsToFinish()
2222

2323
testsDirectoryPath.assertFileOrDirExists()

clion-plugin/src/test/kotlin/org/utbot/cpp/clion/plugin/tests/GenerateForIsolatedFileTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GenerateForIsolatedFileTest : BaseGenerationTestCase() {
1717
"Testing generate for snippet using target: auto, compiler: ${compiler.name}, verbose mode = ${project.settings.storedSettings.verbose}")
1818
compiler.buildProject(projectPath, buildDirName)
1919
fixture.configureFromTempProjectFile("snippet.c")
20-
fixture.performEditorAction("com.huawei.utbot.cpp.actions.GenerateForSnippetAction")
20+
fixture.performEditorAction("org.utbot.cpp.clion.plugin.actions.GenerateForSnippetAction")
2121
waitForRequestsToFinish()
2222
testsDirectoryPath.assertFileOrDirExists()
2323
testsDirectoryPath.assertTestFilesExist(listOf("snippet"))

clion-plugin/src/test/kotlin/org/utbot/cpp/clion/plugin/tests/GenerateForLineTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class GenerateForLineTest: BaseGenerationTestCase() {
2323
fixture.configureFromTempProjectFile("/lib/basic_functions.c")
2424
fixture.editor.moveCursorToLine(lineNumber)
2525

26-
fixture.performEditorAction("com.huawei.utbot.cpp.actions.GenerateForLineAction")
26+
fixture.performEditorAction("org.utbot.cpp.clion.plugin.actions.GenerateForLineAction")
2727
waitForRequestsToFinish()
2828

2929
testsDirectoryPath.assertFileOrDirExists()

0 commit comments

Comments
 (0)