Quick question: is it true that it is simply impossible to close
a specific view programmatically? I don't mean to hide a view;
I want to close it just like I can close it using the GUI closer
in its title bar.

See:
/**
* Hides the given view that belongs to the reference, if any.
*
* @param view
* the references whos view is to be hidden
* @since 3.0
*/
public void hideView(IViewReference view);
or
/**
* Hides the given view. The view must belong to this page.
*
* @param view
* the view to hide
*/
public void hideView(IViewPart view);

of org.eclipse.ui.IWorkbenchPage

HTH,
Sandip

"Marcus Olk" <molk@comosoft.com> wrote in message news:cs0quk$ljf$1@www.eclipse.org...
> Quick question: is it true that it is simply impossible to close
> a specific view programmatically? I don't mean to hide a view;
> I want to close it just like I can close it using the GUI closer
> in its title bar.
>
> Cheers,
> Marcus

> "Marcus Olk" <molk@comosoft.com> wrote in message news:cs0quk$ljf$1@www.eclipse.org...
>>a specific view programmatically? I don't mean to hide a view;
>>I want to close it just like I can close it using the GUI closer
>>in its title bar.

That's what I was looking for: I simply want to get rid of
a view programmatically just as if I closed it using
the GUI control.

Problem being: I'd like to close certain views before workbench
shutdown to avoid them being restored in the next session.

If I use hideView() the view gets hidden but not disposed or
what ever it is called in Eclipish. The view seems to exist as
an reference or something and the framework stores its existance
and restores it in the next session.

I'am lacking the words how much time I spend on simply closing
a view... and still I'm not there...

No, the hideView API is equivalent to closing it manually.
If the same view is open in another perspective in the same window, the
view instance is kept around, but that is the same behaviour as when
closing it manually.

Nick

Marcus Olk wrote:
> Sandip,
>
> Sandip Chitale wrote:
>
>> public void hideView(IViewReference view);
>> or
>> public void hideView(IViewPart view);
>
> >
>
>> HTH,
>
>
> No, not really:
>
>> "Marcus Olk" <molk@comosoft.com> wrote in message
>> news:cs0quk$ljf$1@www.eclipse.org...
>>
>>> a specific view programmatically? I don't mean to hide a view;
>>> I want to close it just like I can close it using the GUI closer
>>> in its title bar.
>
>
> That's what I was looking for: I simply want to get rid of
> a view programmatically just as if I closed it using
> the GUI control.
>
> Problem being: I'd like to close certain views before workbench
> shutdown to avoid them being restored in the next session.
>
> If I use hideView() the view gets hidden but not disposed or
> what ever it is called in Eclipish. The view seems to exist as
> an reference or something and the framework stores its existance
> and restores it in the next session.
>
> I'am lacking the words how much time I spend on simply closing
> a view... and still I'm not there...
>
> Marcus