Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#154 MiscUtilities.openInDesktop() in jEdit 5.0

for 5.0.x
closed-accepted
None
5
2012-07-01
2012-06-10
Alan Ezust
No

Originally, I was just going to move the code out of the browser.actions.xml file and into MiscUtilities
but during testing, I found and fixed a couple of bugs in related to files with spaces in the names.

So revision # 21791 moves the code into MiscUtilities (which is a new API) and also fixes some of the code
that was there before. I would like to put this into jEdit 5.0 so that plugins can use it sooner (esp. projectviewer which has duplicate bad code right now).

Discussion

1 2 > >> (Page 1 of 2)
  • Alan Ezust
    Alan Ezust
    2012-06-11

    I removed some unnecessary code in rev# 21792 so you can apply that as part of this merge request too.

     
  • Alan, so you suggest that 5.0pre1 (already released) have different api than 5.0 or 5.0pre2? I remember someone said recently that it shouldn't be done, but I don't see any written rule about that.

     
  • Alan Ezust
    Alan Ezust
    2012-06-11

    I hope an exception can be made in this case.
    I was just a day late :-)

     
  • Alan Ezust
    Alan Ezust
    2012-06-14

    Rev#21801 improves the API docs for the function.

     
  • Kazutoshi was not sure whether to agree on this merge. I am going to commit it, but will wait a few days for possible objections.

     
    • assigned_to: nobody --> jarekczek
     
  • There is a problem with method's signature, maybe with javadoc.

    @throws IOException if the path is not valid or something else is not working

    Usually the exception will not be thrown because the string is simply passed to a native command. Only in

    // I don't know what platform it is...

    there may really be IOException raised. But that's the border case, as all known operating systems don't reach this line.

    I think it would be better to remove this misleading exception from signature. Capture it and report immediately, maybe returning true on success, false on failure.

    Copying the code from action to api seems to be not enough in this case. Api needs additional care.

     
  • Alan Ezust
    Alan Ezust
    2012-06-25

    That is incorrect.
    An IOException can also be thrown from Runtime.exec(). if for example, command is not found or filename is bad.

     
    • assigned_to: jarekczek --> nobody
     
  • Alan, with such hasty comment and this level of your verbosity I see no way to work on this ticket. And my opinion about this new api in 5.1 remains negative.

     
1 2 > >> (Page 1 of 2)