Eclipse Plugin Interest

2007-12-24
2013-04-12
1 2 > >> (Page 1 of 2)
  • Has anyone in the freemind community discussed the possibility of porting any portion of freemind into the Eclipse Plugin environment ?

    Eclipse brings a lot of nice infrastructure to a project ( like freemind, eh ? )

    My interest is one of a consumer, it would be fun to add freemind to other eclipse plugins as a functionality set.

    With some apologies for starting a thread that I have no capability of finishing....

     
    • Didn't know if I could get any discussion started on this thread or not :)

      So much discussion on the other threads ties in with scripts, groovy, etc, it just keeps coming back to the same question about how much functionality are be trying to replicate strictly inside FM that might be more easily tied in with another platform (eclipse, for example). Or with related plugins that are always beeing worked on such as the eclipse groovy plugin.

      Not that reinventing wheels is any great sin of course.

      Freemind suuuuure would make a nice plugin for Eclipse - concerns about tight coupling to another platform not-withstanding. It would be nice to discuss anyway.

       
      • Bernard Lang
        Bernard Lang
        2008-03-09

        Hi Pete,

        >>Didn't know if I could get any discussion started on this thread or not :)

        Well, I'm game. I've posted a bit on scripts lately (strongest feature of latest beta) and I'm excited about the potential of a Freemind/Groovy marriage: sql/db/backend interface, user interface/presentation (e.g. layout/alignment), utility libraries & prototyping potential core Freemind functions.

        Did you mean:

        a) Script Editor should leverage power of estabished code (Eclipse)? - certainly, but I don't have to code it.
        b) Freemind should not implement users scripts (complexity/security)? - I think it's more than worth it.
        c) Scripts that have been written would be better implemented using existing libraries? - I hope so.

        I'm long in the IT tooth, but Java/Groovy/Eclipse newbie, but Chris, who I believe is Scripting maestro for Freemind, and would probably have to write the code, posted...

        >>Should we allow scripts to be taken from disk everytime they are executed in order to enable editors like Eclipse?

        It's obviously on his mind at least...

        You said:

        >>Not that reinventing wheels is any great sin of course.

        IMHO it can be. I love creativity/learning, but I love leverage more (new wheel prob is testing/maintenance). Better men than me apparently believe Eclipse is kewl (never used it myself). If Chris believes in his (coding) heart of hearts that Eclipse would pay dividends in medium term, he should probably go for it.

        If you post, I'll post.

        Bye for now...

        Bernard

         
        • Bernard:

          I will speak in generalities because the possible synergies from integration within the Eclipse platform are much greater than could be discussed in an introductory posting.

          It's really not as relevant what someone like me thinks, what is important is what the current contributors to Freemind think. They are the ones that know this project well, and what makes it tick.

          As relates to running Freemind within Eclipse, the farther extreme would involve integration within the RCP platform, but I would think that would be too ambitious without a few really enthusiastic developers, so let's set that aside.

          The low hanging fruit that hit me was the groovy script editors. IntelliJ is the gold standard for groovy code editing, very sweet stuff, but there is a lesser Eclipse Groovy Plugin that provides a much nicer groovy editor than would ever be practical within Freemind given it's developer base. So if we could leverage the Eclipse Groovy Plugin, which is itself getting a lot of developer attention here lately, we could provide a very sweet code editor that could integrate nicely with Freemind, and with relatively little effort. This would also allow all the other features of the IDE such as packaging, libraries, code completion etc etc etc.

          If you haven't used Eclipse with it's fantastic capabilities such as code completion and too many other great features to mention here - it's a gorgeous platform and I can get stuff done in seconds that might take minutes or longer without it.

          Examples of swing applications that live happily within Eclipse abound. There are some scary threading issues, but for something as limited integrating as an external groovy script editor that might be minimal. One such example is the Matisse plugin which is written in Swing and recently ported to Eclipse while still a Swing plugin.

          As a side issue - but sort of related, it is very impressive how you can do a script attribute within a .mm file. Yet, a scriptURL attribute to a .groovy file that lived *externally* to the .mm file, or any other way of externalizing that script - that would make a ton of sense from many perspectives. I know that has been discussed by at least one other on the forum so I won't push it here, but it makes the use of the editor obviously more practical in some respects.

           
          • Bernard Lang
            Bernard Lang
            2008-03-10

            Hi Peter,

            I'm not competent to comment on much of what you say (frankly I'm not even clear if Groovy plugs into Eclipse, or the reverse). What effect such an integration would have on Freemind development time scales? Chris & Dimitri would be the best judges of that I guess.

            My interest is in a powerful tool presented as a simple/positive user experience. If Eclipse/IntelliJ/whatever can enhance this, then it's a good idea. If not, not.

            I had seen reference to using the Groovy Eclipse plugin to develop a script on one of the examples page so I investigated a bit, did some installs and was frankly baffled. The sort of experience, in fact, that has always put me off using Java.

            The Script Editor needs a little work to make it sweet (e.g. undo...), but the way scripting is presented to me using it within Freemind I don't find intimidating; stimulating in fact. I don't have to do any setup, worry about class paths, understand the compiler...

            Autocomplete etc would be great, as would a professional scripting environment, as would better debug, but only if the extra functionality was low key, didn't force the user to engage in system issues and was not offputting to scripting newbies.

            JM2CW...

            Bernard

             
            • Bernard:

              >I'm not competent to comment on much of what you say (frankly I'm not even clear if Groovy plugs into Eclipse, or the reverse). What effect such an integration would have on Freemind development time scales? Chris & Dimitri would be the best judges of that I guess.

              The most important issue would be Chris and Dimitri's concerns, perhaps the only issue.

              Freemind is a fantastic tool and will far out stretch any particular environment or implementation, so ruining anything with Tail Wags Dog would be a negative, not a positive. Even groovy inside Freemind is a bit of a distraction, even if it's my favorite feature.

              The issue of a script editor and an IDE as a host environment would be fantastic for the millions(? I think) of us who already use Eclipse and could love scripting Freemind inside our favorite IDE. To anyone else it may be a bit ahead of it's time. I forget that not everyone is a java guy, and not everyone loves Eclipse.

              Thanks for indicating an interest. It's fun to think about, anyway.

               
              • Bernard Lang
                Bernard Lang
                2008-03-10

                Hi Pete,

                >>Freemind is a fantastic tool and will far out stretch any particular environment

                100% agree. I don't "get religon" about software often these days, but I'm burning the midnight oil now. Freemind is not just YA coders nice idea, it has a vision and implementation to over-match most commercial product (it's java yet it's fast). As an apple evangelist might put it: "insanely great ". It's indispensible to running my projects.

                >>Even groovy inside Freemind is a bit of a distraction, even if it's my favorite feature

                This is true, but it's inobtrusive (and should stay that way).

                Given the size of the core Freemind team (small), I think enabling other Java-phobic, but experienced developers to develop bolt on functionality is a smart move. I think the benefits go beyong ad-hoc customisation, important as they are.

                As I understand it (correct me where I'm wrong) If any 3rd party script proves indispensible, or needs maximum optimisation, it can be compiled into a Java class via groovy and rolled into the core/packaged as a plugin.

                Small team + input from skilled enthusiasts users (many are enthused about both Groovy & Freemind) = max leverage.

                The scripting power available is apparently (old cliche, but I think true here) only limited by the imagination Heh I can reformat the users HD if I want to(?). In fact security / malicious code issues needs more thought.

                OK, duty calls...

                Bernard

                 
                • Hi,
                  I'm working on the security issue. No groovy script may access the file system nor the network unless otherwise stated in the properties of FreeMind.

                  Chris

                   
                  • Bernard Lang
                    Bernard Lang
                    2008-03-10

                    Hi Chris,

                    Glad your addressing security. Did you mean:

                    1) users would have to explicitely select an option in preferences as to whether to allow file sytem access.
                    2) that it would be buried somewhere in a config file, requiring users to edit it to access i/o feature?

                    I'd prefer (1) as I need to able to create folders / move files as part of what I'm working, and I want it to be non-tech user friendly.

                    The low level access is one of the key things that got me excited about Groovy for Freemind (front ends/dashboards/LMS...). I only thought of presentation solutions second.

                    JM2CW...

                    Bernard

                    P.S. While I'm here just finished a proof of concept node align script (below).

                    Needs input params/better maths, but it working well (in beta 16)..

                    /* --------------------------------------------------------------------------- */
                    /* Proof of concept script to layout the children of a node programatically    */
                    /* Idea is to generate a table of [x,y] coordinates to fit a desired layout    */
                    /* Just add your own routines to create shapes for other layout format         */
                    /* Needs input dialogue to select the preferred shape, default sin wave shape  */
                    /* is best with 20+ odd nodes. Some ropey hard coded vals are usedto compensate*/
                    /* for various offsets in use that I'm still trying to quantify/compensate for */
                    /* --------------------------------------------------------------------------- */

                    //select a shape for plotting children of this node
                    //Options: WAVE, ALIGN or SLOPE - add your own tables
                    def shapeSelection = "SLOPE";

                    //Count number of children - must be better way(?)
                    def int numChildren = countChildren(node);

                    //select which table to use

                    switch (shapeSelection) {  
                    case 'WAVE':      
                        shape = makeSinTable(200,0,numChildren,140);
                        break  
                    case 'ALIGN':      
                        shape = makeAlignVertical(numChildren,100,100);
                        break  
                    case 'SLOPE':      
                        shape = makesSlopeHorizontal(numChildren,100,100)
                    default:      
                        shape = makeSinTable(200,0,numChildren,140);
                    }

                    //move the nodes children

                    plotChildren(node, shape);

                    //Create a table of [x,y] coordinates (based on params) to plot a Sin Wave
                    //Really, the values for a circle, but displayed as wave by Freemind (why?)

                    def makeSinTable(int xOffset, int yOffset, float numNodes, float radius){

                             def table = [];
                        angInc = (float) (2.0 * Math.PI / numNodes);
                                   
                        for (angle = 0.0f; angle < 2.0f * Math.PI; angle += angInc){
                                def int x = xOffset + (int) (radius * Math.cos(angle));
                                def int y = (yOffset + (int) (radius * Math.sin(angle)))/50;
                                    table.add([x,y])}       
                            return table;
                    }

                    //straight up/down align

                    def makeAlignVertical(int numPoints, int xOffset, int yOffset){
                             def table = [];
                        for (inc = 0; inc <= numPoints; inc += 1){
                            table.add([xOffset,(yOffset/10).toInteger()]);
                                yOffset++;
                            }
                            return table;
                    }

                    //sloped alignment

                    def makesSlopeHorizontal(int numPoints, int xOffset, int yOffset){
                             def table = [];
                        for (inc = 0; inc <= numPoints; inc += 1){
                            table.add([xOffset,(yOffset/10).toInteger()]);
                                yOffset++;
                                xOffset = xOffset + 30;
                            }
                            return table;
                    }

                    //plot location of a node's children based on the shape array passed

                    def plotChildren(aNode, array) {
                        def x = 0;
                        def children = node.childrenUnfolded();
                        while  (children.hasNext()) {
                                child = children.next();
                                xOffset = array[x][0];
                                child.setHGap(xOffset);
                                yOffset = array[x][1];
                                child.setShiftY(yOffset);
                                x++;
                            }
                            //need to refresh - hgap/vshift not applied through controller
                            c.nodeRefresh(node);
                    }

                    //count number of nodes children - must be a better way?

                    def countChildren(aNode){
                        def x = 0; def children = node.childrenUnfolded();
                        while  (children.hasNext()) {child = children.next(); x++;};
                        return x;
                    };

                     
                    • > The low level access is one of the key things that got me excited about Groovy
                      for Freemind (front ends/dashboards/LMS...). I only thought of presentation
                      solutions second.

                      Protest ! There are so many zillions of use cases for groovy scripts and Freemind the mention of any one use case is almost misleading ! Every app written or conceived would want a Freemind data entry point if it were possible.....

                      :)

                       
                      • Bernard Lang
                        Bernard Lang
                        2008-03-10

                        Hi Chris,

                        >>zillions of use cases for groovy scripts and Freemind the mention of any one use case is almost misleading

                        Absolutely, I'm going to post a list of different useful (non-trivial) things to do and see if anyone wants to be a script buddy - I need all the Java help I can get :-}

                        >>Every app written or conceived would want a Freemind data entry point if it were possible

                        They would, just wasn't sure whether or not you were in favour? I'm assuming it is posssible / you are?

                        i.e. will io + file will be possibe (panics).

                        Yes?

                        Bernard

                         
                        • denyo
                          denyo
                          2009-05-05

                          Hi

                          Is this project alive? A freemind container for eclipse would be great.

                           
                      • Bernard Lang
                        Bernard Lang
                        2008-03-12

                        Hi Pete,

                        Just a thought, if you mostly want to use freemind as a map renderer with the real processing on the back end have you tried just using the Flash browser as a UI and feeding it with xml (I'm assuming your thinking browser rather than desktop).

                        Just in case you haven't, (sure you have), try this link which displays the sql table attributes behing our LMS.

                        http://www.userbility.co.uk/freemindscripts/sql_mindmap

                        Link to the code by Mustafa Görmezer is at the top of the maps frame. Key point is if you can tell Flashbrowser to start up with a php rather than mm url and it'll work - not sure about other extensions.

                        fo.addVariable("initLoadFile", "sqlmap.php");

                        Ajax it's not (afaik you have to reload html/flash to update), but it has potential perhaps.

                        Bernard

                         
                  • Bernard Lang
                    Bernard Lang
                    2008-03-14

                    Hi Chris,

                    Looking forward to getting a heads up on script security in future version. I noticed this thread on the freemind-developer list:

                    >>I'll have a try to install a special security manager for the groovy plugin.
                    >>Thus it is possible to restrict network and file access.
                    >>Chris

                    Glad you're taking security seriously, (and in advance of me raising the issue on Open Discussion >> "In fact security / malicious code issues needs more thought" ), but I'm a bit concerned as to the size of the sandpit you envisage.

                    I posted elsewhere (can't find it, because sourceforge threading is utterly baffling) that, while I want believable security for users, we should not lock out low level/file/io functions as it would make implementation of many useful things (e.g. dashboards) impractical. I also suggested a "trusted scripts" repository (still think it's simplest real world solution).

                    Locking out developers from engaging in user's file management could be a real failure of "imagination" (as Eric characterised it). Smart move might be to give more power to the applet, not less for the ap.

                    QUESTION: Will developers be able to use a script to manage a user's files in 0.9.# - subject of course to their consent / dev. references - without the user having to do more than click a check box (no config files)?

                    Yes/No? Answers on a postcard to...

                    JM2CY

                    Thanks...

                    Bernard

                     
                    • Bernard Lang
                      Bernard Lang
                      2008-03-14

                      >>No groovy script may access the file system nor the network unless otherwise stated in the properties of FreeMind.

                      P.S. Comment about importance of system/file/io access apply^2 to network access.

                      P.P.S. Not implying security is an easy balance (it's not), but please don't choke the goose ...

                      P.P.S. Thought for scripters. If you told users that, providing the word "java" doesn't appear in a acript it CAN'T eat you hard disc, would you be telling them the truth?

                      Postcards to...

                      Bernard

                       
                      • In answer to your questions about scripts Bernard, my view is that they are almost orthogonal to the Freemind product.

                        In other words, it is in our interest to make scripting (but not scripts themselves) as powerful and easy as possible without ever making Freemind more complex.

                        But any and every script must stand totally on it's own, and totally outside the domain and interest of Freemind. To do otherwise is to get into the script management business, a no win deal from any perspective.

                        Keeping things simple has been discussed here before, and that is the beauty of Freemind. Betray that and it all goes downhill.

                        There is nothing simple that could ever be done about script management. That is a totally external domain. My 2c.

                         
                    • Eric L.
                      Eric L.
                      2008-03-14

                      Hello,

                      I changed the subject to better reflect the new content.

                      My thoughts which I addressed to Chris and perhaps I was not explicit enough, so let me try it again:

                      People are lazy and will choose the easy way to use macros/scripts, and a FreeMind macro/script worm/virus would kill our reputation (see how Microsoft with all its might is fighting to correct its image in terms of Security).

                      We can discuss about the above points but I'm not ready to support anything endangering FreeMind's reputation and the security of our users! What I'm more ready to discuss is how we address the above points.

                      And what I had in mind when I addressed the issue to Chris was the following (making it more precise at the same time):

                      1. it must be easy for a user to remove the question back before executing scripts, under the condition that scripts can't do harm to his computer, data, and/or spread itself.
                      2. it must be difficult/impossible for a user to remove the question back before executing scripts able to perform the above actions.

                      So, the following must be difficult/impossible to do without explicit user interaction:
                      A. access the file system
                      B. access the network
                      C. access another (already opened) FreeMind map (that's a new requirement, I know)
                      D. modify FreeMind's configuration (it's also new, but if it's not given, you can forget about the above points)

                      Eric

                       
                      • Bernard Lang
                        Bernard Lang
                        2008-03-14

                        Hi Eric

                        >>I'm not ready to support anything endangering FreeMind's reputation

                        Absoloutely, I posted similar sentimnts elsewhere.

                        >>So, the following must be difficult/impossible to do without explicit user interaction:

                        Agreed 100%. My only question would be how easy will it be for a user to override the "firewall" if/when they do want to run a script they trust, which they may, indeed, have commissioned. I'm just trying to get clear if ideas I'm pitching are going to run into the security sand...

                        Bernard

                         
                        • Eric L.
                          Eric L.
                          2008-03-14

                          Hi,

                          Chris would now need to jump in and tell us what he has in mind resp. what is possible.

                          My suggestion would be the following: the first time a script in a specific map tries to access network/disk/other map/config, a dialog pops-up asking the user if he wants to allow this, Yes or No (the default), with 3 possibilities:
                          1. Once
                          2. for x minutes/hours
                          3. for the session

                          this means:
                          - the decision is once per map and session, which is acceptable burden (IMHO).
                          - the default possibility out of 3 is a new preference

                          Eric

                           
                          • Bernard Lang
                            Bernard Lang
                            2008-03-14

                            Hi Eric, Pete & (hopefully) Chris,

                            Thanks for the update. Embarassingly, I can't remember if I posted a response to this earlier (SourceForge threading is a mystery to me), but the lollowing:

                            >>My suggestion would be the following: the first time
                            >>a script in a specific map tries to access network/
                            >>disk/other map/config, a dialog pops-up asking the
                            >>user if he wants to allow this, Yes or No (the
                            >>default), with 3 possibilities:
                            >>1. Once
                            >>2. for x minutes/hours
                            >>3. for the session

                            >>this means:
                            >>- the decision is once per map and session, which is acceptable burden (IMHO).
                            >>- the default possibility out of 3 is a new preference

                            Sounds good to me right now - I can stop panicing I think(?)

                            I'll sleep on it and see what I think tomorrow...

                            Bernard

                             
                            • Hi,

                              sorry, I think different as the questions like: "a script wants to link a dynamic library to the java virtual machine. Do you want to permit this?" is not decidable by the users (like in Vista, where my dad gets a message every minute if he wants to permit 0406456-04560454-45604324-2342396, or the like, which he isn't able to decide).
                              Thus, I implemented, that scripts can't do these things and that an exception occurs, that stops the script. Nonetheless, there are three switches in the preferences that allow these type of actions for all scripts.

                              Finally, I think about signed scripts, that get a signature from the FreeMind team. Signed scripts can do everything.

                              What do you think?

                              Chris

                               
                              • Eric L.
                                Eric L.
                                2008-03-16

                                Hi Chris,

                                good to have you on the conversation.

                                I'm not 100% convinced by your arguments, but I think your solution is good enough for 0.9.0 and we can fine-tune in a following release, based on our users' experience. So OK with me.

                                When you say 3 switches, you mean network, disk and other map access? What about FreeMind's config? I would agree to remove access to FreeMind's config from the possibilities (anyway, access to the file system makes it easy for a script to access FreeMind's config).

                                Thanks, Eric

                                 
                                • Eric L.
                                  Eric L.
                                  2008-03-16

                                  Hi again,

                                  thinking about it again, signature of scripts might be the answer to my concerns, but:

                                  1. I'd rather postpone this to after-0.9.0, topic sounds too complex to be decided now.
                                  2. I'd like to be able to sign (and trust) my own scripts and trust the scripts of trustworthy persons, not only FreeMind (when I said, too complex for 0.9.0, I meant it).

                                  Cheers, Eric

                                   
                                • > When you say 3 switches, you mean network, disk and other map access?
                                  No: disk, network and execution of foreign applications.
                                  Other map access restriction is technically not possible at the moment, IMHO.

                                  Chris

                                   
                      • I would agree with all of Eric's proposals:

                        So, the following must be difficult/impossible to do without explicit user
                        interaction:
                        A. access the file system
                        B. access the network
                        C. access another (already opened) FreeMind map (that's a new requirement, I
                        know)
                        D. modify FreeMind's configuration (it's also new, but if it's not given, you
                        can forget about the above points)

                        How does one accomplish this, technically ? If it can be done, that is great.

                         
1 2 > >> (Page 1 of 2)