mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
fix for bug 178424
This commit is contained in:
parent
c07835b7d2
commit
a51c134be1
2 changed files with 33 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2000, 2006 IBM Corporation and others.
|
# Copyright (c) 2000, 2007 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -9,14 +9,25 @@
|
||||||
# IBM Corporation - initial API and implementation
|
# IBM Corporation - initial API and implementation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
withtempvar = with temporary variable
|
## NOTE TO TRANSLATORS:
|
||||||
statement = statement
|
## The following code words should not be translated: for, do while, switch case,
|
||||||
## block is a noun
|
## if, if else, else if, else, try catch, catch, main, class, using, namespace, author
|
||||||
block = block
|
|
||||||
method = method
|
forLoop = for loop
|
||||||
declaration = declaration
|
forLoopWithTempVar = for loop with temporary variable
|
||||||
|
doWhileStmt = do while statement
|
||||||
|
switchCaseStmt = switch case statement
|
||||||
|
ifStmt = if statement
|
||||||
|
ifElseStmt = if else statement
|
||||||
|
## block is a noun
|
||||||
|
elseIfBlock = else if block
|
||||||
|
elseBlock = else block
|
||||||
|
tryCatchBlock = try catch block
|
||||||
|
catchBlock = catch block
|
||||||
|
mainMethod = main method
|
||||||
|
classDeclaration = class declaration
|
||||||
usinganamespace = using a namespace
|
usinganamespace = using a namespace
|
||||||
statement = statement
|
namespaceDeclaration = namespace declaration
|
||||||
createnewobject = create new object
|
createnewobject = create new object
|
||||||
defaultmultilinecomment = default multiline comment
|
defaultmultilinecomment = default multiline comment
|
||||||
printtostdout = print to standard output
|
printtostdout = print to standard output
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Copyright (c) 2000, 2006 IBM Corporation and others.
|
# Copyright (c) 2000, 2007 IBM Corporation and others.
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are made available under the terms of the Eclipse Public License v1.0
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
# which accompanies this distribution, and is available at
|
# which accompanies this distribution, and is available at
|
||||||
|
@ -20,17 +20,17 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<templates>
|
<templates>
|
||||||
<template name="for" description="for loop" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.for" enabled="true">for (${var} = 0; ${var} < ${max}; ++${var}) {
|
<template name="for" description="%forLoop" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.for" enabled="true">for (${var} = 0; ${var} < ${max}; ++${var}) {
|
||||||
${line_selection}${cursor}
|
${line_selection}${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
|
|
||||||
<template name="for" description="for loop %withtempvar" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.for" enabled="true">for (int ${var} = 0; ${var} < ${max}; ++${var}) {
|
<template name="for" description="%forLoopWithTempVar" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.for" enabled="true">for (int ${var} = 0; ${var} < ${max}; ++${var}) {
|
||||||
${line_selection}${cursor}
|
${line_selection}${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="do" description="do while %statement" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.do" enabled="true">do {
|
<template name="do" description="%doWhileStmt" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.do" enabled="true">do {
|
||||||
${line_selection}${cursor}
|
${line_selection}${cursor}
|
||||||
} while (${condition});</template>
|
} while (${condition});</template>
|
||||||
<template name="switch" description="switch case %statement" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.switch" enabled="true">switch (${key}) {
|
<template name="switch" description="%switchCaseStmt" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.switch" enabled="true">switch (${key}) {
|
||||||
case ${value}:
|
case ${value}:
|
||||||
${cursor}
|
${cursor}
|
||||||
break;
|
break;
|
||||||
|
@ -38,37 +38,37 @@
|
||||||
break;
|
break;
|
||||||
}</template>
|
}</template>
|
||||||
|
|
||||||
<template name="if" description="if %statement" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.if" enabled="true">if (${condition}) {
|
<template name="if" description="%ifStmt" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.if" enabled="true">if (${condition}) {
|
||||||
${line_selection}${cursor}
|
${line_selection}${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="ifelse" description="if else %statement" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.ifelse" enabled="true">if (${condition}) {
|
<template name="ifelse" description="%ifElseStmt" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.ifelse" enabled="true">if (${condition}) {
|
||||||
${cursor}
|
${cursor}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}</template>
|
}</template>
|
||||||
<template name="elseif" description="else if %block" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.elseif" enabled="true">else if (${condition}) {
|
<template name="elseif" description="%elseIfBlock" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.elseif" enabled="true">else if (${condition}) {
|
||||||
${cursor}
|
${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="else" description="else %block" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.else" enabled="true">else {
|
<template name="else" description="%elseBlock" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.else" enabled="true">else {
|
||||||
${cursor}
|
${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="try" description="try catch %block" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.try" enabled="true">try {
|
<template name="try" description="%tryCatchBlock" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.try" enabled="true">try {
|
||||||
${line_selection}${cursor}
|
${line_selection}${cursor}
|
||||||
} catch (${Exception} e) {
|
} catch (${Exception} e) {
|
||||||
}</template>
|
}</template>
|
||||||
<template name="catch" description="catch %block" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.catch" enabled="true">catch (${Exception} e) {
|
<template name="catch" description="%catchBlock" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.catch" enabled="true">catch (${Exception} e) {
|
||||||
${cursor}
|
${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="main" description="main %method" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.main" enabled="true">int main(int argc, char **argv) {
|
<template name="main" description="%mainMethod" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.c.main" enabled="true">int main(int argc, char **argv) {
|
||||||
${cursor}
|
${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="class" description="class %declaration" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.class" enabled="true">class ${name} {
|
<template name="class" description="%classDeclaration" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.class" enabled="true">class ${name} {
|
||||||
${cursor}
|
${cursor}
|
||||||
private:
|
private:
|
||||||
};</template>
|
};</template>
|
||||||
<template name="using" description="%usinganamespace" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.using" enabled="true">using namespace ${namespace};
|
<template name="using" description="%usinganamespace" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.using" enabled="true">using namespace ${namespace};
|
||||||
</template>
|
</template>
|
||||||
<template name="namespace" description="namespace %declaration" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.namespace" enabled="true">namespace ${namespace} {
|
<template name="namespace" description="%namespaceDeclaration" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.namespace" enabled="true">namespace ${namespace} {
|
||||||
${cursor}
|
${cursor}
|
||||||
}</template>
|
}</template>
|
||||||
<template name="new" description="%createnewobject" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.new" enabled="true">${type} ${name} = new ${type}(${arguments});</template>
|
<template name="new" description="%createnewobject" context="org.eclipse.cdt.ui.text.templates.c" id="org.eclipse.cdt.ui.text.templates.cpp.new" enabled="true">${type} ${name} = new ${type}(${arguments});</template>
|
||||||
|
|
Loading…
Add table
Reference in a new issue