Shortcut in eclipse to do the opposite of tab? - java

Is there a shortcut or option in eclipse that will perform the opposite of tab. I can select a bunch of lines and if i do control tab, all of those lines will be tabbed over. Is there a control option that I can do to do the opposite of that? Is there a shortcut to get all of your code to line up? I looked on http://www.shortcutworld.com/en/win/Eclipse.html but didn't find anything. It's a hassle to go to each line and hit back a bunch of times....

Use Shift+Tab to move selected lines to the left.
You could also use Ctrl+Shift+F to format the whole file.

Related

Eclipse predict the direction of submenu in popup

How to know where eclipse will open the next sub menu inside popup.
For example in Java Class file, right click and the menu appears, mouse over an item which has sub menu.
Even when there is enough space most of the time it is illusive. Is there a rule of thumb for correctly predicting eclipse behavior
cheers :)
Not sure this is what you want but you might try customizing your Java perspective: Window->Perspective->Customize Perspective...
You'll have to look through the tabs (2 of which I included) to see what can be done.

Intellij 2016 Multiple tabs for Tool window

I am using IntelliJ 2016.3.3 and I want my Run and Messages window to be switchable like tabs. Right now I have them in split mode as shown below:
Can this be changed to tabs in tool window such that whichever tab I click that covers the whole area ? Split mode does not suit me.
Update:
When click on the upper right wheel , these are the options I get:
Okay , I found the solution. All, we had to do was to go to View -> Tool buttons and activate it. See the image below :
and now if you look at bottom and right , we will see tabs for all possible tool windows. Have a look at figure below:
Now, we can simply click and select the tab we want. :)
You can turnoff split mode in tab options:

In Eclipse, how do I set a keyboard shortcut for duplicating DOWNWARD?

When I go to keyboard shortcuts, I only have the option to duplicate in general, which apparently is set to upward. (Basically the line you select to duplicate will appear ABOVE what you're duplicating, rather than below, which feels more natural for me.)
So I was wondering if there was a way to make it so I could duplicate downward instead?
The name of the shortcut for copy the row downward seems to be "Copy Lines" (at least in Eclipse Juno). Just try to change that to whatever you like. Just search "Lines" and you should find it.
Another option, which I prefer, is to disable the Ctrl+Alt+ up arrow/Down arrow (which sometimes is used by Windows to flip the screen) system command. I'm very used to the default Eclipse short cut, so this is what I typically do.

What do those yellow horizontal arrows in eclipse, at the left of the line numbers do?

I'm talking about the lines that are in the same visual space as my break points. What do those do, and why are popping up and covering my break points?
I am in the Java perspective, i'm looking at the code (code editor view), the debugger is not running, my application is not running. My eclipse is Helios. and I've got RTC tools installed on it.
Thx, you guys are awesome.
EDIT: arrows are not triangles. I wasn't talking about the warnings :P
EDIT #2: a snapshot added:
The yellow arrows show up next to search results for me. If you go to the search tab and delete the results they should go away.
You can get rid of them by going to Preferences > General > Editors > Text Editors > Annotations, then look for "Search Results" and uncheck "Vertical Ruler".
This is what they look like.
Note that it's pointing at a blank line. I also did a search for some string and it did not affect the arrow. I have been trying to get "Extract Android String" to work from a keyboard shortcut (Mac OS) and may have found some other implicated command.
Edit: I see it now. Eclipse has more than one search command. This is not from command-F (find/replace). It is from control-H (search). There's a Search item on the menu bar as well.
not really sure what you are looking at...
for me, the little orange looking lines are on the right - and they represent compiler warnings. - you can hover your mouse over them for messages.
when you double click a word in the code, then more lines appear - where that word is also located in the file.
Those are warnings. If you click on them, useful suggestion will be shown to disappear them.

Removing trailing spaces in eclipse -- FROM THE COMMENTS

Preferences -> Java -> Editors -> Save Actions Check "Perform the selected actions on save", then check "Additional actions" and click the "Configure.." button. In the "Code organizing" tab, check "Remove trailing whitespace"
That will do the job for any normal code, however this does not look to have any effect on the comments. Is there any way to automatically get rid of trailing spaces from the commented lines?
Thanks,
p
This is something i've tried to remove trailing space:
Window->Preferences
Jave->Editor->Save Actions
Enable Perform the selected actions on save.
Enable Additional actions.
Click Configure.
In the Code Organizing tab,
enable Remove trailing whitespace for All lines.
Review all the other options there, since it will all happen
automatically whenever you save -- make sure there isn't anything
there you don't want.
Dismiss the Configure window.
Review the other options under Save Actions, since these will also happen automatically now.
Don't forget to click Apply in the Save Actions preference page. it should be fine.
I've contracted same trouble recently and it seems impossible to handle within IDE without any external tools. This is what worked for me:
sed -i 's/\s\+$//' MyClass.java
The normal way to format your code (and of course your comments/javadoc) is with a customized formatter. See Preferences/Java/Code Style/Formatter Button "Edit" => Tab "Comments", Option "Enable Javadoc formatting", etc.
and then to click "Format source code" as an automatically save action.

Categories

Resources