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 22228 Details for
Bug 98037
[formatter] Templates with multiple lines are inlined when used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply on HEAD
patch_98037.txt (text/plain), 3.06 KB, created by
Olivier Thomann
on 2005-06-02 10:03:32 EDT
(
hide
)
Description:
Apply on HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-02 10:03:32 EDT
Size:
3.06 KB
patch
obsolete
>Index: formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java,v >retrieving revision 1.158 >diff -u -r1.158 CodeFormatterVisitor.java >--- formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 12 May 2005 02:43:01 -0000 1.158 >+++ formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java 2 Jun 2005 14:02:49 -0000 >@@ -311,6 +311,8 @@ > if (currentField.declarationSourceStart == ((FieldDeclaration) previousMergedNode).declarationSourceStart) { > // we create a multi field declaration > mergedNodes.set(mergedNodes.size() - 1, new MultiFieldDeclaration(new FieldDeclaration[]{ (FieldDeclaration)previousMergedNode, currentField})); >+ } else { >+ mergedNodes.add(currentNode); > } > } else { > mergedNodes.add(currentNode); >Index: formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java,v >retrieving revision 1.48 >diff -u -r1.48 DefaultCodeFormatter.java >--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 28 Mar 2005 21:15:56 -0000 1.48 >+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 2 Jun 2005 14:02:49 -0000 >@@ -333,21 +333,25 @@ > } > ProbingScanner.setSource((char[]) null); > >+ // probe for expression > Expression expression = this.codeSnippetParsingUtil.parseExpression(source.toCharArray(), getDefaultCompilerOptions(), true); > if (expression != null) { > return internalFormatExpression(source, indentationLevel, lineSeparator, expression, offset, length); > } > >- ASTNode[] bodyDeclarations = this.codeSnippetParsingUtil.parseClassBodyDeclarations(source.toCharArray(), getDefaultCompilerOptions(), true); >- if (bodyDeclarations != null) { >- return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, offset, length); >- } >- >+ // probe for statements > ConstructorDeclaration constructorDeclaration = this.codeSnippetParsingUtil.parseStatements(source.toCharArray(), getDefaultCompilerOptions(), true); > if (constructorDeclaration.statements != null) { > return internalFormatStatements(source, indentationLevel, lineSeparator, constructorDeclaration, offset, length); > } > >+ // probe for body declarations (fields, methods, constructors) >+ ASTNode[] bodyDeclarations = this.codeSnippetParsingUtil.parseClassBodyDeclarations(source.toCharArray(), getDefaultCompilerOptions(), true); >+ if (bodyDeclarations != null) { >+ return internalFormatClassBodyDeclarations(source, indentationLevel, lineSeparator, bodyDeclarations, offset, length); >+ } >+ >+ // this has to be a compilation unit > return formatCompilationUnit(source, indentationLevel, lineSeparator, offset, length); > } > }
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 98037
: 22228 |
22230