File tree Expand file tree Collapse file tree
java/com/urswolfer/intellij/plugin/gerrit/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ dependencies {
4747 compile (' com.google.inject.extensions:guice-multibindings:4.1.0' ) {
4848 exclude group : ' com.google.guava' , module : ' guava'
4949 }
50- compile (' com.urswolfer.gerrit.client.rest:gerrit-rest-java-client:0.8.13 ' ) {
50+ compile (' com.urswolfer.gerrit.client.rest:gerrit-rest-java-client:0.8.14 ' ) {
5151 exclude group : ' com.google.code.gson' , module : ' gson'
5252 exclude group : ' com.google.guava' , module : ' guava'
5353 exclude group : ' commons-logging' , module : ' commons-logging'
Original file line number Diff line number Diff line change 11ideaVersion =IC-2016.2.5
22ijPluginRepoChannel =
33downloadIdeaSources =false
4- version =1.0.5 -146
4+ version =1.0.6 -146
55javaVersion =1.8
Original file line number Diff line number Diff line change 1717package com .urswolfer .intellij .plugin .gerrit .ui .diff ;
1818
1919import com .google .inject .Inject ;
20+ import com .intellij .openapi .actionSystem .CommonShortcuts ;
21+ import com .intellij .openapi .keymap .KeymapUtil ;
2022import com .intellij .openapi .ui .popup .ComponentPopupBuilder ;
2123import com .intellij .openapi .ui .popup .JBPopup ;
2224import com .intellij .openapi .ui .popup .JBPopupFactory ;
2931 * https://github.com/ktisha/Crucible4IDEA
3032 */
3133public class CommentBalloonBuilder {
34+ private static final String POPUP_TEXT =
35+ String .format ("Hit %s to create a comment. It will be published once you post your review." ,
36+ KeymapUtil .getShortcutsText (CommonShortcuts .CTRL_ENTER .getShortcuts ()));
3237
3338 @ Inject
3439 private JBPopupFactory jbPopupFactory ;
3540
3641 public JBPopup getNewCommentBalloon (final CommentForm balloonContent , @ NotNull final String title ) {
3742 final ComponentPopupBuilder builder = jbPopupFactory .
3843 createComponentPopupBuilder (balloonContent , balloonContent );
39- builder .setAdText ("Hit Ctrl+Enter to create comment. It will be published once you post your review." );
44+ builder .setAdText (POPUP_TEXT );
4045 builder .setTitle (title );
4146 builder .setResizable (true );
4247 builder .setMovable (true );
Original file line number Diff line number Diff line change 1919import com .google .gerrit .extensions .api .changes .DraftInput ;
2020import com .google .gerrit .extensions .client .Comment ;
2121import com .google .gerrit .extensions .client .Side ;
22+ import com .intellij .openapi .actionSystem .CommonShortcuts ;
2223import com .intellij .openapi .editor .Editor ;
2324import com .intellij .openapi .editor .SelectionModel ;
25+ import com .intellij .openapi .keymap .KeymapUtil ;
2426import com .intellij .openapi .project .Project ;
2527import com .intellij .openapi .ui .popup .JBPopup ;
2628import com .intellij .openapi .wm .IdeFocusManager ;
@@ -76,7 +78,7 @@ public CommentForm(Project project,
7678 reviewTextField .setPreferredSize (new Dimension (BALLOON_WIDTH , BALLOON_HEIGHT ));
7779
7880 reviewTextField .getInputMap (JComponent .WHEN_IN_FOCUSED_WINDOW ).
79- put (KeyStroke .getKeyStroke (KeyEvent . VK_ENTER , InputEvent . CTRL_DOWN_MASK ), "postComment" );
81+ put (KeymapUtil .getKeyStroke (CommonShortcuts . CTRL_ENTER ), "postComment" );
8082 reviewTextField .getActionMap ().put ("postComment" , new AbstractAction () {
8183 @ Override
8284 public void actionPerformed (ActionEvent e ) {
Original file line number Diff line number Diff line change 2222import com .intellij .openapi .actionSystem .AnAction ;
2323import com .intellij .openapi .actionSystem .AnActionEvent ;
2424import com .intellij .openapi .actionSystem .CommonShortcuts ;
25+ import com .intellij .openapi .keymap .KeymapUtil ;
2526import com .intellij .openapi .project .DumbAwareAction ;
2627import com .intellij .openapi .project .Project ;
2728import com .intellij .openapi .ui .popup .ComponentPopupBuilder ;
3940 * @author Thomas Forrer
4041 */
4142public abstract class AbstractUserFilter extends AbstractChangesFilter {
43+ private static final String POPUP_TEXT = String .format ("%s to search" ,
44+ KeymapUtil .getShortcutsText (CommonShortcuts .CTRL_ENTER .getShortcuts ()));
45+
4246 @ Inject
4347 private JBPopupFactory jbPopupFactory ;
4448
@@ -146,7 +150,7 @@ public void actionPerformed(AnActionEvent e) {
146150 private JBPopup buildBalloon (JTextArea textArea ) {
147151 ComponentPopupBuilder builder = jbPopupFactory .
148152 createComponentPopupBuilder (textArea , textArea );
149- builder .setAdText ("Ctrl+Enter to search" );
153+ builder .setAdText (POPUP_TEXT );
150154 builder .setResizable (true );
151155 builder .setMovable (true );
152156 builder .setRequestFocus (true );
Original file line number Diff line number Diff line change 8989 href="https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases">
9090 https://github.com/uwolfer/gerrit-intellij-plugin#pre-releases</a>.</li>
9191
92+ <li>1.0.6</li>
93+ <ul>
94+ <li>fix for session expiration related issues</li>
95+ <li>macOS: change diff viewer shortcut "Add comment" to cmd+enter</li>
96+ </ul>
9297 <li>1.0.5</li>
9398 <ul>
9499 <li>improved labels and documentation for improved usability</li>
You can’t perform that action at this time.
0 commit comments