[Ultra-complete sorting] A summary of MyEclipse usage experiences in the J2EE integrated development environment, j2eemyeclipse
I. First, why do we need MyEclipse?
Here are some brief introductions:
We should all know the advantages of Eclipse, another close cousin of MyEclipse: free of charge, program code Formatting Function, Chinese Character pack, many powerful plug-ins can be added, support for a variety of operating systems (Windows, Linux, Solaris, Mac OSX) and so on.
MyEclipse Enterprise-level work platform (MyEclipse Enterprise Workbench, or MyEclipse for short) is an extension of Eclipse IDE, which can be used for development and release in databases and J2EE, and Application Server integration to greatly improve work efficiency. It is an integrated development environment with rich functions such as coding, debugging, testing, and publishing. It fully supports HTML, Struts, JSF, CSS, Javascript, SQL, Hibernate, spring and WebSphere.
In terms of structure, the features of MyEclipse can be divided into seven categories:
1. J2EE Model
2. WEB development tools
3. EJB development tools
4. Application Server Connector
5. J2EE project deployment service
6. Database Service
7. MyEclipse integration help
For each of the above functional categories, there are corresponding functional components in Eclipse, and they are implemented through a series of plug-ins. The modularization of the MyEclipse structure allows us to expand and upgrade any module without affecting other modules.
In short, MyEclipse is an advanced extension of Eclipse and a powerful J2EE integrated development environment that supports code writing, configuration, testing, and debugging.
Now that we know the software, what can it do for us?
2. What can MyEclipse do?
Here I will give a brief introduction (because different versions of MyEclipse are released one after another, each version has its own characteristics. Here I will only introduce the entire version 6.xgai am currently using ).
To sum up, this version supports the following features:
1. Platform and installation support
1) compatible with Eclipse 3.3/Europa 1.0
2) support for Java 5 & Java 6
3) running on Windows (XP, Vista), Linux, and Mac
2. Improved Java EE 5 and Spring functional components
1) improve the flexibility of the EJB3.0 project and generate beans directly from the database mode. You can use the sybase development tool PowerDesigner to generate corresponding object beans, which brings us a lot of convenience! (The only thing to note is that the entity bean it generates has poor support for the OR ing function. We need to make some modifications manually)
2) support for Java persistence structure development
3) upgrade Spring 2.0 to enhance the Configuration Management Function
4) Upgrading Hibernate makes it a great pleasure to develop enterprise-level applications! Right?
5) highly integrated Spring-JPA
3. Support for AJAX development and testing(This technology is a technology that everyone has been optimistic about in recent years. The software provides support for it and brings a lot of convenience to developers. You will know it when you use it !)
1) Support for Apple, USA-All AJAX features can run on Mac operating systems
2) improved the AJAX Web Browser
3) Improved AJAX tools
4) The JavaScript debugging has been enhanced. I have a deep understanding of this. If you fully use the debugging mechanism provided by this software, you will find that your development efficiency will be greatly improved.
4. Supports RAD Web development(I am not very familiar with this, because I have never used it, but I believe that the support provided by such powerful software will not be bad !)
5. The Matisse4MyEclipse visual Swing designer is available.(Same as above)
6. Fast Java EE deployment and Testing(I am deeply touched. If your computer has poor performance and the deployment speed is very fast, it is so obvious that it is superior to the traditional method, I believe that as long as you use it, you will not want to use the traditional method any more, but it is a bit unsatisfactory that as long as your code is modified, you will need to redeploy the software package you played, for example, when you deploy EJB3.0 on the jboss server, if some of your Bean classes change or modify, you have to re-deploy them, but they do not affect your efficiency !)
1) Automatic project deployment and start-up service: automatically configure the project and start the server according to the specified debugging and running mode; automatically stop the running server before configuration; you can reconfigure the existing application configuration.
2) MyEclipse Tomcat 6 server-local integration, which takes only one second to start
3) MyEclipse Derby server: Automatic JDBC connection; configurable startup options
The above is just some of the functions I used when developing some small projects. If you are interested, you can go to the MyEclipse Learning Center to find help and learning materials. including: 1) contains the Java EE Project source code. 2) one-click installation of MyEclipse Java EE sample project
Iii. How to Use MyEclipse to improve development efficiency
Have you been attracted by so many of its powerful functions! In fact, you only see general functions and some detailed functions! It can help you improve development efficiency (if you don't bother me, let me continue !)
1. Common MyEclipse shortcut keys (convenient and fast)
- Ctrl + M switch window size
- Ctrl + Q jump to the last Edit
- F2 when you place the cursor on a tag and press F2 when a Tooltip is displayed, the Tooltip also displays Show Tooltip Description.
- F3 jumps to the declaration or definition.
- F5 debug the function in one step.
- F6 single-step debugging does not enter the function. If Kingsoft 2006 is installed, you need to change the shortcut key of "word acquisition switch" to another one.
- F7 is returned to the call place by the function.
- F8 continues until the next breakpoint.
- Ctrl + Pg ~ For XML files, the code and graphical window are switched.
- Ctrl + Alt + I view the variable information in the Java File
- Ctrl + PgUp open the "Show List" drop-down box for the code window. The drop-down box displays files that have been opened recently.
- Ctrl + Shift +/Add a segment comment
- Ctrl + Shift +/cancel the comment
- Ctrl +/in the code window //~ Annotations.
- Ctrl + Shift +/in the code window, In the JSP file window is <! --~ -->.
- Alt + Shift + O (or click the Toggle Mark Occurrences button in the toolbar) When you click a tag, this yellow Mark can be highlighted elsewhere on this page, and the right border of the window will show a white square, click this square will jump to this mark.
- Right-click the left border of the window and select Show Line Numbers to add a row number.
- Ctrl + I Format the activated element Format Active Elements.
- Ctrl + Shift + F Format the file Format Document.
- Ctrl + S Save the current file.
- Ctrl + Shift + S save all unsaved files.
- Categories required for automatic import: Ctrl + Shift + M Ctrl + Shift + O. If Ctrl + Shift + O is used, you can also press new Remote Site and Name to enter svn, and enter http://subclipse.tigris.org/updatein the URL to get the finisheduntil
- Ctrl + Space indicates that the entered Content is Content Assist. In this case, you need to change the shortcut key of Chinese (Simplified) IME-Ime/Nonlme Toggle in the input method (used to switch between English and other texts) to another one.
- Ctrl + Shift + Space the prompt message is Context Information.
- Double-click the left border of the window to add a breakpoint.
- Ctrl + D Delete the current row.
- Ctrl + Shift + M (place the cursor on the class name of the package to be imported first) to add the Import Statement.
- Ctrl + Shift + O is used to add missing Import statements and delete unnecessary Import statements.
- Quick execution program: When Ctrl + F11 is executed for the first time, it will ask you about the execution mode. After setting it, it will be executed quickly by pressing this hot key.
2. solution to reduce memory usage
Those who have used eclipse should be able to achieve Eclipse itself quickly, but after myeclipse is added, it will occupy the memory, and the speed will be so slow. How can we drag Eclipse into myeclipse?
Solution:
Step 1:Cancel automatic validation-there are a bunch of validation items, such as xml, jsp, jsf, and js. We don't need to verify all of them automatically, but we only need to verify them manually when necessary, the speed is immediately improved to several levels!
Cancellation Method: windows --> perferences --> myeclipse --> validation
Except for all the check boxes under Manual, all others are not selected.
Manual verification method:
On the file to be verified, right-click --> myeclipse --> run validation
Step 2:Cancel Eclipse spelling check
1. spelling check will cause us a lot of trouble. Our method names will be abbreviations of words, and it will prompt errors, so it is best to remove them, so it is not very useful.
Windows> perferences> general> validation> editors> Text Editors> spelling
Step 3:Cancel the startup Item of myeclipse
Myeclipse has a lot of startup items, but many of them are not needed, or only one or two of them are used. You can cancel the unnecessary ones before windows-> perferences-> general-> startup and shutdown.
Step 4:Change the default open mode of jsp
After myeclipse is installed, edit the jsp page to open its editing page and preview the page, which is slow and not suitable for development. Therefore, windows-> perferences-> general-> editors-> file associations
Step 5:Change code prompt shortcut
The current Code prompts the shortcut key. The default value is ctrl + space, and we also switch the input method, so there will be conflicts. Who is myeclipse made by foreigners .. You do not need to switch the input method.
Windows> perferences> general> Keys
Change content assist to alt +/
At the same time, because alt +/has been occupied by word completion, you must modify the shortcut key value of word completion at the same time.
<! -- [If! SupportEmptyParas] -->
3. Sometimes, when you click the struts xml configuration file in myeclipse, an error is returned:
Error opening the editorUnable to open the editor, unknow the editor id .....
After closing this window, the correct xml file is displayed. This is changed as follows:
Windows-> perferences-> general-> editors-> file associations select *. xml, select myeclipse xml editor Point default, OK
4. alert ("Chinese") in js "); You can press ctrl + shift + f, but in this way, you will only know what alert is, and if there are English comments in js, it will still not be saved, right-click "properties" and choose "oth-er" GBK "in the text file encoding point (in this way, each js needs to be manually changed) windows --> preference --> genral --> content type, select text --> javascript, change the corresponding ISO8859-1 to GBK, and press update. So OK.
5. Solve the breakpoint debugging Problem
(This is uploaded from the Internet and is valuable.) if it is a version earlier than myeclipse 5, there may sometimes be such a problem: there is no green bar display during breakpoint debugging, when the breakpoint goes to another file, the view does not automatically jump to that page. This makes debugging very troublesome. You need to manually click it to view the variable value at the breakpoint location!
Solution:
On the left side of eclipse Window -- Preferences -- Tomcat -- Source Path, Apply and OK after the project to be tracked. Restart Tomcat. This is not found in myeclipse6. It seems that this problem has not been found in myeclipse6;
I encountered another problem today. I would like to add:
Modified a file, for example, adding a print: System. out. println ("black ");
During execution, I found that the class was not printed. I decompiled the class and found that this sentence was added. I restarted tomcat. This sentence is okay, but the modification still does not take effect, in the end, it is found that the disable caching check box is canceled in Window -- Preferences -- MyEclipse -- InterNet Tools -- cache, and it is easy to use again.
6. set breakpoints to find which line of the Code's hollow pointer is generated and debug it:
In the Debug view, select Breakpoints and enter NullPointerException in the next line with the Add Java Exception Breakpoint icon in the Choose an exception. If you do not need to use it, delete it.
Supplement Solve MyEclipse's memory consumption and let MyEclipse fly ~
I have collected some methods to solve the memory consumption of MyEclipse, which is very effective and shared by myself, hoping to make it easier for more friends.
1. always pop-up Quick update error and disable the Quick Update automatic update function of myeclipse.
The solution to this problem is to disable automatic updates.
Windows> Preferences> MyEclipse Enterprise Workbench> Community essen,
Remove the prefix of "Search for new features on startup.
2. Disable updating indexes
Window> Preferences> Myeclipse Enterprise Workbench> Maven4Myeclipse> Maven> disable Download repository index updates on startup.
3. Disable automatic validation of MyEclipse
There are a bunch of validation items, such as xml, jsp, jsf, and js. We don't have to perform automatic verification on all of them. We only need to perform manual verification when necessary, and the speed will immediately increase to several levels.
Windows> perferences> myeclipse> validation
Uncheck all Build
If you need to verify a file, we can verify it separately. The method is to right-click the file to be verified (right-click-> MyEclipse-> Run Validation.
4. Start optimization and disable unnecessary modules.
20% of a system's functions often meet 80% of the requirements, and MyEclipse is no exception. We only need 20% of the system functions in most cases, so we can disable loading and starting some unused modules.
Window> Preferences> General> Startup andy Shutdown lists the modules loaded during MyEclipse Startup. Here I only want it to load Tomcat 5 and check MyEclipse EASIE Tomcat 5.
How can we know which startup items are useful? I want to explain the usefulness of the startup items I know. I hope you can reply to them as follows:
- WTP: similar to myeclipse, the main difference is that WTP is free of charge. If myeclipse is used, this can be canceled.
- Mylyn: A team task management tool, similar to CVS, which manages the project progress in task units and can be canceled if it is useless.
- Derby, for example, I only select tomcat.
5. Remove the spelling check of MyEclipse (if you think it is useful, do not go)
Spelling check will cause us a lot of trouble. Our method names will all be abbreviations of words, and it will prompt errors, so it is best to remove them, window> perferences> General> Editors> Text Editors> Spelling> check the Enable spell checking check box.
6. Remove the complicated built-in plug-in automatic add-on of MyEclipse
Window> perferences> General> Startup and Shutdown> deselect the check box in Plug-ins activated on startup.
7. Modify the editing tool when MyEclipse edits the JSP page
Window> perferences> General> Editors> File Associations>
In File types, select *. jsp> set "MyEclipse JSP Editor" to default in Associated editors.
8. Modify the eclipse. ini file in the MyEclipse installation directory to increase the non-heap memory of JVM.
The details are as follows:
-Clean
-Showsplash
Com. genuitec. myeclipse. product. ide
-- Launcher. XXMaxPermSize
256 m
-Vmargs
-Xms128m
-Xmx512m
-Duser. language = en
-XX: PermSize = 128 M
-XX: MaxPermSize = 256 M
Increase the following-XX: MaxPermSize, such as-XX: MaxPermSize = 512 M, and then convert-XX: PermSize to-XX: MaxPermSize 1.
If it is useful, just like it ~
Thanks to Defonds
Download MyEclipse