Loading ...
Sorry, an error occurred while loading the content.

[PATCH] implemented netbeans_intg

Expand Messages
  • Kazuki Sakamoto
    Hi, I have implemented `+netbeans_intg for MacVim. clewn has finally worked with MacVim! http://clewn.sourceforge.net/ $ clewn (gdb) $
    Message 1 of 8 , Jun 25, 2009
    • 0 Attachment
      Hi,

      I have implemented `+netbeans_intg' for MacVim.
      clewn has finally worked with MacVim!

      http://clewn.sourceforge.net/

      $ clewn
      (gdb)

      $ MacVim.app/Contents/MacOS/Vim -g -nb:localhost:3219

      sakamoto

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... Hi Sakamoto, That s great! I think a lot of people will appreciate this. I haven t tested the code yet but the patch looks good. I only have a few
      Message 2 of 8 , Jun 25, 2009
      • 0 Attachment
        2009/6/25 Kazuki Sakamoto:
        >
        > I have implemented `+netbeans_intg' for MacVim.
        > clewn has finally worked with MacVim!
        >
        > http://clewn.sourceforge.net/
        >
        > $ clewn
        > (gdb)
        >
        > $ MacVim.app/Contents/MacOS/Vim -g -nb:localhost:3219

        Hi Sakamoto,

        That's great! I think a lot of people will appreciate this.

        I haven't tested the code yet but the patch looks good. I only have a
        few (trivial) comments at the moment:

        1. What happens if setNetbeansSocket: is called twice with "socket ==
        -1"? Same thing if called with two different values for "socket"? (I
        guess the way it is set up this will never happen but it doesn't hurt
        to be a bit paranoid and make this more robust by freeing all
        structures and setting them to nil before CFSocketCreate...() and
        making sure you don't call CFRelease() twice on the same structure.)

        2. Check whitespace in feature.h/netbeans.c -- you should use "set et"
        in the core Vim source code files (at the moment there are spaces in
        some places where there should be tabs).

        Thanks for the patch,
        Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • björn
        ... Sorry, that was meant to read set noet . Björn --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_mac
        Message 3 of 8 , Jun 25, 2009
        • 0 Attachment
          > 2. Check whitespace in feature.h/netbeans.c -- you should use "set et"
          > in the core Vim source code files

          Sorry, that was meant to read "set noet".

          Björn

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Kazuki Sakamoto
          Hi Björn, ... Thanks! I am happy to hear that. ... Ok, I have made sure it. ... understand. I have fixed about whitespace as other lines. By the way, we might
          Message 4 of 8 , Jun 25, 2009
          • 0 Attachment
            Hi Björn,

            On Fri, Jun 26, 2009 at 12:25 AM, björn<bjorn.winckler@...> wrote:

            > That's great!  I think a lot of people will appreciate this.

            Thanks! I am happy to hear that.

            > I haven't tested the code yet but the patch looks good.  I only have a
            > few (trivial) comments at the moment:
            > 1. What happens if setNetbeansSocket: is called twice with "socket ==
            > -1"?  Same thing if called with two different values for "socket"?  (I
            > guess the way it is set up this will never happen but it doesn't hurt
            > to be a bit paranoid and make this more robust by freeing all
            > structures and setting them to nil before CFSocketCreate...() and
            > making sure you don't call CFRelease() twice on the same structure.)

            Ok, I have made sure it.

            > 2. Check whitespace in feature.h/netbeans.c -- you should use "set et"
            > in the core Vim source code files (at the moment there are spaces in
            > some places where there should be tabs).
            > Sorry, that was meant to read "set noet".

            understand. I have fixed about whitespace as other lines.


            By the way, we might need to implement `+balloon_eval' as well.
            src/gui_beval.c

            sakamoto

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Nico Weber
            Hi, ... I m very excited about this patch, too. Once it s in, it would be great if there was a MacVim wiki page that has a few screenshots that show what s
            Message 5 of 8 , Jun 25, 2009
            • 0 Attachment
              Hi,

              On 25.06.2009, at 14:45, Kazuki Sakamoto wrote:

              > Hi Björn,
              >
              > On Fri, Jun 26, 2009 at 12:25 AM, björn<bjorn.winckler@...>
              > wrote:
              >
              >> That's great! I think a lot of people will appreciate this.
              >
              > Thanks! I am happy to hear that.

              I'm very excited about this patch, too. Once it's in, it would be
              great if there was a MacVim wiki page that has a few screenshots that
              show what's possible with this patch, and links to the documentation
              on how to set this up.

              > By the way, we might need to implement `+balloon_eval' as well.
              > src/gui_beval.c

              I started looking at this a while ago, but then got sidetracked
              working on the other "one background process per gui window/tab" mac
              app :-/

              My main "discovery" back then was that Cocoa's toolkit support
              (there's a function to set a tooltip on a view) isn't quite good
              enough for +baloon_eval: It doesn't support more than one tooltip at
              once, and it's not easy to specify where it should appear.

              However, it looks like the tooltip code from Camino could be used for
              this. That's also what Chromium uses:

              http://src.chromium.org/viewvc/chrome/trunk/src/third_party/mozilla/include/ToolTip.h
              http://src.chromium.org/viewvc/chrome/trunk/src/third_party/mozilla/include/ToolTip.mm

              If you want to take a shot at this, I can send you a few more notes
              (i.e. where the code changes need to be made), but judging from your
              netbean patch, it looks like you can figure that out yourself :-)

              Nico
              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              Hi Sakamoto, Thanks for the updated patch -- I have merged and pushed it now. I did still change around -[MMBackend setNetbeansSocket:] a little bit to fit
              Message 6 of 8 , Jun 26, 2009
              • 0 Attachment
                Hi Sakamoto,

                Thanks for the updated patch -- I have merged and pushed it now. I
                did still change around -[MMBackend setNetbeansSocket:] a little bit
                to fit the general programming style I use for setters in MacVim.
                Please look over it and let me know if you have any objections. Other
                than that I only made some cosmetic changes. All in all the patch
                looks really good -- you seem to have come up with a very clean way to
                integrate this with the inputQueue handling and everything. :-)

                >
                > By the way, we might need to implement `+balloon_eval' as well.
                > src/gui_beval.c

                I think that would be great -- do you think you'll look into it?


                To test the patch out I installed clewn myself and this turned out to
                be a bit of a pain. For everybody else who'd like to try this patch
                out, here's what I did:

                1. Download clewn from http://clewn.sourceforge.net
                2. Open Terminal and cd to dir where you unpacked clewn, then

                $ vimdir=$HOME/.vim ./configure --prefix=$HOME
                $ make

                and notice that this fails. It may fail on the configure step if you
                don't have the readline library installed, but I already had that (if
                you don't have it, you can get it from MacPorts with "sudo port
                install readline").

                The reason "make" fails is that the Makefile hasn't got the right
                paths to the readline headers and library. Edit the Makefile as
                follows: Add

                -I/opt/local/include

                to DEFAULT_INCLUDES on line 63 (assuming readline is installed with
                MacPorts, otherwise change "/opt/local/include" for wherever readline
                is). Next make sure it finds the library. Add

                -L/opt/local/lib

                to LDFLAGS on line 119 (again, assuming MacPorts was used to install readline).

                After those changes you are good to go:

                $ make
                $ make install

                That takes care of the installation of clewn.

                3. Try it out, e.g. go to the src/ directory of MacVim and

                $ clewn -ga './Vim'

                In another Terminal window ("path/to/" should be the path to the
                MacVim.app binary you built with netbeans support):

                $ path/to/MacVim.app/Contents/MacOS/Vim -g -nb:localhost:3219

                Back in the clewn Terminal window, type "break main" then "run" and
                the source for main.c should appear in the MacVim window that opened
                in the step above with a "=>" on the line where GDB has halted (at the
                beginning of main()).

                4. Use C-n for "next", S for "step", F for "finish", etc. See ":h
                clewn" for more info.


                That's it. Yes, I found that very complicated to get going.
                Hopefully somebody could make a tutorial on how this should be done
                and I can add it to the MacVim Google code page. It is supposed to be
                possible to have clewn automatically open Vim for you, but I haven't
                gotten that far yet.

                Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Nico Weber
                ... FWIW, looks like Chromium is back to native tooltips: http://codereview.chromium.org/150188 Nico --~--~---------~--~----~------------~-------~--~----~ You
                Message 7 of 8 , Jul 6, 2009
                • 0 Attachment
                  > My main "discovery" back then was that Cocoa's toolkit support
                  > (there's a function to set a tooltip on a view) isn't quite good
                  > enough for +baloon_eval: It doesn't support more than one tooltip at
                  > once, and it's not easy to specify where it should appear.
                  >
                  > However, it looks like the tooltip code from Camino could be used for
                  > this. That's also what Chromium uses:
                  >
                  > http://src.chromium.org/viewvc/chrome/trunk/src/third_party/mozilla/include/ToolTip.h
                  > http://src.chromium.org/viewvc/chrome/trunk/src/third_party/mozilla/include/ToolTip.mm

                  FWIW, looks like Chromium is back to native tooltips: http://codereview.chromium.org/150188

                  Nico

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Bram Moolenaar
                  ... I finally had time to have a look at this patch. Most of the changes are to files not in the normal Vim distribution. And most of the changes to
                  Message 8 of 8 , Jul 10, 2010
                  • 0 Attachment
                    Kazuki Sakamoto wrote:

                    > Hi Björn,
                    >
                    > On Fri, Jun 26, 2009 at 12:25 AM, björn<bjorn.winckler@...> wrote:
                    >
                    > > That's great! I think a lot of people will appreciate this.
                    >
                    > Thanks! I am happy to hear that.
                    >
                    > > I haven't tested the code yet but the patch looks good. I only have a
                    > > few (trivial) comments at the moment:
                    > > 1. What happens if setNetbeansSocket: is called twice with "socket ==
                    > > -1"? Same thing if called with two different values for "socket"? (I
                    > > guess the way it is set up this will never happen but it doesn't hurt
                    > > to be a bit paranoid and make this more robust by freeing all
                    > > structures and setting them to nil before CFSocketCreate...() and
                    > > making sure you don't call CFRelease() twice on the same structure.)
                    >
                    > Ok, I have made sure it.
                    >
                    > > 2. Check whitespace in feature.h/netbeans.c -- you should use "set et"
                    > > in the core Vim source code files (at the moment there are spaces in
                    > > some places where there should be tabs).
                    > > Sorry, that was meant to read "set noet".
                    >
                    > understand. I have fixed about whitespace as other lines.
                    >
                    >
                    > By the way, we might need to implement `+balloon_eval' as well.
                    > src/gui_beval.c

                    I finally had time to have a look at this patch. Most of the changes
                    are to files not in the normal Vim distribution. And most of the
                    changes to src/netbeans.c are rejected, other changes interfere.

                    Thus I won't include this now. If you would like Vim 7.3 to include
                    some of these changes, please send a new patch.

                    --
                    TALL KNIGHT OF NI: Ni!
                    "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ download, build and distribute -- http://www.A-A-P.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    You received this message from the "vim_mac" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  Your message has been successfully submitted and would be delivered to recipients shortly.