Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 41 Next »

Table of contents

 

Pre Gradle version

This page document the usage with Gradle, the pre-Gradle documentation is here: Eclipse Tips

Most important shortcuts

CTRL+SHIFT+R for finding resources!

CTRL+H for finding text in files


 

Setting up Eclipse to work with OFBiz is easy. There are two ways to import OFBiz into Eclipse:

  • You can either allow Eclipse to download OFBiz directly from SVN,
  • or you can import an already downloaded copy of OFBiz (from SVN or otherwise) from the filesystem.

Importing OFBiz from the filesystem into Eclipse

If you have already downloaded OFBiz and do not wish to have Eclipse handle SVN pulls for you, Eclipse can import OFBiz from the filesystem as well.

First you need to generate the ".project" file to allow Eclipse to automatically configure the project for you. For that simply run "gradlew eclipse" on the command line.

Then all you have to do to import the project is:

  • Right-click in the Navigator window and click on Import.
  • Select "Existing Project into Workspace" and click Next.
  • Click Browse and select the directory that contains the ".project" file, then click Finish. When this is complete, a new project named "ofbiz" will now appear in your Navigator. This will not copy the project to Eclipse's workspace directory: it will remain wherever it was before the import. If you want the OFBiz files in your workspace directory, you must move them there before you do the import.

 


Using SVN from within Eclipse

If you want to do the SVN pull from within Eclipse, use the following steps:

First you need to install Subclipse

  • see Installation Instructions for Eclipse. Then connect to the repository:
  • Bring up the "SVN Repository" panel in Eclipse (Window/Open Perspective/SVN Repository Exploring)
  • Right-Click within panel/New/Repository Location
  • Click on Finish. Now, do the initial checkout:
  • Click the "+" next to the new repository, then Right-Click on trunk and select "Checkout...". Select "Check out as project in the workspace" and click on "Finish". This will create a new project called "ofbiz" and download the OFBiz files directly from SVN. To sync your project with SVN in the future, right-click on the project and click Teams/Synchronize with Repository.

 

Using local XSD's when no internet connection is available, or you are using another version than the one online

Eclipse uses XSD files to check XML files for correctness and also when using autocompletion. Normally, eclipse uses the XSD location specified at the top of the XML file which is usually a remote address. If you do not have an internet connection, the XSD will not be found and these features will not be available (unless they have been previously cached by eclipse).

A new file .catalog.xml has been introduced in OFBiz root starting from svn 1326499. This file contains a definition compliant with the Oasis Catalog specification of all schemas used by ofbiz. You can import it in you Eclipse workbench by following the explanation at the Eclipse Import XML catalog section (hint: use the Eclipse Import/XML feature). Note also that the platform:/resource notation is used to identify a resource located in the workspace. The next path segment after "resource" should be the name of a project, which can be followed by the folder and/or file we want to locate. So you might need to change the workspase name part of the path according to your real project name.

Here is an example

 

  • No labels