Home » Eclipse Projects » Rich Client Platform (RCP) » RCP application and BuildAction action
RCP application and BuildAction action [message #437520] |
Thu, 29 September 2005 15:00 |
Mehdi Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hey guys,
We have an 2.1 eclipse IDE-based plug-in. We realized back then, when
writing our plug-in that many of the action menus don't really apply to our
plug-in and we started "hacking" core eclipse plug-ins (plug-ins.xml...and
sometimes even re-compile core code...) in order to remove these
menus...(ugly, not maintainable, etc....)
Now, in the process of moving our plug-in to eclipse 3.1, we stumbled upong
RCP and that's where it hit us. This seems like what we want...
So, part of a proof of concept, I started with an RCP application and
starting exposing some of the actions through the advisors. But problems
started when I got to the buildAction (we have a wizard that allow users to
create a new project, and before using the projects, users must build it,
through the build action). In our 2.1 stream, we used the IDE build action
from the Project menu item. We defined our own builder by extending from
"org.eclipse.core.resources.builders" and the method
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) in
our builder gets called by eclipse.
Now, I was wondering in RCP, (although I know that you are not supposed to
import the ide package) is there a way to still say I would like to use some
of the ide plug-ins actions, the same way for instance there is QUIT,COPY,
CUT and others in the ActionFactory.
So, what I did in my actionbaradvisor, makeActions(IWorkbench window)
method, I tried something like this:
{
buildAction = new
BuildAction(window.getShell(),IncrementalProjectBuilder.INCR EMENTAL_BUILD);
register(buildAction);
exitAction = ActionFactory.QUIT.create(window);
register(buildAction);
}
But I quickly realized that window.getShell() is null and that is probably
not the way to do this.
Are we supposed to do such things in RCP?? Is there way??? What are you guys
advice on this?
Elextra--
|
|
| |
Re: RCP application and BuildAction action [message #437534 is a reply to message #437527] |
Thu, 29 September 2005 17:03 |
Mehdi Messages: 4 Registered: July 2009 |
Junior Member |
|
|
Hey Paul,
Thank you for your reply.
Well, up until now we have an eclipse 2.1 based plug-in. And, we are
looking to upgrade to 3.1. Now, as I explained in my posting, in our
current 2.1 plug-in we are hidding whole bunch of menus and actions that
didn't really fit our plug-in...
We were doing so, by commenting lines in plug-ins.xml and re-compiling
some of the core eclipse plug-in to not expose certain actions. Then, we
would package
our plug-in along with these 'altered' eclipse core plug-ins and ship it
to the end user. definitely not a proper way!!!
So, from your posting, I understand that there is a better way of doing so
through the use of Activity. I am not familiar with that piece at all.
I ll investigate that more (any article in mind?). That is if we decide to
stick with the current way our plug-in is built.
But, in the process of moving to Eclipse 3.1, we discovered RCP
Application and we thought that it might be what we need instead of an
IDE-based plug-in , which is what our current plug-in is and all Eclipse
2.1 was allowing us to build at that time.
And, in that sense, I was working on a little proof of concept. In that
context, I was trying to 're-construct' out plug-in starting from an
application plug-in project. I was trying to build the menus through the
advisors. When I got to the build action (which is an action that we have
in our current 2.1 plug-in for the user to build their projects, custom
projects that they can define through our custome wizard).
In our current 2.1 plug-in, the build action was defined through our own
builder by extending from
"org.eclipse.core.resources.builders" and the method
protected IProject[] build(int kind, Map args, IProgressMonitor monitor) in
our builder gets called by eclipse. This is how we got control of the
build.
But, in the application context for my proof of concept, I did not manage
to do so. ( I can certainely create a just an Action, and in the run
method I can do my build stuff....but I was hoping I could still leverage
eclipse IDE buildAction...)
Sorry for the long email, but I am trying to explain the context as much
as possible to avoid confusions.
|
|
| |
Goto Forum:
Current Time: Mon Dec 09 10:32:19 GMT 2024
Powered by FUDForum. Page generated in 0.05025 seconds
|