Developing with CRXDE Lite

You are reading the CRX 2.3 version of Developing with CRXDE Lite.
This documentation is also available for the following versions: CRX 2.2  CRX 2.1  CRX 2.0 (for CQ 5.3) 

This section describes how to develop your JCR, Apache Sling or CQ5 application using CRXDE Lite.

Please refer to the overview documentation for more information on the different development environments that are available.

CRXDE Lite is embedded into CRX/CQ and enables you to perform standard development tasks in the browser. With CRXDE Lite, you can create a project, create and edit files (like .jsp and .java), folders, templates, components, dialogs, nodes, properties and bundles while logging and integrating with SVN.
CRXDE Lite is recommended when you do not have direct access to the CRX/CQ server, when you develop an application by extending or modifying the out-of-the-box components and Java bundles or when you do not need a dedicated debugger, code completion and syntax highlighting.

Getting Started with CRXDE Lite

To get started with CRXDE Lite, proceed as follows:

  1. Install CQ or CRX.
  2. In your browser, enter http://<host>:<port>/crx/de. By default it is http://localhost:4502/crx/de.
  3. Enter your username and password. By default it is admin and admin.
  4. Click OK.

The CRXDE Lite User Interface looks as follows in your browser:

CRXDE Lite

You can now use CRXDE Lite to develop your application.

Overview of the User Interface

CRXDE Lite offers the following functionality:

Top switcher bar Allows you to quickly switch between CRXDE Lite, Package Manager, and Package Share.  
Node path widget

Displays the path to the currently selected node.

You can also use it to jump to a node, by entering the path by hand, or pasting it from somewhere else, and hitting Enter.

It also provides support for looking for nodes with specific node name. Enter the name of the node you would like to find, and wait (or hit the search symbol on the right-hand side). You can try entering, e.g., the string crx into the widget to see how it works. If a given node or nodes is loaded into the explorer pane, the list will be displayed, and you can select the path and hit Enter to navigate to it. Note that it only works for the nodes currently loaded into the CRXDE client application in browser. If you want to search the whole repository, use Tools, then Query.

 
Explorer pane

Displays a tree of all the nodes in the repository.

Click a node to display its properties in the Properties tab. After clicking a node, you can select an action in the toolbar. Click the node again to rename it.

Tree Navigation Filter (binocular icon): enables you to filter the nodes in the repository for which the name contains the input text. It only applies to nodes that have been loaded locally.

 
Edit pane

Home tab: lets you search content and/or documentation and access developer resources (documentation, developer blog, knowledge base) and support (Adobe homepage and support center).

Double-click a file in the Explorer pane to display its content; like for example a .jsp or a .java file. You can then modify it and save the changes.

Once a file is edited in the Edit pane, the following tools are available:

- Show in tree: shows the file in the repository tree.
- Undo: reverts to the state before the last editor action.
- Redo: executes the last undone action again.
- Redraw: redraws the editor to fix highlighting problems.
- Goto line ...: goes to a specific line.
- Search/Replace ...: do search or replace.
 
Properties tab
Displays the properties of the node that you have selected. You can add new properties or delete existing ones.
 
Access Control tab

Display permissions based on current path, repository-level or principal.

The permissions are broken down into

- Applicable Access Control Policy: The policies that can be applied to the current selection.

- Local Access Control Policies: The current policies applied locally to the current selection.

- Effective Access Control Policies: The current policies applied for the current selection, might be set locally or inherited from parent nodes.

Note. To be able to see the Access Control information at all, the user logged in to CRXDE Lite must have rights to read ACL entries. The anonymous user cannot see this information by default - please log in as, e.g., admin to see the information.

 
Replication tab

Display the replication status of current node. You can replicate and replicate delete the current node.

 
Console tab

Server Logs:

Displays logs messages. You can configure the log level, clear the console, pin at the selected scroll position and enable/disable the displaying of messages.

Version Control:

Displays version control messages.

 
Build Info tab
Displays information when a bundle is being built.
 
Refresh
Refreshes the current selection. Changes from other users are updated in your view of the repository. Changes you have made are unaffected.
 
Save All

Save All:

Saves all the changes you have made. Until you click save, the changes are temporary, and will be lost when you exit the console.

Revert:

Discards all the changes that you have made on the selected node since the last save action, then reloads the current state of the repository for the selected node.

Revert All:

Discards all the changes that you have made throughout the entire repository since the last save action, then reloads the current state of the repository.

 
Create ...

Drop-down menu to create the following under the selected node:

- Node: a node with an arbitrary node type

- File: nt:file node and its nt:resource subnode

- Folder: nt:folder node

- Project: create an empty project structure (projects are not created under the current node)

- Bundle: create a skeleton OSGi bundle

The following are only available if you work with CQ5 instance:

- Template: CQ5 template

- Component: CQ5 component

- Dialog: CQ5 dialog

 
Delete
Deletes the selected node.
 
Copy Copies the selected node.
 
Paste
Pastes the copied node under the selected node.
 
Move ...
Moves the selected node to the node that is set through the dialog.  
Rename ...
Renames the selected node.
 
Mixins ...
Allows you to add mixin types to the node type. The mixin types are mostly used to add advanced features such as versioning, access control, referencing, and locking to the node.  
Team

Drop-down menu to perform standard version control tasks:

- Update repository from SVN server

- Commit local changes to SVN server

- View Status of the current node

- View Recursive Status of the subtree of the current node

- Checkout a working copy from SVN server

- Export a project from SVN server (without creating a working copy)

- Import a project from repository to SVN server

Note you need to be logged in as user with sufficient permissions to be able to execute some of the tasks (especially the ones that write to the local repository).

 
Tools

Drop-down menu with the following tools:

- Server Config ...: to access the Felix Console.

- Query ...: to query the repository.

- Privileges ...: to open privilege management, where you can view and add privileges.

- Test Access Control ...: a place where you can test the permission for certain path and/or principal.

- Export Node Type: to export node types in the system as cnd notation.

- Import Node Type ...: to import node types using cnd notation.

- Compile: to compile all the Java classes under the selected Node.

- Build Bundle: to build a bundle.

- Import Site ...: opens the Site Importer tool to import an existing site into CQ (only in CQ5)

- Install SiteCatalyst Debugger ...: instructions on how to install SiteCatalyst Debugger.

 
Login widget

Displays the currently logged-in users and the workspace they are logged into, e.g., admin@crx.default.

Click it to log in or re-login as a specific user. If you don't specify a workspace to log in to, you will be logged into the default workspace, crx.default.

If you want to browse the repository as Anonymous user, use anonymous as the login name, and any password (e.g., a space or a dot).

If your authorization is no longer valid (e.g., it is expired), the login widget displays "Unauthorized - Login...". Click it to log in again.

 

Creating a Project

With CRXDE Lite you can create a working project in three clicks. The project wizard creates a new project under /apps, some content under /content and a package wrapping all the project the content under /etc/packages. The project can be used right away to render a sample page displaying Hello World, based on a jsp script that renders a property from the repository and calls a Java class to render some text.

To create a project with CRXDE Lite:

  1. Open CRXDE Lite in your browser.
  2. In the Navigation pane, right-click a node, select Create ..., then Create Project ....
    Note: you can right-click any node in the tree navigation, as the new project nodes are, by design, created below /apps, /content and /etc/packages.
  3. Define:
    • Project Name - the project name is used to create the new nodes and the bundle, e.g. myproject.
    • Java Package - the Java package name prefix, e.g. com.mycompany.
  4. Click Create.
  5. Click Save All to save the changes on the server.

To access the sample page displaying Hello World, point your browser to:

http://localhost:4502/content/<project-name>.html

The Hello World page is based on a content node, that calls a jsp script through the sling:resourceType property. The script reads the jcr:title property from the repository and gets the body content by calling a method of the SampleUtil class, that is available in the project bundle.

The following nodes are created:

  • /apps/<project-name>: the application container.
  • /apps/<project-name>/components: the components container, containing the sample html.jsp file, used to render a page.
  • /apps/<project-name>/src: the bundles container, containing a sample project bundle.
  • /apps/<project-name>/install: the compiled bundles container, containing the compiled sample project bundle.
  • /content/<project-name>: the content container.
  • /etc/packages/<java-suffix>/<project-name>.zip, a package wrapping all the project app and content. You can use it to rebuild the project for further deployment (e.g. to other environments) or for sharing through Package Share.

The structure looks as follows in CRXDE Lite with a project called myproject and a java package suffix called mycompany:

file
file

Creating a Folder

To create a folder with CRXDE Lite:

  1. Open CRXDE Lite in your browser.
  2. In the Navigation pane, right-click the folder under which you want to create the new folder, select Create ..., then Create Folder ....
  3. Enter the folder Name and click OK.
  4. Click Save All to save the changes on the server.

Creating a Template

The feature described here is only available if CQ5 is installed, that is if the node type cq:Template is available in the repository.

To create a template with CRXDE Lite:

  1. Open CRXDE Lite in your browser.
  2. In the Navigation pane, right-click the folder where you want to create the template, select Create ..., then Create Template ....
  3. Enter the Label, Title, Description, Resource Type and Ranking of the template. Click Next.
  4. This step is optional: set the Allowed Paths. Click Next
  5. This step is optional: set the Allowed Parents. Click Next.
  6. This step is optional: set the Allowed Children. Click OK.
  7. Click Save All to save the changes on the server.

It creates:

  • A node of type cq:Template with Template properties
  • A child node of type cq:PageContent with Page Content properties

You can add properties to your template: refer to the Creating a Property section.

Creating a Component

The feature described here is only available if CQ5 is installed, that is if the node type cq:Component is available in the repository.

To create a component with CRXDE Lite:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the folder where you want to create the component, select Create ..., then Create Component ....
  3. Enter the Label, Title, Description, Super Resource Type and Group of the component. Click Next.
  4. This step is optional: set the component properties Is Container, No Decoration, Cell Name and Dialog Path. Click Next.
  5. This step is optional: set the component property Allowed Parents. Click Next.
  6. This step is optional: set the component property Allowed Children. Click OK.
  7. Click Save All to save the changes on the server.

It creates:

  • A node of type cq:Component
  • Component properties
  • A component .jsp script

Creating a Dialog

The feature described here is only available if CQ5 is installed, that is if the node type cq:Dialog is available in the repository.

To create a dialog with CRXDE Lite:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the component where you want to create the dialog, select Create ..., then Create Dialog ....
  3. Enter the Label and the Title. Click OK.
  4. Click Save All to save the changes on the server.

It creates a dialog with the following structure:

dialog[cq:Dialog]/items[cq:Widget]/items[cq:WidgetCollection]/tab1[cq:Panel]

You can now adapt the dialog to your needs by modifying properties or creating new nodes.

You can also use the Dialog Editor to edit a dialog. Double clicking the dialog node in CRXDE Lite will bring up the editor. More information about the Dialog Editor can be found here.

Creating a Node

To create a node with CRXDE Lite:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the node where you want to create the new node, select Create ..., then Create Node ....
  3. Enter the Name and the Type. Click OK.
  4. Click Save All to save the changes on the server.

You can now adapt the node to your needs by modifying properties or creating new nodes.

Note

Most of the edit operations, including Create Node, keeps all the changes in memory, and only stores them into the repository upon saving (via the "Save All" button).

The validation with regard to whether the newly created node is allowed by the node type of the parent node is also carried out by the JCR repository first when saving changes. If you receive an error message while saving a node, please check, whether the content structure is valid (e.g., you cannot create an nt:unstructured node as a child of nt:folder node).

Creating a Property

To create a property with CRXDE Lite:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, select the node where you want to add the new property.
  3. In the Properties tab in the bottom pane, enter the Name, the Type and the Value. Click Add.
  4. Click Save All to save the changes on the server.

Creating a Script

To create a new script:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the component where you want to create the script, select Create ..., then Create File ....
  3. Enter the File Name including its extension. Click OK.
  4. The new file opens as a tab in the Edit pane.
  5. Edit the file.
  6. Click Save All to save the changes.

Managing a Bundle

With CRXDE Lite, it is straightforward to create an OSGI bundle, add Java classes to it, and build it. The bundle is then automatically installed and started in the OSGI container.

This section describes how to create a Test bundle with a HelloWorld Java class that displays Hello World! in your browser when the resource is requested.

Creating a Bundle

To create the Test bundle with CRXDE Lite:

  1. In CRXDE Lite create myapp project with the project wizard. Among others the following nodes are created:
    • /apps/myapp/src
    • /apps/myapp/install
  2. Right-click the folder /apps/myapp/src that will contain the Test bundle, select Create ..., then Create Bundle ....
  3. Set the bundle properties as follows:
    • Symbolic Bundle Name: com.mycompany.test.TestBundle
    • Bundle Name: Test Bundle
    • Bundle Description: This is my Test Bundle
    • Package: com.mycompany.test
    Click OK.
  4. Click Save All to save the changes on the server.

The wizard creates the following elements:

  • The node com.mycompany.test.TestBundle of type nt:folder. It is the bundle container node.
  • The file com.mycompany.test.TestBundle.bnd.  It acts as deployment descriptor for your bundle and consists of a set of headers.
  • The folder structures:
    • src/main/java/com/mycompany/test. It will contain the packages and the Java classes.
    • src/main/resources. It will contain the resources used within the bundle.
  • The Activator.java file. It is the optional listener class to be notified of bundle start and stop events.

The following table lists all the properties of the .bnd file, their values and descriptions:

Property Value (at bundle creation)
Description
Export-Package:

*

Note: this value needs to be adapted to reflect the specificity of the bundle.

The Export-Package header defines exported packages from the bundle (comma-separated list of packages). The exported packages constitute the public
view of the bundle.
Import-Package:

*

Note: this value needs to be adapted to reflect the specificity of the bundle.

The Import-Package header defines imported packages for the bundle (comma-separated list of packages)
Private-Package:

*

Note: this value needs to be adapted to reflect the specificity of the bundle.

The Private-Package header defines private packages for the bundle (comma-separated list of packages). The private packages constitute the internal implementation.
Bundle-Name: Test Bundle Defines a short, human-readable name for the bundle
Bundle-Description: This is my Test Bundle Defines a short, human-readable description for the bundle
Bundle-SymbolicName: com.mycompany.test.TestBundle Specifies a unique, non-localizable name for the bundle
Bundle-Version: 1.0.0-SNAPSHOT Specifies the version of the bundle
Bundle-Activator: com.mycompany.test.Activator Specifies the name of the optional listener class to be notified of bundle start and stop events

For more information on the bnd format, refer to the bnd utility used by CRXDE to create OSGI bundles.

Creating a Java Class

To create the HelloWorld Java class within the Test Bundle:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the node containing the Activator.java file (/apps/myapp/src/com.mycompany.test.TestBundle/src/main/java), select Create ..., then Create File ....
  3. Name the file HelloWorld.java. Click OK.
  4. The HelloWorld.java file opens in the Edit pane.
  5. Add the following lines into HelloWorld.java:
    package com.mycompany.test;

    public class HelloWorld {
        public String getString(){
        return "Hello World!";
        }
    }
  6. Click Save All to save the changes on the server.

Building a Bundle

To build the Test Bundle:

  1. Open CRXDE Lite in your browser.

  2. In the Navigation pane, right-click the .bnd file, select Tools, then Bundle.

The Build Bundle wizard:

  • Compiles the Java classes.
  • Creates the .jar file containing the compiled Java classes and the resources and places it into the myapp/install folder.
  • Installs and starts the bundle in the OSGI container.

To see the effect of the Test Bundle, create a component that uses the Java method HelloWorld.getString() and a resource that is rendered by this component:

  1. Create the component mycomp under myapp/components.
  2. Edit mycomp.jsp and replace the code with the following lines:
    <%@ page import="com.mycompany.test.HelloWorld"%><%
    %><%@ include file="/libs/foundation/global.jsp"%><%
    %><% HelloWorld hello = new HelloWorld();%><%
    %>
    <html>
    <body>
    <b><%= hello.getString() %></b><br>
    </body>
    </html>
  3. Create the resource test_node of type nt:unstructured under /content.
  4. For test_node, create the following property: Name = sling:resourceType, Type = String, Value = myapp/components/mycomp.
  5. Click Save All to save the changes on the server.
  6. In your browser, request test_node: http://<hostname>:<port>/content/test_node.html.
  7. A page is displayed with the Hello World! message.

Exporting and Importing Node Types

With CRXDE Lite you can import and/or export node type definitions in CND (Compact Namespace and Node Type Definition) notation.

To export a node type definition:

  1. Open CRXDE Lite in your browser.
  2. Select your required node.
  3. Select Tools then Export Node Type.
  4. The definition, in cnd notation will be displayed in your browser. Save the information if required.

To import a node type definition:

  1. Open CRXDE Lite in your browser.
  2. Select Tools then Import Node Type....
  3. Enter the CND notation for the definition n the text box.
  4. Check Allow Update if you are updating an existing definition.
  5. Click Import.

Logging

With CRXDE Lite you can display the file error.log that is located on the file system at <crx-install-dir>/crx-quickstart/server/logs and filter it with the appropriate log level. Proceed as follows:

  1. Open CRXDE Lite in your browser.

  2. In the Console tab at the bottom of the window, in the drop-down menu on the right, select Server Logs.
  3. Click the Stop icon to display the messages.

You can:

  • Adjust the log parameters in the Felix Console by clicking the Logging Configurations icon.
  • Clear the messages by clicking the Brush icon.
  • Pin the message at the current selection by clicking the Pin icon.
  • Enable or disable the displaying of messages by clicking the Stop icon.

Access Control

Note

With the Access Control tab of CRXDE Lite you can define the access control policies and assign the related privileges.

For example, for Current Path select the required resource in the left pane, the Access Control tab in the bottom right pane:

file

The policies are categorized according to:

  • Applicable Access Control Policies
    These policies can be applied.
    These are policies that are available for creating a local policy. Once you select and add an applicable policy it becomes a local policy.
  • Local Access Control Policies
    These are access control policies that you have applied. You can then update, order, or remove them.
    A local policy will override any policies inherited from the parent.
  • Effective Access Control Policies
    These are the access control policies that are now in effect for any access requests. They show the aggregated policies derived from both the local policies and any inherited from the parent.

Policy Selection

The policies can be selected for:

  • Current Path
    As in the example above, select a resource within the repository. The policies for this "current path" will be shown.
  • Repository
    Selects repository level access control. For example, when setting the jcr:namespaceManagement privilege, which is only relevant for the repository, not a node.
  • Principal
    A principal that is registered in the repository.
    You can either type in the Principal name or click the icon to the right of the field to open the Select Principal dialog.
    This allows you to Search for a User or Group. Select the required principal from the resulting list, then click OK to carry the value back to the previous dialog.
file

Note

To simplify management we recommend that you assign access rights to group accounts, not individual user accounts.

It is easier to manage a few groups, rather than many user accounts.

Privileges

The following privileges are available for selection when adding an access control entry (see the Security API for full details):

Privilege Name Which controls the privilege to...
jcr:read Retrieve a node and read its properties and their values.
rep:write This is a jackrabbit specific aggregate privilege of jcr:write and jcr:nodeTypeManagement.
jcr:all This is an aggregate privilege that contains all other predefined privileges.
Advanced  
crx:replicate Perform replication of a node.
jcr:addChildNodes Create child nodes of a node.
jcr:lifecycleManagement Perform lifecycle operations on a node.
jcr:lockManagement Lock and unlock a node; refresh a lock.
jcr:modifyAccessControl Modify the access control policies of a node.
jcr:modifyProperties Create, modify and remove the properties of a node.
jcr:namespaceManagement Register, unregister and modify namespace definitions.
jcr:nodeTypeDefinitionManagement Import node type definitions to the repository.
jcr:nodeTypeManagement Add and remove mixin node types and change the primary node type of a node. This also includes any calls to Node.addNode and XML importing methods where the mixin or primary type of new node is explicitly specified.
jcr:readAccessControl Read the access control policy of a node.
jcr:removeChildNodes Remove child nodes of a node.
jcr:removeNode Remove a node.
jcr:retentionManagement Perform retention management operations on a node.
jcr:versionManagement Perform versioning operations on a node.
jcr:workspaceManagement The creation and deletion of workspaces through the JCR API.
jcr:write This is an aggregate privilege that contains:
- jcr:modifyProperties
- jcr:addChildNodes
- jcr:removeNode
- jcr:removeChildNodes
rep:privilegeManagement Register new privilege.

Registering New Privileges

You can also register new privileges:

  1. From the toolbar select Tools, then Privileges to display the privileges currently registered.

    file
  2. Use the Register Privilege icon (+) to open the dialog and define a new privilege:

    file
  3. Click OK to save. The privilege will now be available for selection.

Adding an Access Control Entry

  1. Select your resource and open the Access Control tab.

  2. To add a new Local Access Control Policies, click the + icon at the right of the Applicable Access Control Policy list:

    file
  3. A new entry appears under Local Access Control Policies:

    file
  4. Click the + icon to add a new entry:

    file

    Note

    Currently a workaround is needed to specify an empty string.

    For this you need to use "".

  5. Define your access control policy and click OK to save. Your new policy will:

    • be listed under Local Access Control Policy
    • the changes will be reflected in the Effective Access Control Policies.

CRX will validate your selection; for a given principal there exists (at most) 1 deny and 1 allow entry on a given node. The implementation always clears redundant entries and makes sure that the same privilege is not listed in both the allow and deny entries.

Ordering Local Access Control Policies

The order in the list indicates the order in which the policies are applied.

  1. In the table of Local Access Control Policies select the required entry and drag it to the new position in the table.

    file
  2. The changes will be shown in both the tables for the Local and the Effective Access Control Policies.

Removing an Access Control Policy

  1. In the table of Local Access Control Policies click the red icon (-) at the right of the entry.

  2. The entry will be removed from both the tables for the Local and the Effective Access Control Policies.

Testing an Access Control Policy

  1. From the CRXDE Lite toolbar select Tools, then Test Access Control....

  2. A new dialog opens in the top right pane. Select the Path and/or Principal that you want to test.

  3. Click Test to see the results for your selection:

    file

Integrating with SVN

CRXDE and CRXDE Lite include integration with Apache Subversion (SVN), which allows developers to create a Subversion working copy inside their CRX repository without having to synchronize the file system as an intermediate step.

With SVN integration, you can do the following:

  • Check out of an existing CQ5 project from SVN into content subtree.
  • Modify a resource like a script and check it back into the SVN repository.

SVN integration has been designed with those use cases in mind where ease of use and simplicity is more important than complex development and processes. Any additional svn functionality is available via the CRX/CQ5 FileVault command-line tool vlt and stand-alone Subversion clients. (For example, use one of these tools to initially import the content into the SVN server.)

Note

SVN support is implemented on the server-side (crxde-support bundle) and is used by CRXDE and CRXDE Lite. The implementation is using SVNKit 1.3.0 which according to [1] should be compatible with SVN 1.6.

[1] http://svn.svnkit.com/repos/svnkit/branches/1.3.x-ca/changelog.txt

Intended Use Cases

With SVN integration, you can perform troubleshooting, performance tuning, quick fixes, and prototyping without external tools, and maintain the source code control at the same time.

In a single-developer project or small, agile teams, where a full project setup is not possible or too costly, but there is a requirement to keep code changes under version control, the CRXDE family of tools provides a simpler alternative to source code control using external tools and intermediate, manually managed working copy in the filesytem.

Typical, intended usage of SVN integration in the CRXDE family of development environments is as follows:

  1. A developer checks out an existing content application/project from SVN into content in his or her personal development repository; the command line vlt tool and svn client can be used for importing an unversioned content project into SVN. (Unversioned content can also be imported directly from a repository to SVN with the import operation.)
  2. The developer performs basic development tasks (changes source code in Java bundles or scripts, and so on) then tests the changes locally.
  3. The developer checks in the changed content back to the SVN repository.
  4. The developer checks the status of the content working copy and updates the local source code (content) with changes from other developers (changes from SVN), then repeats the cycle.

SVN Integration Features/Design Implications

The focus on simple usage resulted in a few design decisions, which are important to understand before using SVN integration:

Local, single user content repository instance

The integration has been designed to work with a local content repository (CRX or CQ5 instance), used by a single developer. Multiple users connecting to the same content repository instance (development instance) and using SVN integration on the same content is not supported.

Implicit SVN operations

Certain SVN operations are done implicitly, for example, nodes added to the content tree under source control are automatically added and committed to SVN when checking in (same for deletions).

SVN status on JCR nodes

The integration is based on many-to-one mapping between JCR nodes and FileVault representation thereof. This intermediate representation, based on files and folders, is then synchronized one-to-one with Subversion. SVN status is shown for individual repository nodes, and is mapped from "real" SVN status on FileVault files (for example, .content.xml representing potentially many nodes).

Conflict resolution

There is very limited support for SVN conflict resolution, so it is recommended to do frequent updates and short update-commit cycles.

Where more explicit control over SVN operations or full support for distributed development in larger teams is required, the integration based on stand-alone FileVault vlt client and Subversion client can be used (such as this project setup based on FileVault, Eclipse, Subversion, and Maven).

Using SVN Integration

With CRXDE Lite you can perform the following operations through the tree context menu or Team toolbar:

  • Import into SVN (initial checkout)
  • Check out from SVN
  • Export from SVN
  • Update from SVN
  • Commit to SVN
  • View the SVN status

From the toolbar menu:

file

From the context menu:

file

Importing the CRX repository into SVN

Importing allows you to put a project under version control that was initially created with CRXDE Lite (rather than in SVN). Use this command to initially check out content to SVN.

To import the CRX repository into SVN:

  1. In CRXDE Lite, in the tree list, right-click the folder that you want to import into SVN, select Team, and then Import. Alternatively, select Import from the Team drop-down menu in the toolbar.

    file
  2. Enter the URL, User Name, Password, Path, and optionally a Message. Click OK. The files are imported into SVN.

Checking out from the SVN server

To check out from SVN:

  1. In CRXDE Lite, in the tree list, right-click the folder that you want to contain the checkout in, and select Team, then Checkout. Alternatively, select Checkout from the Team drop-down menu in the toolbar.

    file
  2. Enter the URL, User Name, Password, and Path. Click OK. The files are checked out from SVN into the desired location.

Exporting from the SVN server

Exporting from the SVN is similar to checking out except that this action does not create a working copy.

  1. In CRXDE Lite, in the tree list, right-click the folder that you want to export, select Team and then Export. Alternatively, select Export from the Team drop-down menu in the toolbar.

    file
  2. Enter the URL, User Name, Password, and Path. Click OK. The files are exported from SVN into the desired location without version control.

Committing to SVN

When you create or modify a file or a folder that is under version control, it is automatically added to the version control.

To commit a change:

  1. In CRXDE Lite, in the tree list, right-click the folder that you want to commit, select Team, and then Commit. Alternatively, select Commit from the Team drop-down menu in the toolbar.

    file
  2.  Enter a message and click OK. Your changes are committed.

Updating from SVN

To update a file or folder from SVN:

  1. In CRXDE Lite, in the tree list, right-click the file or the folder that you want to update, select Team and then Update. Alternatively, select Update from the Team drop-down menu in the toolbar.

  2. If not already logged in, you are prompted for a user name and password. Click OK. CRXDE Lite updates the file or folder.

Viewing the SVN status

You can view the SVN status, either by looking at the icons on the nodes in the tree list or by doing the following:

  1. In CRXDE Lite, in the tree list, right-click the file or the folder under version control, select Team and then Status to view the status of the selected node or Recursive Status to view the status of the selected node and its subnodes. Alternatively, select Status or Recursive Status from the Team drop-down menu in the toolbar.

  2. View the SVN status in the Console tab.

Warning

The SVN operations to bring initial content from the SVN server to the repository under a given path (Checkout, Export) will generally not ask for confirmation or check, whether there is already repository content under the selected path. They will overwrite the content under that path with the content from SVN server.

Please make sure that the selected path is the intended target for the checkout or export before confirming the operation in the dialog.

Querying the Repository

With CRXDE Lite, you have the following possibilities to query the repository:

  • Search in the Home tab: enables you to full text search the repository. GQL search is supported.
  • Node path widget (long text widget below the menu): if you enter a node name, a list of nodes with this name will be displayed in the drop-down list. You can select one and hit Enter to have it selected in the tree navigator.
  • Tree Navigation Filter (binocular icon): enables you to filter nodes in the repository according to the input text. It only applies to nodes that have been loaded locally.
  • Tools, then Query ...: enables you to search the repository by setting the Type (XPath or SQL), the Path and the Text to search for, or by directly entering the XPath/SQL query.

Keyboard Shortcuts

Keyboard shortcuts can be configure under preferences dialog. To open preference dialog, click small arrow at login button and then click Preferences.

 Location Shortcut
Description
 Global Ctrl-S Save all.
  Ctrl-G
Go to Path.
 File Editor Ctrl-L
Go to line.
  Ctrl-F
Search/Replace.
  Ctrl-Z
Undo.
  Ctrl-Y
Redo.
  Ctrl-C
Copy selection to clipboard.
  Ctrl-V
Paste from clipboard.
 Repository Tree Ctrl-Shift-R
Reload selected node.
  Ctrl-O Open selected file.
  Ctrl-Alt-N Create node.
  Ctrl-Shift-N Create file.
  Ctrl-M Move node.
  Ctrl-Shift-C
Copy node to clipboard.
  Ctrl-Shift-V  Paste node from clipboard.
  Shift-Del
Delete node.
 Property Editor Shift-Del
Delete property.

Note

In Mac OS X, you can use Cmd-Key instead of Ctrl-Key shortcuts.