Skip to main content



      Home
Home » Eclipse Projects » GEF » How to open a new page?
How to open a new page? [message #166337] Mon, 31 January 2005 02:58 Go to next message
Eclipse UserFriend
Originally posted by: zhlmmc.hotmail.com

When double click the EditPart in my graphical editor,I want to open a new
page in the workbench and create a new file.How can I get the EditorInput?
getEditorSite().getWorkbenchWindow().openPage(???);
How to give the parameter? Is there anothor way to reach the target?
Thanks :-)
Re: How to open a new page? [message #166355 is a reply to message #166337] Mon, 31 January 2005 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

zhlmmc wrote:
> When double click the EditPart in my graphical editor,I want to open a
> new page in the workbench and create a new file.How can I get the
> EditorInput?
> getEditorSite().getWorkbenchWindow().openPage(???);
> How to give the parameter? Is there anothor way to reach the target?
> Thanks :-)
>
>

when you call open page you will have to provide an IEditorInput. You
dont get the IEditorInput, you create it yourself. Are you trying to
open another view of the same model already opened?
Re: How to open a new page? [message #166393 is a reply to message #166337] Mon, 31 January 2005 17:09 Go to previous messageGo to next message
Eclipse UserFriend
You can create an IFileEditorInput for your new file. If you're just trying
to open a new editor, use
getEditorSite()#getWorkbenchWindow()#getActivePage()#openEdi tor(). For
further questions, try the platfrom newsgroup. This query is not related to
GEF.

"zhlmmc" <zhlmmc@hotmail.com> wrote in message
news:ctkof4$t3g$1@www.eclipse.org...
> When double click the EditPart in my graphical editor,I want to open a new
> page in the workbench and create a new file.How can I get the EditorInput?
> getEditorSite().getWorkbenchWindow().openPage(???);
> How to give the parameter? Is there anothor way to reach the target?
> Thanks :-)
>
>
Re: How to open a new page? [message #166451 is a reply to message #166355] Tue, 01 February 2005 02:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zhlmmc.hotmail.com

I want to create a new model(new file) for the new page.I don't know how
to
create the IEditorInput...
Is there any class can be created like this:
Input input = new Input("filename");
and I can call openPage(input);

CL [dnoyeb] Gilbert wrote:

> zhlmmc wrote:
>> When double click the EditPart in my graphical editor,I want to open a
>> new page in the workbench and create a new file.How can I get the
>> EditorInput?
>> getEditorSite().getWorkbenchWindow().openPage(???);
>> How to give the parameter? Is there anothor way to reach the target?
>> Thanks :-)
>>
>>

> when you call open page you will have to provide an IEditorInput. You
> dont get the IEditorInput, you create it yourself. Are you trying to
> open another view of the same model already opened?
Re: How to open a new page? [message #166457 is a reply to message #166393] Tue, 01 February 2005 02:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zhlmmc.hotmail.com

BTW:How to catch the double click event?

Pratik Shah wrote:

> You can create an IFileEditorInput for your new file. If you're just trying
> to open a new editor, use
> getEditorSite()#getWorkbenchWindow()#getActivePage()#openEdi tor(). For
> further questions, try the platfrom newsgroup. This query is not related to
> GEF.

> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ctkof4$t3g$1@www.eclipse.org...
>> When double click the EditPart in my graphical editor,I want to open a new
>> page in the workbench and create a new file.How can I get the EditorInput?
>> getEditorSite().getWorkbenchWindow().openPage(???);
>> How to give the parameter? Is there anothor way to reach the target?
>> Thanks :-)
>>
>>
Re: How to open a new page? [message #166488 is a reply to message #166457] Tue, 01 February 2005 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wjancz.\/\/asko.pl(change \/\/ with w)

Uzytkownik "zhlmmc" <zhlmmc@hotmail.com> napisal w wiadomosci
news:ctn9q5$vqu$1@www.eclipse.org...
> BTW:How to catch the double click event?
>

in EditPart class override performRequest method like this:

public void performRequest(Request request) {
// this one is double click event
if (request.getType() == RequestConstants.REQ_OPEN) {
// do what You want
}
}



--

========================
Wojciech Jancz
Programista

Zaklad Informatyki
Re: How to open a new page? [message #166496 is a reply to message #166451] Tue, 01 February 2005 07:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Lamont_Gilbert.rigidsoftware.com

So you want to open a file from the filesystem?

You must create the IEditorInput, AND you must tell your IEditorPart how
to decode the IEditorInput and present it in the view.

You probably need to look at an example. its not too tough. If you
download the full GEF package you should have the examples. set a few
breakpoints and step through the creation process all the way back to
when the ieditorInput is created.


zhlmmc wrote:
> I want to create a new model(new file) for the new page.I don't know how
> to create the IEditorInput...
> Is there any class can be created like this:
> Input input = new Input("filename");
> and I can call openPage(input);
>
> CL [dnoyeb] Gilbert wrote:
>
>> zhlmmc wrote:
>>
>>> When double click the EditPart in my graphical editor,I want to open
>>> a new page in the workbench and create a new file.How can I get the
>>> EditorInput?
>>> getEditorSite().getWorkbenchWindow().openPage(???);
>>> How to give the parameter? Is there anothor way to reach the target?
>>> Thanks :-)
>>>
>>>
>
>> when you call open page you will have to provide an IEditorInput. You
>> dont get the IEditorInput, you create it yourself. Are you trying to
>> open another view of the same model already opened?
>
>
>
Re: How to open a new page? [message #166521 is a reply to message #166496] Tue, 01 February 2005 09:06 Go to previous message
Eclipse UserFriend
Originally posted by: zhlmmc.hotmail.com

I have got it,thank you :-)

CL [dnoyeb] Gilbert wrote:

> So you want to open a file from the filesystem?

> You must create the IEditorInput, AND you must tell your IEditorPart how
> to decode the IEditorInput and present it in the view.

> You probably need to look at an example. its not too tough. If you
> download the full GEF package you should have the examples. set a few
> breakpoints and step through the creation process all the way back to
> when the ieditorInput is created.


> zhlmmc wrote:
>> I want to create a new model(new file) for the new page.I don't know how
>> to create the IEditorInput...
>> Is there any class can be created like this:
>> Input input = new Input("filename");
>> and I can call openPage(input);
>>
>> CL [dnoyeb] Gilbert wrote:
>>
>>> zhlmmc wrote:
>>>
>>>> When double click the EditPart in my graphical editor,I want to open
>>>> a new page in the workbench and create a new file.How can I get the
>>>> EditorInput?
>>>> getEditorSite().getWorkbenchWindow().openPage(???);
>>>> How to give the parameter? Is there anothor way to reach the target?
>>>> Thanks :-)
>>>>
>>>>
>>
>>> when you call open page you will have to provide an IEditorInput. You
>>> dont get the IEditorInput, you create it yourself. Are you trying to
>>> open another view of the same model already opened?
>>
>>
>>
Previous Topic:Connection Requests and unused model deletion
Next Topic:Like ToolBarLayout, but with multiple rows?
Goto Forum:
  


Current Time: Mon Jun 16 16:18:44 EDT 2025

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

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

Back to the top