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 201644 Details for
Bug 337935
Test failures when run as an IDE (org.eclipse.sdk.ide)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
alternative fix
Bug_337935_v2.patch (text/plain), 2.39 KB, created by
Stephan Herrmann
on 2011-08-17 09:55:26 EDT
(
hide
)
Description:
alternative fix
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-08-17 09:55:26 EDT
Size:
2.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java,v >retrieving revision 1.53 >diff -u -r1.53 ClassFileWorkingCopy.java >--- model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 27 Jun 2008 16:03:51 -0000 1.53 >+++ model/org/eclipse/jdt/internal/core/ClassFileWorkingCopy.java 17 Aug 2011 13:52:31 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 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 >@@ -81,21 +81,18 @@ > protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { > > // create buffer >- IBuffer buffer = this.owner.createBuffer(this); >- if (buffer == null) return null; >+ IBuffer buffer = new Buffer(null /*no file = cannot save*/, this, false /*isReadOnly*/); > > // set the buffer source >- if (buffer.getCharacters() == null) { >- IBuffer classFileBuffer = this.classFile.getBuffer(); >- if (classFileBuffer != null) { >- buffer.setContents(classFileBuffer.getCharacters()); >- } else { >- // Disassemble >- IClassFileReader reader = ToolFactory.createDefaultClassFileReader(this.classFile, IClassFileReader.ALL); >- Disassembler disassembler = new Disassembler(); >- String contents = disassembler.disassemble(reader, Util.getLineSeparator("", getJavaProject()), ClassFileBytesDisassembler.WORKING_COPY); //$NON-NLS-1$ >- buffer.setContents(contents); >- } >+ IBuffer classFileBuffer = this.classFile.getBuffer(); >+ if (classFileBuffer != null) { >+ buffer.setContents(classFileBuffer.getCharacters()); >+ } else { >+ // Disassemble >+ IClassFileReader reader = ToolFactory.createDefaultClassFileReader(this.classFile, IClassFileReader.ALL); >+ Disassembler disassembler = new Disassembler(); >+ String contents = disassembler.disassemble(reader, Util.getLineSeparator("", getJavaProject()), ClassFileBytesDisassembler.WORKING_COPY); //$NON-NLS-1$ >+ buffer.setContents(contents); > } > > // add buffer to buffer cache
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 337935
:
201477
|
201644
|
202725