| ################################################################################ |
| # Copyright (c) 2011, 2012 Obeo. |
| # All rights reserved. This program and the accompanying materials |
| # are made available under the terms of the Eclipse Public License v1.0 |
| # which accompanies this distribution, and is available at |
| # http://www.eclipse.org/legal/epl-v10.html |
| # |
| # Contributors: |
| # Obeo - initial API and implementation |
| ################################################################################ |
| ## note : apostrophes need to be doubled in these messages or they'll be ignored |
| |
| ## This file will be used in order to determine a human-readable name for all of |
| ## the Acceleo syntax highlighting colors. The keys in this file correspond to |
| ## the "preferenceKey" of the AcceleoColor enum constants. |
| |
| ## Some of the keys share the same value, we're keeping separate keys for these |
| ## for the sake of clarity (the "Name" of a template is not the same as the |
| ## "Name" of a query). |
| |
| # Category names |
| org.eclipse.acceleo.template.category = Template |
| org.eclipse.acceleo.query.category = Query |
| org.eclipse.acceleo.macro.category = Macro |
| org.eclipse.acceleo.general.category = General |
| |
| # Template category |
| org.eclipse.acceleo.template.color = Signature |
| org.eclipse.acceleo.template.name.color = Name |
| org.eclipse.acceleo.template.parameter.color = Parameter |
| org.eclipse.acceleo.template.ocl.expression.color = OCL Expression |
| org.eclipse.acceleo.template.ocl.keyword.color = OCL Keyword |
| |
| # Query category |
| org.eclipse.acceleo.query.color = Signature |
| org.eclipse.acceleo.query.name.color = Name |
| org.eclipse.acceleo.query.parameter.color = Parameter |
| org.eclipse.acceleo.query.return.color = Return Type |
| |
| # Macro category (NOTE : this isn't shown (yet?) on the UI |
| org.eclipse.acceleo.macro.color = Macro |
| |
| # General category |
| org.eclipse.acceleo.comment.color = Comment |
| |
| org.eclipse.acceleo.module.name.color = Module name |
| |
| org.eclipse.acceleo.for.color = For block |
| org.eclipse.acceleo.if.color = If block |
| org.eclipse.acceleo.let.color = Let block |
| |
| org.eclipse.acceleo.default.color = Static text |
| org.eclipse.acceleo.keyword.color = Acceleo keyword |
| org.eclipse.acceleo.literal.color = String literal |
| |
| org.eclipse.acceleo.ocl.expression.color = OCL expression |
| org.eclipse.acceleo.ocl.keyword.color = OCL keyword |
| org.eclipse.acceleo.variable.color = OCL variable |
| |
| org.eclipse.acceleo.protected.color = Protected Area |
| |
| ## Editor preview |
| editor.preview = \ |
| [comment]\n\ |
| ' 'This is a preview module.\n\ |
| [/comment]\n\ |
| [module preview(''http://www.eclipse.org/uml2/3.0.0/UML'') extends namespace::extend::module/]\n\ |
| [import namespace::import::module/]\n\ |
| \n\ |
| [template public aTemplate(class : Class) overrides anotherTemplate ? (not class.isAbstract)]\n\ |
| [comment @main /]\n\ |
| [file (class.name + ''.java'', false, ''UTF-8'')]\n\ |
| [let className : String = class.name]\n\ |
| public class [className.toUpperFirst()/] '{'\n\ |
| [/let]\n\ |
| [for (prop : Property | class.ownedAttribute) separator (''\n'')]\n\ |
| ' '/** The [prop.name/] attribute. */\n\ |
| ' '[if (prop.upper = -1 or prop.upper > 1)]\n\ |
| ' 'List<[prop.visibility/]> [prop.type.name/] [prop.name/];\n\ |
| ' '[else]\n\ |
| ' '[prop.visibility/] [prop.type.name/] [prop.name/];\n\ |
| ' '[/if]\n\ |
| [/for]\n\ |
| \n\ |
| ' '[class.abstractOperationWarning()/]\n\ |
| }\n\ |
| [/file]\n\ |
| [/template]\n\ |
| \n\ |
| [query private abstractOperationWarning(class : Class) : String =\n\ |
| ' 'if class.ownedOperation->select(isAbstract)->notEmpty() then ''this class contains abstract operations'' else '''' endif\n\ |
| /] |