On 02/08/2012 10:59 PM, Miklos Espak wrote:
Hi,

I created a new plugin, I can access the data storage and the render windows, but I cannot be notified of the selection changes. As I saw I need at least a reference to the workbench to listen to them. That I do not have. Is it possible to get it through some service providers?

Yes, use berry::PlatformUI::GetWorkbench()


I set the activation policy to "eager", but it was not activated, only if I made another plugin depend on it. But it is OK.

It works for example for the org.mitk.planarfigure plug-in:

https://github.com/MITK/MITK/blob/master/Modules/Bundles/org.mitk.planarfigure/manifest_headers.cmake

- Sascha


Thanks,
Miklos

On Wed, Feb 8, 2012 at 12:46 PM, Sascha Zelzer <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I would suggest to add this kind of code in one of your "core"
    plug-ins activator, which will always be activated (either because
    it has Activation-Policy "eager" or other plug-ins depend on it).
    If you have a MITK module which is central to your application,
    you could put it in there as well but you would need some (static)
    initialisation stuff which should be avoided. Of course you could
    expose a "initialisation" function which is called by one of your
    plug-ins. That is a matter of taste, I would say.

    Tweaklets are an impementation detail which happens to be exposed
    via extension-points... don't use that.

    Best,

    Sascha


    On 02/08/2012 09:00 AM, Miklos Espak wrote:

        Hi,

        I want to display the pixel intensity values on the render
        windows. There was a thread about how to do this from a view,
        recently.

        The code depends only on the MITK Core, and it does not need
        any view. I want to run it always, independently which views
        are active.

        Is that what tweaklets are for? Or shall I put the code in a
        module, not a plugin, and call it from my application after
        creating the workbench?

        Or just call the code from a plugin activater directly?

        What is the nice way to do this?

        Thanks,
        Miklos




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to