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 34423 Details for
Bug 102390
Provide sort by time capabilities in the Anaysis Result 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]
updated patch
com.ibm.etools.symptom.editor.102390.patch.txt (text/plain), 16.58 KB, created by
Eugene Chan
on 2006-02-09 11:19:05 EST
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Eugene Chan
Created:
2006-02-09 11:19:05 EST
Size:
16.58 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P com.ibm.etools.symptom.editor >Index: src/com/ibm/etools/symptom/editor/internal/util/SymptomEditMessages.java >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/editor/internal/util/SymptomEditMessages.java,v >retrieving revision 1.2 >diff -u -r1.2 SymptomEditMessages.java >--- src/com/ibm/etools/symptom/editor/internal/util/SymptomEditMessages.java 29 Nov 2005 20:33:47 -0000 1.2 >+++ src/com/ibm/etools/symptom/editor/internal/util/SymptomEditMessages.java 9 Feb 2006 16:20:21 -0000 >@@ -195,25 +195,10 @@ > public static String _185; > public static String _186; > >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >- >+ public static String _187; >+ public static String _188; >+ public static String _189; >+ public static String _190; > > > static { >Index: src/com/ibm/etools/symptom/editor/internal/util/messages.properties >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/editor/internal/util/messages.properties,v >retrieving revision 1.2 >diff -u -r1.2 messages.properties >--- src/com/ibm/etools/symptom/editor/internal/util/messages.properties 29 Nov 2005 20:33:47 -0000 1.2 >+++ src/com/ibm/etools/symptom/editor/internal/util/messages.properties 9 Feb 2006 16:20:21 -0000 >@@ -185,11 +185,10 @@ > _185 = IBM WebSphere Application Server, Version 6 > _186 = IBM WebSphere Application Server Network Deployment, Version 5 > >- >- >- >- >- >+_187 = Sort in ascending order by symptom creation time >+_188 = Sort in descending order by symptom creation time >+_189 = Descending >+_190 = The time the symptom instance generated by the current rule is created. > > > >Index: src/com/ibm/etools/symptom/editor/internal/util/SymptomEditorConstants.java >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/editor/internal/util/SymptomEditorConstants.java,v >retrieving revision 1.8 >diff -u -r1.8 SymptomEditorConstants.java >--- src/com/ibm/etools/symptom/editor/internal/util/SymptomEditorConstants.java 1 Jul 2005 02:02:08 -0000 1.8 >+++ src/com/ibm/etools/symptom/editor/internal/util/SymptomEditorConstants.java 9 Feb 2006 16:20:21 -0000 >@@ -26,4 +26,8 @@ > public static final String SDB_FILE_NAME_KEY = "sdb_file_name"; > > public static final int PAGE_SIZE = 100; >+ >+ public static final String SORT_ORDER = "Descending"; >+ >+ > } >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/plugin.properties,v >retrieving revision 1.39 >diff -u -r1.39 plugin.properties >--- plugin.properties 8 Dec 2005 18:47:37 -0000 1.39 >+++ plugin.properties 9 Feb 2006 16:20:21 -0000 >@@ -48,6 +48,7 @@ > _UI_RecommendedAction_type_feature = T&ype > _UI_RecommendedAction_version_feature = &Version > _UI_SimpleMatchPattern_expirationTime_feature = &Expiration Time >+_UI_AnalysisMatchPattern_creationTime_feature = &Creation Time > _UI_SimpleMatchPattern_name_feature = &Name > _UI_SimpleMatchPattern_priority_feature = &Priority > _UI_SimpleMatchPattern_probability_feature = Pr&obability >Index: src/com/ibm/etools/symptom/editor/internal/SymptomEditorPluginImages.java >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/editor/internal/SymptomEditorPluginImages.java,v >retrieving revision 1.9 >diff -u -r1.9 SymptomEditorPluginImages.java >--- src/com/ibm/etools/symptom/editor/internal/SymptomEditorPluginImages.java 6 May 2005 04:07:34 -0000 1.9 >+++ src/com/ibm/etools/symptom/editor/internal/SymptomEditorPluginImages.java 9 Feb 2006 16:20:21 -0000 >@@ -56,6 +56,8 @@ > > public static final String IMG_HORIZONTAL = "th_horizontal.gif"; > public static final String IMG_VERTICAL = "th_vertical.gif"; >+ public static final String IMG_SORT_ASC = "sortrecords_ac.gif"; >+ public static final String IMG_SORT_DSC = "sortrecords_dc.gif"; > public static final String IMG_PG_UP = "pageup.gif"; > public static final String IMG_PG_DOWN = "pagedown.gif"; > public static final String IMG_PG_GOTO = "gotopage.gif"; >@@ -72,6 +74,8 @@ > public static final ImageDescriptor DESC_VERTICAL_DISABLED = createManaged(T_DLCL, IMG_VERTICAL); //$NON-NLS-1$ > public static final ImageDescriptor DESC_OPEN_LOG_VIEW = createManaged(T_TOOL, IMG_OPEN_LOG_VIEW); //$NON-NLS-1$ > >+ public static final ImageDescriptor DESC_SORT_ASC = createManaged(T_ELCL, IMG_SORT_ASC); //$NON-NLS-1$ >+ public static final ImageDescriptor DESC_SORT_DSC = createManaged(T_ELCL, IMG_SORT_DSC); //$NON-NLS-1$ > public static final ImageDescriptor DESC_PG_UP = createManaged(T_ELCL, IMG_PG_UP); //$NON-NLS-1$ > public static final ImageDescriptor DESC_PG_DOWN = createManaged(T_ELCL, IMG_PG_DOWN); //$NON-NLS-1$ > public static final ImageDescriptor DESC_PG_GOTO= createManaged(T_ELCL, IMG_PG_GOTO); //$NON-NLS-1$ >Index: src/com/ibm/etools/symptom/presentation/SymptomAnalysisViewer.java >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/presentation/SymptomAnalysisViewer.java,v >retrieving revision 1.6 >diff -u -r1.6 SymptomAnalysisViewer.java >--- src/com/ibm/etools/symptom/presentation/SymptomAnalysisViewer.java 29 Nov 2005 20:33:47 -0000 1.6 >+++ src/com/ibm/etools/symptom/presentation/SymptomAnalysisViewer.java 9 Feb 2006 16:20:21 -0000 >@@ -10,6 +10,7 @@ > > package com.ibm.etools.symptom.presentation; > >+import org.eclipse.core.runtime.Preferences; > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.IToolBarManager; > import org.eclipse.jface.dialogs.IInputValidator; >@@ -30,6 +31,7 @@ > import com.ibm.etools.symptom.editor.internal.SymptomEditorPluginImages; > import com.ibm.etools.symptom.editor.internal.util.GridUtil; > import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages; >+import com.ibm.etools.symptom.editor.internal.util.SymptomEditorConstants; > import org.eclipse.osgi.util.NLS; > > public class SymptomAnalysisViewer extends ViewPart { >@@ -38,9 +40,8 @@ > private SymptomAnalysisPage _currentPage = null; > private String _title = SymptomEditPlugin.INSTANCE.getString("15"); > private boolean _initializedMenu = false; >- private Action _pageUp, _pageDown, _gotoPage; >- >- >+ private Action _sort, _pageUp, _pageDown, _gotoPage; >+ private String STR_SORT_ORDER; > /* (non-Javadoc) > * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) > */ >@@ -50,7 +51,7 @@ > > // Create the default page. > _defaultPage = createDefaultPage(_book); >- >+ > addViewPage(null); > } > >@@ -121,15 +122,55 @@ > tbm.removeAll(); > getViewSite().getActionBars().updateActionBars(); > } >+ > > public void makeActions(){ > if (isInitializedMenu()) > return; >- >- initializedMenu(true); >+ initializedMenu(true); >+ >+ STR_SORT_ORDER = SymptomEditPlugin.getPlugin().getPreferenceStore().getString( >+ SymptomEditorConstants.SORT_ORDER); >+ if ((STR_SORT_ORDER == null) || (STR_SORT_ORDER.equals(""))) >+ STR_SORT_ORDER=SymptomEditMessages._189; >+ _sort = new Action(STR_SORT_ORDER) { >+ public void run() { >+ if (_currentPage == null || !(_currentPage instanceof SymptomAnalysisPage)) >+ return; >+ BusyIndicator.showWhile(null, new Runnable() { >+ public void run() { >+ SymptomAnalysisTreeContentProvider provider = (SymptomAnalysisTreeContentProvider) ((SymptomAnalysisPage) _currentPage).getTreeViewer().getContentProvider(); >+ _sort.setEnabled(provider.sort()); >+ STR_SORT_ORDER = provider.sortTreeViewer(STR_SORT_ORDER); >+ ((SymptomAnalysisPage) _currentPage).update(); >+ Preferences store = SymptomEditPlugin.getPlugin().getPluginPreferences(); >+ store.setValue(SymptomEditorConstants.SORT_ORDER, STR_SORT_ORDER); >+ } >+ }); >+ } >+ }; >+ getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), _sort); >+ if (STR_SORT_ORDER.equalsIgnoreCase("Descending")){ >+ SymptomEditorPluginImages.setImageDescriptors(_sort, >+ SymptomEditorPluginImages.T_LCL, >+ SymptomEditorPluginImages.IMG_SORT_DSC); >+ _sort.setDescription(SymptomEditMessages._188); >+ _sort.setToolTipText(SymptomEditMessages._188); >+ } >+ else if (STR_SORT_ORDER.equalsIgnoreCase("Ascending")){ >+ SymptomEditorPluginImages.setImageDescriptors(_sort, >+ SymptomEditorPluginImages.T_LCL, >+ SymptomEditorPluginImages.IMG_SORT_ASC); >+ _sort.setDescription(SymptomEditMessages._187); >+ _sort.setToolTipText(SymptomEditMessages._187); >+ >+ } >+ > String STR_PAGE_UP = SymptomEditMessages._123; > _pageUp = new Action(STR_PAGE_UP) { > public void run() { >+ >+ > if (_currentPage == null || !(_currentPage instanceof SymptomAnalysisPage)) > return; > >@@ -221,6 +262,7 @@ > _gotoPage.setToolTipText(STR_GO_TO_PAGE); > > IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager(); >+ tbm.add(_sort); > tbm.add(_pageUp); > tbm.add(_pageDown); > tbm.add(_gotoPage); >@@ -255,6 +297,11 @@ > } > } > >+ public Action getSortAction(){ >+ return _sort; >+ } >+ >+ > public Action getPageUpAction(){ > return _pageUp; > } >@@ -266,6 +313,7 @@ > public Action getGotoPageAction(){ > return _gotoPage; > } >+ > > // ///////////////// > // public void fakeData(){ >Index: src/com/ibm/etools/symptom/presentation/SymptomAnalysisTreeContentProvider.java >=================================================================== >RCS file: /cvsroot/ac-tech/com.ibm.etools.symptom.editor/src/com/ibm/etools/symptom/presentation/SymptomAnalysisTreeContentProvider.java,v >retrieving revision 1.4 >diff -u -r1.4 SymptomAnalysisTreeContentProvider.java >--- src/com/ibm/etools/symptom/presentation/SymptomAnalysisTreeContentProvider.java 29 Nov 2005 20:33:47 -0000 1.4 >+++ src/com/ibm/etools/symptom/presentation/SymptomAnalysisTreeContentProvider.java 9 Feb 2006 16:20:21 -0000 >@@ -10,14 +10,19 @@ > package com.ibm.etools.symptom.presentation; > > import java.util.ArrayList; >+import java.util.Comparator; >+import java.util.GregorianCalendar; > import java.util.List; >+import java.util.Collections; >+import org.eclipse.hyades.models.symptom.impl.SymptomDescriptionImpl; > import org.eclipse.jface.viewers.ITreeContentProvider; > import org.eclipse.jface.viewers.Viewer; > import com.ibm.etools.symptom.editor.SymptomEditPlugin; >+import com.ibm.etools.symptom.editor.internal.SymptomEditorPluginImages; > import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages; >- > import org.eclipse.osgi.util.NLS; > >+ > public class SymptomAnalysisTreeContentProvider implements ITreeContentProvider { > private SymptomAnalysisPage _container; > private List _allElements = new ArrayList(); >@@ -82,6 +87,59 @@ > return (getChildren(element).length > 0); > } > >+ private long getSymptomDescriptionCreationTime(SymptomDescriptionImpl item) { >+ String creationTime = item.getCreationTime().toString(); >+ return( new GregorianCalendar(Integer >+ .parseInt(creationTime.substring(0, 4)), Integer >+ .parseInt(creationTime.substring(5, 7)), Integer >+ .parseInt(creationTime.substring(8, 10)), Integer >+ .parseInt(creationTime.substring(11, 13)), Integer >+ .parseInt(creationTime.substring(14, 16)), Integer >+ .parseInt(creationTime.substring(17))).getTimeInMillis()); >+ } >+ >+ /** >+ * Sorts the items in the TreeViewer based on the sortOrder passed as argument and update the sort button >+ * @param sortOrder >+ * @return >+ */ >+ public String sortTreeViewer(String sortOrder) { >+ if (sortOrder.equalsIgnoreCase("Descending")) { >+ List sortedList = _allElements; >+ Collections.sort(sortedList, new Comparator() { >+ public int compare(Object o1, Object o2) { >+ return (getSymptomDescriptionCreationTime((SymptomDescriptionImpl)o1) > getSymptomDescriptionCreationTime((SymptomDescriptionImpl) o2))? -1:1; >+ } >+ }); >+ //update the sort button >+ SymptomEditorPluginImages.setImageDescriptors(_container.getSymptomAnalysisViewer().getSortAction(), >+ SymptomEditorPluginImages.T_LCL, >+ SymptomEditorPluginImages.IMG_SORT_ASC); >+ _container.getSymptomAnalysisViewer().getSortAction().setDescription(SymptomEditMessages._187); >+ _container.getSymptomAnalysisViewer().getSortAction().setToolTipText(SymptomEditMessages._187); >+ sortOrder="Ascending"; >+ } else if (sortOrder.equalsIgnoreCase("Ascending")){ >+ List sortedList = _allElements; >+ Collections.sort(sortedList, new Comparator() { >+ public int compare(Object o1, Object o2) { >+ return (getSymptomDescriptionCreationTime((SymptomDescriptionImpl)o1) < getSymptomDescriptionCreationTime((SymptomDescriptionImpl) o2))? -1:1; >+ } >+ }); >+ //update the sort button >+ SymptomEditorPluginImages.setImageDescriptors(_container.getSymptomAnalysisViewer().getSortAction(), >+ SymptomEditorPluginImages.T_LCL, >+ SymptomEditorPluginImages.IMG_SORT_DSC); >+ _container.getSymptomAnalysisViewer().getSortAction().setDescription(SymptomEditMessages._188); >+ _container.getSymptomAnalysisViewer().getSortAction().setToolTipText(SymptomEditMessages._188); >+ sortOrder="Descending"; >+ } >+ return sortOrder; >+ } >+ >+ public boolean sort(){ >+ return _allElements.size() > 1; >+ } >+ > public boolean pageUp(){ > if (_currentPage > 0){ > _currentPage--; >@@ -138,6 +196,7 @@ > > private void updatePageActions(){ > try{ >+ _container.getSymptomAnalysisViewer().getSortAction().setEnabled(_allElements.size() > 1); > _container.getSymptomAnalysisViewer().getPageUpAction().setEnabled(_currentPage > 0); > _container.getSymptomAnalysisViewer().getPageDownAction().setEnabled((_totalPages - _currentPage) > 1); > _container.getSymptomAnalysisViewer().getGotoPageAction().setEnabled(_totalPages > 1); >Index: icons/full/dlcl16/sortrecords_ac.gif >=================================================================== >RCS file: icons/full/dlcl16/sortrecords_ac.gif >diff -N icons/full/dlcl16/sortrecords_ac.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/dlcl16/sortrecords_ac.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,)HºÜM¸×¸TrûÜÊ?i??Ü_©º'Ü4me5Ã:<þÀE; >Index: icons/full/clcl16/sortrecords_dc.gif >=================================================================== >RCS file: icons/full/clcl16/sortrecords_dc.gif >diff -N icons/full/clcl16/sortrecords_dc.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/clcl16/sortrecords_dc.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,+HºÜ> >+¸¸TrûÜJ?i??ù#ª>ì7C]//c39#Ì£ p; >Index: icons/full/elcl16/sortrecords_ac.gif >=================================================================== >RCS file: icons/full/elcl16/sortrecords_ac.gif >diff -N icons/full/elcl16/sortrecords_ac.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/elcl16/sortrecords_ac.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,)HºÜM¸×¸TrûÜÊ?i??Ü_©º'Ü4me5Ã:<þÀE; >Index: icons/full/dlcl16/sortrecords_dc.gif >=================================================================== >RCS file: icons/full/dlcl16/sortrecords_dc.gif >diff -N icons/full/dlcl16/sortrecords_dc.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/dlcl16/sortrecords_dc.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,+HºÜ> >+¸¸TrûÜJ?i??ù#ª>ì7C]//c39#Ì£ p; >Index: icons/full/elcl16/sortrecords_dc.gif >=================================================================== >RCS file: icons/full/elcl16/sortrecords_dc.gif >diff -N icons/full/elcl16/sortrecords_dc.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/elcl16/sortrecords_dc.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,2 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,+HºÜ> >+¸¸TrûÜJ?i??ù#ª>ì7C]//c39#Ì£ p; >Index: icons/full/clcl16/sortrecords_ac.gif >=================================================================== >RCS file: icons/full/clcl16/sortrecords_ac.gif >diff -N icons/full/clcl16/sortrecords_ac.gif >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ icons/full/clcl16/sortrecords_ac.gif 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1 @@ >+GIF89a¢ÁÆÙ«ÖëLZ]O[[ÿÿÿ!ù,)HºÜM¸×¸TrûÜÊ?i??Ü_©º'Ü4me5Ã:<þÀE;
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 102390
:
32679
|
32726
|
32727
| 34423