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 81013 Details for
Bug 207101
[logview] Highlight current session
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch
patch.txt (text/plain), 7.07 KB, created by
Jacek Pospychala
on 2007-10-23 19:50:23 EDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jacek Pospychala
Created:
2007-10-23 19:50:23 EDT
Size:
7.07 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.views.log >Index: src/org/eclipse/ui/internal/views/log/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/messages.properties,v >retrieving revision 1.2 >diff -u -r1.2 messages.properties >--- src/org/eclipse/ui/internal/views/log/messages.properties 22 Oct 2007 15:18:42 -0000 1.2 >+++ src/org/eclipse/ui/internal/views/log/messages.properties 23 Oct 2007 23:47:13 -0000 >@@ -51,6 +51,7 @@ > LogView_FilterDialog_eventsLogged = Show events logged during: > LogView_FilterDialog_allSessions = &All sessions > LogView_FilterDialog_recentSession = &Most recent session >+LogViewLabelProvider_CurrentSession=Current Session > LogViewLabelProvider_truncatedMessage=... (Open log entry details for full message) > LogViewLabelProvider_Session=Session > >Index: src/org/eclipse/ui/internal/views/log/Messages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/Messages.java,v >retrieving revision 1.3 >diff -u -r1.3 Messages.java >--- src/org/eclipse/ui/internal/views/log/Messages.java 22 Oct 2007 15:18:42 -0000 1.3 >+++ src/org/eclipse/ui/internal/views/log/Messages.java 23 Oct 2007 23:47:13 -0000 >@@ -59,6 +59,7 @@ > public static String LogView_FilterDialog_recentSession; > > public static String LogViewLabelProvider_Session; >+ public static String LogViewLabelProvider_CurrentSession; > public static String LogViewLabelProvider_truncatedMessage; > > public static String EventDetailsDialog_title; >Index: src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java,v >retrieving revision 1.4 >diff -u -r1.4 LogViewLabelProvider.java >--- src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java 22 Oct 2007 15:18:42 -0000 1.4 >+++ src/org/eclipse/ui/internal/views/log/LogViewLabelProvider.java 23 Oct 2007 23:47:13 -0000 >@@ -11,8 +11,6 @@ > *******************************************************************************/ > package org.eclipse.ui.internal.views.log; > >-import java.util.ArrayList; >- > import org.eclipse.core.runtime.IStatus; > import org.eclipse.jface.viewers.ITableLabelProvider; > import org.eclipse.jface.viewers.LabelProvider; >@@ -33,7 +31,7 @@ > private Image warningImage; > private Image errorWithStackImage; > private Image hierarchicalImage; >- ArrayList consumers = new ArrayList(); >+ Object consumer; > > public LogViewLabelProvider() { > errorImage = SharedImages.getImage(SharedImages.DESC_ERROR_ST_OBJ); >@@ -44,7 +42,7 @@ > hierarchicalImage = SharedImages.getImage(SharedImages.DESC_HIERARCHICAL_LAYOUT_OBJ); > } > public void dispose() { >- if (consumers.size() == 0){ >+ if (consumer == null){ > super.dispose(); > } > } >@@ -73,7 +71,11 @@ > if (element instanceof LogSession) { > LogSession entry = (LogSession) element; > if (columnIndex == 0) { >- return Messages.LogViewLabelProvider_Session; >+ if ((consumer instanceof LogView) && (((LogView)consumer).isCurrentLogSession(element))) { >+ return Messages.LogViewLabelProvider_CurrentSession; >+ } else { >+ return Messages.LogViewLabelProvider_Session; >+ } > } else if (columnIndex == 2) { > if (entry.getDate() != null) { > DateFormat formatter = new SimpleDateFormat(LogEntry.F_DATE_FORMAT); >@@ -106,14 +108,12 @@ > } > > public void connect(Object consumer) { >- if (!consumers.contains(consumer)) >- consumers.add(consumer); >+ this.consumer = consumer; > } > > public void disconnect(Object consumer) { >- consumers.remove(consumer); >- if (consumers.size() == 0) { >- dispose(); >+ if (consumer == this.consumer) { >+ this.consumer = null; > } > } > } >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.3 >diff -u -r1.3 LogView.java >--- src/org/eclipse/ui/internal/views/log/LogView.java 22 Oct 2007 15:18:42 -0000 1.3 >+++ src/org/eclipse/ui/internal/views/log/LogView.java 23 Oct 2007 23:47:13 -0000 >@@ -123,7 +123,7 @@ > public static int ASCENDING = 1; > public static int DESCENDING = -1; > >- private ArrayList fLogs; >+ private ArrayList fLogs; // list of LogSession objects > > private Clipboard fClipboard; > >@@ -288,7 +288,7 @@ > action.setToolTipText(Messages.LogView_delete_tooltip); > action.setImageDescriptor(SharedImages.getImageDescriptor(SharedImages.DESC_REMOVE_LOG)); > action.setDisabledImageDescriptor(SharedImages.getImageDescriptor(SharedImages.DESC_REMOVE_LOG_DISABLED)); >- action.setEnabled(fInputFile.exists() && fInputFile.equals(Platform.getLogFileLocation().toFile())); >+ action.setEnabled(fInputFile.exists() && !isImportMode()); > return action; > } > >@@ -634,8 +634,12 @@ > LogReader.parseLogFile(fInputFile, fLogs, fMemento); > } > >+ private boolean isImportMode() { >+ return !fInputFile.equals(Platform.getLogFileLocation().toFile()); >+ } >+ > public void logging(IStatus status, String plugin) { >- if (!fInputFile.equals(Platform.getLogFileLocation().toFile())) >+ if (isImportMode()) > return; > if (fFirstEvent) { > readLogFile(); >@@ -668,7 +672,7 @@ > fTreeViewer.refresh(); > fTreeViewer.expandToLevel(2); > fDeleteLogAction.setEnabled(fInputFile.exists() >- && fInputFile.equals(Platform.getLogFileLocation().toFile())); >+ && !isImportMode()); > fOpenLogAction.setEnabled(fInputFile.exists()); > fExportAction.setEnabled(fInputFile.exists()); > if (activate && fActivateViewAction.isChecked()) { >@@ -1162,4 +1166,8 @@ > protected File getLogFile() { > return fInputFile; > } >+ >+ public boolean isCurrentLogSession(Object element) { >+ return (!isImportMode()) && (! fLogs.isEmpty()) && fLogs.get(fLogs.size() - 1).equals(element); >+ } > } >Index: src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java,v >retrieving revision 1.4 >diff -u -r1.4 EventDetailsDialog.java >--- src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java 22 Oct 2007 15:18:42 -0000 1.4 >+++ src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java 23 Oct 2007 23:47:13 -0000 >@@ -91,7 +91,7 @@ > protected EventDetailsDialog(Shell parentShell, IAdaptable selection, ISelectionProvider provider, Comparator comparator) { > super(parentShell); > this.provider = (TreeViewer) provider; >- labelProvider = (LogViewLabelProvider)this.provider.getLabelProvider(); >+ labelProvider = new LogViewLabelProvider(); > labelProvider.connect(this); > this.entry = (LogEntry)selection; > this.comparator = comparator;
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 207101
: 81013 |
84373
|
84374