Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Accumulating Clipboard

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
foxmuldr Posted - May 01 2020 : 4:01:45 PM
It would be nice to have a keystroke to append some text to an accumulating clipboard.

There are time when you need to build a list of things, such as going through a .cpp file to find every function reference and create a .h list of forward declarations. Doing this manually is a lot of back-and-forth. Being able to highlight something, keystroke, highlight the next thing, keystroke, then go in and do one paste ... it would be handy.

17   L A T E S T    R E P L I E S    (Newest First)
foxmuldr Posted - May 29 2020 : 4:07:24 PM
Off the top of my head, untested:


struct SAddinFuncs
{
    HMODULE hmod;

    // Supported functions
    bool (*fixup_tooltip)     (String* tooltip, String** newTooltip);
    bool (*fixup_cliptext)    (String* cliptext, String** newCliptext);
    void (*monitor_keystroke) (int vkey, unsigned int flags);
    // Other functions go here
};

SAddinFuncs* load_third_party_addin(char* pathname)
{
    HMODULE hmod = LoadLibrary(pathname);
    if (!hmod)
        return NULL;

    SAddinFuncs* addin = new SAddinFuncs;
    addin->hmod = hmod;
    addin->fixup_tooltip     = GetProcAddress(hmod, "fixup_toolip");
    addin->fixup_cliptext    = GetProcAddress(hmod, "fixup_cliptext");
    addin->monitor_keystroke = GetProcAddress(hmod, "monitor_keystroke");
    // Repeat for other functions
    return addin;
}

void monitor_keystrokes(int vkey, unsigned int flags)
{
    for (int lnI = 0; lnI < addins.size(); ++lnI)
    {
        SAddinFuncs* addin = addins.get(lnI);
        if (addin->monitor_keystroke)
            addin->monitor_keystroke(vkey, flags);
    }
}

String* fixup_cliptexts(String* cliptext)
{
    String* newCliptext;

    for (int lnI = 0; lnI < addins.size(); ++lnI)
    {
        SAddinFuncs* addin = addins.get(lnI);
        if (addin->fixup_cliptext)
        {
            newCliptext = NULL;
            if (addin->fixup_cliptext(cliptext, &newCliptext) && newCliptext)
            {
                delete cliptext;
                cliptext = newCliptext;
            }
        }
    }

    // Return the updated cliptext content
    return cliptext;
}


In this way, we could monitor anything that's added to the clipboard with the existing Ctrl+C form. We could detect if we've turned on "accumulate clipboard mode" by the keystroke that was typed.

With Ctrl+C, VA has already obtained the text that it's about to add to its Ctrl+Shift+V list. But before it adds it, pass through the fixup_cliptext() function so we can accumulate it and return a string which you then stick into the ring.

These are the kinds of 3rd party DLL enhancements I'm talking about. They're not difficult to implement. And they don't add much maintenance because they're largely write once and forget type code. It would just be adding new features.

I read a post someone at Whole Tomato wrote one time that "we're basically running around behind Visual Studio doing all these things." But at some point you have obtained the information. It shouldn't be too hard to setup protocols to expose some of that to us so we can intercept it and post-process it before you process it for input.

Little things like the above at first. Then more complex things once it is comfortable.
foxmuldr Posted - May 20 2020 : 8:34:44 PM
quote:
Originally posted by feline

Having seen some of the strange and bizarre things that people do with C++, good luck, you are likely to need it



Thank you, feline, from my family and I and our 8 feral and 2 domesticated house cats. :-)
feline Posted - May 20 2020 : 06:47:08 AM
Having seen some of the strange and bizarre things that people do with C++, good luck, you are likely to need it
foxmuldr Posted - May 19 2020 : 3:13:58 PM
quote:
Originally posted by feline

I have put in a feature request for this, but I am still not convinced that this is going to be an efficient use of resources at the moment. Still, worth seeing what the developers make of it.



I have a spreadsheet app I'm finishing up right now (the expression parsing portion of it ironically). Once it is done I have a file system ABI that I'm defining. Once I get that finished, I'm most likely going to help The SemWare Editor's author on porting a version to Linux and X windows. Once that's completed, I'm going to turn my attention toward Code Helper. Should be two months or thereabouts until I can begin.

UPDATE: May.22.2020 -- Spreadsheet is completed.
UPDATE: Jun.23.2020 -- The ABI project has been suspended.
feline Posted - May 16 2020 : 06:59:38 AM
I have put in a feature request for this, but I am still not convinced that this is going to be an efficient use of resources at the moment. Still, worth seeing what the developers make of it.
foxmuldr Posted - May 13 2020 : 1:05:12 PM
quote:
Originally posted by feline

The main focus for feature requests and bug reports for VA are specific features that are either logical extensions of existing features, or handling edge cases. The IDE is already extendable, but re-working VA to provide a stable API would require an ongoing commitment to keeping everything working correctly. A significant overhead.



You could develop and open source the API code, then developers like me could add in the custom features we seek through the existing API already exposed. And, if we need more, we could provide the framework of what else needs to be there and it can be added.

And in addition to that, I, and I assume others, would be willing to sign NDAs to be able to assist with that fringe portion of internal VA development.

From my point of view, the ability to receive file lists for open, project, solution, to read source lines, add, update, or delete source lines, iterate through source lines sequentially, by some pattern-matching criteria, or by components (through each portion of various flow control blocks).

Those basic abilities would address probably 90% of what any of us would want in terms of custom add-ons. We can handle the processing if VA can feed us some of what it knows.

I do not expect you to do this, by the way, but that is the general goal / design / seeking.
feline Posted - May 13 2020 : 06:26:29 AM
The main focus for feature requests and bug reports for VA are specific features that are either logical extensions of existing features, or handling edge cases. The IDE is already extendable, but re-working VA to provide a stable API would require an ongoing commitment to keeping everything working correctly. A significant overhead.
foxmuldr Posted - May 12 2020 : 10:27:06 PM
quote:
Originally posted by feline
Having said that, what problems are you actually trying to solve here? You can already extend the IDE its self, and there are plenty of tools for programming / controlling Windows as well.



I want an extensible tool similar to VAX, one that allows me to add-in features I want to introduce on top of those base abilities, to augment the tool with my own creativity, new abilities, refactored abilities, etc.
feline Posted - May 12 2020 : 05:18:43 AM
Be aware that even the current version of Clang C++ parser reaches the wrong conclusions when your code does not compile correctly. Also duplicate symbol names cause a lot of our bug reports.

Having said that, what problems are you actually trying to solve here? You can already extend the IDE its self, and there are plenty of tools for programming / controlling Windows as well.
foxmuldr Posted - May 11 2020 : 09:19:15 AM
quote:
Originally posted by feline
Remember that a lot of what VA does is based on parsing your code as you are writing it, which is hard. We cannot assume your code compiles, or is valid, but still try to provide useful and helpful feedback and interaction.



Understood. My Visual FreePro language has a built-in lexer and syntax parser that is very flexible and extensible. I think I can adapt that easily enough. And there's always the fallback of just matching text when you can't find syntactic contexts.

We'll see. I'm going to plan an experiment in writing a plugin extension this weekend. Nothing fancy, but just to get the feel for it. I'd like to get the interface setup for interfacing with external DLLs and then present that code here for you to use as a template so you can expose some features for us to write code for. It would be a great asset to VAX.
feline Posted - May 11 2020 : 06:23:15 AM
Speaking as someone who jumps between lots of different programs, having to learn yet another macro programming language is not that appealing. IDE macros used VBScript, which I know is not a popular language, but at least it is a standard language that you can get books to help you learn and master.

If you just want to create an extensible clipboard, then why not use autohotkey:

https://www.autohotkey.com/

since this is a keyboard shortcut manager it would extend outside of the IDE, and this seems relatively easy to do, since you just need to capture a custom copy and paste keyboard shortcut, and simply update the buffer the program manages. Yes, you need to learn another programming language, but there are plenty of examples to help you.

Remember that a lot of what VA does is based on parsing your code as you are writing it, which is hard. We cannot assume your code compiles, or is valid, but still try to provide useful and helpful feedback and interaction.
foxmuldr Posted - May 08 2020 : 2:00:52 PM
quote:
Originally posted by feline
As a slight answer to making Visual Assist extendable, Microsoft removed the built in macro tools in Visual Studio several versions ago, since their data showed that only a tiny percentage of developers used them, so they were not really a priority feature. Personally I did use the macros, but I know that in general people were not interested in using them to fix problems or work around issues, sadly supporting Microsoft's experience.



Their macros were clunky. It's why few people used them.

I use The SemWare Editor for its macro abilities. It's SAL macro language is an amazing language with built-in features to call DLLs, access data on-screen, process lines, columns, words, change colors, all kinds of things. www.semware.com

I think of things like that when I think of extensibility for a tool. The ability to have such a powerful add-on macro language, to be able to define contextual macros on-the-fly, but to go into code and add new features, it's always in the back of my mind when I think about how to implement things. Linking in DLLs with fixed protocols for interfacing, able to call out to 3rd party code with our own callback to handle necessary internal things, and to make that interface extensible by publishing it and allowing others to contribute code fixes. It changes very little internally to VAX, but would extend the abilities to all of us exponentially.

As I say, if I ever get caught up on the things I'm working on, I'm going to devote a few months to create a baseline tool (Code Helper) that does many of the things I use VAX for. I will release it open source and market it as a free and open source alternative to VAX, inviting others to come and help me/us develop it.
feline Posted - May 07 2020 : 06:07:47 AM
We only have finite resources to devote to VA, and these need to be split between fixing bugs, implementing new features, supporting new versions of the IDE and making sure we are not breaking anything when we do make changes. As a result we need to try and prioritise somehow.

As a slight answer to making Visual Assist extendable, Microsoft removed the built in macro tools in Visual Studio several versions ago, since their data showed that only a tiny percentage of developers used them, so they were not really a priority feature. Personally I did use the macros, but I know that in general people were not interested in using them to fix problems or work around issues, sadly supporting Microsoft's experience.
foxmuldr Posted - May 06 2020 : 1:36:15 PM
quote:
Originally posted by feline

Have you considered one of the extensions to add IDE macros back to the IDE?


No. But I have considered writing a Visual Assist X replacement called Code Helper which does much of what VAX does, and also offers these extension abilities I've outlined several times. It would be free and open source so people can contribute their ideas and bug fixes to it.

If I ever get to a stopping point in my current workload I will do that.

When proprietary software comes with limited technical support and/or limited abilities to add features, especially when people are offering you free assistance to add them for you ... it's time for that software to end.
feline Posted - May 04 2020 : 07:51:33 AM
Have you considered one of the extensions to add IDE macros back to the IDE? I agree that this is a simple enough idea to implement, but thinking about it, I wonder if you would want a single, "special" clipboard where the append was happening, so that the standard clipboard could change without adding extra / unwanted items to the block.

This is a small but specialist feature, so it's not something that VA would automatically look to add, at least not without some more interest in this.
foxmuldr Posted - May 02 2020 : 3:36:15 PM
quote:
Originally posted by feline

Are you aware of both the VA clipboard history and Windows 10 built in clipboard history features?


Yes. I use it regularly.

quote:
I know the feeling of needing to pull together several pieces of text / information from different places, but generally when I am doing this I need to do some limited editing as well as I stitch the parts together, so simply having them placed into a single block without control would not help much. Of course it's possible your usage is different.



Even if one had to do limited editing or stitching together, once the source content is pasted it can be edited as needed. Or edit before, copy-append, then Ctrl+Z to get it back.

It's such an easy thing to add. Ctrl+Shift+C copy-append, and Ctrl+Shift+X cut-append.
feline Posted - May 02 2020 : 06:20:45 AM
Are you aware of both the VA clipboard history and Windows 10 built in clipboard history features?

VA clipboard https://docs.wholetomato.com/default.asp?W174

and Windows Key + V to access the Windows clipboard history.

I know the feeling of needing to pull together several pieces of text / information from different places, but generally when I am doing this I need to do some limited editing as well as I stitch the parts together, so simply having them placed into a single block without control would not help much. Of course it's possible your usage is different.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000