Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Eclipse tips: Better Java navigation + more!  (Read 7921 times)
0 Members and 1 Guest are viewing this topic.
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Posted 2009-10-19 08:16:37 »

Everyone I have ever seen use Eclipse has package explorer open and they are constantly scrolling up and down, left and right, to open classes in different packages and projects. I hate package explorer. I don't think a tree is the right way to represent classes, there is too much scrolling up and down and the indentation causes left and right scrolling. Also, I don't want my IDE to try to replace my filesystem. There is a better way!

Years ago I found three views that can replace package explorer: projects, packages, and types. With these three views I can open any class in the same package in one click, and class in the same project in two clicks, and any class in any other project in three clicks. It is godly! Smiley Go ahead, try it out, it rocks!

In the projects view, I use the filter settings (click the little arrow) to filter out resource directories and JARs. This way the view only contains projects and source folders.

The three views don't need as much horizontal space. The package view can, but to fix that click the little arrow in the view and make sure it is set to "package presentation -> flat". Also, go to Window -> Preferences -> Java -> Appearance and set the "compression pattern" to "5.." without the quotes. You can change 5 higher or lower. This shortens all package names except the last one to 5 characters.

I usually keep a fourth view, members, in a tab in the same group as types, for the rare occasion I want to browse a class' methods (usually to get an overview of the public API).

Another tip for navigation is a plugin called Easy Explore. This lets you right click anywhere in Eclipse and open the operating system's filesystem browser at that resource location. This lets me use the filesystem as I wish and I don't have to try to do inside the IDE. The plugin is here:
http://osdn.dl.sourceforge.net/sourceforge/easystruts/org.easyexplore_1.0.1.zip
Just put it in the Eclipse/plugins directory and restart Eclipse.

I like to put my 3 views on the right. This way I can hit ctrl+m to see more code and the position of the code doesn't shift. For a while now I have been using a 24", 1920x1200 monitor rotated 90 degrees. The 1920 pixels high gives me 126 lines of code visible at once! The 1200 pixels across is enough for 130 columns and the 3 views stacked on top of each other. I usually have the debug and problems view under those. Across the bottom I have the console, with tabs for seldom used views.

If you are using a single, not so large monitor, you can drag the console view to the toolbar at the bottom left of the Eclipse window. Right click its icon and check orientation -> horizontal. Now your console will pop over your code when stuff is written to it. Hit escape or click away to make the console go back to the toolbar. This maximizes the code you can see on screen, and also gives you a larger console window when you need to look at the console. Be careful though, if you close the console view by clicking its X button you have to go to Window -> Show View to get it back.

Another tip, word completion. I highly recommend binding ctrl+shift+space to "Word Completion". When pressed, it looks backwards from your caret and inserts the first word it finds with the same prefix as what you have typed. Hit it again to get the next match, etc. When it hits the beginning of the file, it looks in the bottom of the file. Then it looks in every other file you have open. The reason it is so amazing is because it just does the insert, no popup. The first or second match is almost always the right match. People watching me program are amazed that the words just pop into view without me typing them!

To see all keyboard shortcuts, hit ctrl+shift+L in Eclipse.

Online princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2009-10-19 10:48:05 »

I've used the 4-panels view since I started with Eclipse. I can't fathom why people use the tree view it's a totally inappropriate way to navigate round a project, let alone multiple projects. Blame Eclipse maybe, because the default view it gives Java developers is the tree view. Some developers I know don't even know that the browsing view exists.

Nothing beats having two monitors though Smiley

Cas Smiley

Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #2 - Posted 2009-10-19 11:03:52 »

Sweet! It is good to know someone else out there is using the 4 views. i have shown people the light, then later I catch them still using package explorer. I don't get it.

I used to be big into multiple monitors. For the past 3 years though, I changed to thinking one big ass monitor is better than two smaller ones, especially if you rotate the big one to maximize vertical space. With two monitors I put my console and tools on one and use the other one for coding. This is nice, but not as good as a single monitor where you get a larger space for code if needed (ctrl+m in Eclipse). The single monitor approach is also better when doing tasks that don't need two monitors (web browsing).

Of course, the only thing better than THAT, is one big ass monitor and a second monitor. Wink I do wish Eclipse's floating views would snap together though.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #3 - Posted 2009-10-19 12:28:32 »

Of course, the only thing better than THAT, is one big ass monitor and a second monitor. Wink I do wish Eclipse's floating views would snap together though.

For the couple of hundred £ it takes, I do wonder why every programmer doesn't have two, three or even four 1920x1080 displays =]
They can be had for as little as ~£110 ea. atm

This arrangement of views sounds intriguing; will check it out next time I fire up Eclipse.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline Mike

JGO Ninja


Medals: 71
Projects: 1
Exp: 5 years


Java guru wanabee


« Reply #4 - Posted 2009-10-19 13:29:08 »

I changed from package explorer to this after reading this post and it will take some getting used to. I agree though that once I'm used to it it'll save me some mouse clicks and give me better overview Smiley

Thanks a lot!

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline pjt33
« Reply #5 - Posted 2009-10-19 14:01:27 »

For the couple of hundred £ it takes, I do wonder why every programmer doesn't have two, three or even four 1920x1080 displays =]
They can be had for as little as ~£110 ea. atm
Sure, but how much is a graphics card which has 4 outputs? I can't even find any on newegg (one which claims to have 4 DVI outputs, but the photo clearly shows that it only has 2).

I just quickly tested the Projects / Packages / Types views and I can't say I'm impressed. It's six clicks, not three, to open a type in another project (three clicks on view tabs). In addition, I prefer to keep the number of views open as low as possible. Package Explorer and Outline contains everything I need.
Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« Reply #6 - Posted 2009-10-19 14:26:51 »

Two dual DVI outputs?

I've got SIX outputs on my computer at home. Grin

Play Minecraft!
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 742
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #7 - Posted 2009-10-19 14:49:26 »

If you copy/paste a type in the Types-view, it will create an inner class in the class that you copied, with the same name. Compile error!

Further, if you work in a lot of packages at the same time, it's so much easier to have the Package Explorer view with multiple open packages. Otherwise you keep clicking in the Packages-view. In Vista the Package Explorer view scrolls horizontally automatically.

Best of both worlds, is to have both the Package Explorer and Projects+Packages+Types open, but that clutters the UI.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline Wildern

Junior Member





« Reply #8 - Posted 2009-10-19 21:20:12 »

So how does a dual DVI output work?  Is there a special splitter cable?

Two dual DVI outputs?

I've got SIX outputs on my computer at home. Grin
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #9 - Posted 2009-10-19 22:08:25 »

So how does a dual DVI output work?  Is there a special splitter cable?


Not sure what you're asking?

3 graphics cards, each with 2 outputs -> upto 6 monitors possible.

They don't have to be anything particularly special either; even an old pci gfx card will suffice.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pjt33
« Reply #10 - Posted 2009-10-20 00:24:33 »

Rob, if you assume that Markus' post was a reply to mine then Wildern's question makes sense.

Markus, I am as puzzled as Wildern.
Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« Reply #11 - Posted 2009-10-20 01:02:43 »

Yep, splitter cable for dual link dvi ports. Looks thisly: http://www.pacificgeek.com/productimages/xl/H9361.jpg

Also, at home, I've got some double ATi card with a total of four single link dvi outputs, and a separate NVidia card with two outputs. I normally only use two of the ATI ports, though, unless I disable some hardware acceleration.
I used to have three monitors (two in the ATi, one in the NVidia), but my main one broke so I'm down to two now.

Play Minecraft!
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #12 - Posted 2009-10-20 02:49:56 »

I just quickly tested the Projects / Packages / Types views and I can't say I'm impressed. It's six clicks, not three, to open a type in another project (three clicks on view tabs). In addition, I prefer to keep the number of views open as low as possible. Package Explorer and Outline contains everything I need.
You are putting all three views in one group as tabs? Stack the three views vertically so all three are visible at once, then it is three clicks. It shouldn't take up any more room than package explorer.

If you copy/paste a type in the Types-view, it will create an inner class in the class that you copied, with the same name. Compile error!
Yeah, this happens when you have a type selected. Either paste into the package view or select no type and paste into the type view.

Quote
Further, if you work in a lot of packages at the same time, it's so much easier to have the Package Explorer view with multiple open packages. Otherwise you keep clicking in the Packages-view.
Doesn't seem like a huge problem. Once I have the classes open, I am ctrl+tabbing between them, not using the views anymore.

Quote
Best of both worlds, is to have both the Package Explorer and Projects+Packages+Types open, but that clutters the UI.
I keep the package explorer as a quick view in the bottom left toolbar. I need it occasionally, like to find a jardesc file so I can right click it and have Eclipse generate a JAR.

Offline Spasi
« Reply #13 - Posted 2009-10-20 23:14:15 »

Yep, splitter cable for dual link dvi ports. Looks thisly: http://www.pacificgeek.com/productimages/xl/H9361.jpg

Also, at home, I've got some double ATi card with a total of four single link dvi outputs, and a separate NVidia card with two outputs. I normally only use two of the ATI ports, though, unless I disable some hardware acceleration.
I used to have three monitors (two in the ATi, one in the NVidia), but my main one broke so I'm down to two now.
Do these cards have DMS-59 outputs? The splitter doesn't work on normal dual-link DVI-D outputs right?

I wonder why ATI didn't put those on the 5870s, I just got mine and found out that I need either a DisplayPort monitor or a 100$ DP-DVI active adapter to go triple-head...
Offline OverKill

Junior Member




Java games rock!


« Reply #14 - Posted 2009-10-21 09:06:46 »

@Quad monitor setup:
Besides the extra GFX card there are also splitters available (f.i. from Matrox) but they are more expensive then just adding in another card.

IIRC isn't ATI comming out with a quad-head card?
Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« Reply #15 - Posted 2009-10-21 10:19:34 »

@Quad monitor setup:
Besides the extra GFX card there are also splitters available (f.i. from Matrox) but they are more expensive then just adding in another card.

IIRC isn't ATI comming out with a quad-head card?

I've got an ATi quad head at home..

Play Minecraft!
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (37 views)
2014-07-18 06:55:21

Zero Volt (35 views)
2014-07-17 23:47:54

danieldean (28 views)
2014-07-17 23:41:23

MustardPeter (31 views)
2014-07-16 23:30:00

Cero (46 views)
2014-07-16 00:42:17

Riven (47 views)
2014-07-14 18:02:53

OpenGLShaders (36 views)
2014-07-14 16:23:47

Riven (36 views)
2014-07-14 11:51:35

quew8 (32 views)
2014-07-13 13:57:52

SHC (69 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!