[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: add copyright information in EMF generated Java

Liangzhao,

The GenModel has a "Copyright Text" property for this. You also have to set CopyrightFields to true to get the field declarations.


liangzhao zeng wrote:
thanks.
Further, I also need to add another line of copyright after the package name and also a string right after class declaration, like


package xxx.xxx.xxx.xxx.xx;

/**
* * @author liangzhaoversion 1. June 29, 2008
*/
public class Foo {

public static final String COPYRIGHT = "Copyright ABC Corporation 2008.";
---



}

and I notice that in Class.javajet, there are sth like

<%if (genModel.getCopyrightText() != null) {%>
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
<%=publicStaticFinalFlag%><%=genModel.getImportedName("java.lang.String")%> copyright = "<%=genModel.getCopyrightText()%>";<%=genModel.getNonNLS()%>


<%}%>

But I do not know how to set the CopyrightText in genModel, any suggestion will be greatly appreciate.


Liangzhao