[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Changing a package name

Yesterday I wrote a generic linked list. The eclipse workspace is called "Linked List" and the package is called LinkedList.

Today I extended it to a doubly linked list and would like to rename everything.

* I figured out how to rename the eclipse package -- go to the package explorer, highlight "Linked List", click "File | Rename...", and rename it to "DoubleLinkedList".

* Go to the the class files in other projects that use the package and change "import fitch.LinkedList;" to "import fitch.DoubleLinkedList".

* Go to the package files and change "public class LinkedList" to "public class DoubleLinkedList".

But then there's a question of renaming the file "LinkedList.java" to "DoubleLinkedList.java". I'm wary of doing it from outside Eclipse because IDE's get cranky when you start messing with files from outside their interface.

The filename has to match the class name. How should I rename the file in the case?

Secondly, I have another project named Geometry. There's a red box with an "X" within the icon representing the project, indicating some kind of error. However, the program runs fine, and when I expand the project in the explorer, I can't find anything else that has the error icon.

Is there a way to find out what that error icon is trying to tell me?


Sorry for the stupid questions -- my IDE before this was vim. I feel like a fish out of water. Thanks!