Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Eclipse
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Bedienung== ===Show Bin Directory in Project Explorer=== * Window -> Show View -> Project Explorer * Select little triangle at top right -> Customize View ... * Filters -> deselect 'Java Output Folder' ===Show Open Files=== * CTRL + E or * CTRL + SHIFT + E ===Show Hidden Files=== * like .gitignore * select project in Project Explorer and click the filter icon on top bar * deselect .* resources ===Create a new JBoss 7 Maven project=== * File -> New -> Project -> Other -> Maven -> JBoss Archetype -> jboss-javaee-webapp ===Create a Java Project from existing file system=== #copy folder to eclipse workspace folder #right click navigator->new project->Java #name the project like the project folder ===Create PHP Project from Filesystem=== #right click navigator->new project->PHP #insert the path of the root manually (otherwise crash) ===Lookup library for Java element=== #select in editor and right click #Open declaration #Package or Project explorer (left window)->Link with editor (icon with arrows to left and right) ===Create new HTML page=== #right click folder -> new -> others -> web -> html file # ===New JPA Project=== #new project->JPA->JPA procect ===New JPA Entity=== #see also [[JavaJEEJPA#Entity_Implementation|JPA entities]] #right click on package below Java Resources -> new Class #add fields in Java code to new class #right click on classname -> Source -> Generate Setters and Getters #right click on classname -> Source -> Generate Hibernate/JPA Annotations #create DB table or deployment will create DB table in case [[JavaJEEJPA#persistence.xml|persistence.xml]] contains <property name="hibernate.hbm2ddl.auto" value="create-drop" /> ===Revers Engineer a database with Hibernate=== For reverse engineering perform the following steps in eclipse: #create a Hibernate Console Configuration via ''File->New->Other->Hibernate->Hibernate Console Configuration'' (edit it by changing to the perspective Hibernate) and double click in the Hibernate Configurations view #specify Database Connection, Property file, [[Hibernate#ConfigurationFiles|Hibernate configuration file]]. The rest seems to be unneccessary. #''Run->Hibernate Code Generation...->Open Hibernate Code Generation Dialog...'' #Create a new Code Generation Configuration or edit an existing ##specify the existing output directory ##specify via the reveng.xml setup dialog the tables for reverse engineering ##select the exporters ##press ''Run'' or later ''Run->Hibernate Code Generation-><Code Generation Configuration>'' ===Anzeigen der Plug-Ins=== #''Help -> About -> Plug-In Details'' === Perspektiven öffnen=== ''Window -> Open Perspective ... ===Source Verzeichnis einrichten=== #Project Properties #Java Build Path #file card 'source' ===Configuration and Using of Server=== * File -> New -> Other * Windows -> Show View -> Server ===Deploy to Server=== * e.g. JBoss AS Quickstart 'right click project -> Run As -> Run on Server' will build the project, copy the war file to the deployment directory and call the browser ===Tastatur/Keyboard=== see also http://www.allapplabs.com/eclipse/eclipse_shortcuts.htm {| border=1 cellpadding=2 cellspacing=0 |- |CTRL + K |find selection next |- |CTRL + N |new structure |- |CTRL + L |goto line |- |CTRL + <Dot> |Focus in Search results goto next find |- |CTRL + <Space> |Code Completion or Java API Documentation |- |CTRL + SHIFT + B |Breakpoint einfügen |- |CTRL + SHIFT + C |compare with other resources, resource must be selected in project explorer |- |CTRL + SHIFT + K |find selection previous |- |CTRL + SHIFT + P |find matching brace (cursor behind brace) |- |CTRL + SHIFT + T |open class search dialog |- |F6 |Step over |} ===Getter/Setter generieren=== #right click in editor #Source->Generate Getter/Setter ===Java Files Formatieren=== # select file in project navigator # context menu -> source -> format ===Compare Files=== # select files to compare in project navigator (CTRL+left mouse) # context menu -> compare with -> each other ===Compare with external File=== * select resource in project explorer * CTRL + SHIFT + C ===Adding a jar file to the build path=== # see [http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29 here] or you can now either add a JAR file which is contained in your workspace or which is somewhere else: #to add a JAR file which is inside your workspace click the Add JARs button #to add an external JAR file click the Add External JARs button ===Using the type hierachy=== *F4 actualizes the type hierachy with the current class in the editor ===Debugging=== ====Java Remote Debugging==== For example uweheuer: # [[EDTLaptop1#Enable_Java_Debugging|start Wildfly for Debugginging]] # select 'Debug Configuration' form Debug Menu and press 'Debug' # after change to Debug View set breakpoints ====Java Applet Debugging==== There is a integrated applet viewer but setting breakpoints doesn't work, so it's better to use remote debugging. For example configuration 'uweheuer_applet_laptop'. Precondition is the configuration of the java runtime for applets: * '''MS Windows:''' s. [[EONISLaptop#Java|Windows Java Configuration]] * '''Ubuntu:''' s. [[HomePC#Java_2|Ubuntu Java Configuration]] ====PHP Debugging==== s. http://www.eclipse.org/pdt/documents/XDebugGuideForPDT2.0.pdf * set breapoints * Run->Debug Configurations...-> e.g Local XT Sport Boeckmann -> Debug ===Convert a project to a java or javascript project=== *right click project in project explorer *properties *project facets or *open .project *add <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> ===Set Preferences for HTML Editor=== *Window->Preferences->Web->HTML Files->Editor ===Use the jQuery Mobile Palette=== *right click on HTML file -> Open With -> JBoss Tools HTML editor => Palette will be available as tab in the bottom area ====Insert jQuery Mobile link to HTML file==== *click JS/CSS icon in palette ===Browser Sim=== *Icon in icon bar or *Right click on html file -> Open With -> Browser Sim Javascript console goes to Console tab in the bottom, perhaps select by icon 'Display selected console'
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width