Eclipse Lianqibu lecture series
Abstract: Eclipse Lianqibu lecture series
(Preface)
Eclipse of the new NEE, we are very interested in, in order to help beginners Eclipse opened the mysterious veil, but also to sum up its own application development experience, so intend to write it down for everyone to share, of course, I am also in constant groping ,
For Buduizhichu paper, we also hope correction.
(Text)
Eclipse project is IBM in 2001 donated a development platform, the project was valued at 40 million
USD. This NEE so valuable, that naturally there are过人之处. Then transferred directly into the subject, native to Eclip
Se it.
[Eclipse Download]
Download the Eclipse official website:
Http://www.eclipse.org/downloads/
This site there are a lot of mirror, you can network and choose their own most convenient download mirror
If you Jiaotong University campus, Oh, it here to
Eclipse Lianqibu lecture series (2)
===========================================
(Preface)
This eclipse today focused on the analysis of the internal structure for the development of plug-ins to the comrades, these are basic knowledge,
Can make good to see. As I write this, but also is of the play, what to think of what to write. Eclipse and on how to use, how to use eclipse to develop a java projects or other items such as articles, I think I would After wrote in the article, but I would like to be in the development of the eclipse on the web development project, c project or other, you will be able to install their own plug-ins can be developed, so these basic knowledge of these people to still very necessary that
.
(Text)
Last time we Jushui to eclipse the download, install, activate. Eclipse in which a directory structure, you will find that there are two directory, a call plugins, a call features, and you will find that on these two accounts directory the entire eclip
Se item 9 x% of the space, less if the two directory, Oh, eclipse simply basket case. Kept it here in the end is what some, let us have a look.
[What is a plug-in]
We make an analogy, you buy a new house, bought from the Housing is rough, and then a little decoration to you, the shop floor
, On the wallpaper, of course, now we all have to use household electrical appliances, electricity line yesterday, so we will have a good cloth wiring, installed power outlets. This time, you can put this house Xiangxiangcheng eclipse this platform. After, we should perhaps purchase household appliances, such as television, audio, etc., etc. We bought home, and then the power supply to a socket inserted, then we take the children, Louzhao wife, watching television, listening to music, the leading comfortably happy little life ~ ~ ~
Similarly, the eclipse of the plug-in is the same principle, as long as the plug-in put / p
Lugins directory, the eclipse will start automatically after in this directory to all the plug-ins, telecommunication, power, then these plug-ins will automatically up and running, beautiful eclipse interface also will be dealt with in your face.
The Next, let us look at the eclipse from the plug-in component of this platform, in the end is what kind of structure
[Eclipse platform architecture]
———————————————
| Eclipse Platform | ——–
| | — \ | |
| ———————– ———— | == | |______| JDT _ |
| | Workbench | | | | == | | | |
| | | | | | — / ——–
| | | | | |
| | —————| | Help | |
| | | Jface | | | |
| |———– | | | |
| | SWT | | | | |
| | | | __________ |
| ———————– |
| __________ | ——–
| —————— | | | — \ | |
| | Workspace | | | | == | |______| _ PDE |
| | | | Team | | == | | | |
| —————— | | | — / ——–
| | | |
| __________ |
———————————————
Eclipse Platform is a house, workbench, jface, swt, workspace, help, team,
Jdt, pde are based on this platform plugin.
Below I explain the basis of the basic functions of plug-ins:
*: Workbench used to control workstations, including responsibility for the control menu on the table, view, rendering the control and operation, etc.
*: SWT is a similar AWT, the SWING java components, is a lightweight components, but also and awt, swing is different, it is not based on the underlying jre achieve, but under different operating systems, the corresponding dynamic link The realization of the effect to make it very professional, SWT workbench for the main draw ui
*: Jface SWT is based on a plug-in, a package of SWT, Packaging achieved dialog, such as Dongdong view
*: Workspace is used to control the work area, (as distinct from the table), including the work of the regional project control, delete, add, the compiler project resources, and so on are in control
*: Help eclipse is a help system, eclipse the menu -> Help-> Help Content, we can open the help system, the system is not closed, can be extended (after the eclipse will be introduced to help plug)
*: Cvs team is a system that can coordinate and use CVS server, version control
*: Jdt is Java Development Tools, development java plugin
*: Pde the plug-in development environment, the development of plug-in platform
[Plug-in the basic structure]
Each plug-in is used to wrap a directory, but there is also a directory of stress, such as plug-in name is
Edu.sjtu.bbs.eclipse, version 1.0.0, that the directory name is edu.sjtu.bbs.eclipse_1.0.0.
And casually open a plugin directory, we find that there is a document called a plugin.xml, this document is of great importance for the plugin, it defines the plugin equivalent to the operating parameters, and without this, plugin can boot
Like your home refrigerator is used if we do not know 110 V or 220 V, you do not Ganluan inserted to the outlet, there should be a note of this note is plugin.xml. Regard to the specific structure of some documents, I think in the future on the preparation of the plug-in, I will be described in detail.
[What is the feature]
Feature of the functional components, it did not actually run the library, which is used to manage plugins eclipse a way. Such as a lamp you Decoration, the need to switch control, such as a hall light switch control, the bedroom There is also a light switch control, they were used to control the bright lights and eliminate.
Similarly, the functional components is used to control the start-up or plug-ins. Eclipse the update perspective can set the various functional components enabled or disabled status, which is why you can disable function components, plug-in to prohibit the start. Such a One of the advantages, such as plug-ins you with a lot of the eclipse, but the more loaded, loading the more will start slowing down, you do not believe, you can play wsad will know what I had to say instead of a fake.
Therefore, we are able to function as a plug-in component or set of plug-switch, used to control plug-in the state. If pl
Ugins directory has a plug-in has not been any one functional components of the envelope, I called the "Wild plug-ins" is eclipse
Start, it will start on the equivalent of no switch, the same power supply has been connected.
Of course, there are many other components of the usefulness, it will be described in detail.
Eclipse Lianqibu lecture series (3)
===========================================
(Preface)
Based on a stresses, you probably already know about the composition of the Eclipse, as well as the general operation of the mechanism. This article will begin to take you use eclipse.
(Text)
[Eclipse workbench Guide]
This part of the post, in fact write a lot, and the best way is illustrated further demonstration of the best. Me here only to the overall number, and give some guidance on the use. Personal feeling, if you have never
Not touched eclipse, after commencement, to help look at the best, it would better.
Specific steps that is the launching eclipse after the election, the help menu-> help contents, this will pop up a new window, a window with the help of the eclipse, this is a window on the left side navigation
Of choice Workbench User Guide, the inside is divided into Getting Started, Concepts, and Refer Tasks
Ence. Getting Started can be looked at the inside Basic Tutorial. This
Tutorial can in the shortest possible time, so that you are familiar with the eclipse table.
In fact, the eclipse platform ui has several components: menus, toolbars, views, perspective, Editor
Menus and toolbars Needless to say, the Earth will know that, the view is the view, such as Navigator, Outline,
Tasks, etc. are view, each has its own view of the corresponding functions, you can see
Workbench user guide to understand these views. Editor, is the editor, for example, has developed java editor
Prepared text editor, and so on, finally, there is one called perspective, English is perspective,
Dongdong this is different view, the menu, toolbar, editor of permutations and combinations. Such as the development of java you, you often use package explorer, tasks, outline view and the preparation of java, such as the editor,
Java, as well as for the development of the menu (Source and Refactor), then it will layout java development of a suitable perspective, and so on.
Below I explain commonly used menu items:
+ File
— New: new documents, projects, or others are from here
— Import: this is also very useful, for example, the eclipse projects developed by others, do you copy to your machine, you can import this project into the work area
— Export: This function is derived, for example, you develop a project to export a final runtime, jar packets like this can be used, so you do not have their own manual to make those class
Packaged paper
+ Window
— New Window: If you feel that a window in the Taji things developed, they can re-open one of the two equal out workbench, in fact the operation of resource is the same.
— Open Perspective: eclipse many as resource perspective, java, java
Browsing, cvs, debug, and so on, you can light of the current development needs, you have to choose the perspective of development
— Open View: the limited perspective, it is impossible to view all of the help you have a good beginning, so if you find that you use a particular view but it did not open, use this option
— Customize Perspective: after all, everyone has their own habits, do you feel that this perspective with theä¸çˆ½can own custom
— Reset Perspective: customized mess to you, alas, no way, reduced to the old-fashioned way,
To use this
— Preference: This is a very important option, is nothing to get even changed, and it preserved a lot of things allocation, such as fonts, Shortcuts settings, many aspects of this should be used
, The details of this thing, will be introduced later.
+ Help
— Welcome: eclipse has done a lot of plug-ins welcome page, the page for many beginners and useful, otherwise many cases, new things is not the start.
— Help Content: the front said, the system used to help launch
— Update: The specific on the future
— About Platform: From here you can understand what you installed features and plugins
[Use eclipse to develop simple java procedure]
Well, with us step by step to learn about the, it is easy to
1. New menu -> project, and then in the new project dialog election java -> java project, according to n
Ext button
2. Importation project name, by next button, and of course if you do not want the project built in the root directory of the default, can also Quxiaodiao use default, and then set their own directory
3. After the finish, use the default configuration
4. If you do not have the following in the java perspective, it will prompt you Skip to the java perspective, the choice is
5. Ok completed a project on the
6. After, you can start writing the new class java procedure
7. Such as your new one class, as
Public class A (
Public static void main (String args []) (
System.out.println ( "Hello World");
)
)
8. Edit well preserved, and then Skip to the menu -> run -> run as -> java application
9. Console view, you can see out on the Hello World
Very easy to, of course, you will be encountered in the development of many of the problems, it is inevitable that these problems can only be accumulated in the course of practice can be resolved, not radical, with the use of more play, often encounter problems version of Q
Asked.
If you find that there are problems, find solutions for problems the first place, should eclipse the help of the system, Java Development User Guide, almost most issues, above all the answer. Therefore,
It is time to read more.
However, many people say that with the eclipse, abandoned on the other java ide, and that it must be cool place, I used to tell us about the development of java eclipse, which places Shuang
[Java Development Tool (JDT) characteristics]
In fact, there are many characteristics, I just in my experience, tell us about jdt prominent features.
1. Automatically modified code function this function to a large extent, the development of peacetime some of the trivial code to automate the work of the
Open the menu
+ Source
— Comment: This is more useful, for example, you write java code, a section that you have to comment out the code, a code that it selected, and then the election, he would automatically to the code in front of them. Fast
- "Ctrl + /"
— Uncomment: Anti-Notes, the methods of operation and almost Comment, Shortcuts is "Ctrl + \"
— Format: This is the operation I have been recommended, very convenient, for example, you write a paragraph format Henlan code, messy, then you choose this, you will find that ~ ~ wow, how can I code
Mody suddenly more beautiful, do not believe that you can try, Shortcuts "Ctrl + Shift + F", so I have a habit now, while writing the code, c + + f s what, huh, it is convenient .
— Sort Member: this is not very common, but if you feel that the code is too long, not always function can also try. Him you will help you write a function of variables reordering
— Organize Import: This is a function notä¸çˆ½features, such as a project for you,
Found a lot of import are not used, or that you quoted a class, but you do not import,
Results compiler is not passed, then no relationship with this one, all the problems solved. At least I have used this, never wrote on the import of such a statement. Shortcuts "Ctrl + Shift + O (the letter O, not few
Word 0), "I often take this and c + s + f used in conjunction with, Oh, people have changed a lot of lazy
— Override / Implement Method: For example, you write this category, to achieve a certain interface, but you do not achieve that interface function, then use this, it will automatically search and father of the interface
, You can choose to cover or to achieve what function
— Generate Getter and Setter: If you add a class variable, it is necessary to write it getter and se
Tter, not less trouble to use this are automatically
— Generate Delegating Method: If a field agent function to generate, use this to,
Elected to the ok
— Add Javadoc Comment: a certain point you want to increase the javadoc type or function or variable, and then the election, it will automatically help you increase javadoc good in the first, including those you use or return param
— Surround with try / catch block: For example, you have a section of code to deal with some exception,
You can also forget to try / catch to write, Do not, check that part of the code, and then the election, you will find that it will
Automatic needle test this code, you should be dished out what exception, and automatically generate code for all
— Externalize string: this is done by the internationalization of the time, the simple, it is the string
Packets in the resource bundle, i18n This is a solution, I think I will be detailed after -
Shao things in this regard.
2. Reconstruction functions:
Reconstruction of the past two years is very hot, then let us look at the inside of Reconstruction jdt how strong in the end. Oh, this is my eclipse the most attractive place.
Open the menu
+ Refactor
— Rename: If you write a category, you find this type of a variable name from the less pleasant to the ear
Do you thinkä¸çˆ½, so you wanted to change the name, how to do it, so that the variable name changed
? Oh, not that simple, because if you have this in certain variables, applied to the function, then compiled to fault, and you do not know where you cited, write so much code, the brain is dizzy, then not dead
Dishes? Biejinzhang with rename this can help you to solve all problems, it not only can help you to change the names of variables, and it will automatically search all the variables applied to the place, and then those places
With the change, not Shuang Shuang A, you save a lot of labor is not.
— Move: Similarly, a move to achieve a static function or variable to the other category,
Using this mobile, and ensure that no mistakes
— Modify Method Signature: You can design function of all of a sudden on stereotypes, such as the one you started with a parameter of this function, but that is wrong, to use two, then you must use this to change,
It will also search for all samples has been used this function, and the application of these places to remove, or to compile errors
— Extract Interface: it can help you to an abstract category as an interface, standardizing your code
— Extract Method: If you wrote a very long function, but the function of some of the duplication of code, you can to separate, select those code, and then the election, the system will ask
You out of the definition of the function, then it will generate this function, the realization of the original function out there, and there in the original function to write an application of this new function, to ensure that the procedures invariance.
— Extract Local Variable: If you find that your function, some of the expressions are passed by, and you can pass this on to become a variable expression of this, and for this variable
For the reference to the local expression
— Extract Constant: extraction constants, such as a string = "eclipse", do you feel that many places to use, then out of ECLIPSE become a constant, so simple
— Convert local variable to field: This look at the name on that little said
— Encapsulate field: This and generate getter and setter somewhat similar, but different is that
If you have a public constants var, and has been used elsewhere to, and then you use Generation
Getter and setter certainly, as quoted local not change overnight, and this, then not only will generate getter,
Setter, but also to remove all the places cited, for example, the var = …; into place
Setvar (…), to change places … … var = = getvar ();, Oh, the vigorous …
3. Sensitive help:
Jb like this ide also activated form as "alt + /" If you think thisä¸çˆ½, preference-election
> Workbench-> keys-> edit-> modify keys and content assist, this sensitive help is also available in a strong place is:
If you wanted to write for a statement, huh marines for, and then alt + / election for a generation, for a complete statement on out, Oh, eclipse more use of the lazy people will change this function is jdt Template function, you can also increase their use of templates, in the specific preference->
Java -> editor -> templates plus
4. Quick Fix functions:
For example, we have to produce a class A, as follows:
Public class A (
Public static void main (String args []) (
System.out.prin ( "Hello World");
)
)
Compiler is not passed by the print methods have been wrong, labeled as a prin
All you will find that there is a line to the left of Red poor poor, indicating there is a mistake, you Bashubiaochidao that poor-poor, it will be a reminder out to tell you what a mistake
This party, you also found that poor left in the red has a poor light bulb, you point that the light bulb, it will pop-up box asking you chang
E to print or change to println choose change to print, it automatically help
Good to you, huh, and even Gaicu are so convenient, too cool. Certainly, if there is no light bulb, then you can manually changed, after all, not so smart on these things, can help you automatically solve all problems
Ftp://ftp.sjtu.edu.cn/mirror/sites/download.eclipse.org/
This directory is also a mirror of the Eclipse Web site, but why not published in the Eclipse.org website, I do not know you from the website can be found on the Eclipse download package on the site, you will find that there are many versions of Eclipse, 1. x, 2.x, 3.x, then what in the end the version?
[Eclipse version (as well as WSAD version)]
IBM has a welcome by all the products, called Webshpere Studio Application Developer (WSAD),
By the time WSAD4.0 release is version 1.0 of the Eclipse, the Eclipse was donated by IBM, after the two have developed. X version, but also applied to subsequent WSAD products, now WSAD5.0 using the Eclipse 2.0, WSAD
5.1 using the Eclipse 2.1.1.
Now Eclipse.org Release Release of the latest version of the Eclipse 2.1.3, I believe we normally use Ec
Lipse do development, the more appropriate use 2.1.3.
At the same time, if you would like to Changchangxian If so, try Eclipse version 3.0 now has not Release 3.0,
Eclipse 3.0 development process is divided into 10 points to the Milestone, has been developed to the first eight Milestone,
Is the Eclipse 3.0M8. We can try. Official version 3.0 is expected to be released in June this year, I believe that when the time comes shortly after release, WSAD6.0 will be issued. Oh, look forward ah @ @
In addition to the Eclipse development, there is a marked versions, respectively have been N, I, R beginning, such as
N20040101 such, we feel wonder, what do I mean by this in the end. Actually, N is Nightly
Build, I was Integration Build R is Release Build, in particular for large-scale software, sometimes compiling a project to spend a lot of time and a lot of time on the task of compiling the night, so there will be a
Nightly Build this, and Nightly version after integration testing, we generated Integration version.
Integration version After rigorous testing, the final version of Release issued. Degree of stability so: R>
I> N.
I believe we understand this version, can be when they want the latest version.
When such a good, we can be installed
[Eclipse installation] (R2.1.3 version example)
When the NEE down is a compressed, then you have to do is to extract the compressed packages are a directory, in order to facilitate, we called for this directory.
Let us start to look at this directory:
|
— / Plugins storage plug-in directory (later on)
— / Features of the directory storage components (later on)
— / Plugins links and other features of the storage directory link address (later on)
— / Readme
Eclipse started procedures - eclipse.exe
— …
[Enable Eclipse]
But if you have not installed machines jre it, the eclipse could not be activated or if not, when a jre to java.sun.com, installed jre If you start only after a few jre At the same time, it will automatically search registered eclipse Table and find versions of the use of high-jre.
Note: If you wish to use designated eclipse the jre would like to use it, they can set up the start-up eclipse.exe parameters:
Eclipse.exe-vm
Then you can start eclipse, slowly, or very slow, you can Incidentally Hekoucha enjoy the eclipse appreciate the splash screen, huh good start after the eclipse of the development platform on the front of your display.
In this started, eclipse automatically create a workspace, you can see a directory of the workspace directory, a directory is also available. Metadata directory, the directory of the start of your work area of all configuration .
Of course, if you do not want the workspace directory of the work area into other directory, no problem, set to eclipse the start-up parameters:
Eclipse.exe-data
After, if you do at the same time to develop several projects, and then does not want to put a work area, the Society launched a variety of areas are necessary
(Preface)
Based on an all speakers, and the good practice, I believe that you will become more and more like to use eclipse to develop java procedures. Today that this should be ForEclipse version of the Friends of the request, wrote an article on the eclipse using cvs article
. Yesterday and water paste of that, everyone talks about the use of feelings, I also feel the benefit of non-submersible. Huh, to sum up the
.
(Text)
[CVS Profile]
CVS is the acronym for Concurrent Versions System, based on the Unix operating system mature SCCS (Source
Code Control System) and RCS (Revision Control System) development is an open-source
Code, the current version control system is the mainstream of software. A very common use of the CVS occasions, the open source project. Due to the development of open-source projects of the distribution, version management requirements more stringent,
At present most of the open source projects are used in almost CVS to manage source code, CVS standards and powerful is evident.
CVS using client / server system, as well as various versions of the code stored in the central server, each individual developers when first developed from the server on their own access to a copy, on the basis of this development, in order to avoid
Direct impact on the server's data. Developers can keep their new code to the server, and access code by updating the latest state to maintain with other developers agreement.
CVS is transparent to the network, developers can use the client software (almost all platforms have corresponding client software) at any time and any place through the network to get the latest code.
The Eclipse developers, Eclipse built-in CVS support themselves, do not use other client software, as long as the establishment of a CVS server, you can use this powerful version control systems.
[CVS installation and configuration]
Here only on the windows cvs achieve CVSNT, CVSNT installation has been difficult, I briefly talk about.
Of course, first of all to say about what can be downloaded to cvsnt, in http://www.cvsnt.org/, the latest version
CVSNT 2.0.41 (Wednesday 21st April 2004)
CVSNT the windows version nt, 2000, xp, can be installed in 2003.
When down after the first thing that setup, installed,
From the Start menu programs in the allocation process initiated CVSNT service control panel. Server at this time should be seen also is not running (CVSNT run as a system service), if the operation has been, to put it to stop. Election
Optional second tab Repositories, here we assume that the databases are stored in E: \ work \ cvsrepo, click Ad
D, and then click the ellipsis button to select E: \ work \ cvsrepo as a database path. Prompted it
Your database is not initialized and asked do you have initialized election is then we have chosen to service status tab, activate server.
As cvs account is the default and windows domain linked to the user, available through the windows in the control panel add a user, for example, we add a user, username = userid,
Password = passwd and we will be back to use.
[Cvs the use of the Eclipse]
In the eclipse using cvs before, we must first connect to the cvs server, open cvs repository perspective, and this perspective, there is a cvs repository view, in this view, right-click New menu-election>
Repository location. Talks at a dialog box add cvs repository. Then fill in the information this dialog:
Host: localhost (if you cvs server installed in their machines)
Repository path: e: / work / cvsrepo
User: userid
Passwd: passwd
Connection type: pserver
All normal operation, the eclipse will be able to connect to the cvs. Then we must begin on how specific use.
1. Share project & disconnect
The first project would like to join the cvs control, it is necessary to share project for all project information under the accession cvs under control. Mode of operation is: you have to share the selected project, and then right-click
Pop-up menus, the election team-> share project
It should be noted here, however, not all documents are cvs should be included, such as the editor temporary files generated by the compiler generated. Class document, or some process compiler generated binary files etc. It is therefore
, Eclipse does not automatically to all documents stored in the database, need to develop a manual to designate those files to the database, that is by adding version control add to version control. Designated for a single document
, Or at any time in the Resource Perspective Java Perspective on the use of the documents in the right-Select Team,
Add to Version Control if necessary storage designated the entire project or multiple files at the same time,
To use the Sync (Synchronize) view.
If a cvs has been under the control of the project, you want to disconnect with the cvs, is also very simple, that the project selected, and then right-click on the pop-up menu, then select team-> disconnect
2. Check out
If you want cvs, to the local, to participate in team development, first in cvs repository cvs view, browse the contents and find the project you are looking for, then right-click, select check out as project,
Kind eclipse will automatically check out from the cvs down on this project, the development team can start
3. Steps recommended the cvs
The development of the ideal flow is this:
Workbench # 1 ———————————————– —-
/ \ / \
/ \ / \
Update / \ commit update / \ commit
/ \ / \
Branch ————————————————- –
\ /
\ /
Update \ / commit
\ /
Workbench # 2 ———————————————– —-
*: The latest from the beginning. Before work, it is necessary to ensure that all resources and the latest state of the same branch. For the new project from the beginning, we must first connects to the server, configure those resources document storage. In the database server
The project has been recorded, the first by updating to ensure that the latest state resources. Not work if the local need of special preservation and can be used directly in the database to the latest version of Check Out As Project, or Replace
With, Latest from Repository.
*: For the local workforce, save your changes.
*: Synchronization. When to do the work of the preparations, and the database server simultaneously.
**: First of all should be updated (Update) to check all the Incoming change, the local input to see whether they would affect their work, it will cause conflict and undermine the integrity and so on.
**: End updated inspection, may confirm their own work and the latest Branch is the same, can be submitted (Commit) to amend its own, marked on the appropriate note.
Recommended steps must be more strictly enforced, otherwise your own risk!
4. Use other tips
Commit: Upon the completion of the document or project changes, the need to recognize changes to the latest state to the database to store,
On the need to implement the (commit) operation. Similar, we can Resource Perspective
Java Perspective or the use of documents in right-Select Team, Commit, or in the Synchronize view at the same time multiple files, and even the entire project. Attention, each submission will be prompted for the Notes, which is
Very important, as each and every state of instructions and prompts.
Merge: When we need to file or project, or to compare different versions of the replacement, can Resource
Perspective or Java Perspective on the use of the documents in the right-Select Team, Compare
With or Team, Replace With completed. Comparison will open a relatively editor, well that the differences between the different versions, and Local History similar.
Explorer: If CVS to understand the content of the database, can use the CVS Repository Exploring
Perspective and we can click on the upper left corner of the Eclipse open view button to add this view to the left
Browse the view box. Mentioned earlier, the representative of CVS HEAD database content of the mainstream. Start Versions, we can see that the previous version. Addition, a database in the lower right corner of the historical records indicate each revision of relevant information
.
[Other resources]
*: Eclipse Help Workbench User Guide in the GettingStarted -> Team Tutorial and
Task -> Working in team environment
*: Http://www.cvshome.org/ CVS official website, from here to download the latest version of the CVS (Unix / Linux
Platform Edition), as well as relevant documents and information,
*: A Chinese http://laser.zhengmai.com.cn/cvstutorials.html the CVS simple tutorial.
*: Http://www.cvsnt.org/ CVSNT, in the Windows NT server CVS
*: Http://www.cvsnt.org/mailman/listinfo/cvsnt CVSNT on the use of the mailing list.
*: Http://devguy.com/cvsnt another CVSNT installation help and frequently asked questions.
*: Http://www.cvsgui.org/ Windows platform graphical CVS client.
Eclipse Lianqibu lecture series (5)
===========================================
(Preface)
Ever since the birth of eclipse, the term plug-in is getting so hot up, and although the jdt own eclipse, pde
, And other plug-in, but they certainly do not meet our basic needs, they do not fully reflect the eclipse of the powerful
. That this started to introduce some of the third-party plugin some knowledge.
(Text)
[Plug-in installation]
Perhaps a lot of people said that the installation of the plug-in is not simple to extract the copy on the restart not ok? Oh, of course, this is an option. Far more than this one but oh.
Method 1: extract + + copy start
Remember talk about the second, the eclipse will be activated automatically search plugins directory all the plugin, then featu
Res under the control of start-up or disable them. Therefore, the simplest approach is the one you downloaded third-party plugin
Unzipping after this copy of these two features and plugins directory on the all ok.
For example: We eclipse_example example of this plug-in (version eclipse each have a corresponding examp
Le plug-in, you need to download eclipse, we will be able to find this plug-in download)
Downloaded, extract to a temp directory,
/
Plugins /
Org.eclipse.ui.examples.readmetool_2.1.0 /
Org.eclipse.swt.examples_2.1.0 /
Org.eclipse.help.examples.ex1_2.1.0 /
Org.eclipse.swt.examples.paint_2.1.0 /
Org.eclipse.sdk.examples_2.1.1 /
Org.eclipse.ui.examples.multipageeditor_2.1.0 /
Org.eclipse.compare.examples_2.1.0 /
Org.eclipse.jdt.ui.examples.projects_2.1.0 /
Org.eclipse.ui.examples.propertysheet_2.1.0 /
Org.eclipse.ui.examples.javaeditor_2.1.0 /
Org.eclipse.team.examples.filesystem_2.1.0 /
Org.eclipse.swt.examples.controls_2.1.0 /
Org.eclipse.swt.examples.layouts_2.1.0 /
Org.eclipse.swt.examples.launcher_2.1.0 /
Org.eclipse.swt.examples.ole.win32_2.1.0 /
Org.eclipse.sdk.examples.win32_2.1.1 /
Features /
Org.eclipse.sdk.examples.win32_2.1.1 /
Org.eclipse.sdk.examples_2.1.1 /
This example there are 16 plugins, and two features, and then we copies of these plugins and features
Inside the relative eclipse of the directory should be ok on the go
If you start with the old eclipse is the work area, which started after the eclipse will find that the work area and the old configuration compared to the two additional feature, it will pop up all the tips you frame this feature activated, the elections are, and then election resuming work area, so that the entry into force of feature, then the whole installation process on the ok
Method 2: links form (recommended method)
This means better management, because you installed a plug-in 1,2 Fortunately, if installed by many many, it may difficult, and you will find / plugins and / features that how the two directory countless plugins and features,
You want to cut a plug-in, you do not know what good the cut. That of any other way to install plugin? There.
Or as an example to eclipse example, but we would like to extract the directory done to adjust the structure of such a
/
Eclipse / software update ->
Update manager, it will switch to install / update perspective, the perspective is devoted to install and update plug-ins and design.
Eclipse in the concept of a site, that is, plug-in production of the latter, to be issued after a package on the site,
This enables users to connect to the platform eclipse through this site, updated automatically.
For example, we have to ajdt example of this plugin (http://www.eclipse.org/ajdt, we have to install the online plug-in,
In the features update view, right-click on the new election-> site bookmark,
In the new site bookmark dialog box, fill ajdt name, URL fill
Http://download.eclipse.org/technology/ajdt/update
We will determine, you will find that in the view of many features update the ajdt called a node, the node start:
+ Ajdt
+ AspectJ
— Eclipse AspectJ Development Tools 1.1.4 lomboz, giving us the option to do something lomboz settings.
This preference-> lomboz this page, installed JDK Tool.jar, (premise that you need to be a jdk, it is best
1.4)
Then select preference-> lomboz-> server definitions, this page is used to configure all servers in that there are many pre-defined server, we can first to configure jboss
Select server type: jboss 3.2.x (because the latest version of the 4.0 jboss not add lomboz, using 3.2.
X configuration make do with, because 3.2. X and
4.0 configuration is the same)
Then amend the following attributes: Application Server Directory:
Classpath Variable:
Classpath Variable: JBOSS400
Server Configuration: There are three configurations have been minimal / defa
Ult / all, you can choose a suitable,
Do not know how good the default election
Port: 8080 is the default, you can modify its own
, Is open after the server port visit
If you feel that the allocation of 4.0 in jboss3.2.x isä¸çˆ½, can a new server type Node
ECLIPSE_HOME/plugins/com.objectlearn.jdt.j2ee/servers folder in a new suffix called the document server, and then under the
Some server document as a template, use a text editor edit server document. The establishment of a new server document, can also attribute page Lomboz
Accordingly settings.
5. Laws bug
As usual he did this step, and can be no way, configuration jboss here is to have a bug, we should not run behind jboss or choose not to the server type: jboss 3.2.x this node, and then switch to the page and then add server classpath library? options / lib/dom4j.jar, such jboss started classpath
Otherwise, the only complete, will be launched at the wrong time
Java.lang.NoClassDefFoundError: org/dom4j/Element
At java.lang.Class.getDeclaredConstructors0 (Native Method)
At java.lang.Class.privateGetDeclaredConstructors (Unknown Source)
At java.lang.Class.getConstructor0 (Unknown Source)
At java.lang.Class.newInstance0 (Unknown Source)
At java.lang.Class.newInstance (Unknown Source)
At org.jboss.mx.modelmbean.RequiredModelMBeanInstantiator.instantiate (
RequiredModelMBeanInstantiator.java: 36)
At org.jboss.mx.server.MBeanServerImpl. (MBeanServerImpl.java: 163)
At
Org.jboss.mx.server.MBeanServerBuilderImpl.newMBeanServer (MBeanServerBuilderI
Mpl.java: 56)
At
Javax.management.MBeanServerBuilder.newMBeanServer (MBeanServerBuilder.java: 62
)
At
Javax.management.MBeanServerFactory.createMBeanServer (MBeanServerFactory.java
: 177)
At
Javax.management.MBeanServerFactory.createMBeanServer (MBeanServerFactory.java
: 115)
At org.jboss.system.server.ServerImpl.doStart (ServerImpl.java: 327)
At org.jboss.system.server.ServerImpl.start (ServerImpl.java: 291)
At org.jboss.Main.boot (Main.java: 144)
At org.jboss.Main $ 1.run (Main.java: 389)
At java.lang.Thread.run (Unknown Source)
6. Configuration in the tomcat lomboz
This choice tomcat 5.0.x server type,
Then amend the following attributes: Application Server Directory:
Classpath Variable:
Classpath Variable: TOMCAT_HOME
Port: 8080 is the default, you can modify its own
, Is open after the server port visit
Laws do not have here another server classpath, so ok.
[Lomboz use Web application development]
File-> New-> Project -> Java -> Lomboz J2EE Wizards -> Lomboz J2EE Project
New Project in the project, fill in the names, and then next
Create J2EE Modules in the pages, and add a new web module, for example, called Test
Then switch to Targeted Server, joined JBoss 3.2.x and / or Tomcat 5.0.x (is good that we have in front of the server configuration)
Then we can see a j2ee the web projects are completed, and we click on this view in the Package Explorer
This directory, select Test
Right-click, there is a menu called Set Lomboz J2EE,
We can use this menu set to operate:
For example, you added a few servers, it will change default server can be used to select the default server
Choosing a default server, we will be able to run server,
At this time started the server, log in information will be displayed in the console view
Wait until after the server completely activated, we can deploy module, which is the implementation of a section of ant, and then deplo
Y to the current operation of the server after the completion deploy, we can see the effects
Open ie, http://localhost:8080/Test/index.jsp
If you see the welcome that shows that everything is a ok
For example, after you run, in the editor jsp, edit After re-deploy, we can immediately see the results updated
↑ Back
Tags: eclipse






