diff --git a/ide-former-plugin/ide-core/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/api/models/fileSystemRelated/DeleteFile.kt b/ide-former-plugin/ide-core/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/api/models/fileSystemRelated/DeleteFile.kt index f48152b..4dcc6f6 100644 --- a/ide-former-plugin/ide-core/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/api/models/fileSystemRelated/DeleteFile.kt +++ b/ide-former-plugin/ide-core/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/api/models/fileSystemRelated/DeleteFile.kt @@ -12,6 +12,7 @@ class DeleteFile( override fun execute() { projectDirectory.refresh() + // TODO: getting deleting file text should be here. when execute() is called it may be different projectDirectory.deleteFileByName(fileName) } diff --git a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getChangeDirectory.kt b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getChangeDirectory.kt index 93def68..ef89a79 100644 --- a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getChangeDirectory.kt +++ b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getChangeDirectory.kt @@ -10,6 +10,7 @@ import org.jetbrains.research.ideFormerPlugin.server.respondJson import org.jetbrains.research.ideFormerPlugin.stateKeeper.IdeStateKeeper import org.slf4j.Logger +// TODO: make it a post method fun Routing.getChangeDirectory(logger: Logger, ideStateKeeper: IdeStateKeeper) { get("/change-dir/{targetDirName?}") { val targetDirName = call.parameters["targetDirName"] diff --git a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateDirectory.kt b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateDirectory.kt index f2f8dd3..af2aa05 100644 --- a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateDirectory.kt +++ b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateDirectory.kt @@ -8,6 +8,7 @@ import org.jetbrains.research.ideFormerPlugin.server.IdeServerConstants.DIRECTOR import org.jetbrains.research.ideFormerPlugin.stateKeeper.IdeStateKeeper import org.slf4j.Logger +// TODO: make it a post method fun Routing.getCreateDirectory(logger: Logger, ideStateKeeper: IdeStateKeeper) { get("/create-directory/{$DIRECTORY_NAME_REQUEST_PARAM?}") { val directoryName = call.processRequestParameter( diff --git a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateFile.kt b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateFile.kt index 6f9a986..fffcb6c 100644 --- a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateFile.kt +++ b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getCreateFile.kt @@ -7,6 +7,7 @@ import org.jetbrains.research.ideFormerPlugin.server.* import org.jetbrains.research.ideFormerPlugin.stateKeeper.IdeStateKeeper import org.slf4j.Logger +// TODO: make it a post method fun Routing.getCreateFile(logger: Logger, ideStateKeeper: IdeStateKeeper) { get("/create-file/{fileName?}") { val fileName = call.processFileNameParameter(logger) ?: return@get diff --git a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getDeleteFile.kt b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getDeleteFile.kt index 5f1182a..acec864 100644 --- a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getDeleteFile.kt +++ b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/fileSystemRelated/getDeleteFile.kt @@ -7,6 +7,7 @@ import org.jetbrains.research.ideFormerPlugin.server.* import org.jetbrains.research.ideFormerPlugin.stateKeeper.IdeStateKeeper import org.slf4j.Logger +// TODO: make it a post method fun Routing.getDeleteFile(logger: Logger, ideStateKeeper: IdeStateKeeper) { get("/delete-file/{fileName?}") { val fileName = call.processFileNameParameter(logger) ?: return@get diff --git a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/gitRelated/getGitReset.kt b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/gitRelated/getGitReset.kt index 9b8994c..cc9b825 100644 --- a/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/gitRelated/getGitReset.kt +++ b/ide-former-plugin/ide-server/src/main/kotlin/org/jetbrains/research/ideFormerPlugin/server/requests/gitRelated/getGitReset.kt @@ -9,6 +9,7 @@ import org.slf4j.Logger fun Routing.getGitReset(logger: Logger, ideStateKeeper: IdeStateKeeper) { get("/git-reset/{${IdeServerConstants.COMMITS_COUNT_REQUEST_PARAM}?}") { + // TODO: fix parsing val commitsCount = call.parameters[IdeServerConstants.COMMITS_COUNT_REQUEST_PARAM]?.toIntOrNull() ?: return@get logger.info("Server GET git reset for '$commitsCount' commits is called")