How can i change eclipse code completion settings? - java

Sorry about unclear title, i'm new in Java and Eclipse. Here is my problem I have been using Visual Studio for a long time, and in Visual studio, assume i have a variable named sampleText, when i type "samp" or something like that intellisense shows up and when i press TAB it write sampleText, but to do the same thing in ecplise i have to press Enter, and it's not so cool,i want to change this option, i mean when i press TAB i want it to write selected value. How can i do that ?

It's not possible to change that behavior. I believe it is standard behavior in SWT to select items in lists with ENTER.
As a side note.
You can select Visual Studio key bindings in
Window -> Preferences -> General -> Keys
Change Scheme to Microsoft Visual Studio.
It won't help you with your current problem but it might help you transition to Eclipse.

Related

In Eclipse the text goes beyond page

I have a problem in Java Eclipse in that when I type a long sentence it goes beyond the border of my PC screen, so that I have to scroll to the right to be able to read a long sentence. I would like the text to stay within the screen, or within specific parameters, so that I don't have to scroll. Is there a way to do this?
I tried Googling a solution but can't find a way to get text to stay within screen limits :(
I found a button on the Toolbar.
In Eclipse ide 2019-03:
Toggle Word Wrap: Alt+Shift+Y
Depending on which version of Eclipse you use, there may be a way to enable Word Wrap.
In the question How do you enable word-wrap by default in Eclipse? Emmanuel Guiton explains that there is a setting which can be added manually to a preference file. Mickael states that Eclipse Neon uses the aforementioned shortcut.
Edit: Changed "Eclipse Oxygen ide 2019-03" to "Eclipse ide 2019-03"

SceneBuilder submenus unusable

Not sure if this is the correct place to ask. If there's a better SE site for that please let me know.
Ever since I've started using SceneBuilder it's sub-menus are completely unusable, as they disappear as soon as I move the cursor to select an option.
For example - say I want to change the font size for a label. I click on the "Font" property, which opens the family, size and style properties. Now I click on the size, which opens a drop-down list of sizes, but as soon as I move the cursor to a value the drop-down list disappears! It's as if SceneBuilder thinks I've given up on selecting a value, so it should hide the drop-down again.
The exact same thing happens, for example, when trying to change properties of effects, and anywhere there is a drop-down not in the main window.
I am using the latest (8.0.0) SceneBuilder from Gluon, although the exact same thing happened on Oracle's 2.0 (which is older and not maintained, as far as I could tell). I'm on Linux Debian 64bit, Java version 1.8.0_u40.
Any hint as to why this is happening, and how to solve it?
Normally SceneBuilder does not show such a behavior. I can only imagine that this behavior is triggered by some Linux Java bug. My suggestion would be to switch to Windows or Mac (probably not an option for you :-)) or at least use a more recent version of Java in the hope that this bug has been fixed in the meantime.

Enhance C++ Eclipse with Java

I use Eclipse Mars for C/C++ on Ubuntu. Now I must use Java. I reading on how to install Java on Eclipse, this answer as well as this one. It is obvious that I have to click on Help, but I can't find it in Eclipse, thus I am asking for help! :)
Or maybe is there a way to activate Help via terminal or something?
The menu can be customized as part of the perspective
To get it to show, the two options are
Reset the entire perspective. Help should be visible by default in every one but resetting will reset every customization done to the perspective.
this can be done either through Preferences, General > Perspectives via the Revert button
or via the menu for the current perspective: Window > Perspective > Reset Perspective...
Adjust the perspective
Window > Perspective > Customize Perspective...
In the new window that appears in the Menu Visibility tab is the Help entry which is probably invisible.

How to drag a button and autogenerate onclick method in Eclipse? How to find variable/method references in Eclipse?

I'm a c# / visual Studio developer. I'm porting some of my WP7 apps to Android and I have gotten pretty used to Eclipse. I've read some "differences" documents but still have a couple burnning questions . . .
in VS I drag a button to the surface and assign a method name for onclick and it generates the method outline for me in my source file. I can't see how to do this in Eclipse - can I?
in Vs if I put my cursor over a variable or method name I get a dropdown that has a "Go to" option and a "find all references" option. these are really handy. Can I do that in Eclipse?
You're developing Android projects in Eclipse, so I will base my answers on that. I also guess you installed the Android Developer Pack plugin.
In the ADT plugin for Java, you can open a layout.xml and see its "Graphical Layout". You can drag UI components there, but it won't generate you code for handling events.
For the second question, in Eclipse you have to right-click on the variable or method and go to the "References" menu. Or you can learn the keyboard shortcuts and it becomes easier.
Typing onclick and then pressing Ctrl+Space should open up a list of default functions you can override. Double-clicking or pressing Enter on one will bring it up in the editor (I usually type "on" before pressing Ctrl+Space, whenever I'm not sure about everything that can be done in a class.)
Right-clicking a variable will open up a context sensitive menu where you may view the variable's declaration (F3) or type hierarchy (F4); lower down the list is the References menu where you can view all the references to that variable in the workspace (Ctrl+Shift+G) or beyond.
You can also rename most variables by right clicking and choosing Refactor > Rename..., something I started using pretty early.

Eclipse shortcut for switching current working set

I have several working sets in my eclipse which i often switch from one to another, is there any shortcuts for this so i don't have to click the "view menu" button and click the working set in it every time when i want to switch?
Thanks.
You can set up in preferences/Window working sets.
See this reference for your answer.
Source

Categories