Calling external commandline programs to filter data [message #325774] |
Tue, 26 February 2008 15:48 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: janis_papanagnou.hotmail.com
I am seeking for a way to process data from an Eclipse editor window and
save the transformed data in an external file; the data transformer is an
already existing external Unix shell program that expects as input either
a stream of data or the name of a file that contains the data.
Searching through published Eclipse plugins I found something called
"Emacsish" (to call shell programs from within Eclipse) that seems to go
in that direction, but it's not quite what I need it seems.
So my newbie question is; is there any plugin that makes it possible to
filter the Eclipse editor contents by using an external commandline filter
program and create a new data file from the result? Or is there any other
way how to achieve such tasks with Eclipse? Or, as a last ressort; would
it be necessary to re-implement all the external filter programs as
Eclipse plugin Java programs?
Any enlightenment and all suggestions very much appreciated!
|
|
|
|
Re: Calling external commandline programs to filter data [message #325821 is a reply to message #325805] |
Thu, 28 February 2008 09:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: janis_papanagnou.hotmail.com
David, thanks for your reply!
>If you only want to transform data during a save why not override the
>IEditorPart.doSave(IProgressMonitor) and IEditorPart.doSaveAs()?
Actually, I need a second file to create from the original data in the
Eclipse document.
>Are you transforming an existing AbstractDocument object or will you be able
>to create your own?
As an Eclipse newbie I may not quite understand what you are asking me ;-)
but I suppose I am operating on the document obtained by getDocument(),
the one displayed in the Eclipse editor window. From that data I want to
create an own document which I want to save as a copy in a file (or just
print the transformed data).
(Maybe I can add another "save file type" selection while performing the
doSaveAs() function which triggers the data transformation before saving?)
>Each call to an external unix shell process would be run from a
>org.eclipse.core.runtime.jobs.Job.
I'll have a closer look to that entry.
>The editor API is challenging learn so don't give up early.
Good to know :-)
Janis
|
|
|
|
Powered by
FUDForum. Page generated in 0.03152 seconds