Eclipse behavior in Netbeans - java

I love Netbeans but there is one thing I really like about Eclipse that I can't do in Netbeans:
If I have started a function that takes a string i.e. someFunction("Some string here")
Both netbeans and eclipse will autocomplete the ending doublequote and parens.
In Eclipse, if I hit enter at the end of my string, the cursor will move outside these.
In Netbeans, it will do a newline.
Anyone know how to make Netbeans behave like Eclipse in this manner?

It's an entirely differently application that uses very different APIs for their editors. Short of writing a custom plugin, I don't think you can.

This is a usablity issue. I think NetBeans has not support this yet.

Related

Eclipse: Disable auto completion but keep showing suggestions

After a long period of creating apps with Android Studio I returned to Eclipse to program a pure Java application. Of course, I have noticed large differences in terms of auto completion between IntelliJ IDEA and Eclipse but IntelliJ is no alternative for me because of various reasons.
That is why I started to change the settings in Eclipse, inter alia, for the content assist. I want to have suggestions for variable names too, without having to write a dot first. As you can see in this image, I have changed the auto activation triggers to ._#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ as suggested in another thread on Stack Overflow.
The problem is, if I write short variable names like d it completes them automatically to something different (in this case DEFAULT_CURSOR) when I press the dot key. To avoid this, I have to choose the variable first, before pressing the dot key.
However, having to do it this way is a large waste of time. Is there a possibility to use the suggested variables or methods only when I have pressed the enter key, just like in IntelliJ?
Maybe there is an option to bind the dot key to the closing of the content assist?
No, Eclipse and IntelliJ are different and IntelliJ's level of auto completion is unique to itself. If you are comfortable with it, you should use it and then copy and paste to eclipse for windowbuilder. Also FYI there is a free alternative to windowbuilder for IntelliJ, you can read about it here: WindowBuilder equivalent for IntelliJ?

In IntelliJ is there an easier way to set up the "Complete Current Statement" like eclipse?

I have used Eclipse for Java for the last few years and am trying out Intellij. I'm not using it permanently because it isn't as useful for quick programming (like how you can't just drag in files into the src folder) but for doing certain things, I think it will be faster for me.
I know there is Ctrl+Shift+Enter, but this is just annoying to press. Not because it is awkward to press, but because it takes so much time compared to just pressing enter like you can in Eclipse. I tried to rebind it to enter, but then it just doesn't work.
Is there a way to set up the Complete Current Statement so that it happens when I press enter?
Like, is there a way that I can bind it to Enter, but have it checked before the editor checks for enter as move to next line?
If you want only basic Code completion and not Type completion, use Ctrl+Space
IntelliJ and Android Studio are pretty highly customisable. You can rebind shortcuts too, I believe. Have you looked here? https://www.jetbrains.com/idea/help/configuring-keyboard-shortcuts.html
Also cheatsheet might be of use: https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard.pdf
And Android specific bindings: https://developer.android.com/sdk/installing/studio-tips.html

eclipse auto complete before finishing the full name of a method

I am using eclipse for Java ee. One thing I noticed is in the computer in my office, eclipse auto complete is working even though I didn't finish writing the full name of the method.
For example: as soon as I write
getSer
It suggests me the
getServletContex
However at home the suggestion only appear when I am done with the method name and enter "."
At the office I am using Helios and at home Juno.
Anyone knows how to make the other eclipse to auto complete before I finish the name of the method?
Go to Preferences>java>Editor>Content Assist and configure your settings.
The IDE only suggests these auto-complete sometimes. Use CTRL+space to call it yourself.

How to transfer Netbeans Project into Eclipse?

I have been using Netbeans for my java desktop application since few months. Now in the middle of the project, I want to switch over to Eclipse as the Netbeans once corrupted my GUI and I had to re-create several parts of the GUI and now it is displaying a compiler error as
code too large
private void initComponents() {
1 error
"code too large" is a strange error. My code which it is saying too large is just 10,000 lines long. I came to know first time that we couldn't develop long code in Netbeans :)
So instead of going into detail, I want to switch to Eclipse. I have never used it before. So could please tell me how to import my incompleted Netbeans project into eclipse.
I dont' know if there exists a plugin for that, but if you've used default Netbeans settings it's likely the GUI layout code and form files won't be compatible.
What I suggest you do is first refactor your existing code to eliminate Netbeans-specific features, as well as making it smaller, and working.
For GUI-stuff, you should create several classes and beans so that your main GUI file is much-much smaller. 10000 lines of GUI code is pretty much unmanageable.
I suppose your main concern is migrate the GUI builder stuff, not only your code. The latter would be no problem but I guess that the first one is difficult if not impossible. And furthermore, as far as I know there is no standard GUI builder application in eclipse.
This should be resolved by spitting things up like others have said.
I just got a similar error and NetBeans was struggling with the code so I just tried to compile it on the command line with javac and it yelled at me with this same error. So this is not an IDE issue but a Java compiler issue.
If you get this error you probably auto-generated most of your code.
the easiest thing to do would be to create a new project in eclipse and import the codebase from filesystem into the project. Eclipse has an option to import from filesystem.

Can IntelliJ IDEA open more than one editor window for files from the same project?

I can split editor panes horizontally or vertically, but it does not seem possible to view code in two separate physical windows. I am aware that Idea can open multiple projects in separate windows, but I'd like to be able to do this for two files in a single project.
One answer suggested unpinning the tab, but I haven't been able to make that work (I'm on Mac OSX if that matters.)
This seems like a basic feature in today's world of multi-headed workstations. Before moving to an IDE I used to do this regularly with good old Emacs. Is there some trick I am not aware of to make this happen?
This is now possible in IDEA X. Hopefully you're still an IDEA user and can take advantage of this :)
Unfortunately there is no way (as of IDEA 8.0.1) to do what you're asking for. As you pointed out, you can split the editor pane but there is always exactly one editor per IDEA project.
UPDATE: As of IDEA 10 (currently the latest is 10.5), the answer is yes, you can :-)
I work around the limitation by opening one source file in vi, on a second head monitor.
Then work main file within Idea (actually Pycharm).
Update: even with the feature built into pycharm, I still use vi. Works better.
As per #9000's comment, an editor tab can be turned into a new window by dragging the tab outside of IDEA.
Yes- with IDEA X, it is finally possible to open multiple editor windows.

Categories

Resources