Introduction to Eclipse for Visual Studio users

Source: Internet
Author: User
Tags file system

All integrated development environments (IDES) are very similar because they are all built for the same purpose, but they are also different. Some of these differences can be attributed to different application domains, but the remaining differences are due to IDE design.

Obviously, Microsoft Visual Studio is different from Eclipse: The Java™ programming language is different from c/c++/.net, and Java was once the first language supported by Eclipse. The difference is also because Eclipse is designed to be an IDE that "can implement any functionality rather than implement specific functionality (everything and nothing in particular)", introducing more general features and customizable functionality. Eclipse can also be used in more operating systems. However, our goal is not to enumerate all the differences between Eclipse and Visual Studio.

Instead of discussing the IDE design in detail, this article explains the major differences between these Ides. This article applies to all developers who have used Visual Studio for some time and want to start using Eclipse. This article does not teach you how to do Java programming in Eclipse, or to focus on Java-specific functionality, but to discuss the overall difference.

Eclipse Workspace

Workspace Directory

The Eclipse workspace is a directory in the file system that contains the. Metadata Special subdirectory. The. Metadata directory contains all the private information for the workspace, such as settings, caching, and so on. Typically, you do not have to modify any of the files in the. Metadata directory. The workspace directory is also the default location for new projects in Eclipse.

In general, the Eclipse workspace functions the same as a Visual Studio solution: Top-level projects, folders, and files in the organization hierarchy. However, there are some major differences. The Visual Studio solution lists only the projects it contains, its dependencies, configuration, versioning information, and so on.

The functionality implemented by the Eclipse workspace does not just include these. It manages most of the non project information, such as global preferences, window layouts, and search and browsing history. When Eclipse starts, you must start a workspace at the same time, and you cannot close the workspace in the way that you close the Visual Studio solution. Although you can switch workspaces in Eclipse, many users use a workspace that contains all their projects.

Project structure

The origins of the ECLIPSE project structure

The strict correspondence between the project structure and its file system layout may be influenced by the forced correspondence between the Java package and its layout in the file system. In the Java language, class P1.p2.p3.Class1 must reside in the directory P1/P2/P3.

The Visual Studio language (c/c++/c#, or even J #) does not require such a directory structure. Therefore, the correspondence between the project structure in Visual Studio and the file system layout is less stringent.

The difference between the Eclipse project and the Visual Studio project is in the interaction method with the underlying file system. In Visual Studio, the project is not closely associated with its layout in the file system: You can add a file from C:\temp\ to a D:\work project, and Visual Studio will record the reference location of the new file and open it like any other file. Folders (such as "header Files") do not correspond to file system folders (internally, such folders are called filters).

In Eclipse, the structure of project elements must correspond to their layout in the underlying file system. For example, if the Eclipse project HelloWorld (see Figure 1) is located in C:\eclipse\workspace\HelloWorld, then the README. TXT is located in C:\eclipse\workspace\HelloWorld\src\README. Txt.

Figure 1. A simple HelloWorld project

Eclipse also needs to sync with the files in the project directory. If you delete a file or folder in Eclipse, the deleted file or folder will also disappear from the file system. However, when you add or delete the same file by using Windows® Explorer, the related resources in eclipse will be out of sync, which may interfere with some of Eclipse's operations. In this case, you should select Refresh in the project's right-click menu to refresh the project manually. You can tell eclipse to sync with the file system automatically by selecting the Refresh automatically option in the Eclipse preferences.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.