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 58965 Details for
Bug 167609
Enhance Thread Statistics View
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]
The same patch without icons
org.eclipse.tptp.trace.jvmti.client_20070214-patch (text/plain), 31.67 KB, created by
Ruslan Scherbakov
on 2007-02-14 08:20:14 EST
(
hide
)
Description:
The same patch without icons
Filename:
MIME Type:
Creator:
Ruslan Scherbakov
Created:
2007-02-14 08:20:14 EST
Size:
31.67 KB
patch
obsolete
>Index: plugin.properties >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/plugin.properties,v >retrieving revision 1.6 >diff -u -r1.6 plugin.properties >--- plugin.properties 13 Feb 2007 20:44:49 -0000 1.6 >+++ plugin.properties 14 Feb 2007 13:08:33 -0000 >@@ -15,16 +15,18 @@ > pluginName = TPTP Trace JVMTI Client > providerName = Eclipse.org > >-JVMTI_ANALYSIS_TYPE_DESCRIPTION_TYPE = Execution Time Analysis >+JVMTI_ANALYSIS_TYPE_DESCRIPTION_EXEC = Execution Time Analysis (JVMTI) >+JVMTI_ANALYSIS_TYPE_DESCRIPTION_THRD = Thread Statistics >+JVMTI_ANALYSIS_TYPE_DESCRIPTION_HEAP = Memory Statistics > JVMTI_ANALYSIS_TYPE_VIEW_FLOW = Execution Flow > JVMTI_ANALYSIS_TYPE_VIEW_STATISTICS = Execution Statistics > JVMTI_ANALYSIS_TYPE_VIEW_UML_THREAD = UML2 Thread Interactions > JVMTI_ANALYSIS_TYPE_VIEW_UML_OBJECT = UML2 Object Interactions > JVMTI_ANALYSIS_TYPE_VIEW_UML_CLASS = UML2 Class Interactions >-JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE = Thread Statistics >-JVMTI_ANALYSIS_TYPE_HEAP_DESCRIPTION_TYPE = Memory Statistics >-JVMTI_ANALYSIS_TYPE_THREAD_STATES_DESCRIPTION_TYPE = Thread States >-JVMTI_ANALYSIS_TYPE_CALL_STACK_DESCRIPTION_TYPE = Call Stack >-JVMTI_ANALYSIS_TYPE_THRD_TOOLTIP = Open Thread Statistics >-JVMTI_ANALYSIS_TYPE_THREAD_STATES_TOOLTIP = Open Thread States >-JVMTI_ANALYSIS_TYPE_CALL_STACK_TOOLTIP = Open Call Stack >+JVMTI_ANALYSIS_TYPE_VIEW_THRD = Thread Statistics >+JVMTI_ANALYSIS_TYPE_VIEW_THRD_STATES = Thread States >+JVMTI_ANALYSIS_TYPE_VIEW_CALL_STACK = Call Stack >+JVMTI_ANALYSIS_TYPE_VIEW_HEAP = Memory Statistics >+JVMTI_ANALYSIS_TYPE_TOOLTIP_THRD = Open Thread Statistics >+JVMTI_ANALYSIS_TYPE_TOOLTIP_THRD_STATES = Open Thread States >+JVMTI_ANALYSIS_TYPE_TOOLTIP_CALL_STACK = Open Call Stack >Index: build.properties >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/build.properties,v >retrieving revision 1.4 >diff -u -r1.4 build.properties >--- build.properties 6 Jun 2006 18:57:07 -0000 1.4 >+++ build.properties 14 Feb 2007 13:08:33 -0000 >@@ -1,11 +1,12 @@ > bin.includes = .,\ >- about.html,\ >+ about.html,\ > META-INF/,\ > plugin.properties,\ > plugin.xml,\ > about.ini,\ > about.mappings,\ >- about.properties >+ about.properties,\ >+ icons/ > jars.compile.order = . > source.. = src/ > output.. = bin/ >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/plugin.xml,v >retrieving revision 1.7 >diff -u -r1.7 plugin.xml >--- plugin.xml 13 Feb 2007 20:44:49 -0000 1.7 >+++ plugin.xml 14 Feb 2007 13:08:34 -0000 >@@ -5,7 +5,7 @@ > <extension > point="org.eclipse.hyades.ui.typeDescriptions"> > <typeDescription >- name="%JVMTI_ANALYSIS_TYPE_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_DESCRIPTION_EXEC" > type="org.eclipse.tptp.analysisType.jvmti.execution" > icon="icons/full/obj16/exectimeantype_obj.gif" > extension="trace"> >@@ -13,12 +13,12 @@ > <typeDescription > extension="trace" > icon="icons/full/obj16/exectimeantype_obj.gif" >- name="%JVMTI_ANALYSIS_TYPE_HEAP_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_DESCRIPTION_HEAP" > type="org.eclipse.tptp.analysisType.jvmti.heap"/> > <typeDescription > extension="trace" > icon="icons/full/obj16/exectimeantype_obj.gif" >- name="%JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_DESCRIPTION_THRD" > type="org.eclipse.tptp.analysisType.jvmti.thread"/> > </extension> > >@@ -81,27 +81,29 @@ > extension="trace" > icon="icons/full/obj16/memleakantype_obj.gif" > id="org.eclipse.tptp.platform.jvmti.client.ClassInteractions" >- name="%JVMTI_ANALYSIS_TYPE_HEAP_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_HEAP" > type="org.eclipse.tptp.analysisType.jvmti.heap"/> > <analyzerExtension > class="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatisticViewAction" > extension="trace" > icon="icons/full/obj16/thread.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatisticViewAction" >- name="%JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_THRD" > type="org.eclipse.tptp.analysisType.jvmti.thread"/> > <analyzerExtension > class="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatesViewAction" > extension="trace" >+ icon="icons/full/cview16/thread_states_view.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatesViewAction" >- name="%JVMTI_ANALYSIS_TYPE_THREAD_STATES_DESCRIPTION_TYPE"> >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_THRD_STATES" >+ type="org.eclipse.tptp.analysisType.jvmti.thread"> > </analyzerExtension> > </extension> > > <extension > point="org.eclipse.ui.views"> > <view >- name="%JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE" >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_THRD" > icon="icons/full/obj16/thread.gif" > category="org.eclipse.hyades.trace.internal.ui.trace" > class="org.eclipse.tptp.trace.jvmti.internal.client.views.ThreadStatisticViewer" >@@ -110,13 +112,15 @@ > <view > category="org.eclipse.hyades.trace.internal.ui.trace" > class="org.eclipse.tptp.trace.jvmti.internal.client.views.ThreadStatesViewer" >+ icon="icons/full/cview16/thread_states_view.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.ThreadStatesViewer" >- name="%JVMTI_ANALYSIS_TYPE_THREAD_STATES_DESCRIPTION_TYPE"/> >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_THRD_STATES"/> > <view > category="org.eclipse.hyades.trace.internal.ui.trace" > class="org.eclipse.tptp.trace.jvmti.internal.client.views.CallStackViewer" >+ icon="icons/full/cview16/call_stack_view.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.CallStackView" >- name="%JVMTI_ANALYSIS_TYPE_CALL_STACK_DESCRIPTION_TYPE"> >+ name="%JVMTI_ANALYSIS_TYPE_VIEW_CALL_STACK"> > </view> > </extension> > >@@ -148,31 +152,33 @@ > <extension > point="org.eclipse.ui.actionSets"> > <actionSet >- label="%JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE" >+ label="%JVMTI_ANALYSIS_TYPE_DESCRIPTION_THRD" > visible="true" > id="org.eclipse.tptp.trace.jvmti.threadActionSet"> > <action >- label="%JVMTI_ANALYSIS_TYPE_THRD_DESCRIPTION_TYPE" >+ label="%JVMTI_ANALYSIS_TYPE_VIEW_THRD" > icon="icons/full/obj16/thread.gif" >- tooltip="%JVMTI_ANALYSIS_TYPE_THRD_TOOLTIP" >+ tooltip="%JVMTI_ANALYSIS_TYPE_TOOLTIP_THRD_STATES" > class="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatisticViewAction" > toolbarPath="trace/group.statistic" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatisticViewAction"> > </action> > <action > class="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatesViewAction" >+ icon="icons/full/cview16/thread_states_view.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenThreadStatesViewAction" >- label="%JVMTI_ANALYSIS_TYPE_THREAD_STATES_DESCRIPTION_TYPE" >+ label="%JVMTI_ANALYSIS_TYPE_VIEW_THRD_STATES" > style="push" > toolbarPath="trace/group.statistic" >- tooltip="%JVMTI_ANALYSIS_TYPE_THREAD_STATES_TOOLTIP"/> >+ tooltip="%JVMTI_ANALYSIS_TYPE_TOOLTIP_THRD_STATES"/> > <action > class="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenCallStackViewAction" >+ icon="icons/full/cview16/call_stack_view.gif" > id="org.eclipse.tptp.trace.jvmti.internal.client.views.OpenCallStackViewAction" >- label="%JVMTI_ANALYSIS_TYPE_CALL_STACK_DESCRIPTION_TYPE" >+ label="%JVMTI_ANALYSIS_TYPE_VIEW_CALL_STACK" > style="push" > toolbarPath="trace/group.statistic" >- tooltip="%JVMTI_ANALYSIS_TYPE_CALL_STACK_TOOLTIP"> >+ tooltip="%JVMTI_ANALYSIS_TYPE_TOOLTIP_CALL_STACK"> > </action> > </actionSet> > </extension> >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/UIMessages.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/UIMessages.java,v >retrieving revision 1.3 >diff -u -r1.3 UIMessages.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/UIMessages.java 13 Feb 2007 20:44:46 -0000 1.3 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/UIMessages.java 14 Feb 2007 13:08:34 -0000 >@@ -23,6 +23,7 @@ > public static String CURRENT_TIME; > public static String SELECTED_TIME; > public static String TIME_SCALE; >+ public static String MEM_ANALYSIS_TITLE; > > public static String _261; > public static String _262; >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatisticView.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatisticView.java,v >retrieving revision 1.3 >diff -u -r1.3 ThreadStatisticView.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatisticView.java 13 Feb 2007 20:44:46 -0000 1.3 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatisticView.java 14 Feb 2007 13:08:34 -0000 >@@ -583,6 +583,6 @@ > } > > public void widgetDefaultSelected(SelectionEvent arg0) { >- OpenCallStackViewAction.openCallStackView(false); >+ new OpenCallStackViewAction().openView(false); > } > } >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesViewer.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesViewer.java,v >retrieving revision 1.1 >diff -u -r1.1 ThreadStatesViewer.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesViewer.java 13 Feb 2007 20:44:46 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesViewer.java 14 Feb 2007 13:08:34 -0000 >@@ -20,9 +20,9 @@ > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.IMenuManager; > import org.eclipse.jface.action.IToolBarManager; >+import org.eclipse.tptp.trace.jvmti.internal.client.TITracePlugin; > import org.eclipse.ui.IActionBars; >-import org.eclipse.ui.ISharedImages; >-import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.plugin.AbstractUIPlugin; > > public class ThreadStatesViewer extends TraceViewer { > >@@ -53,39 +53,72 @@ > > Action _selectNextEvent; > Action _selectPrevEvent; >+ Action _selectNextThread; >+ Action _selectPrevThread; > > private void createActions() { > _selectNextEvent = new Action() { > public void run() { >- if (getCurrentPage() instanceof ThreadStatesPage) >+ if (getCurrentPage() instanceof ThreadStatesPage) { > ((ThreadStatesPage) getCurrentPage()).selectNextEvent(); >+ } > } > }; >- _selectNextEvent.setText("Next"); >+ _selectNextEvent.setText("Next Event"); > _selectNextEvent.setToolTipText("Select Next Event"); >- _selectNextEvent.setImageDescriptor(PlatformUI.getWorkbench() >- .getSharedImages().getImageDescriptor( >- ISharedImages.IMG_TOOL_FORWARD)); >+ //_selectNextEvent.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); >+ _selectNextEvent.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(TITracePlugin.PLUGIN_ID >+ , "icons/full/obj16/next_event.gif")); >+ > _selectPrevEvent = new Action() { > public void run() { >- if (getCurrentPage() instanceof ThreadStatesPage) >+ if (getCurrentPage() instanceof ThreadStatesPage) { > ((ThreadStatesPage) getCurrentPage()).selectPrevEvent(); >+ } > } > }; >- _selectPrevEvent.setText("Prev"); >+ _selectPrevEvent.setText("Prev Event"); > _selectPrevEvent.setToolTipText("Select Previous Event"); >- _selectPrevEvent.setImageDescriptor(PlatformUI.getWorkbench() >- .getSharedImages().getImageDescriptor( >- ISharedImages.IMG_TOOL_BACK)); >+ //_selectPrevEvent.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); >+ _selectPrevEvent.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(TITracePlugin.PLUGIN_ID >+ , "icons/full/obj16/prev_event.gif")); >+ >+ _selectNextThread = new Action() { >+ public void run() { >+ if (getCurrentPage() instanceof ThreadStatesPage) { >+ ((ThreadStatesPage) getCurrentPage()).selectNextThread(); >+ } >+ } >+ }; >+ _selectNextThread.setText("Next Thread"); >+ _selectNextThread.setToolTipText("Select Next Thread"); >+ _selectNextThread.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(TITracePlugin.PLUGIN_ID >+ , "icons/full/obj16/next_thread.gif")); >+ >+ _selectPrevThread = new Action() { >+ public void run() { >+ if (getCurrentPage() instanceof ThreadStatesPage) { >+ ((ThreadStatesPage) getCurrentPage()).selectPrevThread(); >+ } >+ } >+ }; >+ _selectPrevThread.setText("Prev Thread"); >+ _selectPrevThread.setToolTipText("Select Previous Thread"); >+ _selectPrevThread.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(TITracePlugin.PLUGIN_ID >+ , "icons/full/obj16/prev_thread.gif")); > } > > private void fillLocalPullDown(IMenuManager manager) { > manager.add(_selectPrevEvent); > manager.add(_selectNextEvent); >+ manager.add(_selectPrevThread); >+ manager.add(_selectNextThread); > } > > private void fillLocalToolBar(IToolBarManager manager) { > manager.add(_selectPrevEvent); > manager.add(_selectNextEvent); >+ manager.add(_selectPrevThread); >+ manager.add(_selectNextThread); > } > } >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenThreadStatesViewAction.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenThreadStatesViewAction.java,v >retrieving revision 1.1 >diff -u -r1.1 OpenThreadStatesViewAction.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenThreadStatesViewAction.java 13 Feb 2007 20:44:43 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenThreadStatesViewAction.java 14 Feb 2007 13:08:34 -0000 >@@ -14,21 +14,9 @@ > > package org.eclipse.tptp.trace.jvmti.internal.client.views; > >-import org.eclipse.core.resources.IResourceStatus; >-import org.eclipse.core.resources.ResourcesPlugin; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.hyades.trace.ui.TraceViewer; >-import org.eclipse.hyades.trace.ui.UIPlugin; >-import org.eclipse.hyades.trace.views.actions.internal.OpenTraceViewAction; >-import org.eclipse.hyades.trace.views.internal.TraceUIMessages; >-import org.eclipse.jface.action.IAction; >-import org.eclipse.jface.dialogs.ErrorDialog; > import org.eclipse.jface.resource.ImageDescriptor; >-import org.eclipse.ui.IViewPart; >-import org.eclipse.ui.IWorkbenchPage; >-import org.eclipse.ui.IWorkbenchWindow; > >-public class OpenThreadStatesViewAction extends OpenTraceViewAction { >+public class OpenThreadStatesViewAction extends OpenTraceViewActionBase { > > private final String VIEW_ID = "org.eclipse.tptp.trace.jvmti.internal.client.views.ThreadStatesViewer"; > >@@ -44,34 +32,6 @@ > super(label, image); > } > >- public boolean isVisibleForType(Object mofObject) { >- return true; >- } >- >- public void run() { >- IWorkbenchWindow window = UIPlugin.getDefault().getWorkbench() >- .getActiveWorkbenchWindow(); >- try { >- IWorkbenchPage persp = UIPlugin.getActivePage(); >- IViewPart view = persp.showView(VIEW_ID); >- if (view != null && view instanceof TraceViewer) { >- ((TraceViewer) view).addViewPage(getMofObject(), true); >- } >- } catch (Exception e) { >- String msg = TraceUIMessages._3; >- Status err = new Status(Status.WARNING, >- ResourcesPlugin.PI_RESOURCES, >- IResourceStatus.INTERNAL_ERROR, e.toString(), null); >- ErrorDialog.openError(window.getShell(), msg, "", err); >- e.printStackTrace(); >- } >- >- } >- >- public void run(IAction action) { >- run(); >- } >- > public String getViewID() { > return VIEW_ID; > } >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/messages.properties >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/messages.properties,v >retrieving revision 1.3 >diff -u -r1.3 messages.properties >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/messages.properties 13 Feb 2007 20:44:46 -0000 1.3 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/messages.properties 14 Feb 2007 13:08:34 -0000 >@@ -19,6 +19,7 @@ > CURRENT_TIME = Current Time > SELECTED_TIME = Selected Time > TIME_SCALE = Time Scale >+MEM_ANALYSIS_TITLE = Memory Analysis > _261 = Running > _262 = Sleeping > _263 = Waiting >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenCallStackViewAction.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenCallStackViewAction.java,v >retrieving revision 1.1 >diff -u -r1.1 OpenCallStackViewAction.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenCallStackViewAction.java 13 Feb 2007 20:44:44 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenCallStackViewAction.java 14 Feb 2007 13:08:34 -0000 >@@ -14,18 +14,9 @@ > > package org.eclipse.tptp.trace.jvmti.internal.client.views; > >-import org.eclipse.core.resources.IResourceStatus; >-import org.eclipse.core.resources.ResourcesPlugin; >-import org.eclipse.core.runtime.Status; >-import org.eclipse.hyades.trace.ui.UIPlugin; >-import org.eclipse.hyades.trace.views.actions.internal.OpenTraceViewAction; >-import org.eclipse.hyades.trace.views.internal.TraceUIMessages; >-import org.eclipse.jface.action.IAction; >-import org.eclipse.jface.dialogs.ErrorDialog; > import org.eclipse.jface.resource.ImageDescriptor; >-import org.eclipse.ui.IWorkbenchWindow; > >-public class OpenCallStackViewAction extends OpenTraceViewAction { >+public class OpenCallStackViewAction extends OpenTraceViewActionBase { > > static final String VIEW_ID = "org.eclipse.tptp.trace.jvmti.internal.client.views.CallStackView"; > >@@ -41,35 +32,6 @@ > super(label, image); > } > >- public boolean isVisibleForType(Object mofObject) { >- return true; >- } >- >- static public void openCallStackView(boolean showError) { >- IWorkbenchWindow window = UIPlugin.getDefault().getWorkbench() >- .getActiveWorkbenchWindow(); >- try { >- UIPlugin.getActivePage().showView(VIEW_ID); >- } catch (Exception e) { >- if (showError) { >- String msg = TraceUIMessages._3; >- Status err = new Status(Status.WARNING, >- ResourcesPlugin.PI_RESOURCES, >- IResourceStatus.INTERNAL_ERROR, e.toString(), null); >- ErrorDialog.openError(window.getShell(), msg, "", err); >- } >- e.printStackTrace(); >- } >- } >- >- public void run() { >- openCallStackView(true); >- } >- >- public void run(IAction action) { >- run(); >- } >- > public String getViewID() { > return VIEW_ID; > } >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesPage.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesPage.java,v >retrieving revision 1.1 >diff -u -r1.1 ThreadStatesPage.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesPage.java 13 Feb 2007 20:44:44 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/ThreadStatesPage.java 14 Feb 2007 13:08:34 -0000 >@@ -259,8 +259,8 @@ > if (_selectedTime < _beginTime) > _selectedTime = _beginTime; > if (ensureVisible) { >- double timeSpace = (_time1 - _time0) * .1; >- double timeMid = (_time1 - _time0) * .5; >+ double timeSpace = (_time1 - _time0) * .02; >+ double timeMid = (_time1 - _time0) * .1; > if (_selectedTime < _time0 + timeSpace) { > double dt = _time0 - _selectedTime + timeMid; > _time0 -= dt; >@@ -301,7 +301,7 @@ > } > > public void widgetDefaultSelected(SelectionEvent e) { >- OpenCallStackViewAction.openCallStackView(false); >+ new OpenCallStackViewAction().openView(false); > updateModelSelection(); > } > >@@ -316,4 +316,12 @@ > public void selectPrevEvent() { > _stateCtrl.selectPrevEvent(); > } >+ >+ public void selectNextThread() { >+ _stateCtrl.selectNextThread(); >+ } >+ >+ public void selectPrevThread() { >+ _stateCtrl.selectPrevThread(); >+ } > } >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/ThreadStatesCtrl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/ThreadStatesCtrl.java,v >retrieving revision 1.1 >diff -u -r1.1 ThreadStatesCtrl.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/ThreadStatesCtrl.java 13 Feb 2007 20:44:47 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/ThreadStatesCtrl.java 14 Feb 2007 13:08:35 -0000 >@@ -248,6 +248,70 @@ > return sel; > } > >+ public void selectThread(int n) { >+ if (n != 1 && n != -1) >+ return; >+ boolean changed = false; >+ int lastSelection = -1; >+ for (int i = 0; i < _data._items.length; i++) { >+ Item item = (Item) _data._items[i]; >+ if (item._selected) { >+ lastSelection = i; >+ if (1 == n && i < _data._items.length - 1) { >+ item._selected = false; >+ if (item._hasChildren) >+ _data.expandItem(i, true); >+ item = (Item) _data._items[i + 1]; >+ if (item._hasChildren) { >+ _data.expandItem(i + 1, true); >+ item = (Item) _data._items[i + 2]; >+ } >+ item._selected = true; >+ changed = true; >+ } else if (-1 == n && i > 0) { >+ i--; >+ Item prevItem = (Item) _data._items[i]; >+ if (prevItem._hasChildren) { >+ if (prevItem._expanded) { >+ if (i > 0) { >+ i--; >+ prevItem = (Item) _data._items[i]; >+ } >+ } >+ if (!prevItem._expanded) { >+ int added = _data.expandItem(i, true); >+ prevItem = (Item) _data._items[i + added]; >+ item._selected = false; >+ prevItem._selected = true; >+ changed = true; >+ } >+ } else { >+ item._selected = false; >+ prevItem._selected = true; >+ changed = true; >+ } >+ } >+ break; >+ } >+ } >+ if (lastSelection < 0 && _data._items.length > 0) { >+ Item item = (Item) _data._items[0]; >+ if (item._hasChildren) { >+ _data.expandItem(0, true); >+ item = (Item) _data._items[1]; >+ item._selected = true; >+ changed = true; >+ } else { >+ item._selected = true; >+ changed = true; >+ } >+ } >+ if (changed) { >+ redraw(); >+ fireSelectionChanged(); >+ } >+ } >+ > public void selectEvent(int n) { > if (null == _timeProvider) > return; >@@ -261,6 +325,8 @@ > nextEvent = findEvent(thread, selectedTime, 0); > else > nextEvent = findEvent(thread, selectedTime, n); >+ if (null == nextEvent && -1 == n) >+ nextEvent = getFirstEvent(thread); > if (null != nextEvent) { > _timeProvider.setSelectedTime(nextEvent.getTime(), true); > fireSelectionChanged(); >@@ -279,6 +345,14 @@ > selectEvent(-1); > } > >+ public void selectNextThread() { >+ selectThread(1); >+ } >+ >+ public void selectPrevThread() { >+ selectThread(-1); >+ } >+ > public TRCThread getSelectedThread() { > TRCThread thread = null; > int idx = getSelectedIndex(); >@@ -441,34 +515,51 @@ > } > > void drawName(Item item, Rectangle rect, GC gc) { >- if (item instanceof GroupItem) { >- gc.setBackground(_colors >- .getBkColorGroup(item._selected, _isInFocus)); >+ boolean group = item instanceof GroupItem; >+ int elemHeight = rect.height / 2; >+ int elemWidth = elemHeight; >+ if (group) { >+ gc.setBackground(_colors.getBkColorGroup(item._selected, _isInFocus)); > gc.fillRectangle(rect); > if (item._selected && _isInFocus) { >- gc.setForeground(_colors.getBkColor(item._selected, _isInFocus, >- false)); >- gc.drawRectangle(rect.x, rect.y, rect.width - 2, >- rect.height - 2); >+ gc.setForeground(_colors.getBkColor(item._selected, _isInFocus, false)); >+ //gc.drawRectangle(rect.x, rect.y, rect.width - 2, rect.height - 2); >+ gc.drawRoundRectangle(rect.x, rect.y, rect.width - 2, rect.height - 2, 2, 2); > } > gc.setForeground(_colors.getBkColor(false, false, false)); >- gc.drawLine(rect.x, rect.y + rect.height - 1, rect.width - 1, >- rect.y + rect.height - 1); >- gc.setForeground(_colors >- .getFgColorGroup(item._selected, _isInFocus)); >+ gc.drawLine(rect.x, rect.y + rect.height - 1, rect.width - 1, rect.y + rect.height - 1); >+ gc.setForeground(_colors.getFgColorGroup(false, false)); >+ gc.setBackground(_colors.getBkColor(false, false, false)); >+ Utils.init(_rect1, rect); >+ _rect1.x += 2; >+ _rect1.y += (rect.height - elemHeight) / 2; >+ _rect1.width = elemWidth; >+ _rect1.height = elemHeight; >+ gc.fillRectangle(_rect1); >+ gc.drawRectangle(_rect1.x, _rect1.y, _rect1.width - 1, _rect1.height - 1); >+ int p = _rect1.y + _rect1.height / 2; >+ gc.drawLine(_rect1.x + 2, p, _rect1.x + _rect1.width - 3, p); >+ if (!item._expanded) { >+ p = _rect1.x + _rect1.width / 2; >+ gc.drawLine(p, _rect1.y + 2, p, _rect1.y + _rect1.height - 3); >+ } >+ gc.setForeground(_colors.getFgColorGroup(item._selected, _isInFocus)); >+ elemWidth+= 4; > } else { >- gc.setBackground(_colors.getBkColor(item._selected, _isInFocus, >- true)); >+ gc.setBackground(_colors.getBkColor(item._selected, _isInFocus, true)); > gc.setForeground(_colors.getFgColor(item._selected, _isInFocus)); > gc.fillRectangle(rect); > } > Utils.init(_rect1, rect); >- _rect1.x += 4; >- _rect1.width -= 4; >+ int leftMargin = 4 + (group ? elemWidth : 0); >+ _rect1.x += leftMargin; >+ _rect1.width -= leftMargin; > int textWidth = 0; > // draw text >- if (_rect1.width > 0) >- textWidth = Utils.drawText(gc, item._name, _rect1, true) + 8; >+ if (_rect1.width > 0) { >+ String name = group ? item._name + " (group}" : item._name; >+ textWidth = Utils.drawText(gc, name, _rect1, true) + 8; >+ } > // draw middle line > Utils.init(_rect1, rect); > _rect1.x += textWidth; >@@ -855,6 +946,20 @@ > _items = itemList.toArray(); > } > >+ public int expandItem(int idx, boolean expand) { >+ if (idx < 0 || idx >= _items.length) >+ return 0; >+ int ret = 0; >+ Item item = (Item) _items[idx]; >+ if (item._hasChildren && !item._expanded) { >+ item._expanded = expand; >+ ret = _items.length; >+ updateItems(); >+ ret = _items.length - ret; >+ } >+ return ret; >+ } >+ > public void refreshData(Object threads[]) { > clearGroups(); > _threads = threads; >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/Utils.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.jvmti.client/src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/Utils.java,v >retrieving revision 1.1 >diff -u -r1.1 Utils.java >--- src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/Utils.java 13 Feb 2007 20:44:48 -0000 1.1 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/widgets/Utils.java 14 Feb 2007 13:08:35 -0000 >@@ -141,6 +141,8 @@ > gc.drawLine(rect.x, rect.y, rect.x + rect.width - 1, rect.y); > gc.drawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width - 1, rect.y + rect.height - 1); > } >+ gc.drawLine(rect.x, rect.y + 1, rect.x + rect.width - 1, rect.y + 1); >+ gc.drawLine(rect.x, rect.y + rect.height - 2, rect.x + rect.width - 1, rect.y + rect.height - 2); > } > } > >Index: src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenTraceViewActionBase.java >=================================================================== >RCS file: src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenTraceViewActionBase.java >diff -N src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenTraceViewActionBase.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/tptp/trace/jvmti/internal/client/views/OpenTraceViewActionBase.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,73 @@ >+/***************************************************************************** >+ * Copyright (c) 2007, Intel Corporation. >+ * 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Intel Corporation - Initial API and implementation >+ * Ruslan A. Scherbakov, Intel - Initial API and implementation >+ * >+ * $Id: >+ *****************************************************************************/ >+ >+package org.eclipse.tptp.trace.jvmti.internal.client.views; >+ >+import org.eclipse.core.resources.IResourceStatus; >+import org.eclipse.core.resources.ResourcesPlugin; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.hyades.trace.ui.TraceViewer; >+import org.eclipse.hyades.trace.ui.UIPlugin; >+import org.eclipse.hyades.trace.views.actions.internal.OpenTraceViewAction; >+import org.eclipse.hyades.trace.views.internal.TraceUIMessages; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.dialogs.ErrorDialog; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.ui.IViewPart; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.IWorkbenchWindow; >+ >+public abstract class OpenTraceViewActionBase extends OpenTraceViewAction { >+ >+ public OpenTraceViewActionBase() { >+ super(""); >+ } >+ >+ public OpenTraceViewActionBase(String label) { >+ super(label); >+ } >+ >+ public OpenTraceViewActionBase(String label, ImageDescriptor image) { >+ super(label, image); >+ } >+ >+ void openView(boolean showError) { >+ IWorkbenchWindow window = UIPlugin.getDefault().getWorkbench() >+ .getActiveWorkbenchWindow(); >+ try { >+ IWorkbenchPage persp = UIPlugin.getActivePage(); >+ IViewPart view = persp.showView(getViewID()); >+ if (view != null && view instanceof TraceViewer) { >+ ((TraceViewer) view).addViewPage(getMofObject(), true); >+ } >+ } catch (Exception e) { >+ if (showError) { >+ String msg = TraceUIMessages._3; >+ Status err = new Status(Status.WARNING, >+ ResourcesPlugin.PI_RESOURCES, >+ IResourceStatus.INTERNAL_ERROR, e.toString(), null); >+ ErrorDialog.openError(window.getShell(), msg, "", err); >+ } >+ e.printStackTrace(); >+ } >+ } >+ >+ public void run() { >+ openView(true); >+ } >+ >+ public void run(IAction action) { >+ run(); >+ } >+}
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 167609
:
57785
|
57787
|
58675
|
58754
|
58831
|
58964
|
58965
|
58966
|
59900
|
59901
|
60096