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 63530 Details for
Bug 181994
Change to PDE UI can improve debug performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
PDE Patch
148965DetailToStringPerformancePDEPatch (text/plain), 6.48 KB, created by
Curtis Windatt
on 2007-04-11 14:46:28 EDT
(
hide
)
Description:
PDE Patch
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2007-04-11 14:46:28 EDT
Size:
6.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java,v >retrieving revision 1.4 >diff -u -r1.4 PDESourceLookupDirector.java >--- src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java 3 Apr 2006 19:47:16 -0000 1.4 >+++ src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupDirector.java 11 Apr 2007 16:47:11 -0000 >@@ -13,6 +13,7 @@ > import java.util.HashSet; > import java.util.Set; > >+import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.SafeRunner; > import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector; > import org.eclipse.debug.core.sourcelookup.ISourceContainerType; >@@ -20,6 +21,9 @@ > import org.eclipse.debug.core.sourcelookup.containers.ProjectSourceContainer; > import org.eclipse.debug.core.sourcelookup.containers.WorkspaceSourceContainer; > import org.eclipse.debug.ui.sourcelookup.WorkingSetSourceContainer; >+import org.eclipse.jdt.debug.core.IJavaObject; >+import org.eclipse.jdt.debug.core.IJavaReferenceType; >+import org.eclipse.jdt.debug.core.IJavaStackFrame; > import org.eclipse.jdt.launching.sourcelookup.containers.JavaSourceLookupParticipant; > > public class PDESourceLookupDirector extends AbstractSourceLookupDirector { >@@ -47,6 +51,9 @@ > return !fFilteredTypes.contains(type.getId()); > } > >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#getSourceElement(java.lang.Object) >+ */ > public Object getSourceElement(Object element) { > PDESourceLookupQuery query = new PDESourceLookupQuery(element); > SafeRunner.run(query); >@@ -54,4 +61,18 @@ > return result != null ? result : super.getSourceElement(element); > } > >+ /* (non-Javadoc) >+ * @see org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector#findSourceElements(java.lang.Object) >+ */ >+ public Object[] findSourceElements(Object object) throws CoreException { >+ Object[] sourceElements = null; >+ if (object instanceof IJavaStackFrame || object instanceof IJavaObject || object instanceof IJavaReferenceType){ >+ sourceElements = new Object[]{getSourceElement(object)}; >+ } >+ if (sourceElements == null){ >+ sourceElements = super.findSourceElements(object); >+ } >+ return sourceElements; >+ } >+ > } >Index: src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java,v >retrieving revision 1.5 >diff -u -r1.5 PDESourceLookupQuery.java >--- src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java 22 Jan 2007 22:52:20 -0000 1.5 >+++ src/org/eclipse/pde/internal/ui/launcher/PDESourceLookupQuery.java 11 Apr 2007 16:47:11 -0000 >@@ -35,6 +35,7 @@ > import org.eclipse.jdt.debug.core.IJavaClassType; > import org.eclipse.jdt.debug.core.IJavaFieldVariable; > import org.eclipse.jdt.debug.core.IJavaObject; >+import org.eclipse.jdt.debug.core.IJavaReferenceType; > import org.eclipse.jdt.debug.core.IJavaStackFrame; > import org.eclipse.jdt.launching.IRuntimeClasspathEntry; > import org.eclipse.jdt.launching.JavaRuntime; >@@ -43,9 +44,9 @@ > import org.eclipse.pde.core.plugin.IPluginModelBase; > import org.eclipse.pde.core.plugin.ModelEntry; > import org.eclipse.pde.core.plugin.PluginRegistry; >-import org.eclipse.pde.internal.core.TargetPlatformHelper; > import org.eclipse.pde.internal.core.PDEClasspathContainer; > import org.eclipse.pde.internal.core.PDECore; >+import org.eclipse.pde.internal.core.TargetPlatformHelper; > import org.eclipse.pde.internal.ui.PDEPlugin; > > public class PDESourceLookupQuery implements ISafeRunnable { >@@ -66,24 +67,44 @@ > } > > public void run() throws Exception { >+ IJavaObject classLoaderObject = null; >+ String declaringTypeName = null; >+ String sourcePath = null; > if (fElement instanceof IJavaStackFrame) { > IJavaStackFrame stackFrame = (IJavaStackFrame)fElement; >- String typeName = generateSourceName(stackFrame.getDeclaringTypeName()); >- >- IJavaObject object = stackFrame.getReferenceType().getClassLoaderObject(); >- if (object != null) { >- IJavaClassType type = (IJavaClassType)object.getJavaType(); >- if (OSGI_CLASSLOADER.equals(type.getName())) { >- fResult = findSourceElement(object, typeName); >- } else if (LEGACY_ECLIPSE_CLASSLOADER.equals(type.getName())) { >- fResult = findSourceElement_legacy(object, typeName); >- } else if (MAIN_CLASS.equals(stackFrame.getDeclaringTypeName())){ >- IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(MAIN_PLUGIN); >- if (model != null) >- fResult = getSourceElement(model.getInstallLocation(), MAIN_PLUGIN, typeName); >- } >+ classLoaderObject = stackFrame.getReferenceType().getClassLoaderObject(); >+ declaringTypeName = stackFrame.getDeclaringTypeName(); >+ sourcePath = generateSourceName(declaringTypeName); >+ } else if (fElement instanceof IJavaObject){ >+ IJavaObject object = (IJavaObject)fElement; >+ IJavaReferenceType type = (IJavaReferenceType)object.getJavaType(); >+ classLoaderObject = type.getClassLoaderObject(); >+ if (object.getJavaType() != null){ >+ declaringTypeName = object.getJavaType().getName(); > } >+ if (declaringTypeName != null){ >+ sourcePath = generateSourceName(declaringTypeName); >+ } >+ } else if (fElement instanceof IJavaReferenceType){ >+ IJavaReferenceType type = (IJavaReferenceType)fElement; >+ classLoaderObject = type.getClassLoaderObject(); >+ declaringTypeName = type.getName(); >+ sourcePath = generateSourceName(declaringTypeName); > } >+ >+ if (classLoaderObject != null) { >+ IJavaClassType type = (IJavaClassType)classLoaderObject.getJavaType(); >+ if (OSGI_CLASSLOADER.equals(type.getName())) { >+ fResult = findSourceElement(classLoaderObject, sourcePath); >+ } else if (LEGACY_ECLIPSE_CLASSLOADER.equals(type.getName())) { >+ fResult = findSourceElement_legacy(classLoaderObject, sourcePath); >+ } else if (MAIN_CLASS.equals(declaringTypeName)){ >+ IPluginModelBase model = PDECore.getDefault().getModelManager().findModel(MAIN_PLUGIN); >+ if (model != null) >+ fResult = getSourceElement(model.getInstallLocation(), MAIN_PLUGIN, sourcePath); >+ } >+ } >+ > } > > protected Object getResult() {
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 181994
: 63530