diff options
author | Mike Kucera | 2007-07-13 18:59:22 +0000 |
---|---|---|
committer | Mike Kucera | 2007-07-13 18:59:22 +0000 |
commit | 623685a2760b28af94bb8ec9ae30e0882354386b (patch) | |
tree | 37508d8edfea64463a690237bb9f8600e9e796e7 /upc | |
parent | b1a7c95e56bde98a4af96c9575fb97abbbaf1a17 (diff) | |
download | org.eclipse.cdt-623685a2760b28af94bb8ec9ae30e0882354386b.tar.gz org.eclipse.cdt-623685a2760b28af94bb8ec9ae30e0882354386b.tar.xz org.eclipse.cdt-623685a2760b28af94bb8ec9ae30e0882354386b.zip |
Bug 189792 - [UPC Parser] template proposals for upc_forall
Diffstat (limited to 'upc')
4 files changed, 64 insertions, 2 deletions
diff --git a/upc/org.eclipse.cdt.core.parser.upc/plugin.xml b/upc/org.eclipse.cdt.core.parser.upc/plugin.xml index d7145fcf911..98703b78a5b 100644 --- a/upc/org.eclipse.cdt.core.parser.upc/plugin.xml +++ b/upc/org.eclipse.cdt.core.parser.upc/plugin.xml @@ -21,6 +21,12 @@ class="org.eclipse.cdt.internal.core.pdom.dom.c.PDOMCLinkageFactory" id="upc"/> </extension> - + <extension point="org.eclipse.ui.editors.templates"> + <include + file="templates/default-templates.xml" + translations="$nl$/templates/default-templates.properties"> + </include> + </extension> + </plugin> diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java index 56502b8d788..ab032f883bf 100644 --- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java +++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/parser/upc/UPCKeywordMap.java @@ -27,7 +27,7 @@ public class UPCKeywordMap extends C99KeywordMap { public static final String MYTHREAD = "MYTHREAD",//$NON-NLS-1$ THREADS = "THREADS",//$NON-NLS-1$ - UPC_MAX_BLOCKSIZE = "UPC",//$NON-NLS-1$ + UPC_MAX_BLOCKSIZE = "UPC_MAX_BLOCKSIZE",//$NON-NLS-1$ relaxed = "relaxed",//$NON-NLS-1$ shared = "shared",//$NON-NLS-1$ strict = "strict",//$NON-NLS-1$ diff --git a/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.properties b/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.properties new file mode 100644 index 00000000000..a6b7229f61c --- /dev/null +++ b/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2007 IBM Corporation and others. +# 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: +# IBM Corporation - initial API and implementation +############################################################################### + + +forallLoop = upc_forall loop +upcMaxBlocksize = UPC_MAX_BLOCKSIZE keyword diff --git a/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.xml b/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.xml new file mode 100644 index 00000000000..65117135fd0 --- /dev/null +++ b/upc/org.eclipse.cdt.core.parser.upc/templates/default-templates.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + +############################################################################### +# Copyright (c) 2007 IBM Corporation and others. +# 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: +# IBM Corporation - initial API and implementation +############################################################################### + +--> + +<!-- NOTE TO TRANSLATOR: +* This file should remain English as it produces compilable code. +--> + +<templates> + +<template + name="upc_forall" + description="%forallLoop" + context="org.eclipse.cdt.ui.text.templates.c" + id="org.eclipse.cdt.ui.text.templates.c.upc_forall" + enabled="true">upc_forall (${var} = 0; ${var} < THREADS; ${var}++; ${var}) { + ${line_selection}${cursor} +}</template> + +<template + name="upc_max_blocksize" + description="%upcMaxBlocksize" + context="org.eclipse.cdt.ui.text.templates.c" + id="org.eclipse.cdt.ui.text.templates.c.upc_max_blocksize" + enabled="true">UPC_MAX_BLOCKSIZE</template> + +</templates> + +
\ No newline at end of file |