-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As a reviewee, I want to be able of setting the caret in the proper l…
…ine after clicking on a comment (#14)
- Loading branch information
Showing
44 changed files
with
404 additions
and
177 deletions.
There are no files selected for viewing
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
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
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
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
45 changes: 9 additions & 36 deletions
45
...to/intellij/plugin/github/codereviews/di/impl/dagger/modules/AntiCorruptionLayerModule.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 |
---|---|---|
@@ -1,40 +1,13 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.entities.ProjectExt | ||
import com.intellij.openapi.wm.ToolWindowManager | ||
import com.intellij.openapi.wm.impl.ToolWindowImpl | ||
import com.intellij.tasks.TaskManager | ||
import com.intellij.ui.content.ContentManager | ||
import com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea.* | ||
import dagger.Module | ||
import dagger.Provides | ||
import javax.inject.Named | ||
|
||
@Module | ||
class AntiCorruptionLayerModule { | ||
@Provides | ||
@ProjectScoped | ||
fun provideTaskManager(project: ProjectExt): TaskManager { | ||
return project.delegate().getComponent(TaskManager::class.java) | ||
} | ||
|
||
@Provides | ||
@ProjectScoped | ||
fun provideToolWindowManager(project: ProjectExt): ToolWindowManager { | ||
return ToolWindowManager.getInstance(project.delegate()) | ||
} | ||
|
||
@Provides | ||
@ProjectScoped | ||
@Named("GH_Reviews") | ||
fun provideToolWindowImpl(toolWindowManager: ToolWindowManager): ToolWindowImpl { | ||
return toolWindowManager.getToolWindow("GitHub Reviews") as ToolWindowImpl | ||
} | ||
|
||
@Provides | ||
@ProjectScoped | ||
@Named("GH_Reviews") | ||
fun provideContentManager(@Named("GH_Reviews") toolWindow: ToolWindowImpl): ContentManager { | ||
return toolWindow.contentManager | ||
} | ||
} | ||
@Module(includes = [ | ||
IdeaTaskModule::class, | ||
IdeaToolWindowModule::class, | ||
IdeaUiContentModule::class, | ||
IdeaFileAndDocumentModule::class, | ||
IdeaGitModule::class | ||
]) | ||
class AntiCorruptionLayerModule |
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
14 changes: 14 additions & 0 deletions
14
...in/com/duxtinto/intellij/plugin/github/codereviews/di/impl/dagger/modules/EditorModule.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,14 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.DomainContract | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.services.editor.IdeaEditorDriver | ||
import dagger.Binds | ||
import dagger.Module | ||
|
||
@Module | ||
abstract class EditorModule { | ||
@Binds | ||
@ProjectScoped | ||
abstract fun provideEditorDriver(switcher: IdeaEditorDriver): DomainContract.EditorDriver | ||
} |
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
10 changes: 9 additions & 1 deletion
10
...duxtinto/intellij/plugin/github/codereviews/di/impl/dagger/modules/ReviewCommentModule.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 |
---|---|---|
@@ -1,14 +1,22 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.comments.ActionOnReviewCommentInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.comments.CommentsByReviewInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.comments.GetAllCommentsForInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.reviews.comments.GoToCommentLineInteractor | ||
import dagger.Binds | ||
import dagger.Module | ||
import javax.inject.Named | ||
|
||
@Module | ||
abstract class ReviewCommentModule { | ||
@Binds | ||
@ProjectScoped | ||
abstract fun provideCommentsByReviewInteractor(review: GetAllCommentsForInteractor): CommentsByReviewInteractor | ||
abstract fun provideCommentsByReviewInteractor(interactor: GetAllCommentsForInteractor): CommentsByReviewInteractor | ||
|
||
@Binds | ||
@ProjectScoped | ||
@Named("goToLine") | ||
abstract fun provideGoToCommentLineInteractor(interactor: GoToCommentLineInteractor): ActionOnReviewCommentInteractor | ||
} |
6 changes: 6 additions & 0 deletions
6
...tellij/plugin/github/codereviews/di/impl/dagger/modules/idea/IdeaFileAndDocumentModule.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,6 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea | ||
|
||
import dagger.Module | ||
|
||
@Module | ||
class IdeaFileAndDocumentModule |
30 changes: 30 additions & 0 deletions
30
.../duxtinto/intellij/plugin/github/codereviews/di/impl/dagger/modules/idea/IdeaGitModule.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,30 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.GetAllOpenForRepoInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.repositories.FindGithubRepoForRootFolderInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.entities.ProjectExt | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.events.repositories.GitChangeListener | ||
import com.duxtinto.intellij.plugin.github.codereviews.ui.toolwindow.pullrequestlist.PullRequestList | ||
import com.intellij.dvcs.repo.VcsRepositoryMappingListener | ||
import dagger.Module | ||
import dagger.Provides | ||
import git4idea.repo.GitRepositoryManager | ||
|
||
@Module | ||
class IdeaGitModule { | ||
@Provides | ||
@ProjectScoped | ||
fun provideVcsRepositoryMappingListener( | ||
repoFinder: FindGithubRepoForRootFolderInteractor, | ||
prFetcher: GetAllOpenForRepoInteractor, | ||
prPresenter: PullRequestList.Presenter): VcsRepositoryMappingListener { | ||
return GitChangeListener(repoFinder, prFetcher, prPresenter) | ||
} | ||
|
||
@Provides | ||
@ProjectScoped | ||
fun provideGitRepositoryManager(project: ProjectExt): GitRepositoryManager { | ||
return GitRepositoryManager.getInstance(project) | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...duxtinto/intellij/plugin/github/codereviews/di/impl/dagger/modules/idea/IdeaTaskModule.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,16 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.entities.ProjectExt | ||
import com.intellij.tasks.TaskManager | ||
import dagger.Module | ||
import dagger.Provides | ||
|
||
@Module | ||
class IdeaTaskModule { | ||
@Provides | ||
@ProjectScoped | ||
fun provideTaskManager(project: ProjectExt): TaskManager { | ||
return project.getComponent(TaskManager::class.java) | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...to/intellij/plugin/github/codereviews/di/impl/dagger/modules/idea/IdeaToolWindowModule.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,25 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.entities.ProjectExt | ||
import com.intellij.openapi.wm.ToolWindowManager | ||
import com.intellij.openapi.wm.impl.ToolWindowImpl | ||
import dagger.Module | ||
import dagger.Provides | ||
import javax.inject.Named | ||
|
||
@Module | ||
class IdeaToolWindowModule { | ||
@Provides | ||
@ProjectScoped | ||
fun provideToolWindowManager(project: ProjectExt): ToolWindowManager { | ||
return ToolWindowManager.getInstance(project) | ||
} | ||
|
||
@Provides | ||
@ProjectScoped | ||
@Named("GH_Reviews") | ||
fun provideToolWindowImpl(toolWindowManager: ToolWindowManager): ToolWindowImpl { | ||
return toolWindowManager.getToolWindow("GitHub Reviews") as ToolWindowImpl | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...nto/intellij/plugin/github/codereviews/di/impl/dagger/modules/idea/IdeaUiContentModule.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,18 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.scopes.ProjectScoped | ||
import com.intellij.openapi.wm.impl.ToolWindowImpl | ||
import com.intellij.ui.content.ContentManager | ||
import dagger.Module | ||
import dagger.Provides | ||
import javax.inject.Named | ||
|
||
@Module | ||
class IdeaUiContentModule { | ||
@Provides | ||
@ProjectScoped | ||
@Named("GH_Reviews") | ||
fun provideContentManager(@Named("GH_Reviews") toolWindow: ToolWindowImpl): ContentManager { | ||
return toolWindow.contentManager | ||
} | ||
} |
Oops, something went wrong.