This is a plugin that allows you to take text content from an Eclipse document, process it through an external tool,
and the make the result available in Eclipse at the end (see the Features section for complete info).
The text is “feed” to the tool as standard input and the standard output becomes the result.
This is something I have missed for a while, and I am amazed that there is nothing out there already. Or maybe it is, and I could not find it…
So in a week-end or two I have put something together.
Some of the inspiration cames from gedit.
It should be able to run anything that you can normally execute on your machine (native applications, Perl/Python/shell scripts, Java, Groovy, etc.)
To install the plugin in Eclipse select Help -> Install New Software… and click “Add…” to add the following URL:
You can then select the site in the “Work with” list and continue the installation like with any other plugin.
The input text can be the whole content of a document, or the current selection selection.
The result can be displayed in the Eclipse console, or a message box, in clipboard,
can replace the current selection, or the whole document, can be appended to the document or at the insertion point,
or create a new document.
This is what I would like to add to it, although it should be usable already:
- Specify the charset for the input / output (right now it is UTF-8, but there might bee tools that can’t handle it)
- Allowing “replacement macros” in the command line (for things like document/project path, home folder, environment, Eclipse variables, prompt for input, etc.
- The ability to include a short script in the tool configuration itself (so that you don’t need an external script)
- The ability to ask for a command to execute
- Specify how to deal with standard-error (merge with standard input, ignore, take it instead of standard input, etc.
- Handle nicely text from column selections.
- Whatever cool ideas you might sugest :-)
On GitHub, at https://github.com/mihnita/external-filter.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.