Skip to content

Commit

Permalink
add some comments todo
Browse files Browse the repository at this point in the history
  • Loading branch information
diffitask committed Jan 10, 2024
1 parent 204e404 commit 04ae619
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 04ae619

Please sign in to comment.