Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 64830

Summary: [Workbench] Creating OK statuses
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: UIAssignee: Krzysztof Daniel <krzysztof.daniel>
Status: VERIFIED FIXED QA Contact: Paul Webster <pwebster>
Severity: trivial    
Priority: P5 CC: krzysztof.daniel, pwebster
Version: 3.0Keywords: helpwanted
Target Milestone: 3.6 M3Flags: john.arthorne: review? (pwebster)
Hardware: PC   
OS: Windows 2000   
Whiteboard: hasPatch
Attachments:
Description Flags
Patch that fizes most important IMO classes
none
mylyn/context/zip
none
Work in progress
none
Fix proposition none

Description John Arthorne CLA 2004-05-31 16:34:32 EDT
 
Comment 1 John Arthorne CLA 2004-05-31 16:35:57 EDT
The following places in the workbench UI create new instances of Status with
severity of OK. There is a singleton (Status.OK_STATUS) that can be used
instead. Marking as trivial, but in some cases this can have non-trivial
performance benefit. Someone familiar with the code could evaluate if these
changes are worthwhile.

org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs -
FileFolderSelectionDialog.java
org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/util - Log.java
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs -
CheckedTreeSelectionDialog.java (2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs -
ElementTreeSelectionDialog.java
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - EditorHistory.java
(2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal -
EditorHistoryItem.java (2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - EditorManager.java
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal -
EditorSashContainer.java (2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - PartStack.java (2
matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - Perspective.java
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal -
PerspectiveHistory.java (2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry -
PerspectiveDescriptor.java (2 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - ViewFactory.java
(4 matches)
org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - Workbench.java
org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor -
AbstractDocumentProvider.java
Comment 2 Krzysztof Daniel CLA 2008-02-19 04:58:47 EST
I'd change:
CheckedTreeSelectionDialog, ElementTreeSelectionDialog - because there OK status is used in validation.

I do not see performance improvement in EditorHistory, EditorHistoryItem, EditorSashContainer, PartStack, Perspective, PerspectiveDescriptor, ViewFactory, Workbench, AbstractDocumentProvider. I think it is not necessary to change those classes because OK status is used in saving and restoring changes.

I wouldn't change EditorManager (there is MultiStatus used).

I have not found: Log, PerspectiveHistory (probably had been moved).
Comment 3 Krzysztof Daniel CLA 2008-02-19 05:35:45 EST
Created attachment 90051 [details]
Patch that fizes most important IMO classes
Comment 4 Krzysztof Daniel CLA 2008-02-19 05:35:52 EST
Created attachment 90052 [details]
mylyn/context/zip
Comment 5 Krzysztof Daniel CLA 2008-12-17 05:52:27 EST
Created attachment 120675 [details]
Work in progress

The fix will not be as easy as expected, because I have found out that some logic relies on the OK status empty message.
Can this bug be assigned to me?
Comment 6 Krzysztof Daniel CLA 2009-02-11 09:00:18 EST
Created attachment 125381 [details]
Fix proposition

FileFolderSeletcionDialog - nothing to change
Log - Status is not mutable object, and in that class it comes with different messages
EditorHistory - replaced
EditorHistoryItem - replaced
PartStack - replaced
PerspectiveDescriptor - replaced


CheckedTreeSelectionDialog,
ElementTreeSelectionDialog,
AbstractDocumentProvider - sorry, some logic relies on Status message. Will break compatibility.

EditorManager - multistatus, not replaceable
Perspective,
EditorSashContainer,
ViewFactory,
Workbench,
 - one replacement, other are multi

PerspectiveHistory - class not found
Comment 7 John Arthorne CLA 2009-07-09 22:59:53 EDT
Paul, note this has a fairly recent patch and looks like a trivial fix. Something to consider throwing into M1.
Comment 8 Paul Webster CLA 2009-09-09 13:09:10 EDT
Sorry, this fell between the cracks.  I can look at this in 3.6  M3 or you can take it Christopher (and move me to the CC)

PW
Comment 9 Krzysztof Daniel CLA 2009-10-01 05:55:50 EDT
Latest patch released on 2009-10-01
Comment 10 Krzysztof Daniel CLA 2009-10-27 06:45:49 EDT
Verified in N20091024-2000 by code inspection.