Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Detaching a View Programatically

Hi Emily.

That message means that you are accessing private classes and when we
change eclipse versions it may stop working.  It is recommended that you
hide the view if possible rather than detach it.  I would rather not
have such code in the main uDig code base because of the danger it
represents over time.  If a client needs it it is totally ok to have it
in a non-udig plugin.

Not having any specifics about the project I cant say much more.

Jesse

Emily Gouge wrote:
>
> I came across the need to have a view detached by default. Some
> investigation lead me to this code which allows me to detach the view.
> I am running this code when the tool that requires the view makes the
> view visible (if it's not currently visible).
>
> IViewReference ref = page.findViewReference(VIEW_ID);
> ((WorkbenchPage)page).detachView(ref);
>
> However there are couple issues with this:
> 1) This line "((WorkbenchPage)page).detachView(ref);" results in the
> following warning:
> Discouraged access:  The type WorkbenchPage is not accessible due to
> the restriction on required library
> org.eclipse.ui.workbench_3.3.2.M20080207-0800.jar
>
> Can anyone point out to me the implications of this message?
>
> 2) If you close the view and re-open it again the view slowly moves
> down & to the right.  As well there seems to be a lot of flickering in
> the screen.  This is not a big problem; just rather annoying.
>
> I'm curious to know if anyone has a better way to automatically detach
> views.
>
> Emily
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top