[prev in list] [next in list] [prev in thread] [next in thread] 

List:       forgerock-openidm
Subject:    [Openidm] Development Templates
From:       laszlo.hordos () forgerock ! com (Laszlo Hordos)
Date:       2010-10-09 14:02:56
Message-ID: AANLkTimVUKpGei1aqnyy+qJkzgMwaDKgSGHE0oDJ5ikC () mail ! gmail ! com
[Download RAW message or body]

I'd like to make the development more easier so I made some templates.

You can add these into Netbeans

Tools/Templates/Java/

*Java Class*

<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">

<#if package?? && package != "">
package ${package};

import com.forgerock.openidm.api.logging.Trace;
import com.forgerock.openidm.logging.TraceManager;

</#if>
/**
 * Sample Class Doc
 *
 * @author $author$
 * @version $Revision$ $Date$
 * @since 1.0.0
 */
public class ${name} {

    public static final String code_id = "$Id$";
    private static final Trace logger =
TraceManager.getTrace(${name}.class);

}

*Java Inteface*

<#assign licenseFirst = "/*">
<#assign licensePrefix = " * ">
<#assign licenseLast = " */">
<#include "../Licenses/license-${project.license}.txt">

<#if package?? && package != "">
package ${package};

</#if>
/**
 * Sample Class Doc
 *
 * @author $author$
 * @version $Revision$ $Date$
 * @since 1.0.0
 */
public interface ${name} {

    public static final String code_id = "$Id$";

}


Finally but not at least the Licence header.  All you need to do is import
from

SVN/trunk/legal/license-ForgeRockCDDL.txt

Next time when you create a new file it will be decorated like this.



/*
 *
 * Copyright (c) 2010 ForgeRock Inc. All Rights Reserved
 *
 * The contents of this file are subject to the terms
 * of the Common Development and Distribution License
 * (the License). You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the License at
 * http://www.opensource.org/licenses/cddl1.php or
 * OpenIDM/legal/CDDLv1.0.txt
 * See the License for the specific language governing
 * permission and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL
 * Header Notice in each file and include the License file
 * at OpenIDM/legal/CDDLv1.0.txt.
 * If applicable, add the following below the CDDL Header,
 * with the fields enclosed by brackets [] replaced by
 * your own identifying information:
 * "Portions Copyrighted 2010 [name of copyright owner]"
 *
 * $Id$
 */

package com.forgerock.openidm;

import com.forgerock.openidm.api.logging.Trace;
import com.forgerock.openidm.logging.TraceManager;

/**
 * Sample Class Doc
 *
 * @author $author$
 * @version $Revision$ $Date$
 * @since 1.0.0
 */
public class SampleFromTemplate {

    public static final String code_id = "$Id$";
    private static final Trace logger =
TraceManager.getTrace(SampleFromTemplate.class);

}


----

<http://www.forgerock.com/> *Laszlo Hordos* : ForgeRock AS
e: laszlo.hordos at forgerock.com
t: +47 48020234
w: www.forgerock.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.forgerock.org/pipermail/openidm/attachments/20101009/724b42ed/attachment.html 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic