News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Plugin for a Programming Language

Started by igorevc, January 27, 2009, 01:45:18 PM

Previous topic - Next topic

igorevc

Good day.

Is there a way to register a new project wizard through a plugin?
If not, how can I make a notion of a project?

Thank you for your attention.

dmoore

Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

igorevc

Good afternoon.

I need that my plugin use the plugin "scriptedwizard". 
Once my plugin is attached to Code::Blocks, my plugin communicates with "scriptedwizard"
and tries to read my own config.script with just my own wizards.
Since "scriptedwizard", when attached to Code::Blocks, reads his own config.script,
I had the idea to use the "scriptedwizard" plugin to add more wizards.
The question is: is my plan feasable? If so, how can my plugin communicate with "scriptedwizard"?

Thank you for your attention.

igorevc

Good afternoon.

I made the question because I think that using the Code::Blocks "scriptedwizard" can be better than
defining our own version of "scriptedwizard".

Can anyone give me an answer?

Thank you for your attention.

igorevc

Good afternoon.

I have solved, in a manual way, the wizards' problems.

I have a question regarding lexers. I want to create a lexer for an interpretted language, but it seems that
an existing lexer possesses the same file mask as the files this plugin will handle. Same mask but different syntax.
Is that a problem? If so, how can I handle it?

Thank you for your attention.

igorevc

Good afternoon.

I need to create a syntax highlight for my interpretted language that, unfortunatelly, isn't included on wxscintilla.
How can I create a syntax highlight?

Thank you for your attention.

igorevc

Good afternoon.

I'll need that my plugin create a textbox that does the following:
- Keeps the history of recent used commands (throught a list)
- Has a button that, when pressed, executes the current command in the textbox and adds the command to the history
- Is dockable and in the top of the Code::Blocks logs

Can anyone help me out, at least with the textbox?

Thank you for your attention.

dmoore

Quote from: igorevc on April 03, 2009, 08:14:21 PM
Good afternoon.

I'll need that my plugin create a textbox that does the following:
- Keeps the history of recent used commands (throught a list)
- Has a button that, when pressed, executes the current command in the textbox and adds the command to the history
- Is dockable and in the top of the Code::Blocks logs

Can anyone help me out, at least with the textbox?

Thank you for your attention.

wxTextCtrl -the question is where do you want to put it? In a toolbar? In a dialog? Take a look at some of the plugins to see how they do it.

also for lexing languages not already supported by scintilla you have to write the lexer yourself. go to the scintilla site to learn how.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

igorevc

I would like to put it in a window, which would be docked near the logs.
I'm pretty sure that what I need is an editable listbox. Why? Because I want to write the command, push a button and store the used commands. If I want to use the same command, I need to dropdown the list and select it.

About the lexer, I'll postpone because it's not that important.

igorevc

#24
Good afternoon, dmoore.

I downloaded your PowerShell plugin, and played with it.
It seems that it is not yet capable to read and write commands in window mode, unless I'm doing something wrong.
For instance, I tried the cmd.exe and I can't write anything at all on the flatnotebook.
How can I (or you) fix it?

Thank you for your attention.

UPDATE:

It seems, now, that cmd.exe works but it doesn't take any input.

dmoore

Quote from: igorevc on April 23, 2009, 05:22:58 PM
It seems that it is not yet capable to read and write commands in window mode, unless I'm doing something wrong.

it was capable. either I or something in the C::B internals broke something to do with wxKeyEvent interception. I'll look into it.

one thing you need to be wary when you run interpreters is calling the interpreter in an "unbuffered" mode. for e.g., I call python with "python -u myfile.py"

more generally trying to handle interactive I/O the way the powershell plugin does using the limited wxExecute implementation is not really the best way to go. a better approach requires some sort of platform specific terminal emulation, maybe embedding a pre-built terminal emulator inside C::B?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

dmoore

Quote from: igorevc on April 23, 2009, 05:22:58 PM
It seems, now, that cmd.exe works but it doesn't take any input.

pull down the latest trunk and try again. should work again (but not in all cases).

let me reiterate that this plugin doesn't support full blown terminal emulation. I'd like it to, but am not sure I have time/inclination/ability.

I saw a pretty cool thread demonstrating how to embed the windows cmd.exe app as a window in another app. I'm sure similar could be achieved on linux. This begins to encroach on window manager territory...
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

igorevc

#27
Good day to everyone.

I'm having a problem with my plugin.

My operating system is Windows XP SP3.
My compiler is MinGW 5.1.4.
First I updated wxWidgets to 2.8.10 (official) and compiled it.
Then, I updated the Code::Blocks source files (through SVN) and compiled Code::Blocks.
Next, I copied wxmsw28u_gcc_custom.dll to devel and ran update.bat.

Finally, within the fresh Code::Blocks build, I rebuild my plugin and tried to install. The problem is the following message:

C:\Aplications\CodeBlocks\src\output/share/codeblocks/plugins/myplugin.dll: not loaded (missing symbols?)

What must I do to resolve this problem?

Thank you for your attention.

Pecan

Quote from: igorevc on June 11, 2009, 01:51:30 PM
Good day to everyone.

I'm having a problem with my plugin.

My operating system is Windows XP SP3.
My compiler is MinGW 5.1.4.
First I updated wxWidgets to 2.8.10 (official) and compiled it.
Then, I updated the Code::Blocks source files (through SVN) and compiled Code::Blocks.
Next, I copied wxmsw28u_gcc_custom.dll to devel and ran update.bat.

Finally, within the fresh Code::Blocks build, I rebuild my plugin and tried to install. The problem is the following message:

C:\Aplications\CodeBlocks\src\output/share/codeblocks/plugins/myplugin.dll: not loaded (missing symbols?)

What must I do to resolve this problem?

Thank you for your attention.


One way is to change the app.cpp line:

"wxLog::EnableLogging(false);" to true , then recompile CB.

An error box will pop up  when your plugin is loaded containing the  missing symbol.


igorevc

Good afternoon.

I did change wxLog::EnableLogging(false);" to true.
I tried to install again the plugin and shows a dialog with the error.

The error says that "it is impossible to locate the specified module".

I hope it helps to unravel the solution for this problem.

Thank you for your attention.