Another modified version of Ted2

About Monkey 2 Forums Monkey 2 Development Another modified version of Ted2

This topic contains 13 replies, has 5 voices, and was last updated by  cocon 2 years, 8 months ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2887

    cocon
    Participant

    This thread is obsolete due to changes, check this thread instead:
    http://monkey2.monkey-x.com/forums/topic/ted2-experimental-plugin-system/

     

    Here is some changes I made to Ted2 test it and see if you like it.

    https://github.com/coconcode/ted2mod

    #2895

    AdamStrange
    Participant

    what are the changes? couldn’t see any?

    #2903

    cocon
    Participant

    Hi, thank for checking the project out.

    I have mentioned some of information in the readme file, however my purpose is to make experimentation.

    The best feature so far is the ability to configure the hotkeys with a JSON file.
    https://github.com/coconcode/ted2mod/blob/master/hotkeyloader.monkey2

    Also I did a massive refactoring by redesigning the program (the commands of the IDE) by using a design pattern. I was very skeptic about this, although it makes the code more organized, it makes it over engineered. I am more of a Python-esque style fan, where you create lists at will and put whatever you like there, perhaps later with the reflection capabilities I will try to see this alternative.
    https://github.com/coconcode/ted2mod/blob/master/idecommand.monkey2

    #2909

    cocon
    Participant

    Automatic reloading of files when saving with another external editor is now ready.
    https://github.com/coconcode/ted2mod/blob/master/documentwatcher.monkey2

    #2926

    cocon
    Participant

    Here is a video to see how to use Ted2 with an external text editor (i.e. Sublime).
    https://1drv.ms/v/s!AquVr9J7xRcsgWyEt7ehOL5vPeyc

    #3114

    cocon
    Participant

    Since Ted2 is much improved now, there was no need to keep obsolete features around. I did a hard reset of the repository to the current newest version of Ted2 and started on some new ideas.

    At this time I thought of a new design on how to extend Ted2 without messing with the core codebase too much. Since it’s better Ted2 to remain a simple project and solid project, any additional functionality could be implemented in a more flexible way.

    https://github.com/coconcode/ted2mod/blob/master/extension.monkey2
    https://github.com/coconcode/ted2mod/blob/master/extensioncursormoveijkl.monkey2

    #3116

    MikeHart
    Participant

    What i am missing in ted is 2 things.

    -Find in files

    -A code treeview with class/method/function names.

    #3152

    cocon
    Participant

    I noted these down, thanks for the suggestions.

    #3156

    Mark Sibly
    Keymaster

    I’m definitely keen on making ted2 as expanded as possible – this would help keep the ‘core’ mean and clean.

    Not sure if an ‘uber’ extension class is necessarily a good idea though, as there could be many ‘kinds’ of extension. One thing that’s definitely going in is a ‘Ted2DocumentType’ class, for example (just experimental!)…

    Then, DocumentManager just calls Ted2DocumentType.Create() instead of it’s current select/case block. Just had a quick hack with an AudioDocumentType class…

    With this in place, adding a new document is just a single #import away – which is really one step away from being able to drop in dlls (which I still plan to do eventually).

    Ted2DocumentType could also provide the ability for document types to add their own views to the right/bottom tabviews, eg:

    Method AddBrowserTab( name:String,view:View )  ‘Add a tab+view to the RHS tabview.
    Method AddConsoleTab( name:String,view:View )  ‘Add a tab+view to the BOTTOM tabview.

    The views passed to these tabs could contain things like editing tools for image apps etc. The IDE would automatically hide/show them as documents became current etc.

    There’s also the potential for multiple document types per extension, in which case ‘Open’ would need some kind of ‘Open With’ trickery.

    I do think this should be kept separate from stuff like ‘KeyFilter’ extensions though, even if they do work sort of the same. You want ‘DocumentTypes’ and ‘KeyFilters’ in separate lists in the first place, so there’s not much they have in common at all. Perhaps description/version info?

    Just brainstorming!

    #3157

    Mark Sibly
    Keymaster

    Actually, here’s an interesting approach…

    As long as your plugin calls ‘AddPlugin’ in it’s ctor, it will automagically appear in it’s Plugin.PluginsOfType() array!

    So to get at all Ted2DocumentType plugins, you call Plugin.PluginsOfType<Ted2DocumentType>(), while to get at *all* plugins you call Plugin.PluginsOfType<Plugin>() (theoretically…).

    Definitely has the ‘cute’ factor and I *think* it’s useful…?

    #3158

    Mark Sibly
    Keymaster

    Note: I’ve gone for ‘Plugin’ instead of ‘Extension’ because extension still might end up as a keyword, although I suspect not…

    #3160

    Mark Sibly
    Keymaster

    OK, just pushed the results of this evenings experiments if you want to have a play.

    There’s a TextViewKeyEventFilter plugin class in there too. I just did it as an experiment so feel free to go nuts with it.

    I also added a Ted2TextView subclass to call the key event filters, so anything that extends this (only Monkey2TextView right now) will get filtered.

    #3163

    Matthew Smith
    Participant

    Nice!

    #3221

    cocon
    Participant

    OK I noted down the details of the implementation, very impressive indeed. The conversation continues here:

    http://monkey2.monkey-x.com/forums/topic/ted2-experimental-plugin-system/

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.