Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » EFS question ...
EFS question ... [message #327549] Thu, 24 April 2008 12:42 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all,
Not sure this is the right forum where post questions on EFS . if no please
just let me know .

The question is about the use of EFS . and what I have done in mapping
(using EFS) my Object database.

Following the examples I have found I built the XXXFileStore and linked it
at the resources view .
everything was just working fine (I can see the tree nicely created and I
could open modify and save back content files and so on)

But

What about creating my own view?

I just created a simple TreeViewer with its own provider based on
XXXFileStore input
It worked just fine but I can only open file (using the file store) using
the default text editor .

I have seen that the OpenAction from the resource view works on
IDE.openEditor(IWorkbenchPage, IFile).

Do I really need to implement my own XFile object that implements the IFile
interface .
Probably there are things not clear for me and what I'm trying to do is
wrong .

If someone could give me any information . I would really appreciate it.

Regards

Kar
Re: EFS question ... [message #327552 is a reply to message #327549] Thu, 24 April 2008 13:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Kar,

There are other open methods that take an IEditorInput or a URI so you
might try those. Here's a snip from of some utility code in
org.eclipse.emf.edit.ui.uti.EditUIUtil we wrote recently to make opening
editors in RCP easier for us:

IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchPage page =
workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart editorPart = page.openEditor(editorInput,
workbench.getEditorRegistry().getDefaultEditor(uri.lastSegme nt()).getId());

KarSc wrote:
> Hi all,
> Not sure this is the right forum where post questions on EFS . if no
> please just let me know .
>
> The question is about the use of EFS . and what I have done in mapping
> (using EFS) my Object database.
>
> Following the examples I have found I built the XXXFileStore and
> linked it at the resources view .
> everything was just working fine (I can see the tree nicely created
> and I could open modify and save back content files and so on)
>
> But
>
> What about creating my own view?
>
> I just created a simple TreeViewer with its own provider based on
> XXXFileStore input
> It worked just fine but I can only open file (using the file store)
> using the default text editor .
>
> I have seen that the OpenAction from the resource view works on
> IDE.openEditor(IWorkbenchPage, IFile).
>
> Do I really need to implement my own XFile object that implements the
> IFile interface .
> Probably there are things not clear for me and what I'm trying to do
> is wrong .
>
> If someone could give me any information . I would really appreciate it.
>
> Regards
>
> Kar
Re: EFS question ... [message #327654 is a reply to message #327552] Mon, 28 April 2008 08:28 Go to previous messageGo to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi Ed and thanks for your help ...

the point is ... what is the right way to create the EDITOR INPUT, do I need
to create one?

I was hoping that using efs I could deal with the logic of reading the
content from the db using the xxxfilestore ... (my previous version was
only using custom editor input ...)

in some examples I have seen the use of NonExistingFileEditorInput (but not
sure this is the correct approach) and all the classes from EditUIUtil deal
with IFile that I haven't got :(

what shall I do?
thanks in advance

Kar



"Ed Merks" <merks@ca.ibm.com> ha scritto nel messaggio
news:fuq2dt$9uh$1@build.eclipse.org...
> Kar,
>
> There are other open methods that take an IEditorInput or a URI so you
> might try those. Here's a snip from of some utility code in
> org.eclipse.emf.edit.ui.uti.EditUIUtil we wrote recently to make opening
> editors in RCP easier for us:
>
> IWorkbench workbench = PlatformUI.getWorkbench();
> IWorkbenchPage page =
> workbench.getActiveWorkbenchWindow().getActivePage();
> IEditorPart editorPart = page.openEditor(editorInput,
> workbench.getEditorRegistry().getDefaultEditor(uri.lastSegme nt()).getId());
>
> KarSc wrote:
>> Hi all,
>> Not sure this is the right forum where post questions on EFS . if no
>> please just let me know .
>>
>> The question is about the use of EFS . and what I have done in mapping
>> (using EFS) my Object database.
>>
>> Following the examples I have found I built the XXXFileStore and linked
>> it at the resources view .
>> everything was just working fine (I can see the tree nicely created and I
>> could open modify and save back content files and so on)
>>
>> But
>>
>> What about creating my own view?
>>
>> I just created a simple TreeViewer with its own provider based on
>> XXXFileStore input
>> It worked just fine but I can only open file (using the file store) using
>> the default text editor .
>>
>> I have seen that the OpenAction from the resource view works on
>> IDE.openEditor(IWorkbenchPage, IFile).
>>
>> Do I really need to implement my own XFile object that implements the
>> IFile interface .
>> Probably there are things not clear for me and what I'm trying to do is
>> wrong .
>>
>> If someone could give me any information . I would really appreciate it.
>>
>> Regards
>>
>> Kar
Re: EFS question ... [message #327655 is a reply to message #327552] Mon, 28 April 2008 08:30 Go to previous message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi Ed and thanks for your help ...

the point is ... what is the right way to create the EDITOR INPUT, do I need
to create one?

I was hoping that using efs I could deal with the logic of reading the
content from the db using the xxxfilestore ... (my previous version was
only using custom editor input ...)

in some examples I have seen the use of NonExistingFileEditorInput (but not
sure this is the correct approach) and all the classes from EditUIUtil deal
with IFile that I haven't got :(

what shall I do?
thanks in advance

Kar


"Ed Merks" <merks@ca.ibm.com> ha scritto nel messaggio
news:fuq2dt$9uh$1@build.eclipse.org...
> Kar,
>
> There are other open methods that take an IEditorInput or a URI so you
> might try those. Here's a snip from of some utility code in
> org.eclipse.emf.edit.ui.uti.EditUIUtil we wrote recently to make opening
> editors in RCP easier for us:
>
> IWorkbench workbench = PlatformUI.getWorkbench();
> IWorkbenchPage page =
> workbench.getActiveWorkbenchWindow().getActivePage();
> IEditorPart editorPart = page.openEditor(editorInput,
> workbench.getEditorRegistry().getDefaultEditor(uri.lastSegme nt()).getId());
>
> KarSc wrote:
>> Hi all,
>> Not sure this is the right forum where post questions on EFS . if no
>> please just let me know .
>>
>> The question is about the use of EFS . and what I have done in mapping
>> (using EFS) my Object database.
>>
>> Following the examples I have found I built the XXXFileStore and linked
>> it at the resources view .
>> everything was just working fine (I can see the tree nicely created and I
>> could open modify and save back content files and so on)
>>
>> But
>>
>> What about creating my own view?
>>
>> I just created a simple TreeViewer with its own provider based on
>> XXXFileStore input
>> It worked just fine but I can only open file (using the file store) using
>> the default text editor .
>>
>> I have seen that the OpenAction from the resource view works on
>> IDE.openEditor(IWorkbenchPage, IFile).
>>
>> Do I really need to implement my own XFile object that implements the
>> IFile interface .
>> Probably there are things not clear for me and what I'm trying to do is
>> wrong .
>>
>> If someone could give me any information . I would really appreciate it.
>>
>> Regards
>>
>> Kar
Previous Topic:getActivePage throws NullPointerException
Next Topic:Best practices for notifications
Goto Forum:
  


Current Time: Wed Jul 24 13:13:15 GMT 2024

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

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

Back to the top