1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 189792 - [UPC Parser] template proposals for upc_forall

This commit is contained in:
Mike Kucera 2007-07-13 18:59:22 +00:00
parent b1a7c95e56
commit 623685a276
4 changed files with 64 additions and 2 deletions

View file

@ -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>

View file

@ -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$

View file

@ -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

View file

@ -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} &lt; 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>