-
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 refreshing the pull request list (#…
…19)
- Loading branch information
Showing
70 changed files
with
544 additions
and
220 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
2 changes: 1 addition & 1 deletion
2
.../com/duxtinto/intellij/plugin/github/codereviews/di/impl/dagger/components/UiInjectors.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
2 changes: 2 additions & 0 deletions
2
...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
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
15 changes: 15 additions & 0 deletions
15
...ntellij/plugin/github/codereviews/di/impl/dagger/modules/idea/actions/IdeaActionModule.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,15 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea.actions | ||
|
||
import com.intellij.openapi.actionSystem.ActionManager | ||
import dagger.Module | ||
import dagger.Provides | ||
|
||
@Module(includes = [ | ||
IdeaRevieweeActionModule::class | ||
]) | ||
class IdeaActionModule { | ||
@Provides | ||
fun provideActionManager(): ActionManager { | ||
return ActionManager.getInstance() | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...plugin/github/codereviews/di/impl/dagger/modules/idea/actions/IdeaRevieweeActionModule.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,50 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.impl.dagger.modules.idea.actions | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.di.qualifiers.Reviewee | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests.GetAllMyOpenForRepoInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.domain.repositories.FindGithubRepoForRootFolderInteractor | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.presentation.toolwindow.toolbar.RevieweeToolbarFactory | ||
import com.duxtinto.intellij.plugin.github.codereviews.ide.acl.presentation.toolwindow.toolbar.reviewee.RefreshPullRequestListAction | ||
import com.duxtinto.intellij.plugin.github.codereviews.presentation.Toolbar | ||
import com.duxtinto.intellij.plugin.github.codereviews.presentation.reviewee.RevieweeContent | ||
import com.intellij.openapi.actionSystem.ActionManager | ||
import com.intellij.openapi.actionSystem.AnAction | ||
import dagger.Module | ||
import dagger.Provides | ||
|
||
@Module | ||
class IdeaRevieweeActionModule { | ||
@Provides | ||
fun provideRefreshPullRequestListAction( | ||
findRepoInteractor: FindGithubRepoForRootFolderInteractor, | ||
getPullRequestsInteractor: GetAllMyOpenForRepoInteractor, | ||
presenter: RevieweeContent.Presenter | ||
): RefreshPullRequestListAction { | ||
return RefreshPullRequestListAction(findRepoInteractor, getPullRequestsInteractor, presenter) | ||
} | ||
|
||
@Provides | ||
@Reviewee | ||
fun provideRevieweeToolbarActions( | ||
refreshPullRequestsAction: RefreshPullRequestListAction | ||
): List<AnAction> { | ||
return listOf( | ||
refreshPullRequestsAction | ||
) | ||
} | ||
|
||
@Provides | ||
@Reviewee | ||
fun provideToolbarFactory( | ||
actionManager: ActionManager, | ||
@Reviewee actions: @JvmSuppressWildcards List<AnAction> | ||
): Toolbar.Factory { | ||
return RevieweeToolbarFactory(actionManager, actions) | ||
} | ||
|
||
@Provides | ||
@Reviewee | ||
fun provideToolbar(@Reviewee toolbar: Toolbar.Factory): Toolbar { | ||
return toolbar.create() | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/com/duxtinto/intellij/plugin/github/codereviews/di/qualifiers/reviewee.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,8 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.qualifiers | ||
|
||
import javax.inject.Qualifier | ||
|
||
@Qualifier | ||
@MustBeDocumented | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Reviewee |
8 changes: 8 additions & 0 deletions
8
src/main/kotlin/com/duxtinto/intellij/plugin/github/codereviews/di/qualifiers/reviewer.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,8 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.di.qualifiers | ||
|
||
import javax.inject.Qualifier | ||
|
||
@Qualifier | ||
@MustBeDocumented | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Reviewer |
13 changes: 3 additions & 10 deletions
13
...llrequests/GetAllOpenForRepoInteractor.kt → ...requests/GetAllMyOpenForRepoInteractor.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,21 +1,14 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.domain.pullrequests | ||
|
||
import com.duxtinto.intellij.plugin.github.codereviews.domain.repositories.GithubRepositoryEntity | ||
import java.io.IOException | ||
import javax.inject.Inject | ||
|
||
class GetAllOpenForRepoInteractor | ||
class GetAllMyOpenForRepoInteractor | ||
@Inject | ||
constructor(private val repository: PullRequestDomainContract.Repository) | ||
: PullRequestsByRepositoryInteractor { | ||
|
||
override fun run(request: GithubRepositoryEntity): List<PullRequestEntity>? { | ||
try { | ||
return repository.getAllMyOpenBy(request.ownerName, request.name) | ||
} catch (e: IOException) { | ||
e.printStackTrace() | ||
throw RuntimeException(e) | ||
} | ||
|
||
override fun run(request: GithubRepositoryEntity): List<PullRequestEntity> { | ||
return repository.getAllMyOpenBy(request.ownerName, request.name) | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
...tinto/intellij/plugin/github/codereviews/ide/acl/events/repositories/GitChangeListener.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
9 changes: 9 additions & 0 deletions
9
...o/intellij/plugin/github/codereviews/ide/acl/presentation/toolwindow/ToolWindowContent.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,9 @@ | ||
package com.duxtinto.intellij.plugin.github.codereviews.ide.acl.presentation.toolwindow | ||
|
||
interface ToolWindowContent { | ||
interface Model | ||
|
||
interface Presenter { | ||
fun displayToolWindow() | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...sentation/toolwindow/ToolWindowFactory.kt → ...sentation/toolwindow/ToolWindowFactory.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
Oops, something went wrong.