You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/06 17:40:10 UTC

[GitHub] [netbeans] errael opened a new issue, #4743: Exceptions if .hint file name has non identifier characters

errael opened a new issue, #4743:
URL: https://github.com/apache/netbeans/issues/4743

   ### Apache NetBeans version
   
   Apache NetBeans 15
   
   ### What happened
   
   _I think it's non-identifier characters in the file name, could be wrong_
   
   Added a file `<userdir>/config/rules/JOptionPane-2.hint`. Tried to edit it from inspect dialog, exceptions
   ```
   java.lang.NullPointerException
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.editScriptButtonActionPerformed(HintsPanel.java:760)
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.access$1100(HintsPanel.java:108)
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel$11.actionPerformed(HintsPanel.java:593)
   	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
   ```
   and
   ```
   java.lang.NullPointerException
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.openInEditorActionPerformed(HintsPanel.java:836)
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel.access$800(HintsPanel.java:108)
   	at org.netbeans.modules.java.hints.spiimpl.options.HintsPanel$8.actionPerformed(HintsPanel.java:502)
   	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
   ```
   I foolishly thought there was a problem with the contents of the file, chasing my tail. I finally became suspect of the name, changing the name to JOptionPane_2.hint fixed the problem.
   
   ### How to reproduce
   
   _No response_
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Linux harmony 5.19.0-76051900-generic #202207312230~1660780566~22.04~9d60db1
   
   ### JDK
   
   openjdk version "11.0.2" 2019-01-15
   
   ### Apache NetBeans packaging
   
   Own source build
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] errael commented on issue #4743: Exceptions if .hint file name has non identifier characters

Posted by GitBox <gi...@apache.org>.
errael commented on issue #4743:
URL: https://github.com/apache/netbeans/issues/4743#issuecomment-1270458878

   @mbien, you might be familiar with this area. :-)


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on issue #4743: Exceptions if .hint file name has non identifier characters

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4743:
URL: https://github.com/apache/netbeans/issues/4743#issuecomment-1271350532

   oops. Turns out `-` has a special meaning. Not sure what it is supposed to do but it removes everything after it from the name. Might have to dig into the old repo to find a commit.
   https://github.com/apache/netbeans/blob/4ae01ea70f4530443343beee3292e880a74099bd/java/java.hints.ui/src/org/netbeans/modules/java/hints/spiimpl/options/HintsPanel.java#L1313-L1322


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] errael commented on issue #4743: Exceptions if .hint file name has non identifier characters

Posted by GitBox <gi...@apache.org>.
errael commented on issue #4743:
URL: https://github.com/apache/netbeans/issues/4743#issuecomment-1271785666

   Wow, that's curious. That 2nd change by emi is particularly interesting. Is the code above used only for hints put into the 'rules/' directory by a user? Maybe the problem comes from the scanning of rules directory and the creation of the `id` as in `selectedHint.id`.
   
   Seems like if anything found in rules, `JOP.hint`, is given an id `JOP.hint-`, then at lease this code would work. Then again what might not work. It would be nice to know what the hell the "-" is all about.
   
   A dialog that _can't open file_ would at least avoid confusing fools like me.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on issue #4743: Exceptions if .hint file name has non identifier characters

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #4743:
URL: https://github.com/apache/netbeans/issues/4743#issuecomment-1271017549

   It think the system uses the file name (minus ending) as hint name by default if it wasn't configured anywhere else (see [hint option](https://netbeans.apache.org/jackpot/HintsFileFormat.html#_options)).
   
   I imagine this is likely what it causing this. Going to take a look.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists