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 46288 Details for
Bug 26639
CDT should enforce newline at end of header files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch file which contains the code to fix bug #26639
patch.txt (text/plain), 1.18 KB, created by
Abeer Bagul
on 2006-07-14 05:15:21 EDT
(
hide
)
Description:
A patch file which contains the code to fix bug #26639
Filename:
MIME Type:
Creator:
Abeer Bagul
Created:
2006-07-14 05:15:21 EDT
Size:
1.18 KB
patch
obsolete
>Index: CDocumentProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java,v >retrieving revision 1.33 >diff -u -r1.33 CDocumentProvider.java >--- CDocumentProvider.java 6 Jul 2006 14:52:55 -0000 1.33 >+++ CDocumentProvider.java 14 Jul 2006 09:15:45 -0000 >@@ -922,6 +922,18 @@ > * @see org.eclipse.ui.editors.text.TextFileDocumentProvider#createSaveOperation(java.lang.Object, org.eclipse.jface.text.IDocument, boolean) > */ > protected DocumentProviderOperation createSaveOperation(final Object element, final IDocument document, final boolean overwrite) throws CoreException { >+ >+ //add a newline to the end of the document (if it is not already present) >+ int offset = document.getLength() - 1; >+ try { >+ char lastChar = document.getChar(offset); >+ if (lastChar != '\n') >+ { >+ document.replace(offset, 1, lastChar + System.getProperty("line.separator")); >+ } >+ } catch (BadLocationException e) { >+ } >+ > final FileInfo info= getFileInfo(element); > if (info instanceof TranslationUnitInfo) { > return new DocumentProviderOperation() {
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 26639
:
46288
|
46416
|
46576
|
46636