Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » RCP App: remove Resource perspective?
RCP App: remove Resource perspective? [message #251932] Fri, 11 June 2004 15:25 Go to next message
Eclipse UserFriend
Is there an API for disabling a perspective? Unfortunately, our RCP app has
a dependency on org.eclipse.ui.ide which defines the Resource perspective-of
course, I could always hack the plugin.xml and remove the extension but I
was hoping there might be a way to achieve this.

I've looked at org.eclipse.ui.internal.Registry.PerspectiveRegistry but it
will not delete a perspective defined in an extension:

/**
* Delete a perspective.
* Has no effect if the perspective is defined in an extension.
*/
public void deletePerspective(IPerspectiveDescriptor in) {
PerspectiveDescriptor desc = (PerspectiveDescriptor) in;
// Don't delete predefined perspectives
if (!desc.isPredefined()) {
perspToRemove.add(desc.getId());
remove(desc.getPluginId(), desc);
desc.deleteCustomDefinition();
verifyDefaultPerspective();
cleanRegistry();
}
}
Re: RCP App: remove Resource perspective? [message #251969 is a reply to message #251932] Fri, 11 June 2004 17:39 Go to previous messageGo to next message
Eclipse UserFriend
Also, I'm guessing the answer is the same for views since org.eclipse.ui.ide
pulls in Outline, Bookmarks, Properties, Progress, Tasks which we do not
require??

thx


"Paul Wuethrich" <paul.wuethrich@eye-ris.com> wrote in message
news:cad0gi$t05$1@eclipse.org...
> Is there an API for disabling a perspective? Unfortunately, our RCP app
has
> a dependency on org.eclipse.ui.ide which defines the Resource
perspective-of
> course, I could always hack the plugin.xml and remove the extension but I
> was hoping there might be a way to achieve this.
>
> I've looked at org.eclipse.ui.internal.Registry.PerspectiveRegistry but it
> will not delete a perspective defined in an extension:
>
> /**
> * Delete a perspective.
> * Has no effect if the perspective is defined in an extension.
> */
> public void deletePerspective(IPerspectiveDescriptor in) {
> PerspectiveDescriptor desc = (PerspectiveDescriptor) in;
> // Don't delete predefined perspectives
> if (!desc.isPredefined()) {
> perspToRemove.add(desc.getId());
> remove(desc.getPluginId(), desc);
> desc.deleteCustomDefinition();
> verifyDefaultPerspective();
> cleanRegistry();
> }
> }
>
>
Re: RCP App: remove Resource perspective? [message #252009 is a reply to message #251969] Sat, 12 June 2004 02:12 Go to previous messageGo to next message
Eclipse UserFriend
Paul Wuethrich schrieb:

> Also, I'm guessing the answer is the same for views since org.eclipse.ui.ide
> pulls in Outline, Bookmarks, Properties, Progress, Tasks which we do not
> require??

I had the problem the other way around: I needed the progress view but
did not need the IDE dependency. On filing a bug I was told to just copy
the progress view implementation manually so hacking the plugin might
also be a reasonable solution for your problem.

Ciao, Michael.
Re: RCP App: remove Resource perspective? [message #252032 is a reply to message #252009] Sat, 12 June 2004 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Michael Keppler wrote:
> I had the problem the other way around: I needed the progress view but
> did not need the IDE dependency. On filing a bug I was told to just copy
> the progress view implementation manually so hacking the plugin might
> also be a reasonable solution for your problem.

The progress view can be activated without the IDE classes because it's
code ( but not it's plugin.xml definition ) is within the eclipse.ui
package.

You only need the following lines in your plugin.xml:

<extension
point="org.eclipse.ui.views">
<view
name="Progress"
category="org.eclipse.ui"
class="org.eclipse.ui.internal.progress.JobView"
id="org.eclipse.ui.views.ProgressView">
</view>
</extension>

Henning Rogge
Re: RCP App: remove Resource perspective? [message #252338 is a reply to message #252009] Mon, 14 June 2004 11:20 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, I've already modified cheatsheets so I may as well add IDE.

"Michael Keppler" <michael.keppler@gmx.de> wrote in message
news:cae6d7$r5k$1@eclipse.org...
> Paul Wuethrich schrieb:
>
> > Also, I'm guessing the answer is the same for views since
org.eclipse.ui.ide
> > pulls in Outline, Bookmarks, Properties, Progress, Tasks which we do not
> > require??
>
> I had the problem the other way around: I needed the progress view but
> did not need the IDE dependency. On filing a bug I was told to just copy
> the progress view implementation manually so hacking the plugin might
> also be a reasonable solution for your problem.
>
> Ciao, Michael.
Re: RCP App: remove Resource perspective? [message #252569 is a reply to message #252338] Mon, 14 June 2004 22:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ed.burnette.REMOVE.THIS.sas.com

I don't know of an easier way but please file a bugzilla report
(www.eclipse.org > bugs) any time you find yourself hacking or copying the
Eclipse source in your RCP apps. Maybe further refactoring can make it
unnecessary in the next version. That's how RCP was born in the first place.

--
Ed Burnette, co-author, Eclipse in Action
www.eclipsepowered.org

> "Michael Keppler" <michael.keppler@gmx.de> wrote in message
> news:cae6d7$r5k$1@eclipse.org...
> > Paul Wuethrich schrieb:
> >
> > > Also, I'm guessing the answer is the same for views since
> org.eclipse.ui.ide
> > > pulls in Outline, Bookmarks, Properties, Progress, Tasks which we do
not
> > > require??
> >
> > I had the problem the other way around: I needed the progress view but
> > did not need the IDE dependency. On filing a bug I was told to just copy
> > the progress view implementation manually so hacking the plugin might
> > also be a reasonable solution for your problem.
Re: RCP App: remove Resource perspective? [message #252741 is a reply to message #252569] Tue, 15 June 2004 11:39 Go to previous message
Eclipse UserFriend
Thanks for the reply Ed. I created bug #67275.

"Ed Burnette" <ed.burnette@REMOVE.THIS.sas.com> wrote in message
news:calllq$tao$1@eclipse.org...
> I don't know of an easier way but please file a bugzilla report
> (www.eclipse.org > bugs) any time you find yourself hacking or copying the
> Eclipse source in your RCP apps. Maybe further refactoring can make it
> unnecessary in the next version. That's how RCP was born in the first
place.
>
> --
> Ed Burnette, co-author, Eclipse in Action
> www.eclipsepowered.org
>
> > "Michael Keppler" <michael.keppler@gmx.de> wrote in message
> > news:cae6d7$r5k$1@eclipse.org...
> > > Paul Wuethrich schrieb:
> > >
> > > > Also, I'm guessing the answer is the same for views since
> > org.eclipse.ui.ide
> > > > pulls in Outline, Bookmarks, Properties, Progress, Tasks which we do
> not
> > > > require??
> > >
> > > I had the problem the other way around: I needed the progress view but
> > > did not need the IDE dependency. On filing a bug I was told to just
copy
> > > the progress view implementation manually so hacking the plugin might
> > > also be a reasonable solution for your problem.
>
>
Previous Topic:Packaging the whole infocenter as a separate webapp
Next Topic:rcp - how turn off cheat sheets menu item
Goto Forum:
  


Current Time: Fri Apr 25 00:50:13 EDT 2025

Powered by FUDForum. Page generated in 0.03916 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top