I was doing debugging with having a lots of expressions in Expressions Window. Then I mistakenly dragged Values column of Expressions window in eclipse and suddenly I was not able see any of Name and Value columns along with any of my expressions in expression window.
This is how it looks:
Also, I am not finding Display View window in eclipse:
I tried to reset the perspective and also restart the eclipse. However, nothing changed. What is happening with me?
I am running
Eclipse IDE for Enterprise Java Developers.
Version: 2018-12 (4.10.0)
Build id: 20181214-0600
In the view menu (the triangle top right) of the Expressions view you can choose which columns to show: Layout > Select Columns...
By selecting other columns here, the column width is reset (in case a column width was accidentally set to 0). By default, the Name and the Value columns are shown.
In Eclipse Photon (4.8) the Display view has been renamed to Debug Shell.
Related
i find very useful the intellij shortcut 'Add selection for next occurence'.It basically adds to the current selection the next occurence of the same selected text,allowing so to modify a lot of same occurences at once and at your choosing(and not just all the occurences).
Now i've switched to eclipse to develop in php(and more),and i would like this shotcut back, but i cannot find it.I found the one that gets all the occurences(the name is 'Add all matches to multi selection'),but not the one who just gets the next one.
Can someone help?
In Eclipse, the command to add the next occurrence to multi-selection is called Multi selection down relative to anchor selection.
By default, there is no shortcut for this command, so you have to add a key binding yourself in the preferences General > Keys (hit Ctrl+Shift+L twice), e.g. Alt+K (which would be similar to Find Next Ctrl+K).
See also:
Eclipse 4.24 - New and Noteworthy - Action commands for multiple carets/selections
My Eclipse 2022-06 Java IDE Improvements video at 8:46
How do you set memory breakpoints in Eclipse? That is, I would like to set a conditional breakpoint that triggers when the data at a given memory location changes.
This question has been asked before, but the only provided answer doesn't address the question and is essentially the same information that can be found in the Eclipse Online help.
What I am looking for is more detailed information (or an example would be good) for setting a conditional breakpoint in Eclipse that will trigger when the data at a specific memory address changes.
You need to use a watchpoint. From the page:
Highlight the variable in the editor, or select it in the Outline
view.
Click Run > Toggle Watchpoint.
Do any of the following:
To stop execution when the watch expression is read, select the Read check box.
To stop execution when the watch expression is written to, select the Write check box.
The watchpoint appears in the Breakpoints view list.
Solution that works:
1/ Select the variable representing the pointer you want to break on in a given context in the "Variables" tab
2/ Right click, then select "Add Watchpoint (C/C++)
3/ In the field "Expression to watch", just replace the name of the variable by the memory address to break on.
Using a Watchpoint in Eclipse Oxygen:
In the Expressions view (Window > Show View > Expressions), add an Expression such as: *(uint8_t*)0x231cc528. The cast tells Eclipse the memory location size.
Right-click the added expression and select "Add Watchpoint".
The resulting Watchpoint may be edited and controlled in the "Breakpoints" view.
It may be important to edit the Watchpoint. If you want to e.g. detect changes done by other threads: right-click the Watchpoint in the "Breakpoints" view, select Breakpoint Properties... > Filter, UN-check "Restrict to Selected Processes and Threads"
This is not an Eclipse-programming question, but rather a question about the Eclipse user-interface in general.
I am writing a verilog source-code in an Eclipse text-editor using the simplifIDE plug-in. I want to align my code so that variable names always start at offset 33 (32 spaces from the left margin)
Does Eclipse have an option for displaying the current cursor position in a status bar? I'd even be happy with a keyboard shortcut that would pop the current cursor-position up in an dialog.
In the absence of a solution, I'll set my tabs to 4-spaces, and put the following text at random places in my file:
//..5...9...13..17..21..25..29..33..37..41..45..49..53..57..61..65..69..73..77..81..
Some editors (such as the built in Java editor) display the current insertion point location in the status bar. However, if you use a third-party editor sch as SimplifIDE, you may have to check its own configuration for that option.
If you write your own editor, you could ask the editor to give you the selection provider, as the selection provider can also provide the current insertion point location.
Using Eclipse 3.5 with the SimplifIDE plugin, I am seeing the correct information for the line and column on a status bar on the bottom of the screen with a {line : column} format using either tabs or spaces.
thedeserthorizon, Are you using 3.5 and the version 1.0.26 of Simplifide.
There is a new API in 3.5 which allows you to listen to cursor movements (see this bug). Then, you can ask for the index of the first character in the current line and subtract that from the absolute cursor position. This gives you the offset in characters.
This is not accurate though; if your editor supports real tabs, then you must query the editor for the current line and count characters yourself (where the tab counts as 2..8 character positions).
I have a specific project where I need to wrap every code line at 65 characters. I have set up the eclipse Java code formatter properly for this. But what I really want is a vertical line to be drawn in the editor showing where the max line width while I am typing, not just when I run the formmater. I know this feature is available in some capacity because it is displayed in the code formatter property page.
I don't see any option in eclipse to turn this on and I didn't see any plug-ins that do it on Eclipse Plugin Central
Look in Windows / Preferences (at least on Windows - IIRC it moves around for different operating systems) then:
General -> Editors -> Text Editors -> Show Print Margin
Tick this and it should show the line.
As a quick way of finding this, use the search filter in the top and filter on "margin".
Notes from the comments - unverified by me, but I have no reason to doubt them:
It has changed somehow in 2016: For details see [here] (https://bugs.eclipse.org/bugs/show_bug.cgi?id=495490#c2) You have to set it in the formatter: From menu [Window]-->[Preferences], select [Java]-->[Code Style]-->[Formatter], and then edit your formatter profile. In the tab page [Line wrapping], you can find a setting named "Maximum line width". Change this setting, and the print margin in Java source editor will be changed too.
In Eclipse Luna (4.4):
Choose menu Window\Preference . Look at top-left corner, in search box type filter text, type: margin.
In section Apperance color option, Choose Print margin. Choose Show print margin. In text box Print margin column , type 65 as what you want.
#Jon Skeet's answer is incomplete.
(1/2) First, do what he said:
Window --> Preferences --> General --> Editors --> Text Editors --> check the box for Show Print Margin
Ticking this box will show the vertical line.
As a quick way of finding this, use the search filter in the top and filter on "margin".
However, this only shows the line, but under most situations the "Print margin column" value there is flat-out ignored.
To set the column number for where the line should be, do what #John Percival Hackworth mentions here:
(2/2) Go to:
Window --> Preferences --> C/C++ [or whatever language you are using] --> Code Style --> Formatter --> click Edit --> under the Line Wrapping tab set the value you desire for Maximum line width.
Side note:
Use Alt + Shift + Y to toggle soft line wrapping on and off. It will soft wrap (ie: no carriage return) at the end of the screen, however, not at the column you set above.
How do you enforce hard line wrapping at the column you set above (ie: that adds a carriage return)? I don't know yet. If you figure it out let me know. In Sublime Text 3 (a much better editor but with a much worse indexer/function definition finder :() it's Alt + Q.
Update: I think it may be possible with the "CppStyle" plugin, which uses clang-format, by using Ctrl + Shift + F to apply the auto-format, but I don't know the exact instructions to make it work yet.
Related:
Set tab width: Changing editor tab width in eclipse 3.5
After some months with Espressif, but also with other brands plugged-in Eclipse, I found how to enlarge maximum line width. I made a lot of attempts and show how to do for Espressif-IDE:
Right click a project->properties->C/C++ General->Formatter
->Enable Project specific settings->
New->Give your profile a name and base it on a built-in formatter: I choose BSD/Allman->Edit this new profile->within Line Wrapping tab type for example 200 for Maximum line width->Apply changes.
Format source files: you'll have long lines.
Before I did the same manouvres starting from:
Window->Preferences->C/C++->code Style->Formatter... : that never worked.
In textmate on OS X there is a handy feature when you select text.
If you hold the option key down the cursor turns into cross-hairs and you can select a vertical column of text and paste it back as a vertical column with the lines rows preserved.
Does Flex Builder or Eclipse have the same feature? Not sure what to call it.
If so, what is the key combo?
In Eclipse it is called Block Selection Mode and available in the newest version 3.5 (Galileo). The key combination to toggle it is Alt-Shift-A.
In Emacs this is called a rectangle and the commands working on these are called *-rectangle, e.g. kill-rectangle.
Just same Alt-Left MB and drag a selection box
It should be possible from version 3.5 and above using ALT+SHIFT+A. See here.