RCP Text Example under 3.1? [message #437676] |
Sat, 01 October 2005 12:08 |
CM Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hi,
I was wondering if anyone could help me converting the RCP Text Editor example
to Eclipse 3.1. It's working, but there are some already depricated methods used.
public void preWindowOpen(IWorkbenchWindowConfigurer configurer)
{
super.preWindowOpen(configurer);
configurer.setInitialSize(new Point(600, 450));
configurer.setShowCoolBar(true);
configurer.setShowStatusLine(true);
}
This one is rather easy, I just have to use
"WorkbenchWindowAdvisor.preWindowOpen()" and get the configurer with
"IWorkbenchWindowConfigurer configurer = getWindowConfigurer();"
public void fillActionBars(IWorkbenchWindow window,
IActionBarConfigurer configurer, int flags)
{
super.fillActionBars(window, configurer, flags);
if(fActionBuilder == null)
fActionBuilder = new WorkbenchActionBuilder(window);
fActionBuilder.makeAndPopulateActions(getWorkbenchConfigurer (), configurer);
}
public void postShutdown()
{
if(fActionBuilder != null)
fActionBuilder.dispose();
}
These two give me trouble. I've tried to move it to the method suggested in the
docs, which is "ActionBarAdvisor.fillActionBars(int)", but I don't know how to
get the WorkbenchConfigurer from there, or if I even need it. What's the
suggested way of doing the above under 3.1 RCP?
regards,
Chris
|
|
|
Re: RCP Text Example under 3.1? [message #437685 is a reply to message #437676] |
Sun, 02 October 2005 03:46 |
Haris Peco Messages: 1072 Registered: July 2009 |
Senior Member |
|
|
Chris,
Try build rcp example (new - plugin project
and check rcp application and add text editor from old
text editor example
Peco
CM wrote:
> Hi,
>
> I was wondering if anyone could help me converting the RCP Text Editor
> example to Eclipse 3.1. It's working, but there are some already
> depricated methods used.
>
> public void preWindowOpen(IWorkbenchWindowConfigurer configurer)
> {
> super.preWindowOpen(configurer);
> configurer.setInitialSize(new Point(600, 450));
> configurer.setShowCoolBar(true);
> configurer.setShowStatusLine(true);
> }
>
> This one is rather easy, I just have to use
> "WorkbenchWindowAdvisor.preWindowOpen()" and get the configurer with
> "IWorkbenchWindowConfigurer configurer = getWindowConfigurer();"
>
> public void fillActionBars(IWorkbenchWindow window,
> IActionBarConfigurer configurer, int flags)
> {
> super.fillActionBars(window, configurer, flags);
>
> if(fActionBuilder == null)
> fActionBuilder = new WorkbenchActionBuilder(window);
>
> fActionBuilder.makeAndPopulateActions(getWorkbenchConfigurer (),
> configurer);
> }
>
> public void postShutdown()
> {
> if(fActionBuilder != null)
> fActionBuilder.dispose();
> }
>
> These two give me trouble. I've tried to move it to the method suggested
> in the docs, which is "ActionBarAdvisor.fillActionBars(int)", but I don't
> know how to get the WorkbenchConfigurer from there, or if I even need it.
> What's the suggested way of doing the above under 3.1 RCP?
>
> regards,
> Chris
|
|
|
|
Powered by
FUDForum. Page generated in 0.03416 seconds