Page 1 of 7 1234 ... LastLast
Results 1 to 10 of 66

Thread: Hammer 3 beta

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Hammer 3 beta

    Hi,

    Here's the first zip of the beta, as before you can download from:
    http://projects.vdf-guidance.com/projects/hammer/files

    A note on what the hammer is and some highlights on its features can be found in the alpha thread here:
    https://support.dataaccess.com/Forum...mmer3-in-alpha

    Addressed has been the following:

    Hammer beta 20170827

    • Make the file tab in the code explorer aware about folders added via Configure Hammer Workspace. Also open "Open File Under" to use those additional paths.
    • New parser.dll, version 3.0.251 with the following features:
    • The parser addresses an issue with finding in files that have parenthesis as part of the filename. Search results from those files would trigger error 54 from the output pane as formerly parenthesis had been used to pass line numbers. Now we use <> characters instead and those are illegal characters in file names and as such they no longer have the issue with the error.
    • File Find now also includes the manually added paths from the Workspace configure dialog.
    • File Find no longer searches in .svn and .git folders, which makes it faster on projects which have those metadata folders.




    Hammer beta 20170830

    • Bob Worsley ran his unused variables app on -at least part of- the hammer and the unused vars have been removed.
    • Remove DosBox.src as functionality is nowadays part of Hammer itself.
    • Added MatchBrace support, works on ([]) and fold point key words (eg. begin/end/procedure/end_proc etc.), so this is about using Ctrl+]
    • Text type now also uses the proper color scheme
    • Pressing enter on a line when the cursor is less then indentation point still inserted an indent, that is fixed.
    • .lng file type default set to ini filetype
    • Parser.dll version 3.0.0.252, adds exclude in find in files for .hg folders (Mercurial)



    Hammer beta 20170901

    • Added menu "Code Refactoring Tools" under Source menu.
    • Introducing "Drop Self" refactor option, attached to keyboard shortcut Ctrl+Shift+S (See screenshot in post below for an idea what this is)
    • Tweaked dependency scanner option a bit so that it is more forgiving on user input.
    • Fix for bug 85, code collapse is executed when the user clicks anywhere between the [-]
    • Add Performance counter for building code explorer


    Hammer beta 20170910

    • Add {} to bracematch support as per request Dave R.
    • Rewritten the cArray2D logic from the time of yore into structs and arrays and removed the cArray2D pkg from the project.
    • For VDF7+ objects will no longer attach/display their whole object neighborhood for that object in the object prompt list, if multiple objects with the same name exist, then display an extra level of the object path.
    • Fix parens issue with multiple objects where it would not add the outermost parens after selecting from the object prompt list.
    • Add Refactor Object Neighborhood logic
    • Close outputpanel with escape when it has the focus.
    • No "brace bad" highlight on braces in comments.
    • Tooltip parameter highlighting did not take byref into account.
    • Add "ByRef" as keyword in the DataFlex keyword list.


    Hammer beta 20170912

    • Function autocomplete on return type would move the line with "Function_Return" to the first column in the line. This has been addressed. In addition the undo sequence has been improved (less steps needed to undo).
    • Refactored a bunch of code, added missing use statements for a less noisy Problem Resolution Panel in the Studio.
    • Testing Object Neighborhood refactor option on cEditorElementsView.pkg, found that tab characters caused detection to fail, fixed that.


    Hammer beta 20170913

    • Tested object neighborhood refactoring on cEditorEdit.pkg
    • New sciLexer.dll to include support for folding on cd_popup_object and cd_end_object
    • New Refactor option "re-indent".
    • No more autocomplete lists when editing a comment.
    • Object autocomplete list sometimes still displayed methods because it added back a level and added a method.
    • Brace matching now no longer happens at all in a comment.
    • Removed cd_popup_object and cd_end_object from the keyword list as it prevented to see them as scope list items.


    Hammer beta 20170914

    • Added messagebox2 feature from Matt Davidian.
    • Extended Drop self/Object Neighborhood refactoring options to have a checkbox that gives you the option to pad the replace value with spaces (keep same width) or not.
    • Object Neighborhood refactor also works if the line starts with "if" or "else" (bug # 88)
    • Find.dg, Replace.dg, changes the search/replace forms into comboforms that remember the most recent searches and replaces.
    • Added GotoFirstIndentationMismatch as requested by Marco
    • Matching braces logic did not work when typing, nor when moving the cursor past the end of line character. Both these cases have been addressed making the matching braces feature working much more as expected.


    Hammer beta 20170915

    • Prevent the "unable to find current workspace" error when there was no current workspace. The error was in this case very unhelpful.
    • MessageBox2.dg, some changes from Matt for dynamic widths and added MBR_CHECKED2
    • cEditorEdit.pkg, added "remember for this object" option for refactoring, donated by Matt Davidian. The DropSelf refactoring now also works when in an if/else statement.
    • ReIndent on DataFlex images and comments no longer happens.
    • SciLexer.dll, added code folding for begin_row/end_row, item_list/end_item_list, begin_constraints/end_constraints, begin_transaction/end_transaction


    Hammer beta 20170915a

    • Extra fix for DataFlex images where it first still did a ltrim before re-inserting the indent. As DataFlex images can have lines starting with spaces that was not wanted. Fixed


    Hammer beta 20170920

    • No longer present brace bad highlights when your cursor is at the last character (you already know it is an unclosed brace, no need to distract)
    • When a codetip was showing you could not get any autocomplete, this has been addressed. After the autocomplete is finished you get your codetip back as well.
    • The method autocomplete would not show if the line would begin with DataFlex keywords "if" or "else", this has been addressed
    • A bit of code cleanup


    This 0922 release is a STABILITY UPDATE, read below for the details
    Hammer beta 20170922

    • oObjectsMethods.SL, invoking this could trigger a file not open error.
    • cEditorEdit.pkg, simplify code tooltip code a bit, add fix for flashing old non active tooltip after closing autocomplete
    • cSciLexer.pkg, file exist test on openfile, so can present normal warning instead of DF error. Under certain circumstances tooltip highlight calculation could end up in a loop. Fixed and added extra safe guard. Cleaned up codetip before autocomplete logic a bit. Renamed GetCodeTipProperties to CodeTipParameterHighlight


    Hammer beta 20171008

    • Help wasn't working well for Visual DataFlex 9.1, fixed.
    • dbExplorer didn't always select the correct workspace when started from the main menu. This was due to how the command line parameters logic works. Fixed.
    • There was still some conditions with if/else on the refactoring options that where not taken into account and caused the logic to not find refactoring candidates.
    • Find/Replace dialogs would always start searching at begin of the document, now it starts by default from your caret position. Added checkbox option to start from begin of document.


    Hammer beta 20171010

    • Changing your workspace home folder would break workspace tree tools pane, not displaying files anymore. That has been fixed, code will verify if your home folder exists and if not replace it in the .hws file with the current one.
    • Added "On_Key" as another compound statement to take into account for autocomplete lists and refactoring rules
    • If Find in Files with "Show all results" is unchecked it would display the search in a raw format, this has been patched up so that it looks more consistent.
    • There's a new autocomplete list for if you type "use" or "include" it will display all the source files from your workspace.
    • Changed global variables gtTHWorkspace and gtTHCompiler to be properties.
    • Fixed any use of psBufferDataPath, psBufferAppSrcPath etc.. into what it had been meant to be eg. CurrentDataPath, PrimaryDataPath etc.. (thereby preventing strange errors to happen)


    Hammer beta 20171012

    • Contains the fix for the memory leak I introduced in the previous build
    • New Refactor method Method Extraction, not finished!
    • Fix saving newly created file did not save, but instead tried to print (weird)


    Hammer beta 20171013

    • Fix Df19 cConnectionManager compile issue.
    • MethodExtract.dg, now also has a method for creating the call invoke, insert a bit better indentation and location of the new method. Pass parameters passed in outer method to extracted method if used.


    Hammer beta 20171027

    • Method Extract: Fix selection test for if end position of selection on end line and not on position 0 of next line.
      Code analysis for variable isolation logic to determine IN/OUT needs the line breakup logic for compound statements to work for every DataFlex keyword, not just when followed by a set/get/send statement.
    • cEditorEdit.pkg, add first rev. variable analysis feature for code extract.
    • MethodExtract.dg, use selected fonts etc. Do not include variables into the variable declaration and parameters that have been found during code analysis.
      cRefactorMethodExtract.pkg, Introduced KeywordParamTemplate for defining how to analyze DataFlex commands.
    • cSciLexer.pkg, changed preparsedLine to use non common characters for the string replacement.
    • Raveen added a new cCJToolPanel class that the studio can visually model and all reference to the toolpanel uses the DF object rather than the parent cCJDialogBar.
      Eases working with toolpanels as the studio visually models it.
      He also reworked the ToolsPane & OutputPane to use this new class.
    • Bug 94: as reported by Marco, DoChangedCurrentFolder method throws error 4509, Referenced Array Index Out of Bounds. This only happens when the startup folder in the codemaxedit<username>.ini is set to a now not existing folder. The reason you get error 4509 is because the translation array is not yet populated this early on startup. I commented out the translation and personally it is OK that this one info/error is not translated.
    • cEditorEdit.pkg, still an error on creating new files, now on not being able to read "Untitled" D'oh
    • cSourcesList.pkg, extended to be able to exclude standard folders such as .svn/.git/.hg from searching and added ability to use the exclude folders from the workspace. This speeds things up a bit.
    • cWorkspaceHandlerBase.pkg, add support for CurrentWSFile, moved logic from cWorkSpaceHandlerEx.pkg if duplicate code.
      cWorkSpaceHandlerEx.pkg, removed duplicate code that was already in cWorkspaceHandlerBase.pkg
    • scilexer.dll, Scope words in DataFlex can be used as table column names (file.field) and as such they should not be characterized as a scope word. So test for that.
      For ex. somebody using procedure for field name should not change that into a fold point.
    • MethodExtract.dg, extending the method extracting logic, it now no longer declares variables local if the var is declared as a parameter at the extracted method. The analyze line method on get/set no longer declares a function name as a variable. When using the Update button (or click OK) the list with declared variables is re-evaluated.
      The code in the parent method is scanned for if the variable for extracted method was used. If that's the case and the variable is tagged as "write" then that means the variable has to be a byref parameter.


    Hammer beta 20171112
    • Method Extract: lines out a bit better, reindents the text on first display. Somehow however reindenting only works correctly 1 time. Very weird.
      Moved most of the reindent logic down to cSciLexer.pkg
    • ToolPane, database context menu did not always work for opening dbExplorer, database builder. Clear on Filter form now is shortcut key F5 instead of F4.
    • Replace.dg, start from beginning did not work. Also fixed a problem where replace all would hang. (bug #96)
    • Method Extract: analysis on "input/output" of variable was not correct if the first operation on a variable was "output", in that situation it can't be input anymore as the output has overwritten the input. The analysis also did not recognize file.field type of variables as a single variable.
      Updated embedded vWin32fh package to latest version.


    Hammer beta 20180405
    • VDF7 support was completely broken as in that it did not understand your workspaces, this update adds support for VDF4 to VDF7 back in. For VDF7 it would also not compile with debug symbols and as such you could not run the debugger. That is also addressed.
    • THAbout.dg, cEditorProperties.pkg, update text "last updated" with today and copyright set to 2018
    • THParameters.dg, added option for multi row file tabs and the ability to enable/disable creating .bak files.
    • cEditorEdit.pkg, fixed bug 98, statusbar linenumber is not updated when using line up/down during text selection
    • cEditorEditView.pkg, implemented feature 102, add a way to disable creating .bak files (WARNING: disabled by default, you might want to adjust that if you depend on this)
    • cEditorElementsView.pkg, if you double clicked in the treeview on the left in an area without treeview items it would popup "unable to open file". That is fixed.
    • cSciLexer.pkg, fixed bug 99, search dialog "Start at first line" checkbox setting wasn't remembered over multiple invocations. New function CurrentColumn
    • THCommandBars.pkg, suggestion 104, add option for multi row file tabs


    Hammer beta 20180613
    • Compiles and runs in DataFlex 19.1
    • Find in Files dialog now has an option to filter out the results which are in comments. See also feature request 111
    • Fixes an issue with the connection dialog where it would only popup the auto-login dialog the first time when changing workspaces. On subsequential changes between workspaces it would not popup the auto login dialog, but instead abort with a unable to login error.
    • Addresses a rare crash. If you manage to get the parser to crash, then the treeview in the code explorer is no longer displayed and as such trying to use setdata on a treeview that is not on screen will trigger a GPF.
    • Running any custom option from the source menu will pause the hammer. Eg. Open current file in Studio stops your ability to edit in the Hammer at the same time. We now only use runprogram wait if a transfer file is passed.



    Hammer beta 20180711
    • Moved vWin32fh packages to a library under the Libraries subfolder.
    • Code cleanup for DF19.1 warnings as well as using Starzen's code explorer - work in progress
    • Ran Cleanmarkers, Trim line endings, Remove public/private, Remove local keyword, Remove Studio markers
    • Exclude comments feature in Find in Files sometimes did not filter the results correctly.
    • Connection error to an external database now no longer is fatal.



    --
    Wil
    Last edited by wila; 11-Jul-2018 at 08:59 AM.

  2. #2
    Join Date
    Feb 2009
    Location
    Round Lake, IL
    Posts
    1,882

    Default Re: Hammer 3 beta

    As there may be a few people using Mercurial, you may as well add .hg to the list of folders to exclude in the search also.
    Todd Forsberg
    Idealease, Inc.
    Senior Programmer

    Web and Mobile Development: Think Outside the <DIV>

  3. #3

    Default Re: Hammer 3 beta

    Hi Todd,

    Sure, added .hg folders and everything under that folder to the exclude list as well.
    Fix is in parser.dll 3.0.0.252 (yes it was quick to do )

    Thanks for the tip!
    --
    Wil

  4. #4

    Default Re: Hammer 3 beta

    Update.

    Sorry very late here but wanted to finish up the brace match feature today, so will keep it brief.

    Bob Worsley ran his unused variables app on -at least part of- the hammer and the unused vars have been removed.

    Remove DosBox.src as functionality is nowadays part of Hammer itself.

    Added MatchBrace support, works on ([]) and fold point key words (eg. begin/end/procedure/end_proc etc.), so this is about using Ctrl+]

    Text type now also uses the proper color scheme

    Pressing enter on a line when the cursor is less then indentation point still inserted an indent, that is fixed.

    .lng file type default set to ini filetype

    Parser.dll version 3.0.0.252, adds exclude in find in files for .hg folders (Mercurial)

    --
    Wil

    edit: Noticed the project server was struggling have just added more RAM hopefully that keeps it fast
    Last edited by wila; 30-Aug-2017 at 07:50 PM.

  5. #5

    Default Re: Hammer 3 beta

    OK, figured it was time to play a bit with a first code refactor option.

    I believe some people want to refactor code not sure why.

    So yesterday evening and a bit of today I've decided to create a refactoring option into the hammer that I named "Drop Self".

    It sits under the Source Menu in a new sub menu called "Code Refactoring", currently it only has "Drop Self" as menu option.

    It works like this:
    Click image for larger version. 

Name:	TH3RefactorDropSelf.png 
Views:	110 
Size:	20.1 KB 
ID:	11300

    (If you are upgrading -remove/rename codemaxedit<username>.ini from the hammer data folder to get the new keyboard shortcut)

    This functionality sits behind keyboard shortcut Ctrl+Shift+S

    It starts on the line your cursor is at, so it is easy to break/restart if needed.

    At the moment it only does this for non nested objects. So if your code has nested objects then that's not suggested for a clean up. I've got ideas to take care of that as well, but lets first see how this one fares.


    Other changes:

    Tweaked dependency scanner option a bit so that it is more forgiving on user input.

    Fix for bug 85, code collapse is executed when the user clicks anywhere between the [-]

    Add Performance counter for building code explorer

    --
    Wil

  6. #6
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Re: Hammer 3 beta

    Quote Originally Posted by wila View Post
    OK, figured it was time to play a bit with a first code refactor option.

    I believe some people want to refactor code not sure why.

    At the moment it only does this for non nested objects. So if your code has nested objects then that's not suggested for a clean up. I've got ideas to take care of that as well, but lets first see how this one fares.
    Wil, congratulations on implementing a refactoring feature!!! I hope to be able to check it out soon!

    Let me just add one observation about refactoring: An automated refactoring needs to be SAFE and RELIABLE. In other words, it should not screw something up or change any behaviour. So I'm just curious - when you say that the refactoring doesn't work for nested objects, does the refactoring routine check for the existence of nested objects, or are we supposed to check for that ourselves? I would really prefer a refactoring operation to abort with an error message like "Sorry, I cannot do this safely... Nested objects are not supported." rather than "undefined behaviour" happening.
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

  7. #7

    Default Re: Hammer 3 beta

    Hi Ola,

    One refactoring option? We're currently already at 3 options and I expect more will come. (Menu Source -> Code Refactoring )

    Yes I understand that refactoring has to be VERY reliable. This is why for potential refactoring changes it does show you the current line of code in context and displays you what it will change into. You still have to press the "Yes" button!
    Here's an old screenshot (has improved already, see my last post from today at the end of the thread)
    Click image for larger version. 

Name:	TH3ObjectNeighborhoodRefactoring.png 
Views:	87 
Size:	13.8 KB 
ID:	11316

    The "drop self" refactor option is the one that does not offer nested objects, but it works for ALL objects, does not care if it knows about them.
    This was the first option and it does indeed not support nested objects. When I say it doesn't support that, I mean it will skip them from offering to refactor.
    So it won't break things for you.

    The object neighborhood refactor -which has some overlap with the drop self option- does work very well with any nesting level. But the object has to be defined in the current document. It does actively check if it can find your object and even verifies if there's another object with the same name as to prevent breakage.
    If two objects of the same name exist then it will try to make the object notation shorter, but I think that in most cases it will actually just skip offering to refactor for now as the alternative it will offer is likely to be just as long or longer as the notation you have now.

    The 3rd refactoring option is the "Re-Indent" which strips the indent of your file and applies a new indentation by looking at your preferences.

    So to spell it out once more.
    IF the refactoring option does not know what to do with it then it will not show an error like you suggest. Instead of showing errors it just skips the offer to refactor.
    The old code works, if you can't change it safely, why bother?
    It will not refactor anything not safe to refactor. That's a very basic premise for me to refactor anything. The refactoring options are to be able to quickly and safely change your code.
    The reason it doesn't show an error is that errors will interfere with your work flow.
    --
    Wil
    Last edited by wila; 14-Sep-2017 at 03:27 PM.

  8. #8
    Join Date
    Feb 2009
    Location
    Cayman Islands
    Posts
    3,969

    Default Re: Hammer 3 beta

    tried Re-indent on a charmode source and it works perfectly with one major exception...
    Code:
    
    /vSplashPage
        +---------------------------------------------------+
        ¦      KirkNet Point of Sale Version ________       ¦
        ¦                                                   ¦
        ¦    Please wait While the Program initialises...   ¦
        ¦                                                   ¦
        ¦In This Version:                                   ¦
        ¦ 1 Customer Information Upgrade continued          ¦
        ¦ 2 Allow COMPUTERNAME as TERMID                    ¦
        +---------------------------------------------------+
    /*
    
    Incidentally, I've remarked elsewhere about notepad++ not treating the linedraw character set the same way as the Studio, but Hammer doesn't either (see above). The difference being that Hammer doesn't appear to actually mess up said linedraws.
    I should be on a beach ...

  9. #9

    Default Re: Hammer 3 beta

    Hi Dave,

    LOL, OK, that should be easy enough to fix.

    If I have time tomorrow then the fix will be in tomorrow's update.

    As for the linedraw stuff. You're saying it works correctly, but does not display correct in the Hammer?

    Sorry haven't done anything with linedraw characters for a long long time.
    We're doing a toansi on reading in order to make it work correctly with Scintilla.
    Then on save we do a ToOEM to make DataFlex happy again.
    If we didn't do the encoding both ways then we had real issues with Native Language Support (eg. cyrillic script etc..) and could not display comments in local -non english- languages.

    Logged your bug as:
    http://projects.vdf-guidance.com/issues/90

    Thanks for the report!
    --
    Wil

  10. #10
    Join Date
    Feb 2009
    Location
    Stord, Norway
    Posts
    882

    Default Re: Hammer 3 beta

    Quote Originally Posted by wila View Post
    It will not refactor anything not safe to refactor. That's a very basic premise for me to refactor anything. The refactoring options are to be able to quickly and safely change your code.
    The reason it doesn't show an error is that errors will interfere with your work flow.
    Wil, that is very reassuring, and once again I hope to investigate this soon!
    Ola Eldøy (Twitter: @olaeld) - Developer at Emma EDB AS

Page 1 of 7 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •