Eclipse IDE Usage Tips (Eclipse workspace tips) (some of your own learning notes and tips, documentation, memos and review use)

Source: Internet
Author: User
Tags documentation



Many people think that eclipse is not a development tool, what good to say ah, in fact, this idea is wrong, the Eclipse IDE integrated development environment has a lot of mystery, there are a lot of tricks and settings, many 4-5 of years of Java programmers are not often applied to even do not know, So I think it's necessary to share some of my eclipse's experience and skills with you. We learn from each other, only to constantly learn and learn new knowledge to constantly improve themselves!



There is an old saying in China called, If you want to be good at work, you must first sharpen itAfter we have mastered some of the settings and tricks in eclipse, we can greatly improve our development efficiency and have a lot of benefits in writing our code. If we compare our Java programmer to a warrior or a swordsman, the programming skills of a Java programmer are like a warrior's marksmanship, like a swordsman's sword, and the Eclipse development tools used by Java programmers are like guns in the hands of warriors, swords in swordsman hands, so let's think, Eclipse is like a weapon, programmers in addition to the need for high programming skills, but also need a powerful weapon, so in the walk in the battlefield to be able to do well, today I would like to say some of their eclipse experience and use of skills bar, we learn together, progress together, said the bad place , you are welcome to correct me! Next, let's talk about how to make the Eclipse weapon powerful!



One: Eclipse's work space tips



1. When we use eclipse, we often make settings for our eclipse, such as setting the font size and color, setting shortcut keys, setting the background color of the code editing area, setting the display line number, etc. The settings of Eclipse can be set according to the habits of the individual or the habits of the team, now that we have developed on the computer in the company, some of the eclipse settings on the company's computer have been set up, but I am now copying the project home. I am in my home computer eclipse, that is not also the Eclipse font size and color, shortcut keys, code editing area background color, line number and so on again set again, in fact, if the settings are relatively small, and then set again there is no so-called, but if the settings are more, It is more offensive to set again, but also delay time, this will also reduce our efficiency.



To say that, Eclipse is set up based on the workspace, that is, our Eclipse font size color, line number, shortcut keys, background color and so on these settings are based on the workspace, if I have a workspace to do these settings, then we change a workspace, these settings are not , so we just have to move the company's workspace settings to eclipse in our home computer. Then give you a detailed explanation, there is a picture of the truth! I'll take the 2 different workspaces on my own computer to give an example!



Such as:



This project is my new test project, the project name is test, the project is placed under the G-Disk Testworkspace workspace, I made a set of Eclipse, the line number is displayed, and the line number is set to red, the background color is set to green beans, Font settings are a bit larger, matching curly braces are set to red, the background color of the selected row of the mouse is set to light gray, which is some of the eclipse's settings. This time, we need to copy the project home, put on their own home computer, that our own home computer eclipse certainly does not have these settings, how to do it, it is in their home computer eclipse do again set it, certainly not, too troublesome, do not worry, take a slow look at the following






I just said, these eclipse settings are based on the workspace, we do not have these settings in the Eclipse workspace of our home computer, so we can copy the settings of Eclipse workspace on the company's computer.



1. Find the workspace directory for the Eclipse project on your company's computer, with a. Metadata folder in the workspace,. plugins\org.eclipse.core.runtime\ under the. Metadata folder. Settings folder, In the. Settings folder is the Eclipse settings information, we just copy the company's. Settings folder home, and then the home Eclipse workspace of the. Settings folder is not OK! (The. Settings folder in the. Metadata/.plugins/org.eclipse.core.runtime is copied out, which is all the configuration files, A netizen is to replace the. plugings folder, but the. plugings folder is too big to replace. Settings folder,. Settings only hundreds of k)









You see, the new workspace, line number, background color, matching flower slogan color, and so on, these settings are the default, We replace the company's. Settings folder with the. Settings folder of the home workspace, which is tantamount to migrating the company's Eclispe settings to their own home eclispe.






After the replacement is complete, we'll see if the settings in Eclispe have changed?



Still unchanged, line number color, background color, matching curly brace color has not changed, do not worry, we restart eclipse again look!









After the restart can see the effect, Eclispe inside the settings become and the company's ECLISPE inside the same set of haha! If you find that the settings have not become a word, then close your home eclispe and then put the. Settings folder over the. Settings folder of your home Eclispe workspace again, then open Eclispe again, so the estimate setting changes!









In addition to the above-mentioned way to save Eclipse settings information, there are actually other ways



Mode two: (This way is also relatively good, recommended use)



Directly save an empty workspace that has been configured but has not built any projects
Configuration is saved in the workspace, a configured but not built any project to save the empty workspace (such as compressed into a compressed file), do not create a new workspace, unzip the compressed file, change a new name, When you start eclipse, point to the new workspace.



Such as:






As soon as the compressed file, decompression, and then change the name, it becomes a new name of the workspace folder, when you start eclipse point to the new workspace on the line.












Way Three: ( this way is not recommended to use, because many settings are not effective after import, many settings do not know when the export is lost or when the import lost, do not know is not eclipse bug! anyway I test the effect is not after the import effect! It is best not to use this method )



For example, export can derive settings for Eclipse












The export is a file with the EPF suffix, which contains the configuration information for Eclipse. Copy the EPF suffix file from the company home, then import the EPF file at home to



Finally, we import the file into eclipse in the home computer, such as












After importing, it is tantamount to importing the company's ECLISPE settings into the home's Eclispe.






OK, let's start with some tips on how to get the ECLISPE started! Eclispe at the start of the time we will choose a workspace, some people will check the option below, meaning that the next time you start Eclispe, no longer the interface, no longer allow you to choose the workspace (it is already the default last selected workspace), But a start eclispe directly into the Eclispe of the main interface, if you want to let Eclispe also display the selection of workspace at the start of the interface, in fact, just to modify a Eclispe file can be






Find your Eclispe's installation directory and modify a Eclispe org.eclipse.ui.ide.prefs file.









So, you see, modify the Eclispe's Org.eclipse.ui.ide.prefs file Show_workspace_selection_dialog this one to the right of the equal sign to true on it, The next time you start Eclispe, there will be an interface for you to choose the workspace, if you do not want to see a workspace in the current workspace, to modify the Eclispe org.eclipse.ui.ide.prefs file Recent_ Workspaces this one, delete the workspace you don't want to see, and use \ n between workspaces, as shown!






In the next, we have opened the ECLISPE, we want to switch workspace how to do, as long as the switch workspace can be






Finally, I summarize, we eclispe is based on the work space to manage, our projects are placed in the work space, many people like to build a workspace, will be all their own projects to this workspace lost, whether it is the company's project Ah, or write their own demo case Project, Or what other projects, all thrown into a workspace inside, in fact, this is a very bad habit, we all want to under, if a lot of work space projects, is not very easy to confuse, messy, bad management, make themselves can not see down, there is a problem, There are too many projects in a working space, so when we start the ECLISPE, it will be very slow, right, after all, it is not slow to load so many projects in the workspace. This time we will be reasonable to set up a workspace, such as my company's project I put in a work space under, I wrote some of the demo case project into another workspace, etc., so that after categorization, is not suddenly appear structure is very clear, steady, and orderly , we don't start loading very slowly because there are too many items in one workspace when we start Eclispe.



Ok,eclispe work space is introduced here, welcome you to add a message!






Eclipse IDE Usage Tips (Eclipse workspace tips) (some of your own learning notes and tips, documentation, memos and review use)


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.