Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to customize products to get rid of unwanted menus/items?
How to customize products to get rid of unwanted menus/items? [message #287099] Thu, 23 June 2005 19:00 Go to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

For example, an Eclipse-based product seems to have a Project menu with
build items in it, even if the app has no concept of build or use for
it. How does one get rid of the build-related menu items?

This is an example of the larger question of how to customize the UI in
general. For instance, how to *not* offer the Resource perspective, how
to pick a default perspective, etc.

Pascal responded to a question recently along the lines of "of course,
if you want complete control of the UI you can..." But unfortunately
I've forgotten what came after and can't find the post. :(

Thanks.

Bob
Re: How to customize products to get rid of unwanted menus/items? [message #287166 is a reply to message #287099] Fri, 24 June 2005 19:33 Go to previous messageGo to next message
Eclipse UserFriend
"Bob Foster" <bob@objfac.com> wrote in message
news:d9fev2$qb3$1@news.eclipse.org...
> For example, an Eclipse-based product seems to have a Project menu with
> build items in it, even if the app has no concept of build or use for
> it. How does one get rid of the build-related menu items?
> This is an example of the larger question of how to customize the UI in
> general. For instance, how to *not* offer the Resource perspective, how
> to pick a default perspective, etc.
> Pascal responded to a question recently along the lines of "of course,
> if you want complete control of the UI you can..." But unfortunately
> I've forgotten what came after and can't find the post. :(
> Thanks.
> Bob
Bob,
For an Eclipse RCP product check the WorkbenchAdvisor, which will give
complete control.
For a standard Eclipse, hacks are the only way for anything that is about
'internals'.
The perspectives visibility can be configured by the activitie in o.e.ui
The default perspective is configured using plugin_customization.ini in the
base Eclispe SDK, it is in o.e.sdk/plugin_customization.ini, but ther may be
some prop also called
welcomePerspective in o.e.ui.workbench but I believe is not usedd in the
base Eclipse SDK.
The prop is org.eclipse.ui/defaultPerspectiveId:
org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaP erspective
And could normally be defined in any plugin. The 1st who creates it most
likely wins.
Re: How to customize products to get rid of unwanted menus/items? [message #287174 is a reply to message #287166] Sat, 25 June 2005 00:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Thanks, Philippe, that's quite helpful.

I tried first to do it as an RCP app because of the extra control, but
many things mysteriously don't work when the IDE doesn't do the
initialization. Gotta go with what works, for now.

BTW, I found the Pascal reference. It referred to a presentation
factory, which is far from complete control of the UI.

Bob

Philippe Ombredanne wrote:
> "Bob Foster" <bob@objfac.com> wrote in message
> news:d9fev2$qb3$1@news.eclipse.org...
>
>>For example, an Eclipse-based product seems to have a Project menu with
>>build items in it, even if the app has no concept of build or use for
>>it. How does one get rid of the build-related menu items?
>>This is an example of the larger question of how to customize the UI in
>>general. For instance, how to *not* offer the Resource perspective, how
>>to pick a default perspective, etc.
>>Pascal responded to a question recently along the lines of "of course,
>>if you want complete control of the UI you can..." But unfortunately
>>I've forgotten what came after and can't find the post. :(
>>Thanks.
>>Bob
>
> Bob,
> For an Eclipse RCP product check the WorkbenchAdvisor, which will give
> complete control.
> For a standard Eclipse, hacks are the only way for anything that is about
> 'internals'.
> The perspectives visibility can be configured by the activitie in o.e.ui
> The default perspective is configured using plugin_customization.ini in the
> base Eclispe SDK, it is in o.e.sdk/plugin_customization.ini, but ther may be
> some prop also called
> welcomePerspective in o.e.ui.workbench but I believe is not usedd in the
> base Eclipse SDK.
> The prop is org.eclipse.ui/defaultPerspectiveId:
> org.eclipse.ui/defaultPerspectiveId=org.eclipse.jdt.ui.JavaP erspective
> And could normally be defined in any plugin. The 1st who creates it most
> likely wins.
>
>
Re: How to customize products to get rid of unwanted menus/items? [message #287206 is a reply to message #287174] Mon, 27 June 2005 10:51 Go to previous messageGo to next message
Eclipse UserFriend
Bob,

you've identified the same problems I'm encountering. I want to build a
custom project with a custom editor (with NONE of the default actions in
the ruler or right click in the body as well a Project Settings) and I
can't find ways to DELETE default items. It seems easy to ADD stuff but
Replace and Delete seems to be dificult or imposible. I've asked the
question several ways in varous "forums" but so far, no one has offered a
straight forward solution.

Can anyone help bob and I? Please!!!!
Re: How to customize products to get rid of unwanted menus/items? [message #287238 is a reply to message #287206] Mon, 27 June 2005 20:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

I'm afraid, Charles, that we've run into a cornerstone of Eclipse
design. It's easy to add things to Eclipse it doesn't already do, but
almost impossible to make it stop doing things it already does. That is
intentional. :(

My problem is that Eclipse worked very hard to make a good, fast build
system but didn't consider that there would be some Eclipse-based
products that didn't want to build anything. I won't have any real
trouble getting rid of those menu items, but I'll have to hack the code
to do it.

For your problem, you can, of course, build an editor that has no
default actions, but you'll have to build it from the ground up.
AbstractTextEditor and TextViewer, the basic building blocks of Eclipse
editors, already have plenty of functionality you may not want wired in.
Some of it can be turned off with preferences, some of it can't; you'll
not find a consistent rationale for it. Ideally the basic editing
building blocks would have no default functionality except basic text
editing - text entry and deletion, cut and paste, undo, redo - and a way
to attach commands to do anything else. When you build your editor,
build it that way. It's harder than it seems to maintain that kind of
discipline, but it's worth it.

Bob

Charles Godwin wrote:
> Bob,
>
> you've identified the same problems I'm encountering. I want to build a
> custom project with a custom editor (with NONE of the default actions in
> the ruler or right click in the body as well a Project Settings) and I
> can't find ways to DELETE default items. It seems easy to ADD stuff but
> Replace and Delete seems to be dificult or imposible. I've asked the
> question several ways in varous "forums" but so far, no one has offered
> a straight forward solution.
>
> Can anyone help bob and I? Please!!!!
>
Re: How to customize products to get rid of unwanted menus/items? [message #287344 is a reply to message #287238] Tue, 28 June 2005 21:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kk.dev.null

Bob Foster wrote:
> I'm afraid, Charles, that we've run into a cornerstone of Eclipse
> design. It's easy to add things to Eclipse it doesn't already do, but
> almost impossible to make it stop doing things it already does. That is
> intentional. :(
>
> My problem is that Eclipse worked very hard to make a good, fast build
> system but didn't consider that there would be some Eclipse-based
> products that didn't want to build anything. I won't have any real
> trouble getting rid of those menu items, but I'll have to hack the code
> to do it.
>
> For your problem, you can, of course, build an editor that has no
> default actions, but you'll have to build it from the ground up.
> AbstractTextEditor and TextViewer, the basic building blocks of Eclipse
> editors, already have plenty of functionality you may not want wired in.
> Some of it can be turned off with preferences, some of it can't; you'll
> not find a consistent rationale for it. Ideally the basic editing
> building blocks would have no default functionality except basic text
> editing - text entry and deletion, cut and paste, undo, redo - and a way
> to attach commands to do anything else. When you build your editor,
> build it that way. It's harder than it seems to maintain that kind of
> discipline, but it's worth it.

We also use the Eclipse framework for our desktop application, which
also has nothing to build. We ended up messing with a lot of plugin.xml
files, and even commented out some menu items in the source code,
and maitain our own copy of it.
Re: How to customize products to get rid of unwanted menus/items? [message #287460 is a reply to message #287238] Thu, 30 June 2005 08:33 Go to previous messageGo to next message
Eclipse UserFriend
Thanks to Bob and KK for answering. I don't thank you for what you said
however ;). I really need to build an application that has a simplified
interface and all the bells and whistles of Eclispe would confuse our
users and add to the learning curve and training effort.

I guess I should open an an enhancement request for enabling the ability
to disable stuff. Perhaps it should be called a plugout <g>

I don't even need an editor, I need a file viewer, that is an editor type
tool for browse only. But I want to include the bookmark, task marker and
custom marker features of the standard text editor and support it with an
outline. Is this possible?
Re: How to customize products to get rid of unwanted menus/items? [message #287461 is a reply to message #287460] Thu, 30 June 2005 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Charles,

Have you guys investigated capabilities/activities, i.e., the
org.eclipse.ui.activities extension point, as way of disabling unwanted
features?


Charles Godwin wrote:

> Thanks to Bob and KK for answering. I don't thank you for what you
> said however ;). I really need to build an application that has a
> simplified interface and all the bells and whistles of Eclispe would
> confuse our users and add to the learning curve and training effort.
>
> I guess I should open an an enhancement request for enabling the
> ability to disable stuff. Perhaps it should be called a plugout <g>
>
> I don't even need an editor, I need a file viewer, that is an editor
> type tool for browse only. But I want to include the bookmark, task
> marker and custom marker features of the standard text editor and
> support it with an outline. Is this possible?
>
Re: How to customize products to get rid of unwanted menus/items? [message #287464 is a reply to message #287461] Thu, 30 June 2005 09:09 Go to previous messageGo to next message
Eclipse UserFriend
No, thanks for the tip. The documentation seems a little thin, so I'll
take a while to absorve the information.
Re: How to customize products to get rid of unwanted menus/items? [message #287468 is a reply to message #287460] Thu, 30 June 2005 09:52 Go to previous messageGo to next message
Eclipse UserFriend
I did find a way to shoot ALL the actions on an editor. It's brute force
and I haven't figured out all that is dead. cut and paste work. everything
else seems to be dead. Bookmark positioning and the bookmark ruler on the
right is still enabled.

Now all I have to do is add in the actions I want.

The solution is to subclass createActions and make it empty.

public void createActions() {

}
Re: How to customize products to get rid of unwanted menus/items? [message #287488 is a reply to message #287461] Thu, 30 June 2005 17:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

No. Is there someplace one can find out how they work and what
activities can be controlled without spending a week chasing through the
code?

Bob

Ed Merks wrote:
> Charles,
>
> Have you guys investigated capabilities/activities, i.e., the
> org.eclipse.ui.activities extension point, as way of disabling unwanted
> features?
>
>
> Charles Godwin wrote:
>
>> Thanks to Bob and KK for answering. I don't thank you for what you
>> said however ;). I really need to build an application that has a
>> simplified interface and all the bells and whistles of Eclispe would
>> confuse our users and add to the learning curve and training effort.
>>
>> I guess I should open an an enhancement request for enabling the
>> ability to disable stuff. Perhaps it should be called a plugout <g>
>>
>> I don't even need an editor, I need a file viewer, that is an editor
>> type tool for browse only. But I want to include the bookmark, task
>> marker and custom marker features of the standard text editor and
>> support it with an outline. Is this possible?
>>
Re: How to customize products to get rid of unwanted menus/items? [message #287489 is a reply to message #287488] Thu, 30 June 2005 17:43 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Bob,

We (the EMF team) did the code chasing approach. The
org.eclipse.emf.activities plugin is the example we provide to show how
to control EMF's capabilities, so that example might help.


Bob Foster wrote:

> No. Is there someplace one can find out how they work and what
> activities can be controlled without spending a week chasing through
> the code?
>
> Bob
>
> Ed Merks wrote:
>
>> Charles,
>>
>> Have you guys investigated capabilities/activities, i.e., the
>> org.eclipse.ui.activities extension point, as way of disabling
>> unwanted features?
>>
>>
>> Charles Godwin wrote:
>>
>>> Thanks to Bob and KK for answering. I don't thank you for what you
>>> said however ;). I really need to build an application that has a
>>> simplified interface and all the bells and whistles of Eclispe would
>>> confuse our users and add to the learning curve and training effort.
>>>
>>> I guess I should open an an enhancement request for enabling the
>>> ability to disable stuff. Perhaps it should be called a plugout <g>
>>>
>>> I don't even need an editor, I need a file viewer, that is an editor
>>> type tool for browse only. But I want to include the bookmark, task
>>> marker and custom marker features of the standard text editor and
>>> support it with an outline. Is this possible?
>>>
Previous Topic:Toggle an action buttons' icon to match its state?
Next Topic:bundle-version attribute problem in PDE (3.1, release)
Goto Forum:
  


Current Time: Tue Jul 22 06:39:00 EDT 2025

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

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

Back to the top