Thread: Eclipse IDE

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Eclipse IDE 
    Registered Member
    Mrthunder23's Avatar
    Join Date
    Mar 2008
    Age
    26
    Posts
    2,463
    Thanks given
    62
    Thanks received
    72
    Rep Power
    319
    Will changing ever thing that needs to be static. (I changed everything that Eclipse said should be static) to static mess the server I am working on up?

    Will it increase stability if it doesn't mess it up?

    And if Eclipse says it is not read, or dead code, should I keep commenting it out, or just delete the fuck out of it?
    Reply With Quote  
     

  2. #2  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    It's your call wether you want to change it to static, give it a thought wether it's wise or not to. Static variables or methods consume less memory and I find them easy to use, which is why I use them often. I don't know if it's actualy faster.
    As for dead code, you need to know for yourself. Maybe it's code that's currently not in use, but might be useful later. In this case commenting it out might be a good idea, or leave it be if you don't bother commening.
    Reply With Quote  
     

  3. #3  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,881
    Thanks given
    1,854
    Thanks received
    4,741
    Rep Power
    5000
    Quote Originally Posted by TheChosenOne View Post
    It's your call wether you want to change it to static, give it a thought wether it's wise or not to. Static variables or methods consume less memory and I find them easy to use, which is why I use them often. I don't know if it's actualy faster.
    As for dead code, you need to know for yourself. Maybe it's code that's currently not in use, but might be useful later. In this case commenting it out might be a good idea, or leave it be if you don't bother commening.
    Only use static when it's required?



    Reply With Quote  
     

  4. #4  
    Registered Member
    Mrthunder23's Avatar
    Join Date
    Mar 2008
    Age
    26
    Posts
    2,463
    Thanks given
    62
    Thanks received
    72
    Rep Power
    319
    Well Eclipse is telling me I should make them static.

    I am afraid to remove code. To be honest.

    So If Eclipse said it's dead/unused, it's most likely okay to remove, or will it fux things up?
    Reply With Quote  
     

  5. #5  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    Removing dead code isn't going to harm your server, since it isn't being used.
    Bear in mind that there might come a time where you will need that particular piece of code.
    Think hard to decide wether it might come in handy or not.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Mrthunder23's Avatar
    Join Date
    Mar 2008
    Age
    26
    Posts
    2,463
    Thanks given
    62
    Thanks received
    72
    Rep Power
    319
    Okay. What about when it says "Unread Code" or the code isn't read, but yet it isn't dead. Should I remove that?
    Reply With Quote  
     

  7. #7  
    Registered Member
    Its paris's Avatar
    Join Date
    Apr 2009
    Posts
    1,141
    Thanks given
    56
    Thanks received
    234
    Rep Power
    689
    I'm not sure what eclipse means with that.
    Reply With Quote  
     

  8. #8  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    Dead code, or shall I say unused method's and variables type's are using system resources, sometimes you do have to be aware Eclipse IDE is not the greatest and can make mistakes.

    A static variable simply means once the variable has been initialized, it remains in memory until the end of the program and should only be used where they are needed.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Mrthunder23's Avatar
    Join Date
    Mar 2008
    Age
    26
    Posts
    2,463
    Thanks given
    62
    Thanks received
    72
    Rep Power
    319
    The static field ItemHandler.ItemList should be accessed in a static way
    ^If I am correct that means it is already static, but being done wrong, right? So I should probably let IDE fix that.
    Reply With Quote  
     

  10. #10  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,682
    Thanks given
    1,093
    Thanks received
    3,494
    Discord
    View profile
    Rep Power
    5000
    Yes, should be something like public static ItemList ItemList[] = new ItemList[10000];
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •