News:

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

Main Menu

Multi File editing

Started by tereshkosg, June 12, 2008, 07:57:54 PM

Previous topic - Next topic

mariocup

The patch is really cool :D

It would be nice if the configuration of the split windows is saved per project. As far as I know codeblocks saves only the open files and the tab positions in the .layout files. Is there a chance to save the split settings too?

Thx,

Mario

MortenMacFly

I think we all here love the work of "Der Meister".

Hence just to avoid the "apply, apply" questions:
IMHO this patch has to be used very carefully and is a very special case due to:
1.) Binary compatibility with 08.02 basically is lost.
2.) This mix of wxFlatNotebook / wxAuiNotebook should be cleaned up (as "Der Meister" suggested: Make all wxAuiNotebook).
3.) MAC testing is needed, too.
4.) Layout should be saved (as mariocup suggested).
5.) We need some time for plugin devs to adopt.

So this does not mean it will be rejected (of course not) but it most likely will not appear in the nightlies any time soon. It is more likely to appear in a special branch which needs to be maintained by somebody obviously, probably until the next official release.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

JGM

really cool! no more third party components  :)

killerbot

Quote from: JGM on June 16, 2008, 05:56:16 PM
really cool! no more third party components  :)

wxScintilla, TinyXml  8)

rhf

Der Meister,
Great!  Based on some very quick tests, this appears to be is a very useful feature.
However, I am a little puzzled about the removal of the splitting mechanism.
Quote from: Der Meister on June 15, 2008, 03:18:32 PM
... This patch also removes the old editor splitting mechanism as it is no more required.
At times, it is very handy to have split views of the same file.
Using your patch, I could not figure out how to do that.  Perhaps, I am missing something.
Thanks for your good work.
rhf

Der Meister

No, you are not missing anything.

I know that it is not possible to have two views of the same file with this patch any more. However, as far as I know this feature wasn't used very often. wxAuiNotebook has some splitting mechanism, therefore this feature could probably be kept even with this patch. But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

dje

Quote from: Der Meister on June 16, 2008, 09:48:18 PM
No, you are not missing anything.

I know that it is not possible to have two views of the same file with this patch any more. However, as far as I know this feature wasn't used very often. wxAuiNotebook has some splitting mechanism, therefore this feature could probably be kept even with this patch. But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
Der Meister ++  :)

rhf

Quote from: Der Meister on June 16, 2008, 09:48:18 PM
But I don't think this is worth the effort and splitting editors in an already splitted notebook might even be somewhat confusing. I would like to hear more opinions on that issue.
OK!  If it is either/or, I would definitely prefer having the multiple file editing capability.
rhf

mariocup

Hi Meister,

I agree that multiple editors are more important than a splitting view of a single file, but in some cases it can be useful, e.g. if you have a source file with a lot of lines and you want to compare two functions within one module.

In my eyes it is important to save the layout of the multiple editor views.:D

Bye,

Mario

JGM


MortenMacFly

Mmmmh... one thing I have noticed:
If I search in files and click on the list of search results the file is opened, the line is focussed but not highlighted anymore. That's quite annoying as you don't really see where you are... there is even no cursor.

Can somebody confirm this? (I am not sure whether it's related to this patch...)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Der Meister

#26
It works for me as soon as the editor gets the keyboard focus. I guess this should automatically happen by the following lines in editormanager (function SetActiveEditor):

    if (ed->IsBuiltinEditor())
        static_cast<cbEditor*>(ed)->GetControl()->SetFocus();

Therefore either cbEditor::m_IsBuiltinEditor isn't set to true or cbStyledTextCtrl::SetFocus doesn't work (anymore).

Edit: cbEditor::m_IsBuiltinEditor seems to be true. I don't think that wxPanel::SetFocus has a bug. The issue here on my system os probably related to my window-manager. It is configured in the way that the window below the mouse cursor gets the keyboard focus which isn't the editor in this case. Therefore I guess everything is working fine here for me. It could still be an issue with the patch I posted on berlios because my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

MortenMacFly

Quote from: Der Meister on June 18, 2008, 03:09:26 PM

    if (ed->IsBuiltinEditor())
        static_cast<cbEditor*>(ed)->GetControl()->SetFocus();

This seems in fact to work... but different now. I realised the following:
If you click on a search result you are taken to the right tab (editor) in the view(s). This tab also gets active - so this seems to work. If you press the TAB key now (on Windows) the content of the editor becomes active and the line is highlighted correctly (and the cursor appears). It seems as if the editors tab (where the file name stands) gets activated first. Very, very strange...

At least it gives a clue and is really caused by the patch...

Quote from: Der Meister on June 18, 2008, 03:09:26 PM
my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
Oh dear... that *really* sounds great... Time to open a SVN branch then... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Quote from: MortenMacFly on June 18, 2008, 05:08:08 PM
Very, very strange...
OK - I found a way to "reproduce" (it's very simple):
- Have an editor opened and an active line in the editor (visible cursor).
- Now just switch to another application (using ALT+TAB) and then back to C::B.

In my case the editors tab is now selected , the actual editor's content (source code) is not and therefore no line highlighted, no cursor etc... Is this the usual behaviour of a wxAuiNotebook?

Anyone using this patch on Windows/Linux, please tell me: What happens to you?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Der Meister

Before I put more effort into this I would like to ask the devs a question: Is this patch desired and will it be applied somewhere in the future? I know it won't be applied immediately because this patch implies big changes (MortenMacFly already named the issues) but I don't want to sacrifice a lot of work for it if no one is willing to apply it to the main codeline.
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.