Skip to content

Commit

Permalink
added formatter + advanced versions
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardo committed Aug 3, 2015
1 parent d7d9640 commit e89650d
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 5 deletions.
6 changes: 3 additions & 3 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bnd-LastModified: 1438018155945
Build-Jdk: 1.7.0_45
Built-By: bluewind
Bnd-LastModified: 1438598118781
Build-Jdk: 1.8.0_45
Built-By: tomasi
Bundle-Category: Web UI libs
Bundle-Classpath: .
Bundle-ManifestVersion: 2
Expand Down
14 changes: 12 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<groupId>org.energy-home</groupId>
<artifactId>jemma.osgi.ah.webui.base</artifactId>
<packaging>bundle</packaging>
<version>2.0.13</version>
<version>2.0.14</version>
<name>Web UI Base</name>

<properties>
Expand Down Expand Up @@ -70,19 +70,29 @@
<instructions>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
<Import-Package>org.osgi.service.http,*
</Import-Package>
<Export-Package>!*
</Export-Package>
<Service-Component>OSGI-INF/*.xml</Service-Component>
<Bundle-Vendor>Telecom Italia</Bundle-Vendor>
<Bundle-Category>Web UI libs</Bundle-Category>
<Bundle-Category>JEMMA Automation@home, GUI</Bundle-Category>
<Bundle-RequiredExecutionEnvironment>OSGi/Minimum-1.2, J2SE-1.3, CDC-1.1/Foundation-1.1</Bundle-RequiredExecutionEnvironment>
<Bundle-Classpath>.</Bundle-Classpath>
</instructions>
</configuration>
</plugin>
<!-- to launch: mvn java-formatter:format -->
<plugin>
<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
<artifactId>maven-java-formatter-plugin</artifactId>
<version>0.4</version>
<configuration>
<configFile>${project.basedir}/src/main/resources/formatter.xml</configFile>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
47 changes: 47 additions & 0 deletions src/main/resources/codetemplates.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/**
* @return the ${bare_field_name}
*/</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/**
* @param ${param} the ${bare_field_name} to set
*/</template><template autoinsert="true" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/**
* ${tags}
*/</template><template autoinsert="true" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
*
*/</template><template autoinsert="true" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**
* @author ${user}
*
* ${tags}
*/</template><template autoinsert="true" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">/**
*
*/</template><template autoinsert="true" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/**
* ${tags}
*/</template><template autoinsert="true" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/* (non-Javadoc)
* ${see_to_overridden}
*/</template><template autoinsert="true" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/**
* ${tags}
* ${see_to_target}
*/</template><template autoinsert="false" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">/**
* This file is part of JEMMA - http://jemma.energy-home.org
* (C) Copyright 2013 Telecom Italia (http://www.telecomitalia.it)
*
* JEMMA is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License (LGPL) version 3
* or later as published by the Free Software Foundation, which accompanies
* this distribution and is available at http://www.gnu.org/licenses/lgpl.html
*
* JEMMA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License (LGPL) for more details.
*/
${filecomment}
${package_declaration}

${typecomment}
${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
${exception_var}.printStackTrace();</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub
${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>
Loading

0 comments on commit e89650d

Please sign in to comment.