Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » A problem with Eclipse Luna Mac version(Eclipse Luna, Hidden lines of code)
A problem with Eclipse Luna Mac version [message #1513344] Tue, 16 December 2014 12:52 Go to next message
Frank Frederick is currently offline Frank FrederickFriend
Messages: 4
Registered: December 2014
Junior Member
Hello Folks,

I am new to this forum and just recently started using Eclipse from Lynda.com and PluralSight.com tutorials. And I am a beginner-to-intermediate level learner of Java.

I was trying to follow a Swing tutorial from PluralSight (mastering java swing by John Purcell) and came across this weird behavior of Eclipse on my MacBookPro that hides several lines of codes automatically when I click on the error icon to the left of the code. I am attaching two snapshots, before and after, where initial few lines of code are not visible after clicking the error icon and applying a fix. There is no + or - icons to expand or collapse the code. The only way to restore the hidden lines is to close the project and re-open it.

Please note that I have verified that this is happening only with the Mac version of Eclipse Luna. The PC version does not behave in that way and clicking on the error icon simply applies the correct solution w/o hiding anything.

I am attaching the code here as well and I left the SwingUtilities statement hanging (unfinished) so that, I am hoping, someone could try to reproduce it and tell me what is the reason for this behavior. Note that I finished the code to its final working version and was able to run the code, but what bothers me is that some lines of code are hidden and I can't see them and that drives me crazy. I am assuming this is a bug with Mac version.

The code:
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

class App {
    public static void main(String[] args) {
        JFrame frame = new JFrame("Hello World!");
        SwingUtilities.

        frame.setSize(600,500);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
 }


Before:
index.php/fa/20240/0/

After:
index.php/fa/20241/0/
  • Attachment: Before.png
    (Size: 108.85KB, Downloaded 655 times)
  • Attachment: After.png
    (Size: 109.13KB, Downloaded 561 times)
Re: A problem with Eclipse Luna Mac version [message #1513974 is a reply to message #1513344] Wed, 17 December 2014 00:48 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 12/16/2014 09:03 AM, Frank Frederick wrote:
> Hello Folks,
>
> I am new to this forum and just recently started using Eclipse from Lynda.com and PluralSight.com tutorials. And I am a beginner-to-intermediate level learner of Java.
>
> I was trying to follow a Swing tutorial from PluralSight (mastering java swing by John Purcell) and came across this weird behavior of Eclipse on my MacBookPro that hides several lines of codes automatically when I click on the error icon to the left of the code. I am attaching two snapshots, before and after, where initial few lines of code are not visible after clicking the error icon and applying a fix. There is no + or - icons to expand or collapse the code. The only way to restore the hidden lines is to close the project and re-open it.
>
> Please note that I have verified that this is happening only with the Mac version of Eclipse Luna. The PC version does not behave in that way and clicking on the error icon simply applies the correct solution w/o hiding anything.
>
> I am attaching the code here as well and I left the SwingUtilities statement hanging (unfinished) so that, I am hoping, someone could try to reproduce it and tell me what is the reason for this behavior. Note that I finished the code to its final working version and was able to run the code, but what bothers me is that some lines of code are hidden and I can't see them and that drives me crazy. I am assuming this is a bug with Mac version.
>
> The code:
>
> import javax.swing.JFrame;
> import javax.swing.SwingUtilities;
>
> class App {
> public static void main(String[] args) {
> JFrame frame = new JFrame("Hello World!");
> SwingUtilities.
>
> frame.setSize(600,500);
> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> frame.setVisible(true);
> }
> }
>
> Before:
>
>
> After:
>
My guess is that you have some how toggled the Only show the selected
Java element option on the Java->Editor preference page. This limits
the display to the selected java element.

You can turn it off by opening Window->Preferences and go to
Java-Editor. It should be right above the Appearance color options:
Re: A problem with Eclipse Luna Mac version [message #1514051 is a reply to message #1513974] Wed, 17 December 2014 02:20 Go to previous message
Frank Frederick is currently offline Frank FrederickFriend
Messages: 4
Registered: December 2014
Junior Member
I can not thank you enough! A simple thing I know, but I was pulling my hair all day long.
Thanks!
Previous Topic:Cannot connect to VM for debugging, AVast Security the culprit
Next Topic:ASTVisitor's ImportDeclaration from Package or JAR?
Goto Forum:
  


Current Time: Mon Mar 04 09:38:12 GMT 2024

Powered by FUDForum. Page generated in 0.01812 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top