• Integrate my plugin with OpenOffice
Replies:
7
Views:
341
Up one level
• Integrate my plugin with OpenOffice
Posted by
marciobr
at
2007-12-12 13:15:53
Hi!
My name is Marcio and I'm a Computer Science student from Brazil. I'm sending this post because most of your documentation is in Deutsch. I'd like to integrate my own Eclipse Plugin with Open Office. More specificaly, I have created a view in my plug-in and I want to be able to right-click a folder in my view and then click on a command "Add new document", or "Add existing document". Such commands would open a document using Open Office editor. Is this kind of integration easy to do? Does NOA4e provide the funcionality I need to create such commands? Do I need any other plugins/APIs? Where should I start? Thank you very much! |
marciobr
Member
Posts:
5
|
• Re: Integrate my plugin with OpenOffice
Posted by
Markus Krueger
at
2007-12-12 16:15:09
Hi Marcio,
NOA4e is used for intgerating OpenOffice.org in eclipse. File handling an actions are based on eclipse's workspace. You would have to do the same things for Your own plugin as You integrated an own view with folders and files wich doesn't really make sense to me (maybe some more background information would make things clear). Since NOA4e is open source You can have a look at the plugins of NOA4e and copy or used the things You need. Regards, Markus |
• Re: Integrate my plugin with OpenOffice
Posted by
marciobr
at
2007-12-13 11:37:37
Hi! Thanks for your reply!
I'll try to make things clear. I have created a view in my plug-in. In my view there is a tree-structure of files and folders (just like the Project Explorer View of Eclipse). So far, when I right-click an object (file or folder) in my view, a menu appears, and I can create actions for my menu like this: action1 = new Action() { public void run() { showMessage("Action 1 executed" } }; What I need to do is change the showMessage() of my action to something like showOpenOfficeNewFileWizard() or showOpenOfficeOpenFileWizard() or editFileWithOpenOffice() I am wondering if there is an easier way to do such things, rather than copying parts of the NOA4e code. Is it easy or hard to do that? |
marciobr
Member
Posts:
5
|
• Re: Integrate my plugin with OpenOffice
Posted by
Markus Krueger
at
2007-12-13 14:54:57
Hi,
you can put the following in the action to open an editor based on a file: IWorkbenchPage page = PlatformUI.getWorkbench(). getActiveWorkbenchWindow().getActivePage(); String editorid = "ag.ion.bion.workbench.office.editor.ui.TextOfficeEditor"; page.openEditor(new MyFileEditorInput(myFile), editorid); The Id of the NewWizard in eclipse is "ag.ion.bion.workbench.office.editor.activation.NewTextDocumentWizard". You can use this to open it I think, but I don't remeber how to. Regards, Markus |
• Re: Integrate my plugin with OpenOffice
Posted by
marciobr
at
2007-12-14 13:33:12
Thank you very much!
I'll try that soon. |
marciobr
Member
Posts:
5
|
• Re: Integrate my plugin with OpenOffice
Posted by
marciobr
at
2008-04-04 14:13:08
Hi,
Sorry to bother you again but I have one more question: Do I really have to implement my own FileEditorInput? Or there is an implementation I can use? Thank you! |
marciobr
Member
Posts:
5
|
• Re: Integrate my plugin with OpenOffice
Posted by
Markus Krueger
at
2008-04-04 15:24:49
Maybe you can give me a hint what you like to do and then I might be able to give you a solution.
|
• Re: Integrate my plugin with OpenOffice
Posted by
marciobr
at
2008-04-04 15:31:38
OK I didn't have to implement a FileEditorInput, I used the class org.eclipse.ui.part.FileEditorInput and it worked really well.
Thanks for your help! |
marciobr
Member
Posts:
5
|


