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 201477 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]
sketch of the simplest fix
Bug_337935_v1.patch (text/plain), 3.39 KB, created by
Stephan Herrmann
on 2011-08-14 13:44:24 EDT
(
hide
)
Description:
sketch of the simplest fix
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-08-14 13:44:24 EDT
Size:
3.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/IClassFileWorkingCopy.java >=================================================================== >RCS file: model/org/eclipse/jdt/core/IClassFileWorkingCopy.java >diff -N model/org/eclipse/jdt/core/IClassFileWorkingCopy.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ model/org/eclipse/jdt/core/IClassFileWorkingCopy.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+package org.eclipse.jdt.core; >+ >+public interface IClassFileWorkingCopy { >+ >+} >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 14 Aug 2011 17:33:44 -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 >@@ -14,6 +14,7 @@ > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.jdt.core.IBuffer; >+import org.eclipse.jdt.core.IClassFileWorkingCopy; > import org.eclipse.jdt.core.IJavaElement; > import org.eclipse.jdt.core.IJavaModelStatusConstants; > import org.eclipse.jdt.core.JavaModelException; >@@ -28,7 +29,7 @@ > /** > * A working copy on an <code>IClassFile</code>. > */ >-public class ClassFileWorkingCopy extends CompilationUnit { >+public class ClassFileWorkingCopy extends CompilationUnit implements IClassFileWorkingCopy { > > public ClassFile classFile; > >#P org.eclipse.jdt.ui >Index: ui/org/eclipse/jdt/internal/ui/JavaPlugin.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/JavaPlugin.java,v >retrieving revision 1.227 >diff -u -r1.227 JavaPlugin.java >--- ui/org/eclipse/jdt/internal/ui/JavaPlugin.java 1 Mar 2011 11:50:59 -0000 1.227 >+++ ui/org/eclipse/jdt/internal/ui/JavaPlugin.java 14 Aug 2011 17:33:47 -0000 >@@ -69,6 +69,7 @@ > import org.eclipse.ui.editors.text.templates.ContributionTemplateStore; > > import org.eclipse.jdt.core.IBuffer; >+import org.eclipse.jdt.core.IClassFileWorkingCopy; > import org.eclipse.jdt.core.ICompilationUnit; > import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jdt.core.WorkingCopyOwner; >@@ -363,9 +364,13 @@ > @Override > public IBuffer createBuffer(ICompilationUnit workingCopy) { > ICompilationUnit original= workingCopy.getPrimary(); >- IResource resource= original.getResource(); >- if (resource instanceof IFile) >- return new DocumentAdapter(workingCopy, (IFile) resource); >+ if (original instanceof IClassFileWorkingCopy) { >+ return super.createBuffer(workingCopy); >+ } else { >+ IResource resource= original.getResource(); >+ if (resource instanceof IFile) >+ return new DocumentAdapter(workingCopy, (IFile) resource); >+ } > return DocumentAdapter.NULL; > } > });
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