Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 223546 Details for
Bug 351864
[1.7][templates] Add 'try-with-resource' template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Added the template for try-with-resources
Bug-351864--17templates-Add-trywithresource-template.patch (text/plain), 2.96 KB, created by
Jordan Chin
on 2012-11-13 22:13:08 EST
(
hide
)
Description:
Added the template for try-with-resources
Filename:
MIME Type:
Creator:
Jordan Chin
Created:
2012-11-13 22:13:08 EST
Size:
2.96 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.ui/templates/default-templates.properties b/org.eclipse.jdt.ui/templates/default-templates.properties >index ed4dcbf..e270ed3 100644 >--- a/org.eclipse.jdt.ui/templates/default-templates.properties >+++ b/org.eclipse.jdt.ui/templates/default-templates.properties >@@ -1,5 +1,5 @@ > ############################################################################### >-# Copyright (c) 2000, 2011 IBM Corporation and others. >+# Copyright (c) 2000, 2012 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 >@@ -8,6 +8,7 @@ > # Contributors: > # IBM Corporation - initial API and implementation > # Benjamin Muskalla <bmuskalla@eclipsesource.com> - [templates] new SWT templates - ToolBar and ToolItem - https://bugs.eclipse.org/bugs/show_bug.cgi?id=264052 >+# Jordan Chin <mail@jordanchin.ca> -[1.7][templates] Add 'try-with-resource' template - https://bugs.eclipse.org/bugs/show_bug.cgi?id=351864 > ############################################################################### > > Templates.for_array=iterate over array >@@ -23,6 +24,7 @@ > Templates.elseif=else if block > Templates.else=else block > Templates.try=try catch block >+Templates.try_with_resources=try with resources > Templates.catch=catch block > Templates.main=main method > Templates.public_method=public method >diff --git a/org.eclipse.jdt.ui/templates/default-templates.xml b/org.eclipse.jdt.ui/templates/default-templates.xml >index e1d1ed1..9d628ad 100644 >--- a/org.eclipse.jdt.ui/templates/default-templates.xml >+++ b/org.eclipse.jdt.ui/templates/default-templates.xml >@@ -2,7 +2,7 @@ > > <!-- > /******************************************************************************* >- * Copyright (c) 2000, 2011 IBM Corporation and others. >+ * Copyright (c) 2000, 2012 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 >@@ -10,6 +10,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Jordan Chin <mail@jordanchin.ca> -[1.7][templates] Add 'try-with-resource' template - https://bugs.eclipse.org/bugs/show_bug.cgi?id=351864 > *******************************************************************************/ > --> > >@@ -84,6 +85,10 @@ > ${cursor}// ${todo}: handle exception > }</template> > >+<template name="try-with-resources" description="%Templates.try_with_resources" id="org.eclipse.jdt.ui.templates.try_with_resources" context="java-statements" enabled="true" autoinsert="false">try (${line_selection}) { >+ ${cursor} >+}</template> >+ > <template name="main" description="%Templates.main" id="org.eclipse.jdt.ui.templates.main" context="java-members" enabled="true" autoinsert="false">public static void main(String[] args) { > ${cursor} > }</template>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 351864
: 223546