Is it possible to use Eclipse IDE as just a text editor? - eclipse

Is it possible to use Eclipse IDE just as a text editor (with features like sytax highlighting, etc., possibly with extra features) , by dragging files into it or using a 'File>Open' kind of thing, without creating any "Projects" and the like, editing the files and saving them to their original location? Is this a feature built into Eclipse, or would a plugin be necessary?
(In case the language makes a difference, this is for Python, although information for other languages would also be useful.)

Yes, you can, but it has much the same feeling as chartering a 747 to taxi to the convenience store.

I'm using Eclipse SDK
Version: 3.5.0
Build id: I20090611-1540
And yes, you can open a .txt file, make changes, then save and it will save the file to the original open location.
Just did it.

I don't know about Python syntax highlighting, but yes, it's completely possible to use it as a text editor. I've even prettified single files of C++ code in Eclipse; just drag-'n-drop the file into the window.

I use Eclipse for:
text editor
Sql perspective (sql client)
Task list
Find in files (Open Resource by name)
Svn plugin (subversion client)
and many other useful task.
I would like to make it more light by removing the Java compiler and SDK.
How can I do that?

Related

Eclipse Generic Text Editor Sort OUtline

I thought this would be very simple to achieve but I cannot sort the outline in alphabetical order in the generic text editor that is now the default editor for javascript files in Eclipse 2020-12. In fact I have no sorting options whatsoever in the outline.
This is all I have in any perspective using the generic text editor.
This really affects my productivity having to sroll through many functions in a javascript file to find the correct one. I have hundreds of javascript files with hundreds of functions each.
I am using Wild Web Developer tools as this is the way Eclipse is heading (and because each update automaticaly installs it). Also I have node.js installed even though I don't require node.js for anything other than the generic text editor.
I'd prefer to not have the overhead of uninstalling Wild Web Devleoper and installing JDT each time Eclipse updates. Ideally, I should be able to simply update when prompted and all works as previously.
This is the Eclipse version I am using
Version: 2020-12 (4.18.0)
Build id: 20201210-1552
Does anybody have any idea how I can simply sort my functions and variables alphabetically in the generic text editor please? (I can sort the outline in java files

Is there any text editor for Mac that can be configured to have, or already has, autocomplete for Lua?

I know TextWrangler shows the option, but it doesn't actually do anything. So what I want is autocomplete, either with a key combination, or while I type.
Syntax coloring/highlighting is a requirement as well, though I know Xcode and TextWrangler have that.
You might want to use Lua Development Tools for this purpose. It has syntax coloring, plus it is doing smart autocomplete, depending on what your actual context is (required modules, ...)
It is an Eclipse Technology project, and it is Open Source! (EPL license).
Project web page - http://www.eclipse.org/koneki/ldt
Installation via Eclipse Marketplace - http://marketplace.eclipse.org/content/lua-development-tools-koneki
I don't know if you have seen this page, but it seems a good place to start:
http://lua-users.org/wiki/LuaEditorSupport
If I search for "completion" I get:
Decoda (Win)
LuaEdit (Win)
DForD (Win)
NsEditor (Win)
Visual Studio + LuaLite
Eclipse + LuaEclipse or LunarEclipse (java)
I personally use Vim + SuperTab (which only auto-fills with things that you have previously written).
There's a nice plugin for IntelliJ IDEA for Lua. IntelliJ IDEA is really nice, though kind of biggish.
Aside of that there is also TextAdept which is a lot smaller, and 100% configurable in Lua.
And probably a bunch of others.
If you want full (semantic) autocompletion, you should try lua-inspect (source code), which can be installed in the SciTE editor, and also into ViM using vim-lua-inspect.
It uses Metalua to fully parse the source code into AST and then performs code analysis. Apart from simple keyword-based syntax highlighters, it can:
differentiate between local/global variables, parameters and unused variables
jump to the definition of a variable/function
autocomplete table members
correctly rename variables/functions (not only definitions but also uses)
Even though it is not yet stable, and tends to hang on large scripts, it is very usable for standard Lua programs, mainly for it's intelligent autocompletion and renaming.

Is it feasible to extract the code assist/completion part from Eclipse and use it in an other editor?

I often hear how good the code completion, coding assist features of Eclipse are compared to other editors which raises the question if these parts could be separated from the Eclipse code base.
If this part is separated with an API through which it can be told things it needs to know (where are the files of the project, what are the include paths, etc.) then it can return the necessary information (help for a symbol at the cursor, possible completions, etc.) and any editor (emacs, vim, etc.) can use it.
Why is it not done already? Are these code assist parts tied too tightly to Eclipse internals and they can't be sepaarated easily? Could someone who knows about the internal workings of Eclipe shed some light on this?
Edit: Here's a working setup with SharpDevelop for C#, emacs is the UI and the info comes from the SharpDevelop module. See the screenshot on this page. Eclipse's completion support could support emacs and other editors similarly.
The eclim project tries to solve this problem by interfacing directly with eclipse. Thus at least an headless running eclipse is required. While eclim's focus is afaik the vim integration, there also exist plugins for other editors (emacs, textmate, etc). The communication between eclim and an editor happens through a server interface.
Maybe not exactly what you where looking after, but imho worth a look:
http://www.eclim.org/
The content assist uses an internal model of the Java projects - without this model the content assist cannot work (that effectively).
I am not sure, how tightly is integrated to Eclipse internals, but I do know that it uses the Eclipse Resources API (file system handling) and other features such as Eclipse extensions (new completion providers can be added without modifying the code).
Alltogether, I believe to port this completion engine to other editors the mentioned editors would lose their (in some case relative) simplicity to Eclipse, thus it might not provide the smaller footprint of the mentioned editors - so I don't think, it is feasible to provide such engines effectively for other editors.

Add functionality to all Eclipse TextEditors

I need to add some functionality to eclipse text editors. The goal is to get a Graphics Context or add a SWT Canvas to any and all Eclipse AbstractTextEditors and package these modifications within a plug-in (so by installing the plugin I provide, the editor modification will work for the Java Editor, XML Editor, plain text editor, etc.). Are there any extension points that would suffice for this purpose, or is my best bet with a fragment? Any help is appreciated.
I would recommend looking at the source code for AbstractTextEditor to see if an extension point exists for this purpose. If an extension point exists, it will be evident in that class source.
I would wager that such extension point does not exist. You are left with opening an enhancement request and in the meantime patching the plugin containing AbstractTextEditor plugin to alter the source of that file. A fragment isn't going to do the trick. Another alternative to consider is to learn and apply a bytecode weaving framework such as AspectJ (http://eclipse.org/ajdt/).

How do I get support for GPB in Eclipse?

I'm trying to use Google Protocol Buffers in my project and I'd like to have some tooling support from Eclipse. In particular, I want Eclipse to call protoc every time I make changes to the .proto files and then rebuild all code that depends on the generated code.
I tried to set up a Custom Builder but it keeps bugging me with errors I don't understand, most often it complains that the .proto file is not on the path given by --proto-path, which it should be by all I can tell. Also, because I use ${build_files}, Eclipse passes all changed files to the compiler (instead of those that I have configured to trigger the build).
NetBeans seems to have a protobuf-Plugin, but I can't find one for Eclipse. Is there one?
Theres a protoclipse plugin on googlecode, which is in the initial stages:
http://code.google.com/p/protoclipse/
Not sure if there is a builder, but I did find a plugin for syntax highlighting for protocol buffers.
You can define an external builder on the plugin that invokes an ant task. It is an ugly kludge, but until there is a better solution this may serve your purposes.
In practice, syntax highlighting turned out to not be that important, I hardly edit these files, and they tend to be very small. Maven and the m2eclipse plugin handle the building side of things great.
I recommend using Google's "Protocol Buffers Development Tools". It is a plugin for Eclipse that features automagic regeneration and error checking, among other things. It's available here: http://code.google.com/p/protobuf-dt/ .
While this question is close to other Eclipse plugin for working with protobuf, answers here are different.
Well, yes, if you use maven/gradle to invoke protoc (Protobuf compiler), than you may need no Eclipse plugin at all.
Colorizing editor helps for long file or with many comments. Know there are 2 editor plugins for Eclipse.