Author Topic: Drag and drop functions or variables from the symbol browser REALLY helpful  (Read 3748 times)

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Why is it not possible to drag&drop a function directly from the symbol browser into the code window? I remember many years ago working in some environment where it was possible, I don't know what it was anymore an ancient version of Visual Studio or Codewright, but dragging something into the editor together with the rat's tail of namespaces in front of it is a HUGE help especially with deeply nested namespaces.

Hopefully you will implement that in a future version

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Why would you drag and drop when you can double click or right click?

You lost me on the namespaces.  Can you explain that a bit better?

The symbol browser is kind of a slow way to find things.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
What I mean is when you are coding and you want to include a call to a function for instance like

Code: [Select]
NAMESPACE1::NAMESPACE2::NAMESPACE3::DoStuffWithMyReallyDescriptivelyNamedSubroutine(x.y,z);

right now I have to type that all in. Sure, Slickedit may or may not help me by suggesting name completions while I type but in many cases the parsing of Slickedit fails and it simply does not suggest anything, especially in complicated project setups with many levels of name spaces. In that case I have to type it all in or, like you said, navigate to the source code where my function is defined through the file dialog pane, if I remember where in the deep directory structure the source file is, and then doubleclick on the funciton name in the Defs pane to get there, then mark the name, copy, move to my code window and insert, not to mention I have to restore the namespace prefixes.

I can't remember what I was using 15 years ago in that company I was working but I remember all you had to do was click on a function name in the symbol browser, drag it into your code and the complete function name including namespace decoration would show up

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
In both the symbol browser or find symbol window you can use right click => copy item - to get a text string on the clipboard with the relevant namespace names.  It's possible to write a macro and add it to the context menu that would paste the text you want into the edit window  - have a look at it and see if it would be useful.  In my next life I might have time to help you implement it if you're really keen.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
That's not very helpful. It copies the whole line from the symbol browser including parameter definition and the file location on disk into one line.
Nope, that just shifts the workload from one kind to another.
My feature request still stands. I believe a functionality like I described it is desperately needed in Slickedit

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Yeah, that's why I said a macro could be written to translate it into the format you want.

I highly doubt that it's desperately needed.  Code that has more than a small number of function calls or data that involves three namespace qualifications, is gonna be horribly verbose and hard to read.


fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
If you have a huge system you have to divide it up somehow to keep it manageable in the editor. My solution is basically to have a 3-5 deep nesting of namespaces plus I sort the files into a directory tree that corresponds to the name spaces. Most of the time I use the Projects tab to go navigate to a file but I realise that the Symbols browser offers additional features that you dont get if you just use the file browser.
I am relatively new to Slickedit, on and off over the past years. I used it in the 90s but then got stuck with Visual Studio and that Tomato tool. Recently I noticed that neither that nor the other one, Resharper, work really flawlessly with larger projects in VS 2019 so I thought I give Slickedit another try. Once you get used to it again it has a better feeling than Visual Studio and with the flaws on that side I am beginning to realize that no IDE is without problems and it's just selecting the one who's problems you can live with best.
What's your solution to organizing huge projects and navigating them in Slickedit?

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
I write mostly embedded software and I don't work on large projects.

I don't understand why the nested namespaces helps with navigating code in slickedit.  I would have thought that would make it harder for slick to do the name completion correctly.

Dennis

  • Senior Community Member
  • Posts: 3955
  • Hero Points: 515
I'll file a feature request with respect to this.  Drag and drop is always tedious, and I think in this case, it would be especially ambiguous trying to anticipate what someone wants with respect to the symbol being fully qualified or not.  One simple solution would be to add a "copy name" and "copy qualified name" item to the right click menu, so that you can get just the bits that you want.

I am also moving this thread to the Features board.

Graeme

  • Senior Community Member
  • Posts: 2793
  • Hero Points: 347
Also keep in mind having shortcut keys for keyboard users.  If you have an unqualified name in your code (or part of a name), a single keystroke (*1) could bring up the find symbol dialog with the (partial) name, then arrow down to the right one and hit ctrl-right-arrow (*3) or something to get the fully qualified name in the source file.
*1 - so this would need to delete the (partial) name at the cursor position and populate the find symbol dialog with it for *3 to work sensibly.  So really, instead of typing part of the name in the source file, just bring up the find symbol dialog, start typing the name.

fritzeflink

  • Community Member
  • Posts: 55
  • Hero Points: 2
Re: Drag and drop functions or variables from the symbol browser REALLY helpful
« Reply #10 on: December 19, 2019, 07:23:04 AM »
I write mostly embedded software and I don't work on large projects.

I don't understand why the nested namespaces helps with navigating code in slickedit.  I would have thought that would make it harder for slick to do the name completion correctly.

That is correct. I always have problems with the symbol completion in Slickedit or rather SE has the problems. the same is true for nested directories and auto creation of the #include statement by the way, but since I was forced to move to VS2019 as a compiler I tried out Resharper and that other thing by Wholetomato software and there are problems there too. Looks like the the more "advanced" Visual studio and all it's features become the more difficult it is for those plugins to support it adequately which is why I decided to come back to Slickedit. I like SE better than VS with plugins and since all are flawed, I might as well use SE especially since I may have to work on Linux and possibly Ada in the future.

Yep thanks for considering this feature. Really bringing a function call into the source code window is a very common task and anything that makes that easier is welcome