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 88796 Details for
Bug 217644
[logview] It's hard to flip between event stack trace and classes listed there.
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]
Add open in stack trace console action
217664.patch (text/plain), 5.13 KB, created by
Curtis Windatt
on 2008-02-04 12:20:01 EST
(
hide
)
Description:
Add open in stack trace console action
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2008-02-04 12:20:01 EST
Size:
5.13 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.debug.ui >Index: ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceConsoleFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceConsoleFactory.java,v >retrieving revision 1.8 >diff -u -r1.8 JavaStackTraceConsoleFactory.java >--- ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceConsoleFactory.java 5 Aug 2005 15:57:56 -0000 1.8 >+++ ui/org/eclipse/jdt/internal/debug/ui/console/JavaStackTraceConsoleFactory.java 4 Feb 2008 17:11:38 -0000 >@@ -43,6 +43,7 @@ > > }); > } >+ > /* (non-Javadoc) > * @see org.eclipse.ui.console.IConsoleFactory#openConsole() > */ >@@ -54,4 +55,16 @@ > } > fConsoleManager.showConsoleView(fConsole); > } >+ >+ public void openConsole(String initialText) { >+ if (fConsole == null) { >+ fConsole = new JavaStackTraceConsole(); >+ fConsole.initializeDocument(); >+ fConsole.getDocument().set(initialText); >+ fConsoleManager.addConsoles(new IConsole[]{fConsole}); >+ } >+ fConsoleManager.showConsoleView(fConsole); >+ } >+ >+ > } >#P org.eclipse.ui.views.log >Index: src/org/eclipse/ui/internal/views/log/LogView.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogView.java,v >retrieving revision 1.22 >diff -u -r1.22 LogView.java >--- src/org/eclipse/ui/internal/views/log/LogView.java 1 Feb 2008 15:40:00 -0000 1.22 >+++ src/org/eclipse/ui/internal/views/log/LogView.java 4 Feb 2008 17:11:39 -0000 >@@ -224,7 +224,7 @@ > final Action importLogAction = createImportLogAction(); > toolBarManager.add(importLogAction); > >- toolBarManager.add(new Separator()); >+ toolBarManager.add(new Separator("additions")); > > final Action clearAction = createClearAction(); > toolBarManager.add(clearAction); >#P org.eclipse.pde.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/plugin.xml,v >retrieving revision 1.437 >diff -u -r1.437 plugin.xml >--- plugin.xml 23 Jan 2008 19:37:52 -0000 1.437 >+++ plugin.xml 4 Feb 2008 17:11:40 -0000 >@@ -1888,4 +1888,22 @@ > </menuContribution> > --> > </extension> >+ <extension >+ point="org.eclipse.ui.viewActions"> >+ <viewContribution >+ id="org.eclipse.pde.ui.logViewActions" >+ targetID="org.eclipse.pde.runtime.LogView"> >+ <action >+ class="org.eclipse.pde.internal.ui.ShowErrorInStackTraceConsoleAction" >+ disabledIcon="$nl$/icons/obj16/open_artifact_obj.gif" >+ enablesFor="+" >+ hoverIcon="$nl$/icons/obj16/open_artifact_obj.gif" >+ icon="$nl$/icons/obj16/open_artifact_obj.gif" >+ id="org.eclipse.jdt.debug.ui.LogViewActions.showStackTrace" >+ label="Show in Stack Trace Console View" >+ toolbarPath="additions" >+ tooltip="Display the stack trace from the currently selected error in the java stack trace console"> >+ </action> >+ </viewContribution> >+ </extension> > </plugin> >Index: src/org/eclipse/pde/internal/ui/ShowErrorInStackTraceConsoleAction.java >=================================================================== >RCS file: src/org/eclipse/pde/internal/ui/ShowErrorInStackTraceConsoleAction.java >diff -N src/org/eclipse/pde/internal/ui/ShowErrorInStackTraceConsoleAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/pde/internal/ui/ShowErrorInStackTraceConsoleAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,40 @@ >+package org.eclipse.pde.internal.ui; >+ >+import org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceConsoleFactory; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.ui.IViewActionDelegate; >+import org.eclipse.ui.IViewPart; >+import org.eclipse.ui.internal.views.log.LogEntry; >+ >+public class ShowErrorInStackTraceConsoleAction implements IViewActionDelegate { >+ >+ String fSelectedStack; >+ >+ public void init(IViewPart view) { >+ } >+ >+ public void run(IAction action) { >+ if (fSelectedStack != null) { >+ JavaStackTraceConsoleFactory factory = new JavaStackTraceConsoleFactory(); >+ factory.openConsole(fSelectedStack); >+ } >+ } >+ >+ public void selectionChanged(IAction action, ISelection selection) { >+ fSelectedStack = null; >+ action.setEnabled(false); >+ if (selection instanceof IStructuredSelection) { >+ Object firstObject = ((IStructuredSelection) selection).getFirstElement(); >+ if (firstObject instanceof LogEntry) { >+ String stack = ((LogEntry) firstObject).getStack(); >+ if (stack != null && stack.length() > 0) { >+ action.setEnabled(true); >+ fSelectedStack = stack; >+ } >+ } >+ } >+ } >+ >+}
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 217644
: 88796