Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 102390 | Differences between
and this patch

Collapse All | Expand All

(-)src/com/ibm/etools/symptom/editor/internal/util/SymptomEditMessages.java (-19 / +4 lines)
Lines 195-219 Link Here
195
	public static String _185;
195
	public static String _185;
196
	public static String _186;
196
	public static String _186;
197
	
197
	
198
	
198
	public static String _187;
199
	
199
	public static String _188;
200
	
200
	public static String _189;
201
	
201
	public static String _190;
202
	
203
	
204
	
205
	
206
	
207
	
208
	
209
	
210
	
211
	
212
	
213
	
214
	
215
	
216
	
217
	
202
	
218
	
203
	
219
	static {
204
	static {
(-)src/com/ibm/etools/symptom/editor/internal/util/messages.properties (-5 / +4 lines)
Lines 185-195 Link Here
185
_185                   = IBM WebSphere Application Server, Version 6
185
_185                   = IBM WebSphere Application Server, Version 6
186
_186                   = IBM WebSphere Application Server Network Deployment, Version 5
186
_186                   = IBM WebSphere Application Server Network Deployment, Version 5
187
187
188
188
_187 = Sort in ascending order by Creation Time
189
189
_188 = Sort in descending order by Creation Time
190
190
_189 = Descending
191
191
_190 = The time the symptom instance generated by the current rule is created.
192
193
192
194
193
195
194
(-)src/com/ibm/etools/symptom/editor/internal/util/SymptomEditorConstants.java (+4 lines)
Lines 26-29 Link Here
26
	public static final String SDB_FILE_NAME_KEY = "sdb_file_name";
26
	public static final String SDB_FILE_NAME_KEY = "sdb_file_name";
27
	
27
	
28
	public static final int PAGE_SIZE = 100;
28
	public static final int PAGE_SIZE = 100;
29
	
30
	public static final String SORT_ORDER = "Descending";
31
	
32
29
}
33
}
(-)plugin.properties (+1 lines)
Lines 45-50 Link Here
45
_UI_RecommendedAction_type_feature = T&ype
45
_UI_RecommendedAction_type_feature = T&ype
46
_UI_RecommendedAction_version_feature = &Version
46
_UI_RecommendedAction_version_feature = &Version
47
_UI_SimpleMatchPattern_expirationTime_feature = &Expiration Time
47
_UI_SimpleMatchPattern_expirationTime_feature = &Expiration Time
48
_UI_AnalysisMatchPattern_creationTime_feature = &Creation Time
48
_UI_SimpleMatchPattern_name_feature = &Name
49
_UI_SimpleMatchPattern_name_feature = &Name
49
_UI_SimpleMatchPattern_priority_feature = &Priority
50
_UI_SimpleMatchPattern_priority_feature = &Priority
50
_UI_SimpleMatchPattern_probability_feature = Pr&obability
51
_UI_SimpleMatchPattern_probability_feature = Pr&obability
(-)src/com/ibm/etools/symptom/presentation/SymptomAnalysisDetailPageBook.java (-3 / +6 lines)
Lines 26-31 Link Here
26
import org.eclipse.hyades.models.plugin.ModelsPlugin;
26
import org.eclipse.hyades.models.plugin.ModelsPlugin;
27
import org.eclipse.hyades.models.symptom.CommonBaseEventKType;
27
import org.eclipse.hyades.models.symptom.CommonBaseEventKType;
28
import org.eclipse.hyades.models.symptom.SymptomDescription;
28
import org.eclipse.hyades.models.symptom.SymptomDescription;
29
import org.eclipse.hyades.models.symptom.impl.SimpleMatchPatternImpl;
29
import org.eclipse.hyades.trace.ui.HyadesUtil;
30
import org.eclipse.hyades.trace.ui.HyadesUtil;
30
import org.eclipse.hyades.trace.ui.IViewSelectionChangedListener;
31
import org.eclipse.hyades.trace.ui.IViewSelectionChangedListener;
31
import org.eclipse.hyades.trace.ui.UIPlugin;
32
import org.eclipse.hyades.trace.ui.UIPlugin;
Lines 315-323 Link Here
315
			_symptomInfoViewer.show();
316
			_symptomInfoViewer.show();
316
			_symptomInfoTreeViewer.setInput(((SymptomDescription) obj)
317
			_symptomInfoTreeViewer.setInput(((SymptomDescription) obj)
317
					.getSymptomDefinitionRef().getKTypeChildren());
318
					.getSymptomDefinitionRef().getKTypeChildren());
318
			IDetailsPage page = getDetailsFor(obj);			
319
			IDetailsPage page = getDetailsFor(obj);		
319
			page.setFormInput(((SymptomDescription) obj)
320
			((SimpleMatchPatternImpl)(((SymptomDescription) obj).getSymptomDefinitionRef())).setCreationTime(((SymptomDescription)obj).getCreationTime());
320
					.getSymptomDefinitionRef());			
321
			page.setFormInput(((SymptomDescription)obj)
322
					.getSymptomDefinitionRef());	
323
			
321
//			_symptomDescViewer.setFormInput(((SymptomDescription) obj)
324
//			_symptomDescViewer.setFormInput(((SymptomDescription) obj)
322
//					.getSymptomDefinitionRef());
325
//					.getSymptomDefinitionRef());
323
		}
326
		}
(-)src/com/ibm/etools/symptom/presentation/SymptomAnalysisViewer.java (-6 / +54 lines)
Lines 10-15 Link Here
10
10
11
package com.ibm.etools.symptom.presentation;
11
package com.ibm.etools.symptom.presentation;
12
12
13
import org.eclipse.core.runtime.Preferences;
13
import org.eclipse.jface.action.Action;
14
import org.eclipse.jface.action.Action;
14
import org.eclipse.jface.action.IToolBarManager;
15
import org.eclipse.jface.action.IToolBarManager;
15
import org.eclipse.jface.dialogs.IInputValidator;
16
import org.eclipse.jface.dialogs.IInputValidator;
Lines 30-35 Link Here
30
import com.ibm.etools.symptom.editor.internal.SymptomEditorPluginImages;
31
import com.ibm.etools.symptom.editor.internal.SymptomEditorPluginImages;
31
import com.ibm.etools.symptom.editor.internal.util.GridUtil;
32
import com.ibm.etools.symptom.editor.internal.util.GridUtil;
32
import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages;
33
import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages;
34
import com.ibm.etools.symptom.editor.internal.util.SymptomEditorConstants;
33
import org.eclipse.osgi.util.NLS;
35
import org.eclipse.osgi.util.NLS;
34
36
35
public class SymptomAnalysisViewer extends ViewPart {
37
public class SymptomAnalysisViewer extends ViewPart {
Lines 38-46 Link Here
38
	private SymptomAnalysisPage _currentPage = null;
40
	private SymptomAnalysisPage _currentPage = null;
39
	private String _title = SymptomEditPlugin.INSTANCE.getString("15");
41
	private String _title = SymptomEditPlugin.INSTANCE.getString("15");
40
	private boolean _initializedMenu = false;
42
	private boolean _initializedMenu = false;
41
	private Action _pageUp, _pageDown, _gotoPage;
43
	private Action _sort, _pageUp, _pageDown, _gotoPage;
42
44
	private String STR_SORT_ORDER;
43
44
	/* (non-Javadoc)
45
	/* (non-Javadoc)
45
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
46
	 * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
46
	 */
47
	 */
Lines 50-56 Link Here
50
		
51
		
51
		// Create the default page.
52
		// Create the default page.
52
		_defaultPage = createDefaultPage(_book);
53
		_defaultPage = createDefaultPage(_book);
53
		
54
54
		addViewPage(null);
55
		addViewPage(null);
55
	}
56
	}
56
57
Lines 121-135 Link Here
121
		tbm.removeAll();
122
		tbm.removeAll();
122
		getViewSite().getActionBars().updateActionBars();
123
		getViewSite().getActionBars().updateActionBars();
123
	}
124
	}
125
124
	
126
	
125
	public void makeActions(){
127
	public void makeActions(){
126
		if (isInitializedMenu())
128
		if (isInitializedMenu())
127
			return;
129
			return;
128
		
130
		initializedMenu(true);		 
129
		initializedMenu(true);
131
132
		STR_SORT_ORDER = SymptomEditPlugin.getPlugin().getPreferenceStore().getString(
133
				SymptomEditorConstants.SORT_ORDER); 
134
		if ((STR_SORT_ORDER == null) || (STR_SORT_ORDER.equals("")))
135
					STR_SORT_ORDER=SymptomEditMessages._189; 
136
		_sort = new Action(STR_SORT_ORDER) {
137
			public void run() {
138
				if (_currentPage == null || !(_currentPage instanceof SymptomAnalysisPage))
139
					return;				
140
				BusyIndicator.showWhile(null, new Runnable() {
141
					public void run() {
142
						SymptomAnalysisTreeContentProvider provider = (SymptomAnalysisTreeContentProvider) ((SymptomAnalysisPage) _currentPage).getTreeViewer().getContentProvider();
143
						_sort.setEnabled(provider.sort());
144
						STR_SORT_ORDER = provider.sortTreeViewer(STR_SORT_ORDER);
145
						((SymptomAnalysisPage) _currentPage).update();
146
						Preferences store = SymptomEditPlugin.getPlugin().getPluginPreferences();
147
						store.setValue(SymptomEditorConstants.SORT_ORDER, STR_SORT_ORDER);
148
					}
149
				});
150
			}
151
		};
152
		getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.PREVIOUS.getId(), _sort);
153
		if (STR_SORT_ORDER.equalsIgnoreCase("Descending")){		
154
			SymptomEditorPluginImages.setImageDescriptors(_sort,
155
					SymptomEditorPluginImages.T_LCL,
156
					SymptomEditorPluginImages.IMG_SORT_DSC);
157
			_sort.setDescription(SymptomEditMessages._188);
158
			_sort.setToolTipText(SymptomEditMessages._188);
159
		}
160
		else if (STR_SORT_ORDER.equalsIgnoreCase("Ascending")){
161
			SymptomEditorPluginImages.setImageDescriptors(_sort,
162
					SymptomEditorPluginImages.T_LCL,
163
					SymptomEditorPluginImages.IMG_SORT_ASC);
164
			_sort.setDescription(SymptomEditMessages._187);
165
			_sort.setToolTipText(SymptomEditMessages._187);
166
			
167
		}	
168
			
130
		String STR_PAGE_UP = SymptomEditMessages._123;
169
		String STR_PAGE_UP = SymptomEditMessages._123;
131
		_pageUp = new Action(STR_PAGE_UP) {
170
		_pageUp = new Action(STR_PAGE_UP) {
132
			public void run() {
171
			public void run() {
172
				
173
				
133
				if (_currentPage == null || !(_currentPage instanceof SymptomAnalysisPage))
174
				if (_currentPage == null || !(_currentPage instanceof SymptomAnalysisPage))
134
					return;
175
					return;
135
				
176
				
Lines 221-226 Link Here
221
		_gotoPage.setToolTipText(STR_GO_TO_PAGE);
262
		_gotoPage.setToolTipText(STR_GO_TO_PAGE);
222
263
223
		IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
264
		IToolBarManager tbm = getViewSite().getActionBars().getToolBarManager();
265
		tbm.add(_sort);
224
		tbm.add(_pageUp);
266
		tbm.add(_pageUp);
225
		tbm.add(_pageDown);
267
		tbm.add(_pageDown);
226
		tbm.add(_gotoPage);
268
		tbm.add(_gotoPage);
Lines 255-260 Link Here
255
		}
297
		}
256
	}
298
	}
257
	
299
	
300
	public Action getSortAction(){
301
		return _sort;
302
	}
303
	
304
258
	public Action getPageUpAction(){
305
	public Action getPageUpAction(){
259
		return _pageUp;
306
		return _pageUp;
260
	}
307
	}
Lines 266-271 Link Here
266
	public Action getGotoPageAction(){
313
	public Action getGotoPageAction(){
267
		return _gotoPage;
314
		return _gotoPage;
268
	}
315
	}
316
	
269
317
270
//	/////////////////
318
//	/////////////////
271
//	public void fakeData(){
319
//	public void fakeData(){
(-)src/com/ibm/etools/symptom/presentation/SymptomEditorDetailsFactory.java (-1 / +7 lines)
Lines 30-35 Link Here
30
	protected SimpleMatchPatternDetails simpleMatchPatternDetails;	
30
	protected SimpleMatchPatternDetails simpleMatchPatternDetails;	
31
	protected RecommendedActionDetails recommendedActionsDetails;
31
	protected RecommendedActionDetails recommendedActionsDetails;
32
	protected SymptomEditor editor;
32
	protected SymptomEditor editor;
33
	protected AnalysisMatchPatternDetails analysisMatchPatternDetails;
33
	
34
	
34
	public KTypeContainerDetails createKTypeContainerDetails(){
35
	public KTypeContainerDetails createKTypeContainerDetails(){
35
		if(kTypeContainerDetails==null)
36
		if(kTypeContainerDetails==null)
Lines 45-51 Link Here
45
	
46
	
46
	public SimpleMatchPatternDetails createSimpleMatchPatternDetails(){
47
	public SimpleMatchPatternDetails createSimpleMatchPatternDetails(){
47
		if(simpleMatchPatternDetails==null){
48
		if(simpleMatchPatternDetails==null){
48
			simpleMatchPatternDetails = new SimpleMatchPatternDetails(editor);
49
			if ((analysisMatchPatternDetails== null)&&(editor == null)){
50
				analysisMatchPatternDetails = new AnalysisMatchPatternDetails(editor);
51
				simpleMatchPatternDetails=analysisMatchPatternDetails;
52
			}
53
			else
54
				simpleMatchPatternDetails = new SimpleMatchPatternDetails(editor);
49
		}		
55
		}		
50
		return simpleMatchPatternDetails;
56
		return simpleMatchPatternDetails;
51
	}
57
	}
(-)src/com/ibm/etools/symptom/presentation/SymptomAnalysisTreeContentProvider.java (-1 / +60 lines)
Lines 10-23 Link Here
10
package com.ibm.etools.symptom.presentation;
10
package com.ibm.etools.symptom.presentation;
11
11
12
import java.util.ArrayList;
12
import java.util.ArrayList;
13
import java.util.Comparator;
14
import java.util.GregorianCalendar;
13
import java.util.List;
15
import java.util.List;
16
import java.util.Collections;
17
import org.eclipse.hyades.models.symptom.impl.SymptomDescriptionImpl;
14
import org.eclipse.jface.viewers.ITreeContentProvider;
18
import org.eclipse.jface.viewers.ITreeContentProvider;
15
import org.eclipse.jface.viewers.Viewer;
19
import org.eclipse.jface.viewers.Viewer;
16
import com.ibm.etools.symptom.editor.SymptomEditPlugin;
20
import com.ibm.etools.symptom.editor.SymptomEditPlugin;
21
import com.ibm.etools.symptom.editor.internal.SymptomEditorPluginImages;
17
import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages;
22
import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages;
18
19
import org.eclipse.osgi.util.NLS;
23
import org.eclipse.osgi.util.NLS;
20
24
25
21
public class SymptomAnalysisTreeContentProvider implements ITreeContentProvider {
26
public class SymptomAnalysisTreeContentProvider implements ITreeContentProvider {
22
	private SymptomAnalysisPage _container;
27
	private SymptomAnalysisPage _container;
23
	private List _allElements = new ArrayList();
28
	private List _allElements = new ArrayList();
Lines 82-87 Link Here
82
		return (getChildren(element).length > 0);
87
		return (getChildren(element).length > 0);
83
	}
88
	}
84
89
90
	private long getSymptomDescriptionCreationTime(SymptomDescriptionImpl item) {
91
		String creationTime = item.getCreationTime().toString();
92
		return( new GregorianCalendar(Integer
93
				.parseInt(creationTime.substring(0, 4)), Integer
94
				.parseInt(creationTime.substring(5, 7)), Integer
95
				.parseInt(creationTime.substring(8, 10)), Integer
96
				.parseInt(creationTime.substring(11, 13)), Integer
97
				.parseInt(creationTime.substring(14, 16)), Integer
98
				.parseInt(creationTime.substring(17))).getTimeInMillis());
99
	}
100
101
	/**
102
	 * Sorts the items in the TreeViewer based on the sortOrder passed as argument and update the sort button
103
	 * @param sortOrder
104
	 * @return
105
	 */
106
	public String  sortTreeViewer(String sortOrder) {
107
		if (sortOrder.equalsIgnoreCase("Descending")) {
108
			List sortedList = _allElements;
109
			Collections.sort(sortedList, new Comparator() {
110
				public int compare(Object o1, Object o2) {
111
					return (getSymptomDescriptionCreationTime((SymptomDescriptionImpl)o1) > getSymptomDescriptionCreationTime((SymptomDescriptionImpl) o2))? -1:1;
112
				}
113
			});
114
			//update the sort button
115
			SymptomEditorPluginImages.setImageDescriptors(_container.getSymptomAnalysisViewer().getSortAction(),
116
					SymptomEditorPluginImages.T_LCL,
117
					SymptomEditorPluginImages.IMG_SORT_ASC);
118
			_container.getSymptomAnalysisViewer().getSortAction().setDescription(SymptomEditMessages._187);
119
			_container.getSymptomAnalysisViewer().getSortAction().setToolTipText(SymptomEditMessages._187);
120
			sortOrder="Ascending";
121
		} else if (sortOrder.equalsIgnoreCase("Ascending")){
122
			List sortedList = _allElements;
123
			Collections.sort(sortedList, new Comparator() {
124
				public int compare(Object o1, Object o2) {
125
					return (getSymptomDescriptionCreationTime((SymptomDescriptionImpl)o1) < getSymptomDescriptionCreationTime((SymptomDescriptionImpl) o2))? -1:1;
126
				}
127
			});
128
			//update the sort button
129
			SymptomEditorPluginImages.setImageDescriptors(_container.getSymptomAnalysisViewer().getSortAction(),
130
						SymptomEditorPluginImages.T_LCL,
131
						SymptomEditorPluginImages.IMG_SORT_DSC);
132
			_container.getSymptomAnalysisViewer().getSortAction().setDescription(SymptomEditMessages._188);
133
			_container.getSymptomAnalysisViewer().getSortAction().setToolTipText(SymptomEditMessages._188);
134
			sortOrder="Descending";
135
		}		
136
		return sortOrder;
137
	}
138
139
	public boolean sort(){
140
		return _allElements.size() > 1; 
141
	}
142
85
	public boolean pageUp(){
143
	public boolean pageUp(){
86
		if (_currentPage > 0){
144
		if (_currentPage > 0){
87
			_currentPage--;
145
			_currentPage--;
Lines 138-143 Link Here
138
	
196
	
139
	private void updatePageActions(){
197
	private void updatePageActions(){
140
		try{
198
		try{
199
			_container.getSymptomAnalysisViewer().getSortAction().setEnabled(_allElements.size() > 1);
141
			_container.getSymptomAnalysisViewer().getPageUpAction().setEnabled(_currentPage > 0);
200
			_container.getSymptomAnalysisViewer().getPageUpAction().setEnabled(_currentPage > 0);
142
			_container.getSymptomAnalysisViewer().getPageDownAction().setEnabled((_totalPages - _currentPage) > 1);
201
			_container.getSymptomAnalysisViewer().getPageDownAction().setEnabled((_totalPages - _currentPage) > 1);
143
			_container.getSymptomAnalysisViewer().getGotoPageAction().setEnabled(_totalPages > 1);
202
			_container.getSymptomAnalysisViewer().getGotoPageAction().setEnabled(_totalPages > 1);
(-)src/com/ibm/etools/symptom/editor/internal/SymptomEditorPluginImages.java (+4 lines)
Lines 56-61 Link Here
56
56
57
	public static final String IMG_HORIZONTAL =  "th_horizontal.gif";
57
	public static final String IMG_HORIZONTAL =  "th_horizontal.gif";
58
	public static final String IMG_VERTICAL =  "th_vertical.gif";
58
	public static final String IMG_VERTICAL =  "th_vertical.gif";
59
	public static final String IMG_SORT_ASC =  "sortrecords_ac.gif";
60
	public static final String IMG_SORT_DSC =  "sortrecords_dc.gif";
59
	public static final String IMG_PG_UP =  "pageup.gif";
61
	public static final String IMG_PG_UP =  "pageup.gif";
60
	public static final String IMG_PG_DOWN =  "pagedown.gif";
62
	public static final String IMG_PG_DOWN =  "pagedown.gif";
61
	public static final String IMG_PG_GOTO = "gotopage.gif";
63
	public static final String IMG_PG_GOTO = "gotopage.gif";
Lines 72-77 Link Here
72
	public static final ImageDescriptor DESC_VERTICAL_DISABLED = createManaged(T_DLCL, IMG_VERTICAL); //$NON-NLS-1$
74
	public static final ImageDescriptor DESC_VERTICAL_DISABLED = createManaged(T_DLCL, IMG_VERTICAL); //$NON-NLS-1$
73
	public static final ImageDescriptor DESC_OPEN_LOG_VIEW = createManaged(T_TOOL, IMG_OPEN_LOG_VIEW); //$NON-NLS-1$
75
	public static final ImageDescriptor DESC_OPEN_LOG_VIEW = createManaged(T_TOOL, IMG_OPEN_LOG_VIEW); //$NON-NLS-1$
74
76
77
	public static final ImageDescriptor DESC_SORT_ASC = createManaged(T_ELCL, IMG_SORT_ASC); //$NON-NLS-1$
78
	public static final ImageDescriptor DESC_SORT_DSC = createManaged(T_ELCL, IMG_SORT_DSC); //$NON-NLS-1$
75
	public static final ImageDescriptor DESC_PG_UP = createManaged(T_ELCL, IMG_PG_UP); //$NON-NLS-1$
79
	public static final ImageDescriptor DESC_PG_UP = createManaged(T_ELCL, IMG_PG_UP); //$NON-NLS-1$
76
	public static final ImageDescriptor DESC_PG_DOWN = createManaged(T_ELCL, IMG_PG_DOWN); //$NON-NLS-1$
80
	public static final ImageDescriptor DESC_PG_DOWN = createManaged(T_ELCL, IMG_PG_DOWN); //$NON-NLS-1$
77
	public static final ImageDescriptor DESC_PG_GOTO= createManaged(T_ELCL, IMG_PG_GOTO); //$NON-NLS-1$
81
	public static final ImageDescriptor DESC_PG_GOTO= createManaged(T_ELCL, IMG_PG_GOTO); //$NON-NLS-1$
(-)icons/full/dlcl16/sortrecords_ac.gif (+3 lines)
Added Link Here
1
GIF89a÷ûûüúúûùùúøøùÃÅÊÎÐÔÊÌÐÇÉÍ­®°òóõñòôðñóÕ×ÚÒÔ×÷øùõö÷ôõö®¯°ÂÁÁüüüÿÿÿ!ù,@€)(¡ Áƒ%„ð aC†
2
)D”(@@€‹J@QÂ\Б €	''¨œP2¡ƒbÊl)1?͛6'LXp'A‚+ƒ²LH0ƒ €¦G“.àôAT¥8…pu)ƒzJH U?Y‘D	ží¨Ó§[
3
;
(-)icons/full/elcl16/sortrecords_ac.gif (+4 lines)
Added Link Here
1
GIF89aæuu?óõûøùüov†pv„qwƒîòúòõûùúüøùû†š¾ŒŸÂðôû…?Ӧƚ¬Ë¢³Ï¨¸ÓnvƒÞèøÝç÷ßè÷äìùçîùíòúóöûov€Üç÷ßéøÞè÷áêøêðùöøûæîùðõûòöûe}•õøû÷ùûV‹·T‹´UвVб]†¦M?¿T‹²TаNY_M[\M[[~uN{sO‡zLƒwMtN‘H?}JŒ}J?…E—‚F°?>¬Œ@§ŠB§‹B¢ˆC´?=ÿÿÿ!ùB,¢€B‚ƒA…†‡‚,„Œ?ŒA‚'ƒ<&	&˜˜=‚*ƒ=%
2
 ›B-ƒ>#±?‚)ƒ@"¡£¥@‚(ƒ:ÅÆ:‚.ƒ;º¤
3
;‚+ƒ7!ØØ×7‚$ƒ9Î¥8‚ƒ4êëê4B5»5B10‚dl 0?Bƒlz1HÈ
4
š1£aÃ-jÜ((;
(-)icons/full/clcl16/sortrecords_dc.gif (+3 lines)
Added Link Here
1
GIF89a÷uu?óõûøùüov†pv„qwƒîòúòõûùúüøùû†š¾ŒŸÂðôû…?Ӧƚ¬Ë¢³Ï¨¸ÓnvƒÞèøÝç÷ßè÷äìùçîùíòúóöûov€Üç÷ßéøÞè÷áêøêðùöøûæîùðõûòöûe}•õøû÷ùûV‹·T‹´UвVб]†¦M?¿T‹²TаNY_M[\M[[~uN{sO‡zLƒwMtN‘H?}JŒ}J?…E—‚F°?>¬Œ@§ŠB§‹B¢ˆC´?=ÿÿÿ!ùB,@³…¤ Áƒ]¼â‚C‡
2
oÐ@`!>ŒÈ ƒÇ?ª(c“4Ø`Cà‹?<L$0! fÍIÔ?Á†Ÿ@uL1?†‡£H?ÒÈb @•
3
œJ?Õ«Vƒ‰!†À%"@xà`?8…D„X²f¸bàŽoË*ø°C Š?9,ä5k‡Àkp€[¡C‡	5žpzƒ‚å¨Bf̘Êy`@;
(-)src/com/ibm/etools/symptom/presentation/AnalysisMatchPatternDetails.java (+195 lines)
Added Link Here
1
package com.ibm.etools.symptom.presentation;
2
3
import java.text.DateFormat;
4
import java.text.SimpleDateFormat;
5
import java.util.GregorianCalendar;
6
import java.util.Date;
7
import org.eclipse.hyades.models.symptom.SimpleMatchPattern;
8
import org.eclipse.swt.SWT;
9
import org.eclipse.swt.custom.CCombo;
10
import org.eclipse.swt.layout.GridData;
11
import org.eclipse.swt.layout.GridLayout;
12
import org.eclipse.swt.widgets.Composite;
13
import org.eclipse.swt.widgets.Label;
14
import org.eclipse.swt.widgets.Text;
15
import org.eclipse.ui.forms.events.ExpansionAdapter;
16
import org.eclipse.ui.forms.events.ExpansionEvent;
17
import org.eclipse.ui.forms.widgets.Section;
18
import com.ibm.etools.symptom.editor.SymptomEditPlugin;
19
import com.ibm.etools.symptom.editor.internal.util.GridUtil;
20
import com.ibm.etools.symptom.editor.internal.util.SymptomEditMessages;
21
22
public class AnalysisMatchPatternDetails extends SimpleMatchPatternDetails {
23
	protected Text creationTime;
24
	protected final int CREATION_TIME_ID = 8;
25
	
26
	public AnalysisMatchPatternDetails(SymptomEditor analysisEditor){
27
		super(analysisEditor);
28
	}
29
	
30
	public void createClientArea() {
31
		//match pattern properties section
32
		
33
		Section matchPatternSection = toolkit.createSection(client, 
34
				Section.DESCRIPTION|Section.TWISTIE|Section.EXPANDED);
35
		GridLayout detailsLayout = new GridLayout();
36
		detailsLayout.marginWidth = detailsLayout.marginHeight = 2;		
37
		matchPatternSection.setLayout(detailsLayout);
38
		GridData data = GridUtil.createFill();
39
		data.horizontalSpan = 2;
40
		matchPatternSection.setLayoutData(data);
41
		matchPatternSection.addExpansionListener(new ExpansionAdapter() {
42
			public void expansionStateChanged(ExpansionEvent e) {
43
				client.layout();
44
			}
45
		});
46
		matchPatternSection.setText(SymptomEditMessages._108);
47
		toolkit.createCompositeSeparator(matchPatternSection);
48
		matchPatternSection.setDescription(SymptomEditMessages._107);
49
		
50
		Composite sectionClient = toolkit.createComposite(matchPatternSection);
51
		detailsLayout = new GridLayout();
52
		detailsLayout.marginWidth = detailsLayout.marginHeight = 2;
53
		detailsLayout.numColumns = 2;		
54
		sectionClient.setLayout(detailsLayout);
55
		data = GridUtil.createFill();		
56
		sectionClient.setLayoutData(data);		
57
		matchPatternSection.setClient(sectionClient);		
58
			
59
		Label l = toolkit.createLabel(sectionClient, getString("_UI_SimpleMatchPattern_name_feature")+":", SWT.WRAP);		
60
		name = toolkit.createText(sectionClient, "", SWT.NONE);		
61
		name.setData(new Integer(NAME_ID));	
62
		setLayout(l,name);
63
		name.setToolTipText(SymptomEditMessages._159);
64
		
65
		l = toolkit.createLabel(sectionClient, getString("_UI_SimpleMatchPattern_value_feature")+":", SWT.WRAP);
66
		value = toolkit.createText(sectionClient, "", SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);		
67
		value.setData(new Integer(VALUE_ID));
68
		setLayout(l,value);
69
		value.setToolTipText(SymptomEditMessages._164);
70
		
71
		l = toolkit.createLabel(sectionClient, getString("_UI_KnowledgeType_knowledgeCategory_feature")+":", SWT.WRAP);
72
		knowledgeCategory = toolkit.createText(sectionClient, "", SWT.NONE);		
73
		knowledgeCategory.setData(new Integer(KNOWLEDGE_CAT_ID));
74
		setLayout(l,knowledgeCategory);
75
		knowledgeCategory.setToolTipText(SymptomEditMessages._142);
76
		
77
		l = toolkit.createLabel(sectionClient, getString("_UI_KnowledgeType_knowledgeScope_feature")+":", SWT.WRAP);
78
		knowledgeScope = toolkit.createText(sectionClient, "", SWT.NONE);		
79
		knowledgeScope.setData(new Integer(KNOWLEDGE_SCOPE_ID));
80
		setLayout(l,knowledgeScope);
81
		knowledgeScope.setToolTipText(SymptomEditMessages._143);
82
		
83
		toolkit.paintBordersFor(sectionClient);
84
85
		//createSpace(toolkit,client,2);
86
		
87
		//symptom properties section
88
		Section symptomInfoSection = toolkit.createSection(client, 
89
				Section.DESCRIPTION|Section.TWISTIE|Section.EXPANDED);
90
		detailsLayout = new GridLayout();
91
		detailsLayout.marginWidth = detailsLayout.marginHeight = 2;		
92
		symptomInfoSection.setLayout(detailsLayout);
93
		data = GridUtil.createFill();
94
		data.horizontalSpan = 2;
95
		symptomInfoSection.setLayoutData(data);		
96
		symptomInfoSection.addExpansionListener(new ExpansionAdapter() {
97
			public void expansionStateChanged(ExpansionEvent e) {
98
				client.layout();
99
			}
100
		});
101
		symptomInfoSection.setText(SymptomEditMessages._176);
102
		toolkit.createCompositeSeparator(symptomInfoSection);
103
		symptomInfoSection.setDescription(SymptomEditMessages._175);
104
		
105
		Composite symptomSectionClient = toolkit.createComposite(symptomInfoSection);
106
		detailsLayout = new GridLayout();
107
		detailsLayout.marginWidth = detailsLayout.marginHeight = 2;
108
		detailsLayout.numColumns = 2;		
109
		symptomSectionClient.setLayout(detailsLayout);
110
		data = GridUtil.createFill();		
111
		symptomSectionClient.setLayoutData(data);		
112
		symptomInfoSection.setClient(symptomSectionClient);		
113
114
		l = toolkit.createLabel(symptomSectionClient,SymptomEditPlugin.INSTANCE.getString("_UI_AnalysisMatchPattern_creationTime_feature")+":", SWT.WRAP);		
115
		creationTime = toolkit.createText(symptomSectionClient, "", SWT.NONE);		
116
		creationTime.setData(new Integer(CREATION_TIME_ID));
117
		setLayout(l,creationTime);
118
		creationTime.setToolTipText(SymptomEditMessages._190);
119
120
		l = toolkit.createLabel(symptomSectionClient, SymptomEditPlugin.INSTANCE.getString("_UI_SimpleMatchPattern_expirationTime_feature")+":", SWT.WRAP);		
121
		expirationTime = toolkit.createText(symptomSectionClient, "", SWT.NONE);		
122
		expirationTime.setData(new Integer(EXPIRATION_TIME_ID));
123
		setLayout(l,expirationTime);
124
		expirationTime.setToolTipText(SymptomEditMessages._158);
125
126
		l = toolkit.createLabel(symptomSectionClient, getString("_UI_SimpleMatchPattern_priority_feature")+":", SWT.WRAP);
127
		priority = toolkit.createText(symptomSectionClient, "", SWT.NONE);		
128
		priority.setData(new Integer(PRIORITY_ID));		
129
		setLayout(l,priority);
130
		priority.setToolTipText(SymptomEditMessages._160);
131
132
		l = toolkit.createLabel(symptomSectionClient, getString("_UI_SimpleMatchPattern_probability_feature")+":", SWT.WRAP);
133
		probability = toolkit.createText(symptomSectionClient, "", SWT.NONE);		
134
		probability.setData(new Integer(PROBABILITY_ID));		
135
		setLayout(l,probability);
136
		probability.setToolTipText(SymptomEditMessages._161);
137
138
		l = toolkit.createLabel(symptomSectionClient, getString("_UI_KnowledgeType_state_feature")+":", SWT.WRAP);
139
		state = new CCombo(symptomSectionClient, SWT.FLAT);
140
		toolkit.adapt(state,false,false);		
141
		state.setData(new Integer(STATE_ID));
142
		setLayout(l,state);		
143
		state.setToolTipText(SymptomEditMessages._162);
144
		
145
		l = toolkit.createLabel(symptomSectionClient, getString("_UI_SimpleMatchPattern_symptomType_feature")+":", SWT.WRAP);		
146
		type = toolkit.createText(symptomSectionClient, "", SWT.NONE);
147
		type.setData(new Integer(TYPE_ID));	
148
		setLayout(l,type);
149
		type.setToolTipText(SymptomEditMessages._163);
150
		
151
//		l = toolkit.createLabel(symptomSectionClient, getString("_UI_SimpleMatchPattern_version_feature")+":", SWT.WRAP);		
152
//		version = toolkit.createText(symptomSectionClient, "", SWT.NONE);
153
//		version.setEditable(true);
154
//		version.setData(new Integer(VERSION_ID));	
155
//		version.addModifyListener(this);
156
//		setLayout(l,version);
157
//		version.setToolTipText(SymptomEditMessages._165);
158
159
		name.addModifyListener(this);
160
		value.addModifyListener(this);
161
		knowledgeCategory.addModifyListener(this);
162
		knowledgeScope.addModifyListener(this);
163
		expirationTime.addModifyListener(this);
164
		priority.addModifyListener(this);
165
		probability.addModifyListener(this);
166
		state.addSelectionListener(this);
167
		type.addModifyListener(this);
168
169
		toolkit.paintBordersFor(symptomSectionClient);
170
		
171
	}
172
	
173
	private long getSymptomDescriptionCreationTime(String creationTime) {
174
		return( new GregorianCalendar(Integer
175
				.parseInt(creationTime.substring(0, 4)), Integer
176
				.parseInt(creationTime.substring(5, 7)), Integer
177
				.parseInt(creationTime.substring(8, 10)), Integer
178
				.parseInt(creationTime.substring(11, 13)), Integer
179
				.parseInt(creationTime.substring(14, 16)), Integer
180
				.parseInt(creationTime.substring(17))).getTimeInMillis());
181
	}
182
	
183
	public void refresh(){
184
		if(!(eObject instanceof SimpleMatchPattern))
185
			return;		
186
		refresh = true;
187
		if(((SimpleMatchPattern) eObject).getCreationTime()  != null){
188
			DateFormat dateFormat = new SimpleDateFormat("MMM dd, yyyy hh:mm:ss");	
189
			Date date = new Date(getSymptomDescriptionCreationTime(((SimpleMatchPattern) eObject).getCreationTime().toString()));
190
			creationTime.setText(dateFormat.format(date));			
191
		}
192
		refresh = false;	
193
		super.refresh();
194
	}
195
}
(-)icons/full/dlcl16/sortrecords_dc.gif (+5 lines)
Added Link Here
1
GIF89a÷ûûüúúûùùúøøùÃÅÊÎÐÔÊÌÐÇÉÍ­®°òóõñòôðñóÕ×ÚÒÔ×÷øùõö÷ôõö®¯°ÂÁÁüüüÿÿÿ!ù,@|)(¡ Áƒ%„ð aC†#¤ A€€3*¤Hp??
2
3
.ظ‘"€	''¨œ@’ ƒbÊl™0?͛6iœ8°'Á•@YRD@2ƒ @gÅ£I—
4
púªRœB°º‚ÓQˆ
5
™°§„±$Kú\+0 ;
(-)icons/full/elcl16/sortrecords_dc.gif (+3 lines)
Added Link Here
1
GIF89a÷uu?óõûøùüov†pv„qwƒîòúòõûùúüøùû†š¾ŒŸÂðôû…?Ӧƚ¬Ë¢³Ï¨¸ÓnvƒÞèøÝç÷ßè÷äìùçîùíòúóöûov€Üç÷ßéøÞè÷áêøêðùöøûæîùðõûòöûe}•õøû÷ùûV‹·T‹´UвVб]†¦M?¿T‹²TаNY_M[\M[[~uN{sO‡zLƒwMtN‘H?}JŒ}J?…E—‚F°?>¬Œ@§ŠB§‹B¢ˆC´?=ÿÿÿ!ùB,@³…¤ Áƒ]¼â‚C‡
2
oÐ@`!>ŒÈ ƒÇ?ª(c“4Ø`Cà‹?<L$0! fÍIÔ?Á†Ÿ@uL1?†‡£H?ÒÈb @•
3
œJ?Õ«Vƒ‰!†À%"@xà`?8…D„X²f¸bàŽoË*ø°C Š?9,ä5k‡Àkp€[¡C‡	5žpzƒ‚å¨Bf̘Êy`@;
(-)icons/full/clcl16/sortrecords_ac.gif (+4 lines)
Added Link Here
1
GIF89aæuu?óõûøùüov†pv„qwƒîòúòõûùúüøùû†š¾ŒŸÂðôû…?Ӧƚ¬Ë¢³Ï¨¸ÓnvƒÞèøÝç÷ßè÷äìùçîùíòúóöûov€Üç÷ßéøÞè÷áêøêðùöøûæîùðõûòöûe}•õøû÷ùûV‹·T‹´UвVб]†¦M?¿T‹²TаNY_M[\M[[~uN{sO‡zLƒwMtN‘H?}JŒ}J?…E—‚F°?>¬Œ@§ŠB§‹B¢ˆC´?=ÿÿÿ!ùB,¢€B‚ƒA…†‡‚,„Œ?ŒA‚'ƒ<&	&˜˜=‚*ƒ=%
2
 ›B-ƒ>#±?‚)ƒ@"¡£¥@‚(ƒ:ÅÆ:‚.ƒ;º¤
3
;‚+ƒ7!ØØ×7‚$ƒ9Î¥8‚ƒ4êëê4B5»5B10‚dl 0?Bƒlz1HÈ
4
š1£aÃ-jÜ((;

Return to bug 102390