mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
IFT-297 Adapt Git Annotate lesson to affected paths view opened as tool window tab
IJ-CR-15271 GitOrigin-RevId: 02bdfc208730db3baa1bcaae5dfd698ad0002db3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c3afc8b902
commit
eb2a76b116
@@ -171,10 +171,10 @@ git.annotate.found.needed.commit=Great! We found the place where {0} value has b
|
||||
So let''s annotate it for the last time to investigate the reason for this change.
|
||||
git.annotate.invoke.shortcut.3=Move the caret to the right editor and press {0}.
|
||||
git.annotate.click.annotation=Click the highlighted annotation to preview information about this commit.
|
||||
git.annotate.close.all.windows=As far as we see the highlighted commit message, this strange value of {0} is not a mistake. \
|
||||
So, after the long journey through the history of this file you can close \
|
||||
{1,choice,0#all opened windows|1#the current window and all opened editor tabs} to return to the editor. \
|
||||
Press {2} three times.
|
||||
git.annotate.close.changes=As far as we see the highlighted commit message, this strange value of {0} is not a mistake. \
|
||||
So, after the long journey through the history of this file you can close the opened window. Press {1}.
|
||||
git.annotate.close.all.windows=And now close {0,choice,0#all opened windows|1#all opened editor tabs} to return to the editor. \
|
||||
Press {1} two times.
|
||||
git.annotate.close.annotations=Now you can close the annotations.
|
||||
git.annotate.close.by.shortcut=Press {0}.
|
||||
git.annotate.invoke.manually.2=Right-click the highlighted area and select the {0} option from the menu.
|
||||
@@ -14,6 +14,7 @@ import com.intellij.openapi.editor.impl.EditorComponentImpl
|
||||
import com.intellij.openapi.keymap.KeymapManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.ui.popup.Balloon
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vcs.actions.ActiveAnnotationGutter
|
||||
import com.intellij.openapi.vcs.actions.AnnotateToggleAction
|
||||
import com.intellij.openapi.vcs.changes.VcsEditorTabFilesManager
|
||||
@@ -195,16 +196,25 @@ class GitAnnotateLesson : GitLesson("Git.Annotate", GitLessonsBundle.message("gi
|
||||
restoreIfDiffClosed(openSecondDiffTaskId, secondDiffSplitter)
|
||||
}
|
||||
|
||||
task("EditorEscape") {
|
||||
task {
|
||||
val showChangesAsTab = Registry.`is`("vcs.show.affected.files.as.tab")
|
||||
before {
|
||||
if (backupRevisionsLocation == null) {
|
||||
if (!showChangesAsTab && backupRevisionsLocation == null) {
|
||||
backupRevisionsLocation = adjustPopupPosition(ChangeListViewerDialog.DIMENSION_SERVICE_KEY)
|
||||
}
|
||||
}
|
||||
text(GitLessonsBundle.message("git.annotate.close.all.windows", code(editedPropertyName),
|
||||
if (VcsEditorTabFilesManager.getInstance().shouldOpenInNewWindow) 0 else 1, action(it)))
|
||||
val actionText = if (showChangesAsTab) action("HideActiveWindow") else action("EditorEscape")
|
||||
text(GitLessonsBundle.message("git.annotate.close.changes", code(editedPropertyName), actionText))
|
||||
stateCheck {
|
||||
previous.ui?.isShowing != true && firstDiffSplitter?.isShowing != true && secondDiffSplitter?.isShowing != true
|
||||
previous.ui?.isShowing != true
|
||||
}
|
||||
}
|
||||
|
||||
task("EditorEscape") {
|
||||
text(GitLessonsBundle.message("git.annotate.close.all.windows",
|
||||
if (VcsEditorTabFilesManager.getInstance().shouldOpenInNewWindow) 0 else 1, action(it)))
|
||||
stateCheck {
|
||||
firstDiffSplitter?.isShowing != true && secondDiffSplitter?.isShowing != true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +224,8 @@ class GitAnnotateLesson : GitLesson("Git.Annotate", GitLessonsBundle.message("gi
|
||||
+ GitLessonsBundle.message("git.annotate.close.by.shortcut", action(it)))
|
||||
stateCheck { !isAnnotationsShown(editor) }
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
task("Annotate") {
|
||||
val closeAnnotationsText = EditorBundle.message("close.editor.annotations.action.name")
|
||||
text(GitLessonsBundle.message("git.annotate.close.annotations") + " "
|
||||
|
||||
Reference in New Issue
Block a user