Eclipse Generic Text Editor Sort OUtline - eclipse

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

Related

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.

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

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?

Indexed full text search in Eclipse?

Is it possible (via a plugin or other way) for Eclipse to build a full text index for a project, so that searching a String does not linearly search all the files in the project?
(or does it automatically build such an index to speed up future searches?)
http://code.inf.unibz.it/projects/instasearch/ (old)
Edit: https://github.com/ajermakovics/eclipse-instasearch
It's a plugin that does indexed search using Lucene. Exactly what you're looking for I think.
The index files used by the search component of Eclipse (like a SearchParticipant) are in your workspace:
.metadata\.plugins\org.eclipse.jdt.core
As mentioned in this thread,
These files are used by the search or some other tools in Eclipse.
If you remove them, they will created again when you restart Eclipse or when you will activate the indexes. Then you will see a progress bar saying the number of files that need to be indexed.
There's an absolutely amazing and free plugin made by Pivotal (the creators of spring) that does indexed search with realtime preview for eclipse and works really good. I use it every day and could not live without it:
Quick Search for Eclipse
https://marketplace.eclipse.org/content/quick-search-eclipse?mpc=true&mpc_state=
After install, it can be easily opened via ctrl+shift+L
Give it a try, in my opinion is better than eclipse instasearch, and periodically maintained
You can write a plugin that does that. Using the "Builder" example in Eclipse PDE in conjunction with Lucene, it should take a novice a couple of days to get something that works.
If you are interested, nWire (for Java or PHP) offers a full text search for all the elements in your code (not just types, but also methods, fields, constants, etc.). It does not index all the code, though.

Generic code snippets or templates in Eclipse

I'm currently evaluating eclipse after using Textmate for all my development for many years. What I miss in Eclipse and what I can't find any solution for are some kind of generic templates:
I'm using PDT for my JavaScript and PHP development, and it supports code-templates. however , in my projects I'm writing large amounts of shell-scripts, yml-configuration-files, xml-files, gnu make scripts, etc., too. I'm writing source-documentation for all these scripts using a generic syntax (similar to robodoc) and you can save much time, when you can insert the doc-blocks using templates. however, besides PDT not all of the editor-plugins support templates.
Is there some generic way of storing code-snippets/templates in eclipse, which will work across all editor-plugins? I think it should be possible to implement such using eclipse monkey -- however, it seems development of monkey was stopped?
I'm using Eclipse 3.4.0.
If you have the web tools (WTP) plugins installed you should have a Snippets view which is an editor-independent place for collecting reusable code snippets. You can create and place your snippets in there and can separate them using 'drawers'. Double clicking or dragging a snippet item will insert it in the active editor.
The web tools user guide has a section about this view.
Why don't you try Snip2Code plugin?
It is a general purpose snippet manager platform that you can add to your Eclipse and will store your snippets on the cloud, so that you don't have to sync them when you reinstall Eclipse or move onto another machine.
http://www.snip2code.com/Static/Downloads