BLIde PlugIn SDK BETA released

BlitzMax Forums/BlitzMax Programming/BLIde PlugIn SDK BETA released

ziggy(Posted 2007) [#1]
The BLIde PlugIn SDK has been released as a BETA module for all BLIde users.

This module will let you create BLIde plugins to process or modify your code. A simple code procesor or even a GUI editor can be directly integrated on BLIde using this simple SDK.

the BLIde PlugIns are writted in 100% pure BlitzMax code, this SDK is a simple BlitzMax module.

There's no documentation yet, but the module is very very simple. It comes with 4 sample programs to test.

BLIde 0.8.10 (or greater) is need to use this SDK.

By the way, this is the changelog for the new BLIde verision:
* Fixed a bug on intelisense when working with full path namespaces
* Fixed a bug on Bug Analizer that was making BLIde crash when a type was defined twice in the same BMX files
* Fixed a bug on the parameters promt information that was not moving from one line to another in some cases
* Fixed Automatic syntax hilighting has been disabled inside comments
* Fixed a bug on the PlugIns that came with that version. The plug ins have been updated to work properly
* Fixed a binary compatibility bug on the BLIde Plugin protocol
* Added support for code templates


As you can see, now BLIde supports codetemplates. I've opened a new thread in the BLIde forums where I spect users to upload and download any interesting code template they wish to share. Feel free to use this forum area (now is empty)


Gabriel(Posted 2007) [#2]
Just a quick question, if i may. I think I posted on your forum a few weeks/months ago about the possibility of a Visual Studio-like Refactor option. You said at the time that it would be a lot of work, and perhaps something better suited to the SDK. So I was wondering, is there enough functionality in this beta for me to potentially be able to write a refactor plugin or do I need to wait for a later version?


H&K(Posted 2007) [#3]
Whats a refactor(er)?


ziggy(Posted 2007) [#4]
The beta version is not mature enought. It is intended to process single files, not entire projects yet. It will grow on demand. I've only made very little plug-ins with it. By now, it interacts with BLIde, getting the selected text, reading and modifing it. It can select the whole file, make a full row selection to ensure no 'partial lines' are selected, and so on. All this data is stored in a TCodeLine collection, that can be manipulates and sent back to BLIde. This TCodeLine collection will be improved to handle AST nodes in the future (so you could ask 'what type is this function retoruning, what is the data type of the word 'MyVariable' on line X, etc, but that is yet to come in a not so far update).

@H&K: Refactor(er) is an engine that, as instance, when you change the name of a function, it change all the calls to that function, so you don't have to rewrite everything.


Gabriel(Posted 2007) [#5]
Ok, thanks for the clarification. When it's mature enough, I might see if I can find time to write a refactor plugin.


ziggy(Posted 2007) [#6]
this sounds more than good :D

This is a very basci plug-in source code. This plugin just writes all the bmx code to the BLIde console:

SuperStrict
Import blide.plugins

'PlugIn Const:
Const PlugInName:String = "Name of the plugin"
Const PlugInAuthor:String = "Author of the plugin"
Const PlugInMajorVersion:Int = 1
Const PlugInMinorVersion:Int = 0

Local P:PlugIn 
P = New PlugIn

p.Pluginize 

Type PlugIn
	Global Engine:BPPMainEngine = New BPPMainEngine
	Method New()
		Self.engine.StartEngine(PlugInName,PlugInMajorVersion,PlugInMinorVersion,PlugInAuthor)	
	End Method
	
	Method Pluginize()
		'Make selection changes here: -----
		
		engine.SelectionActions.SelectAllText
		
		'Get Selected text:
		engine.GetSelectedText()   'This fills the engine.code array
		
		
		'Process all the text:
		engine.InOutActions.MsgBox("All the code will be displayed on the BLIde console.")
		For Local CodeLine:TCodeLine = EachIn engine.Code
			'Process each code line:
			
			engine.InOutActions.Trace(codeline.Contens)
		Next
		
		
		'Return pluginized text to BLIde:
		engine.SetSelectedText()
		
	End Method
	
End Type



klepto2(Posted 2007) [#7]
sorry, but where do I fint the SDK. On the main page it says that it could be found in the download section, but all I have found there is the new Blide update itself.


ziggy(Posted 2007) [#8]
Ok, go the the updated and service packs section.

here:

http://www.blide.org/nueva/updates.htm

I will make it clearer and the download page.


Picklesworth(Posted 2007) [#9]
Yay, you fixed my bug!

And this PlugIn stuff sounds like something I could really make good use of!

Thank you, Ziggy, this is great :)