In the Java source editor in Eclipse, you could select a block of code, pick it with a mouse click and drop the block of code into another area of the code.
You can't do that for other text editors like XML, HTML, etc. I had to press a key combination before I could use the mouse to move and drop the selected text. I have a new Eclipse set-up now and I can't recall what the key combination is. I tried ctrl-shift, ctrl-alt, alt-shift, and ctrl-shift-alt. None of them work. I had drag-and-drop enabled.
Is there something else on Eclipse that I had installed in my old Eclipse set-up that I forgot to install in my new Eclipse set-up? It shouldn't be because the text editor config has a check box for "enable drag and drop" which I enabled.
Of course, if you are one of those guys who wrote the eclipse text editor, you should also answer this question:
why did you not make the other text editors behave like the Java code editor? Why did you make us into having to do a key-combination to perform drag and drop for the other editors? What's wrong with having all the editors exhibit the same behaviour?
I woogled and googled and could not find any eclipse manual that would tell me what the key combination is. I also could not find it in the local help files. If you required us to use key-combination, why did you not document that in a manual?
My apologies, but I realise I sound a little frustrated now.
The text DnD (Drag and Drop) feature (initially introduced by bug 11624 in 2007) has been slowly extended to various editors, as reported by the bug 231294:
Tested in EclipsePdt-2.2.0.v20100427
Verified fixed for:
PHP files
JS files
Still reproducible in:
CSS files
HTML files
XML files (source view)
So it is still "work in progress".
The relevant blocking issues are:
bug 178104: [DND] Need to revisit dnd API to allow multiple drop targets
bug 173405 Make use of IDragAndDropService (Show Votes)
bug 195655 Drag'n'drop selected text
Related
I have a simple HTML text Editor which I'm trying to convert into an IDE. I'm finished with the basics (Like adding a file browser and running the project). The next obstacle I'm facing is adding themes.
I googled and found this question but it requires adding the text before changing its color.
What behaviour I want is similar to JetBrains Webstorm (Or IntelliJ IDE):
This is what it looks like as of now:
After working on some javascript and installing some packages (Babel, Emmet, JsPrettier, Sublime Linter, Sublime Linter-eslint) and experimenting with Github, the row that I changed gets a yellow highlight on the side bar. This happens even for code (even other languages like Java) that I never used github with, which is frustrating.
Does anyone know how to disable this?
The yellow highlighting in the sidebar (it's not actually sidebar, it's called the gutter region) is an example of the incremental diff functionality of Sublime Text, which is used to track modifications done to a file. To disable that, you can to go to command palette (using ctrl+shift+p) & then type Preferences: Settings. In the right hand side of the newly opened window, you'd need to add mini_diff: false. That should disable showing all those highlights in the gutter.
I am currently using a bunch of eclipse, jface libraries to build a small editor. I am using eclipse's SourceViewer for it. I am trying to highlight/change the color of parts of my code in eclipse however I don't think I can use the concept of damager, repairer and PresentationReconciler because I want to highlight lines of code based on user selection. So if a user selects some code I can get the selected code by using
SourceViewer.getSelectionProvider().getSelection();
Which would return an ISelection and thats what I want to "Highlight". I am currently able to create Annotations which essentially creates squigglies under the text the user selects I would rather change the color of the selected text. Would much appreciate any help.
edit:
I am not developing as an eclipse plugin but as a standalone application using the plugin api's.
This is basically the same question as this except for Netbeans 8.0.2 (running under jMonkeyEngine SDK 3.1-alpha1) instead of Visual Studio.
Honestly, the aforemetnioned link says it better than I can, but basically I'm a vim key binding user, and have the netbeans jVi plugin installed and want to map, for example, alt-j and alt-k to scroll through the code completion list instead of the arrow keys:
I've searched through Tools->Options->Keymap, as well as the the JVi configs at Tools->Options->jViConfig. I don't see anything at all under jViConfig, so I think the standard NetBeans key bindings are the way to go.
I have tried modifying most of the obvious down keys e.g insertion point down, scroll down, page down etc, but they all affect the underlying text in the editor, never the completion list.
And:
Does anyone know of a way to do this?
Or maybe a plugin to provide the functionality?
It simply appears that the raw arrow key movements are not mappable by netbeans (?).
Note: this is possible to do in Visual Studio 2015, so I'm hoping it's possible in NetBeans as well.
Many Thanks.
AFAIK, there is no way to do this in NetBeans. At least there wasn't in 2010, when I filed the NetBeans bug hint completion makes assumptions about associated editor pane bindings. I maintain jVi. I filed the bug since I was having trouble with completion bindings for some special keys. In the NB source take a look at
editor.completion/src/org/netbeans/modules/editor/completion/CompletionScrollPane.java
And you'll see a bunch of hardcoded stuff.
In the jVi source
nbvi/nbvi-module/src/org/netbeans/modules/jvi/KeyBindings.java
method fixupKeypadKeys, you see what jVi does (given the fix for the bug I filed). This is part of some arcane code that depends on being friend with some NB editor package.
You could file a bug with NB. If you provided NB a patch, they might incorporate it. If you file a NB bug, cc me (err at netbeans.org)
Alternately, you could try adding some code to the jVi file to add your keybindings.
I've been trying develop my custom plugin for Eclipse, and basically I want to make is a "richer" version on the current TextHover. I don't know what widget(?) Eclipse uses to display the hovering text, but I want to use something different, like SWT Image or SWT Browser.
Most of the tutorials that I've read suggest that I have to implement my own Java Editor to do this, but I don't want the user to switch to my custom editor just for a simple feature (and I don't want to implement a whole editor).
Some Tests:
I've already created two Eclipse Plugin Projects. The first one is a extension for the JavaEditorTextHovers, and with this project I managed to show some custom Strings when hovering some random texts, but wasn't able to change the hover appearance. The second project was a editor plugin. With this last one I managed to get a Browser to appear when hovering a random text(this tutorial helped me), but again, this editor had nothing, no syntax coloring, no rules, etc., and for the previous reasons, I couldn't accept this has a solution.
Maybe if there was way to change the (or set a new) SourceViewerConfiguration of the current editor I could pass my custom SourceViewerConfiguration, but I'm not sure if this is possible.