Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Semantic highlight

<< < (3/16) > >>

Alpha:

--- Quote from: mistar on May 12, 2012, 03:23:11 pm ---Since I've never participate in a big project like C::B, please guide me what to do to post a patch (I've searched the forum but dodn't find anything),
or point to some description.

--- End quote ---
Creating a patch to submit to BerliOS (Patch Tracker)

mistar:

--- Quote from: Alpha on May 12, 2012, 03:39:02 pm ---
--- Quote from: mistar on May 12, 2012, 03:23:11 pm ---Since I've never participate in a big project like C::B, please guide me what to do to post a patch (I've searched the forum but dodn't find anything),
or point to some description.

--- End quote ---
Creating a patch to submit to BerliOS (Patch Tracker)

--- End quote ---

Thanks!
Patch submitted. How long does it take on average to incorporate the changes?

perento:
Hello mistar, may i ask what functions the plugin will be offered?

MortenMacFly:

--- Quote from: mistar on May 12, 2012, 11:24:57 pm ---Patch submitted. How long does it take on average to incorporate the changes?

--- End quote ---
Well, I had a look at this.

I think there is a better way: Instead of introducing another event, you could move the portion:

--- Code: ---    if (can_updateui)
    {
        if (ed)
        {
            SetActiveEditor(ed);
            ed->GetControl()->SetFocus();
        }
    }

--- End code ---
...to after:

--- Code: ---    // check for ProjectFile
    if (ed && !ed->GetProjectFile())
    {
        // First checks if we're already being passed a ProjectFile as a parameter
        if (data)
            Manager::Get()->GetLogManager()->DebugLog(_T("Project data set for ") + data->file.GetFullPath());
        else
            Manager::Get()->GetProjectManager()->FindProjectForFile(ed->GetFilename(), &data, false, false);
        if (data)
            ed->SetProjectFile(data,true);
    }

--- End code ---
This way, you can use the already existing cbEVT_EDITOR_ACTIVATED event and don't screw anything.

I'll check this in my local copy and look for side-effects (but I cannot think of any for the moment...).

MortenMacFly:

--- Quote from: MortenMacFly on May 11, 2012, 09:33:31 pm ---
--- Quote from: mistar on April 27, 2012, 10:19:28 am ---Why is cbEVT_EDITOR_OPEN event posted in EditorManager::New instead of EditorManager::Open (after cbEditor::SetProjectFile is called)?

--- End quote ---
Because it is defined as "about to be opened" if you like and plugins can intercept and interrupt this event in case they handle the file itself. So this won't change.

--- End quote ---
BTW: This was wrong. This event fires when a file has either been created (so it is new from scratch) or newly opened, like File -> Open -> "...". The latter is the reason why it is called OPEN. Internally it means C::B creates a new editor and also loads the file into memory (as needed).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version