Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Open WORD on IFileStore
Open WORD on IFileStore [message #327836] Mon, 05 May 2008 14:35 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all
I have got an IfileStore and I'm using the EditorSelectionDialog to choose
the editor to use.

Let's say I did choose the office word to open my filestore .

String editorId = editor == null ? IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID
: editor.getId();

Activator.getDefault().getWorkbench().getActiveWorkbenchWind ow()
.getActivePage().openEditor(createEditorInput(fileStore),
editorId, true, MATCH_BOTH);

I get the following exception ....

------

EditorDescriptor(id=Microsoft Office Word Document, label=Microsoft Office
Word Document)

org.eclipse.ui.PartInitException: Unable to open editor, unknown editor ID:
Microsoft Office Word Document
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:629)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2737)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2590)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2574)
at testefs.views.SampleView2$2.run(SampleView2.java:409)

what am I doing wrong?
is this possible?
Many thanks in advance.
Ciao

Kar
Re: Open WORD on IFileStore [message #327840 is a reply to message #327836] Mon, 05 May 2008 16:36 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
KarSc wrote:
> Hi all
> I have got an IfileStore and I'm using the EditorSelectionDialog to
> choose the editor to use.
>
> Let's say I did choose the office word to open my filestore .
>
> String editorId = editor == null ?
> IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID
> : editor.getId();
>
> Activator.getDefault().getWorkbench().getActiveWorkbenchWind ow()
>
> .getActivePage().openEditor(createEditorInput(fileStore),
> editorId, true, MATCH_BOTH);
>
> I get the following exception ....
Obviously, since Word has no idea about IFileStore. This is true for all
(external) system editors.

Dani
>
> ------
>
> EditorDescriptor(id=Microsoft Office Word Document, label=Microsoft
> Office Word Document)
>
> org.eclipse.ui.PartInitException: Unable to open editor, unknown
> editor ID: Microsoft Office Word Document
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:629)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2737)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2651)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:2643)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2595)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2590)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2574)
> at testefs.views.SampleView2$2.run(SampleView2.java:409)
>
> what am I doing wrong?
> is this possible?
> Many thanks in advance.
> Ciao
>
> Kar
>
>
Previous Topic:Text editor content assist
Next Topic:Shortcuts for run and debug OSGi framework partly removed since 3.3.2 - accidental?
Goto Forum:
  


Current Time: Sat Jul 27 13:26:41 GMT 2024

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

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

Back to the top