Operation of Grammar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stumpii
    Enthusiast
    • Apr 2008
    • 49

    Operation of Grammar

    I do not understand the new difference between grammar and unimportant text. The help file does not really give and details.

    In BC2, I set an unimportant text regex entry as .*\[DESC\].* This would highlight the matching lines in blue in the file compare window and I could filter by differences which would keep them in view and toggle the 'unimportant differences' to hide them.

    In BC3, I set the same entry as a grammar entry. In the file compare window, this line is now green. Any minor changes such as case are highlighted blue. Filtering by differences now makes the green disappear, so I can no longer check these unimportant differences. Toggling the 'unimportant differences' option removes the blue items as in BC2.
  • maurice
    Enthusiast
    • Jan 2008
    • 42

    #2
    Grammar help

    This is confusing to me also. I have several similar "unimportant text" rules that BC3 did not seem to be using. Here's what I did that worked for me.

    From a file compare window (I don't know any other way to access) bring up the Session Settings window (Session > Session Settings -or- click referee), then click Importance tab...uncheck "String". This seems a little odd to say (when checked) that all strings are important....so ignore my "Grammar" rules for strings.

    Also, all my "rules" are of the type "String=Text matching...." but at least for now, BC3 doesn't remember the last type you created so I have to change from "new element" to "string" every time!

    Also, it seems to me that it takes far too long to get to the "Grammar" tab. In BC2, from a file compare window, click on the Ref and you get the current rules (note - Ref tool tip says "Change Rules"!!)

    In BC3, from a file compare window, Ref tool tip says "Rules", but clicking brings up Session Settings. The only way I can get what I need is Tools > File Formats. Currently no toolbar option for this, but you may be able to add a hot key.

    Comment

    • grunt
      Enthusiast
      • Mar 2008
      • 37

      #3
      i'm struggling with this issue right now...

      bc3 dev team (ui designer in particular, if there is, in fact, one poor soul tasked with that): you must have done something wrong with this in bc3 because its usability sucks. if you forced me to open the manual (much less visit your support forums!) afaic - you failed as a ui designer, simple as that.

      nothing personal, ok? imo, not sucking at ui design is harder than not sucking at plain coding, but that's one of the things it takes to make great product.

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5538

        #4
        Grunt,

        Thanks again for the feedback on this. We will work on this design one more time before the official release of BC 3.0.

        Please see my post in the other recent format/unimportant text thread for an explanation of marking text unimportant.

        http://www.scootersoftware.com/beta3...77&postcount=6
        Chris K Scooter Software

        Comment

        • aid9035
          Journeyman
          • Mar 2005
          • 19

          #5
          More on Grammer Item Importance

          RE: Grammer item definition and whether a particular item is or is not important (Build 456).

          First, I think the idea of defining grammer items is great; however, a given grammer item may be entirely irrelevant to importance. For example, the user may only want that item to apply in syntax highlighting (Options, File Views, Display), without any effect whatsoever on importance determination.

          From what I can see, if there is a defined grammer item, then it is either important or unimportant (checked or unchecked, respectively). If there is a way to tell BC that an item is "irrelevant", I did not find it.

          Otherwise, the ability in a BC3 "session" to pick and choose among predefined items offers great flexibility compared to BC2. I believe I had made some similar suggestion a few years ago. Thanks!

          Comment

          • aid9035
            Journeyman
            • Mar 2005
            • 19

            #6
            Oops, Flagrant Misspelling!

            Oops! If I had been thinking about "grammarian", "grammatical" or even "Grammaticus", I wouldn't have misspelled "Grammar"! Too bad there isn't a blush-faced emoticon.

            Comment

            • Michael Bulgrien
              Carpal Tunnel
              • Oct 2007
              • 1772

              #7
              Originally posted by aid9035
              Oops!
              You can edit your post to correct mis-spellings.
              BC v4.0.7 build 19761
              ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

              Comment

              • Tim
                Team Scooter
                • Oct 2007
                • 786

                #8
                I think leaving a grammar item's importance checkbox checked does what you're asking. Differences are important by default but an individual "unimportant" grammar item can override this. By leaving the item "important", it will get the syntax highlighting but be handled like default text.
                Tim T Scooter Software

                Comment

                • aid9035
                  Journeyman
                  • Mar 2005
                  • 19

                  #9
                  OK - I guess I was changing too many things at one time when first setting up BC3. It also took me a bit to get used to checking important items in BC3 vs. specifying unimportant items in BC2.

                  It had seemed to me that both unimportant and important items were taking precedence over default text, but I reworked that example and verified that only the unchecked, unimportant items take precedence.

                  Jerry

                  Comment

                  • mzel
                    Expert
                    • Mar 2008
                    • 88

                    #10
                    I have trouble adding my unimportant element.
                    I am trying to ignore the differences in the version control stamps. I am pretty good with regexes and ahd no problem with this back in BC2. No I followed the instructions by Chris, but it still does not work for me. When I uncheck my VersionStamp item in the grammar nothing happens. The line is still highlighted. When I go back to the session setting it is checked again.

                    Comment

                    • Aaron
                      Team Scooter
                      • Oct 2007
                      • 16002

                      #11
                      It should not 'recheck.' The first step would be to troubleshoot why it would be rechecking the box after you have selected Ok. Then we can troubleshoot if the rule itself is working. If it is checked, then it will be important.

                      To clarify, you open your pair of files, then click the Referee button (or go to the Session menu -> Session Settings). Then go to the Importance tab. Uncheck your custom "versionstamp". click ok.
                      Then go back to the Session Settings and make sure the uncheck is still unchecked.

                      If it is not, please make sure you are using the most recent version (458 as of today) and send us your settings (Help menu->Support; Export) to [email protected]
                      Which rule are you using with "Versionstamp"?
                      Aaron P Scooter Software

                      Comment

                      • mzel
                        Expert
                        • Mar 2008
                        • 88

                        #12
                        Hey, Aaron.
                        I double checked this, and it keeps rechecking. The regex is working. I managed to get the line colored blue, but only till the next text view.
                        It is even stranger. I configured the rules the way you proposed, and went to the folder view. The pair was shown with the double tilde as expected. The next pair of the files, also .java which I also expected to be approx. equal was shown as non-equal, so I hit Ctrl+F5, but nothing changed.
                        I went into the second file pair, and the line was red, so I hit the Referee button, and it was there, checked. I hit cancel, went back to the folder view, and now the first pair was shown as non-equal too. The Versionstamp was checked in that pair too.
                        I do understand that this is a session-wide setting so I was surprised at the sequence of events.
                        I'll send you the config later on.

                        Comment

                        • Aaron
                          Team Scooter
                          • Oct 2007
                          • 16002

                          #13
                          As a Session setting, for each new Session you open it will use that session's default settings. So if the default is for it to be Important, then each new pair of files will use that (until you change it for that session).

                          You can change the Session's defaults from the Home Screen by selecting the Session type under Edit Session Defaults at the top of the list.

                          Does that help?

                          Edit: Another place to change your Session Defaults: From within the session you just edited (an open pair of files) there is a Combobox at the bottom of the Session Settings dialog where you just changed the importance. It is set by default to For This View only, but can be changed to Edit Session Defaults. This will also set the Session Defaults.
                          Last edited by Aaron; 20-Jun-2008, 11:09 AM. Reason: combobox at bottom
                          Aaron P Scooter Software

                          Comment

                          • mzel
                            Expert
                            • Mar 2008
                            • 88

                            #14
                            I guess not. I was within the same session. BTW, I sent you my config.

                            Comment

                            • Aaron
                              Team Scooter
                              • Oct 2007
                              • 16002

                              #15
                              Thanks, mzel. I think the confusion comes from that in BC3 everything is a Session.

                              I notice your Text Compare default is Versionstamp = Important. That means for any new Text Compare Session you open, even from a Folder Compare Session, it will set that checkbox. To alter this behavior, you can either:
                              -Set the Session default. Then any Text Compare you open will use the defaults
                              -Open a Folder Compare, then open a Text Compare, go to the Session settings and uncheck the box. Then go down to the Combo Box at the bottom of the dialog. Because it is a child session, it will have a couple more options:
                              *For this View Only - only affects that open tab
                              *Use with these Files in parent session - uses for this particular file in the parent session
                              *use for all files in the parent session - uses this config for all files of this file extension in the parent session
                              *Update Defaults - same as going to the home screen and updating the default.
                              Aaron P Scooter Software

                              Comment

                              Working...