mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[github] Make all PR implementation classes internal
This commit is contained in:
+5
-5
@@ -32,11 +32,11 @@ private val REMOTE_KEY = Key<GitRemote>("REMOTE")
|
||||
private val REMOTE_URL_KEY = Key<String>("REMOTE_URL")
|
||||
private val ACCOUNT_KEY = Key<GithubAccount>("ACCOUNT")
|
||||
|
||||
class GithubPullRequestsToolWindowManager internal constructor(private val project: Project,
|
||||
private val toolWindowManager: ToolWindowManager,
|
||||
private val gitRepositoryManager: GitRepositoryManager,
|
||||
private val accountManager: GithubAccountManager,
|
||||
private val componentFactory: GithubPullRequestsComponentFactory) {
|
||||
internal class GithubPullRequestsToolWindowManager(private val project: Project,
|
||||
private val toolWindowManager: ToolWindowManager,
|
||||
private val gitRepositoryManager: GitRepositoryManager,
|
||||
private val accountManager: GithubAccountManager,
|
||||
private val componentFactory: GithubPullRequestsComponentFactory) {
|
||||
|
||||
fun createPullRequestsTab(requestExecutor: GithubApiRequestExecutor,
|
||||
repository: GitRepository, remote: GitRemote, remoteUrl: String,
|
||||
|
||||
+6
-6
@@ -30,12 +30,12 @@ import java.util.concurrent.CancellationException
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import java.util.concurrent.CompletionException
|
||||
|
||||
class GithubPullRequestsDataLoader(private val project: Project,
|
||||
private val progressManager: ProgressManager,
|
||||
private val git: Git,
|
||||
private val requestExecutor: GithubApiRequestExecutor,
|
||||
private val repository: GitRepository,
|
||||
private val remote: GitRemote) : Disposable {
|
||||
internal class GithubPullRequestsDataLoader(private val project: Project,
|
||||
private val progressManager: ProgressManager,
|
||||
private val git: Git,
|
||||
private val requestExecutor: GithubApiRequestExecutor,
|
||||
private val repository: GitRepository,
|
||||
private val remote: GitRemote) : Disposable {
|
||||
|
||||
private var isDisposed = false
|
||||
private val cache = CacheBuilder.newBuilder()
|
||||
|
||||
+4
-4
@@ -17,10 +17,10 @@ import org.jetbrains.plugins.github.api.util.GithubApiSearchQueryBuilder
|
||||
import org.jetbrains.plugins.github.pullrequest.search.GithubPullRequestSearchQuery
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
class GithubPullRequestsLoader(private val progressManager: ProgressManager,
|
||||
private val requestExecutor: GithubApiRequestExecutor,
|
||||
private val serverPath: GithubServerPath,
|
||||
private val repoPath: GithubFullPath) : Disposable {
|
||||
internal class GithubPullRequestsLoader(private val progressManager: ProgressManager,
|
||||
private val requestExecutor: GithubApiRequestExecutor,
|
||||
private val serverPath: GithubServerPath,
|
||||
private val repoPath: GithubFullPath) : Disposable {
|
||||
private var initialRequest = GithubApiRequests.Search.Issues.get(serverPath, buildQuery(null))
|
||||
private var lastFuture = CompletableFuture.completedFuture(GithubResponsePage.empty<GithubSearchedIssue>(initialRequest.url))
|
||||
|
||||
|
||||
+3
-3
@@ -22,9 +22,9 @@ import org.jetbrains.plugins.github.api.search.GithubIssueSearchSort
|
||||
import java.awt.event.KeyEvent
|
||||
import javax.swing.KeyStroke
|
||||
|
||||
class GithubPullRequestSearchComponent(project: Project,
|
||||
private val autoPopupController: AutoPopupController,
|
||||
private val model: GithubPullRequestSearchModel) : BorderLayoutPanel() {
|
||||
internal class GithubPullRequestSearchComponent(project: Project,
|
||||
private val autoPopupController: AutoPopupController,
|
||||
private val model: GithubPullRequestSearchModel) : BorderLayoutPanel() {
|
||||
|
||||
private val searchField = object : TextFieldWithCompletion(project, SearchCompletionProvider(), "", true, true, false, false) {
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.annotations.CalledInAwt
|
||||
import java.util.*
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class GithubPullRequestSearchModel {
|
||||
internal class GithubPullRequestSearchModel {
|
||||
@get:CalledInAwt
|
||||
@set:CalledInAwt
|
||||
var query: GithubPullRequestSearchQuery
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.plugins.github.api.util.GithubApiSearchQueryBuilder
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
class GithubPullRequestSearchQuery(private val terms: List<Term<*>>) {
|
||||
internal class GithubPullRequestSearchQuery(private val terms: List<Term<*>>) {
|
||||
fun buildApiSearchQuery(searchQueryBuilder: GithubApiSearchQueryBuilder) {
|
||||
for (term in terms) {
|
||||
when (term) {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.plugins.github.util.GithubAsyncUtil
|
||||
import org.jetbrains.plugins.github.util.handleOnEdt
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
abstract class GithubDataLoadingComponent<T> : Wrapper() {
|
||||
internal abstract class GithubDataLoadingComponent<T> : Wrapper() {
|
||||
private var updateFuture: CompletableFuture<Unit>? = null
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import javax.swing.JComponent
|
||||
import javax.swing.border.Border
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class GithubPullRequestChangesComponent(project: Project, actionManager: ActionManager)
|
||||
internal class GithubPullRequestChangesComponent(project: Project, actionManager: ActionManager)
|
||||
: GithubDataLoadingComponent<List<Change>>(), Disposable {
|
||||
private val changesBrowser = PullRequestChangesBrowserWithError(project, actionManager)
|
||||
private val loadingPanel = JBLoadingPanel(BorderLayout(), this, ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS)
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.intellij.ui.components.JBLoadingPanel
|
||||
import org.jetbrains.plugins.github.api.data.GithubPullRequestDetailedWithHtml
|
||||
import java.awt.BorderLayout
|
||||
|
||||
class GithubPullRequestDetailsComponent(project: Project) : GithubDataLoadingComponent<GithubPullRequestDetailedWithHtml>(), Disposable {
|
||||
internal class GithubPullRequestDetailsComponent(project: Project) : GithubDataLoadingComponent<GithubPullRequestDetailedWithHtml>(), Disposable {
|
||||
private val detailsPanel = GithubPullRequestDetailsPanel(project)
|
||||
private val loadingPanel = JBLoadingPanel(BorderLayout(), this, ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS)
|
||||
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import javax.swing.JPanel
|
||||
import javax.swing.ScrollPaneConstants
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class GithubPullRequestDetailsPanel(private val project: Project) : Wrapper(), ComponentWithEmptyText {
|
||||
internal class GithubPullRequestDetailsPanel(private val project: Project) : Wrapper(), ComponentWithEmptyText {
|
||||
|
||||
private val emptyText = object : StatusText() {
|
||||
override fun isStatusVisible() = details == null
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@ import com.intellij.openapi.Disposable
|
||||
import com.intellij.ui.OnePixelSplitter
|
||||
import org.jetbrains.plugins.github.pullrequest.data.GithubPullRequestDataProvider
|
||||
|
||||
class GithubPullRequestPreviewComponent(private val changes: GithubPullRequestChangesComponent,
|
||||
private val details: GithubPullRequestDetailsComponent)
|
||||
internal class GithubPullRequestPreviewComponent(private val changes: GithubPullRequestChangesComponent,
|
||||
private val details: GithubPullRequestDetailsComponent)
|
||||
: OnePixelSplitter(true, "Github.PullRequest.Preview.Component", 0.6f), Disposable {
|
||||
|
||||
val toolbarComponent = changes.toolbarComponent
|
||||
|
||||
+5
-5
@@ -31,11 +31,11 @@ import javax.swing.JScrollBar
|
||||
import javax.swing.ScrollPaneConstants
|
||||
import javax.swing.event.ListSelectionEvent
|
||||
|
||||
class GithubPullRequestsListComponent internal constructor(project: Project,
|
||||
actionManager: ActionManager,
|
||||
autoPopupController: AutoPopupController,
|
||||
private val loader: GithubPullRequestsLoader,
|
||||
avatarIconsProviderFactory: CachingGithubAvatarIconsProvider.Factory)
|
||||
internal class GithubPullRequestsListComponent(project: Project,
|
||||
actionManager: ActionManager,
|
||||
autoPopupController: AutoPopupController,
|
||||
private val loader: GithubPullRequestsLoader,
|
||||
avatarIconsProviderFactory: CachingGithubAvatarIconsProvider.Factory)
|
||||
: BorderLayoutPanel(), Disposable, DataProvider {
|
||||
|
||||
val selectionModel = GithubPullRequestsListSelectionModel()
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.plugins.github.api.data.GithubSearchedIssue
|
||||
import java.util.*
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
class GithubPullRequestsListSelectionModel {
|
||||
internal class GithubPullRequestsListSelectionModel {
|
||||
var current: GithubSearchedIssue? by Delegates.observable<GithubSearchedIssue?>(null) { _, _, _ ->
|
||||
changeEventDispatcher.multicaster.selectionChanged()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user