You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2020/09/08 13:57:58 UTC

[GitHub] [jmeter] weisJ opened a new pull request #617: Bug 64711 - Use theme from darklaf extensions for RSyntaxTextArea.

weisJ opened a new pull request #617:
URL: https://github.com/apache/jmeter/pull/617


   ## Description
   Fixes [bug 64711](https://bz.apache.org/bugzilla/show_bug.cgi?id=64711)
   
   ## Motivation and Context
   As described in the issue in some darklaf themes text was hard or impossible to read.
   Darklaf provides specialized themes for RSyntaxTextArea matching the corresponding darklaf theme.
   
   This PR also fixes an issue where the theme isn't applied to the gutter of the text area the first time because
   the theme is installed before the gutter exists (i.e. before the text area has been added to a scroll pane).
   
   ## How Has This Been Tested?
   I manually checked that the text is readable with each theme.
   All non darklaf Lafs aren't affected by this change.
   
   ## Screenshots (if appropriate):
   ![darcula_scheme](https://user-images.githubusercontent.com/31143295/92486017-eb915400-f1eb-11ea-91f4-f783ab80b258.png)
   ![one_dark_scheme](https://user-images.githubusercontent.com/31143295/92486025-ecc28100-f1eb-11ea-9807-4cb03d52916a.png)
   ![solarized_dark_scheme](https://user-images.githubusercontent.com/31143295/92486027-ed5b1780-f1eb-11ea-8b78-c4c1740923fc.png)
   ![solarized_light_scheme](https://user-images.githubusercontent.com/31143295/92486029-ed5b1780-f1eb-11ea-9776-12b82ae4a455.png)
   ![high_contrast_dark_scheme](https://user-images.githubusercontent.com/31143295/92486030-edf3ae00-f1eb-11ea-8fb0-98508e516796.png)
   ![intellij_scheme](https://user-images.githubusercontent.com/31143295/92486033-edf3ae00-f1eb-11ea-8b38-a482c0324e94.png)
   
   ## Types of changes
   - Bug fix (non-breaking change which fixes an issue)
   
   ## Checklist:
   <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
   - [x] My code follows the [code style][style-guide] of this project.
   - [ ] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] pmouawad merged pull request #617: Bug 64711 - Use theme from darklaf extensions for RSyntaxTextArea.

Posted by GitBox <gi...@apache.org>.
pmouawad merged pull request #617:
URL: https://github.com/apache/jmeter/pull/617


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] weisJ commented on a change in pull request #617: Bug 64711 - Use theme from darklaf extensions for RSyntaxTextArea.

Posted by GitBox <gi...@apache.org>.
weisJ commented on a change in pull request #617:
URL: https://github.com/apache/jmeter/pull/617#discussion_r485488906



##########
File path: src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
##########
@@ -44,20 +49,27 @@
 public class JSyntaxTextArea extends RSyntaxTextArea {
 
     private static final long serialVersionUID = 211L;
-    private static final Logger log              = LoggerFactory.getLogger(JSyntaxTextArea.class);
+    private static final Logger log = LoggerFactory.getLogger(JSyntaxTextArea.class);
 
+    private static final Theme DARKLAF_THEME = new DarklafRSyntaxTheme();

Review comment:
       No the static theme isn't necessary. I just tried to be as close to the previous implementation as possible.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on a change in pull request #617: Bug 64711 - Use theme from darklaf extensions for RSyntaxTextArea.

Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #617:
URL: https://github.com/apache/jmeter/pull/617#discussion_r485165022



##########
File path: src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
##########
@@ -44,20 +49,27 @@
 public class JSyntaxTextArea extends RSyntaxTextArea {
 
     private static final long serialVersionUID = 211L;
-    private static final Logger log              = LoggerFactory.getLogger(JSyntaxTextArea.class);
+    private static final Logger log = LoggerFactory.getLogger(JSyntaxTextArea.class);
 
+    private static final Theme DARKLAF_THEME = new DarklafRSyntaxTheme();

Review comment:
       This line seems to cause `HeadlessException`, see https://travis-ci.org/github/apache/jmeter/jobs/725243535#L844
   
   Is static theme really needed here?
   
   
   ```
       java.lang.ExceptionInInitializerError
           at org.apache.jmeter.assertions.jmespath.gui.JMESPathAssertionGui.buildPanel(JMESPathAssertionGui.java:78)
           at org.apache.jmeter.assertions.gui.JSONPathAssertionGui.init(JSONPathAssertionGui.java:71)
           at org.apache.jmeter.assertions.gui.JSONPathAssertionGui.<init>(JSONPathAssertionGui.java:63)
           at org.apache.jmeter.assertions.jmespath.gui.JMESPathAssertionGui.<init>(JMESPathAssertionGui.java:59)
           at org.apache.jmeter.assertions.jmespath.gui.JMESPathAssertionGuiTest.testInit(JMESPathAssertionGuiTest.java:28)
           Caused by: java.awt.HeadlessException
               at java.desktop/javax.swing.text.JTextComponent.checkDragEnabled(JTextComponent.java:698)
               at java.desktop/javax.swing.text.JTextComponent.setDragEnabled(JTextComponent.java:692)
               at org.fife.ui.rtextarea.RTextArea.init(RTextArea.java:918)
               at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.init(RSyntaxTextArea.java:1988)
               at org.fife.ui.rtextarea.RTextAreaBase.<init>(RTextAreaBase.java:82)
               at org.fife.ui.rtextarea.RTextArea.<init>(RTextArea.java:188)
               at org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.<init>(RSyntaxTextArea.java:351)
               at com.github.weisj.darklaf.extensions.rsyntaxarea.DarklafRSyntaxTheme.<init>(DarklafRSyntaxTheme.java:40)
               at org.apache.jmeter.gui.util.JSyntaxTextArea.<clinit>(JSyntaxTextArea.java:54)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org