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 197097 Details for
Bug 347957
RAP PDE Runtime: NullpointerException trying to open filter dialog
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]
Patch allowing to display filters and open log dialogs
filter.patch (text/plain), 20.61 KB, created by
Arnaud MERGEY
on 2011-06-01 11:07:16 EDT
(
hide
)
Description:
Patch allowing to display filters and open log dialogs
Filename:
MIME Type:
Creator:
Arnaud MERGEY
Created:
2011-06-01 11:07:16 EDT
Size:
20.61 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.pde.runtime >Index: src/org/eclipse/pde/internal/runtime/logview/LogReader.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogReader.java,v >retrieving revision 1.2 >diff -u -r1.2 LogReader.java >--- src/org/eclipse/pde/internal/runtime/logview/LogReader.java 10 Oct 2007 12:28:06 -0000 1.2 >+++ src/org/eclipse/pde/internal/runtime/logview/LogReader.java 1 Jun 2011 14:59:32 -0000 >@@ -20,6 +20,7 @@ > import java.util.ArrayList; > import java.util.Date; > >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.ui.IMemento; > > class LogReader { >@@ -102,7 +103,7 @@ > writer = new PrintWriter(swriter, true); > writerState = SESSION_STATE; > updateCurrentSession(session); >- if (!currentSession.equals(session) /*&& !memento.getString(LogView.P_SHOW_ALL_SESSIONS).equals("true")*/) //$NON-NLS-1$ >+ if (!currentSession.equals(session) && !memento.getString(LogView.P_SHOW_ALL_SESSIONS).equals("true")) //$NON-NLS-1$ > entries.clear(); > } else if (state == ENTRY_STATE) { > LogEntry entry = new LogEntry(); >@@ -167,25 +168,25 @@ > public synchronized static void addEntry(LogEntry current, ArrayList entries, IMemento memento, boolean useCurrentSession) { > int severity = current.getSeverity(); > boolean doAdd = true; >-// switch(severity) { >-// case IStatus.INFO: >-// doAdd = memento.getString(LogView.P_LOG_INFO).equals("true"); //$NON-NLS-1$ >-// break; >-// case IStatus.WARNING: >-// doAdd = memento.getString(LogView.P_LOG_WARNING).equals("true"); //$NON-NLS-1$ >-// break; >-// case IStatus.ERROR: >-// doAdd = memento.getString(LogView.P_LOG_ERROR).equals("true"); //$NON-NLS-1$ >-// break; >-// } >+ switch(severity) { >+ case IStatus.INFO: >+ doAdd = memento.getString(LogView.P_LOG_INFO).equals("true"); //$NON-NLS-1$ >+ break; >+ case IStatus.WARNING: >+ doAdd = memento.getString(LogView.P_LOG_WARNING).equals("true"); //$NON-NLS-1$ >+ break; >+ case IStatus.ERROR: >+ doAdd = memento.getString(LogView.P_LOG_ERROR).equals("true"); //$NON-NLS-1$ >+ break; >+ } > if (doAdd) { > if (useCurrentSession) > current.setSession(currentSession); > entries.add(0, current); > >-// if (memento.getString(LogView.P_USE_LIMIT).equals("true") //$NON-NLS-1$ >-// && entries.size() > memento.getInteger(LogView.P_LOG_LIMIT).intValue()) >-// entries.remove(entries.size() - 1); >+ if (memento.getString(LogView.P_USE_LIMIT).equals("true") //$NON-NLS-1$ >+ && entries.size() > memento.getInteger(LogView.P_LOG_LIMIT).intValue()) >+ entries.remove(entries.size() - 1); > } > } > >Index: src/org/eclipse/pde/internal/runtime/logview/LogView.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/sandbox/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/logview/LogView.java,v >retrieving revision 1.5 >diff -u -r1.5 LogView.java >--- src/org/eclipse/pde/internal/runtime/logview/LogView.java 11 Dec 2007 14:57:08 -0000 1.5 >+++ src/org/eclipse/pde/internal/runtime/logview/LogView.java 1 Jun 2011 14:59:33 -0000 >@@ -87,6 +87,7 @@ > import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.PartInitException; > import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.XMLMemento; > import org.eclipse.ui.part.ViewPart; > > public class LogView extends ViewPart implements ILogListener { >@@ -117,7 +118,7 @@ > > // private Clipboard fClipboard; > >-// private IMemento fMemento; >+ private IMemento fMemento; > private File fInputFile; > private String fDirectory; > >@@ -233,10 +234,10 @@ > private Action createActivateViewAction() { > Action action = new Action(PDERuntimeMessages.get().LogView_activate) { // > public void run() { >-// fMemento.putString(P_ACTIVATE, isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putString(P_ACTIVATE, isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ > } > }; >-// action.setChecked(fMemento.getString(P_ACTIVATE).equals("true")); //$NON-NLS-1$ >+ action.setChecked(fMemento.getString(P_ACTIVATE).equals("true")); //$NON-NLS-1$ > return action; > } > >@@ -391,7 +392,7 @@ > private void createColumns(Tree tree) { > fColumn1 = new TreeColumn(tree, SWT.LEFT); > fColumn1.setText(PDERuntimeMessages.get().LogView_column_message); >-// fColumn1.setWidth(fMemento.getInteger(P_COLUMN_1).intValue()); >+ fColumn1.setWidth(fMemento.getInteger(P_COLUMN_1).intValue()); > fColumn1.setWidth(300); > fColumn1.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { >@@ -403,15 +404,15 @@ > setComparator(MESSAGE); > if (!isComparatorSet) > ((EventDetailsDialogAction) fPropertiesAction).setComparator(fComparator); >-// fMemento.putInteger(P_ORDER_VALUE, MESSAGE_ORDER); >-// fMemento.putInteger(P_ORDER_TYPE, MESSAGE); >+ fMemento.putInteger(P_ORDER_VALUE, MESSAGE_ORDER); >+ fMemento.putInteger(P_ORDER_TYPE, MESSAGE); > setColumnSorting(fColumn1, MESSAGE_ORDER); > } > }); > > fColumn2 = new TreeColumn(tree, SWT.LEFT); > fColumn2.setText(PDERuntimeMessages.get().LogView_column_plugin); >-// fColumn2.setWidth(fMemento.getInteger(P_COLUMN_2).intValue()); >+ fColumn2.setWidth(fMemento.getInteger(P_COLUMN_2).intValue()); > fColumn2.setWidth(150); > fColumn2.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { >@@ -423,15 +424,15 @@ > setComparator(PLUGIN); > if (!isComparatorSet) > ((EventDetailsDialogAction) fPropertiesAction).setComparator(fComparator); >-// fMemento.putInteger(P_ORDER_VALUE, PLUGIN_ORDER); >-// fMemento.putInteger(P_ORDER_TYPE, PLUGIN); >+ fMemento.putInteger(P_ORDER_VALUE, PLUGIN_ORDER); >+ fMemento.putInteger(P_ORDER_TYPE, PLUGIN); > setColumnSorting(fColumn2, PLUGIN_ORDER); > } > }); > > fColumn3 = new TreeColumn(tree, SWT.LEFT); > fColumn3.setText(PDERuntimeMessages.get().LogView_column_date); >-// fColumn3.setWidth(fMemento.getInteger(P_COLUMN_3).intValue()); >+ fColumn3.setWidth(fMemento.getInteger(P_COLUMN_3).intValue()); > fColumn3.setWidth(150); > fColumn3.addSelectionListener(new SelectionAdapter() { > public void widgetSelected(SelectionEvent e) { >@@ -440,8 +441,8 @@ > fTreeViewer.setComparator(comparator); > setComparator(DATE); > ((EventDetailsDialogAction) fPropertiesAction).setComparator(fComparator); >-// fMemento.putInteger(P_ORDER_VALUE, DATE_ORDER); >-// fMemento.putInteger(P_ORDER_TYPE, DATE); >+ fMemento.putInteger(P_ORDER_VALUE, DATE_ORDER); >+ fMemento.putInteger(P_ORDER_TYPE, DATE); > setColumnSorting(fColumn3, DATE_ORDER); > } > }); >@@ -450,15 +451,14 @@ > } > > private void initializeViewerSorter() { >-// byte orderType = fMemento.getInteger(P_ORDER_TYPE).byteValue(); >- byte orderType = DATE; >+ byte orderType = fMemento.getInteger(P_ORDER_TYPE).byteValue(); > ViewerComparator comparator = getViewerComparator(orderType); > fTreeViewer.setComparator(comparator); >-// if (orderType == MESSAGE ) >-// setColumnSorting(fColumn1, MESSAGE_ORDER); >-// else if (orderType == PLUGIN) >-// setColumnSorting(fColumn2, PLUGIN_ORDER); >-// else if (orderType == DATE) >+ if (orderType == MESSAGE ) >+ setColumnSorting(fColumn1, MESSAGE_ORDER); >+ else if (orderType == PLUGIN) >+ setColumnSorting(fColumn2, PLUGIN_ORDER); >+ else if (orderType == DATE) > setColumnSorting(fColumn3, DATE_ORDER); > } > >@@ -555,8 +555,7 @@ > } > > private void handleFilter() { >- FilterDialog dialog = new FilterDialog(PDERuntimePlugin.getActiveWorkbenchShell(), null); >-// FilterDialog dialog = new FilterDialog(PDERuntimePlugin.getActiveWorkbenchShell(), fMemento); >+ FilterDialog dialog = new FilterDialog(PDERuntimePlugin.getActiveWorkbenchShell(), fMemento); > dialog.create(); > dialog.getShell().setText(PDERuntimeMessages.get().LogView_FilterDialog_title); > if (dialog.open() == Window.OK) >@@ -617,8 +616,7 @@ > fLogs.clear(); > if (!fInputFile.exists()) > return; >- LogReader.parseLogFile(fInputFile, fLogs, null); >-// LogReader.parseLogFile(fInputFile, fLogs, fMemento); >+ LogReader.parseLogFile(fInputFile, fLogs, fMemento); > } > > public void logging(IStatus status, String plugin) { >@@ -635,8 +633,7 @@ > > private void pushStatus(IStatus status) { > LogEntry entry = new LogEntry(status); >- LogReader.addEntry(entry, fLogs, null, true); >-// LogReader.addEntry(entry, fLogs, fMemento, true); >+ LogReader.addEntry(entry, fLogs, fMemento, true); > asyncRefresh(); > } > >@@ -714,78 +711,77 @@ > > public void init(IViewSite site, IMemento memento) throws PartInitException { > super.init(site, memento); >-// if (memento == null) >-// this.fMemento = XMLMemento.createWriteRoot("LOGVIEW"); //$NON-NLS-1$ >-// else >-// this.fMemento = memento; >-// readSettings(); >- >- // initialize column ordering >-// final byte type = this.fMemento.getInteger(P_ORDER_TYPE).byteValue(); >-// switch (type){ >-// case DATE: >-// DATE_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >-// MESSAGE_ORDER = DESCENDING; >-// PLUGIN_ORDER = DESCENDING; >-// break; >-// case MESSAGE: >-// MESSAGE_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >-// DATE_ORDER = DESCENDING; >-// PLUGIN_ORDER = DESCENDING; >-// break; >-// case PLUGIN: >-// PLUGIN_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >-// MESSAGE_ORDER = DESCENDING; >-// DATE_ORDER = DESCENDING; >-// break; >-// default: >+ if (memento == null) >+ this.fMemento = XMLMemento.createWriteRoot("LOGVIEW"); //$NON-NLS-1$ >+ else >+ this.fMemento = memento; >+ readSettings(); >+ >+// initialize column ordering >+ final byte type = this.fMemento.getInteger(P_ORDER_TYPE).byteValue(); >+ switch (type){ >+ case DATE: >+ DATE_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >+ MESSAGE_ORDER = DESCENDING; >+ PLUGIN_ORDER = DESCENDING; >+ break; >+ case MESSAGE: >+ MESSAGE_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >+ DATE_ORDER = DESCENDING; >+ PLUGIN_ORDER = DESCENDING; >+ break; >+ case PLUGIN: >+ PLUGIN_ORDER = this.fMemento.getInteger(P_ORDER_VALUE).intValue(); >+ MESSAGE_ORDER = DESCENDING; >+ DATE_ORDER = DESCENDING; >+ break; >+ default: > DATE_ORDER = DESCENDING; > MESSAGE_ORDER = DESCENDING; > PLUGIN_ORDER = DESCENDING; >-// } >-// setComparator(fMemento.getInteger(P_ORDER_TYPE).byteValue()); >- setComparator(DATE); >+ } >+ setComparator(fMemento.getInteger(P_ORDER_TYPE).byteValue()); > } > > private void initializeMemento() { >-// if (fMemento.getString(P_USE_LIMIT) == null) >-// fMemento.putString(P_USE_LIMIT, "true"); //$NON-NLS-1$ >-// if (fMemento.getInteger(P_LOG_LIMIT) == null) >-// fMemento.putInteger(P_LOG_LIMIT, 50); >-// if (fMemento.getString(P_LOG_INFO) == null) >-// fMemento.putString(P_LOG_INFO, "true"); //$NON-NLS-1$ >-// if (fMemento.getString(P_LOG_WARNING) == null) >-// fMemento.putString(P_LOG_WARNING, "true"); //$NON-NLS-1$ >-// if (fMemento.getString(P_LOG_ERROR) == null) >-// fMemento.putString(P_LOG_ERROR, "true"); //$NON-NLS-1$ >-// if (fMemento.getString(P_SHOW_ALL_SESSIONS) == null) >-// fMemento.putString(P_SHOW_ALL_SESSIONS, "true"); //$NON-NLS-1$ >-// Integer width = fMemento.getInteger(P_COLUMN_1); >-// if (width == null || width.intValue() == 0) >-// fMemento.putInteger(P_COLUMN_1, 300); >-// width = fMemento.getInteger(P_COLUMN_2); >-// if (width == null || width.intValue() == 0) >-// fMemento.putInteger(P_COLUMN_2, 150); >-// width = fMemento.getInteger(P_COLUMN_3); >-// if (width == null || width.intValue() == 0) >-// fMemento.putInteger(P_COLUMN_3, 150); >-// if (fMemento.getString(P_ACTIVATE) == null) >-// fMemento.putString(P_ACTIVATE, "true"); //$NON-NLS-1$ >-// >-// fMemento.putInteger(P_ORDER_VALUE, DESCENDING); >-// fMemento.putInteger(P_ORDER_TYPE, DATE); >+ if (fMemento.getString(P_USE_LIMIT) == null) >+ fMemento.putString(P_USE_LIMIT, "true"); //$NON-NLS-1$ >+ if (fMemento.getInteger(P_LOG_LIMIT) == null) >+ fMemento.putInteger(P_LOG_LIMIT, 50); >+ if (fMemento.getString(P_LOG_INFO) == null) >+ fMemento.putString(P_LOG_INFO, "true"); //$NON-NLS-1$ >+ if (fMemento.getString(P_LOG_WARNING) == null) >+ fMemento.putString(P_LOG_WARNING, "true"); //$NON-NLS-1$ >+ if (fMemento.getString(P_LOG_ERROR) == null) >+ fMemento.putString(P_LOG_ERROR, "true"); //$NON-NLS-1$ >+ if (fMemento.getString(P_SHOW_ALL_SESSIONS) == null) >+ fMemento.putString(P_SHOW_ALL_SESSIONS, "true"); //$NON-NLS-1$ >+ Integer width = fMemento.getInteger(P_COLUMN_1); >+ if (width == null || width.intValue() == 0) >+ fMemento.putInteger(P_COLUMN_1, 300); >+ width = fMemento.getInteger(P_COLUMN_2); >+ if (width == null || width.intValue() == 0) >+ fMemento.putInteger(P_COLUMN_2, 150); >+ width = fMemento.getInteger(P_COLUMN_3); >+ if (width == null || width.intValue() == 0) >+ fMemento.putInteger(P_COLUMN_3, 150); >+ if (fMemento.getString(P_ACTIVATE) == null) >+ fMemento.putString(P_ACTIVATE, "true"); //$NON-NLS-1$ >+ >+ fMemento.putInteger(P_ORDER_VALUE, DESCENDING); >+ fMemento.putInteger(P_ORDER_TYPE, DATE); > } > > public void saveState(IMemento memento) { >-// if (this.fMemento == null || memento == null) >-// return; >-// this.fMemento.putInteger(P_COLUMN_1, fColumn1.getWidth()); >-// this.fMemento.putInteger(P_COLUMN_2, fColumn2.getWidth()); >-// this.fMemento.putInteger(P_COLUMN_3, fColumn3.getWidth()); >-// this.fMemento.putString(P_ACTIVATE, >-// fActivateViewAction.isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// memento.putMemento(this.fMemento); >-// writeSettings(); >+ if (this.fMemento == null || memento == null) >+ return; >+ this.fMemento.putInteger(P_COLUMN_1, fColumn1.getWidth()); >+ this.fMemento.putInteger(P_COLUMN_2, fColumn2.getWidth()); >+ this.fMemento.putInteger(P_COLUMN_3, fColumn3.getWidth()); >+ this.fMemento.putString(P_ACTIVATE, >+ fActivateViewAction.isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ memento.putMemento(this.fMemento); >+ writeSettings(); > } > > private void addMouseListeners() { >@@ -1019,26 +1015,26 @@ > return; > } > try { >-// fMemento.putString(P_USE_LIMIT, s.getBoolean(P_USE_LIMIT) ? "true":"false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// fMemento.putString(P_LOG_INFO, s.getBoolean(P_LOG_INFO) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// fMemento.putString(P_LOG_WARNING, s.getBoolean(P_LOG_WARNING) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// fMemento.putString(P_LOG_ERROR, s.getBoolean(P_LOG_ERROR) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// fMemento.putString(P_SHOW_ALL_SESSIONS, s.getBoolean(P_SHOW_ALL_SESSIONS) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// fMemento.putInteger(P_LOG_LIMIT, s.getInt(P_LOG_LIMIT)); >-// fMemento.putInteger(P_COLUMN_1, p.getInt(P_COLUMN_1) > 0 ? p.getInt(P_COLUMN_1) : 300); >-// fMemento.putInteger(P_COLUMN_2, p.getInt(P_COLUMN_2) > 0 ? p.getInt(P_COLUMN_2) : 150); >-// fMemento.putInteger(P_COLUMN_3, p.getInt(P_COLUMN_3) > 0 ? p.getInt(P_COLUMN_3) : 150); >-// fMemento.putString(P_ACTIVATE, p.getBoolean(P_ACTIVATE) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >-// int order = p.getInt(P_ORDER_VALUE); >-// fMemento.putInteger(P_ORDER_VALUE, order == 0 ? DESCENDING : order); >-// fMemento.putInteger(P_ORDER_TYPE, p.getInt(P_ORDER_TYPE)); >+ fMemento.putString(P_USE_LIMIT, s.getBoolean(P_USE_LIMIT) ? "true":"false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putString(P_LOG_INFO, s.getBoolean(P_LOG_INFO) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putString(P_LOG_WARNING, s.getBoolean(P_LOG_WARNING) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putString(P_LOG_ERROR, s.getBoolean(P_LOG_ERROR) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putString(P_SHOW_ALL_SESSIONS, s.getBoolean(P_SHOW_ALL_SESSIONS) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ fMemento.putInteger(P_LOG_LIMIT, s.getInt(P_LOG_LIMIT)); >+ fMemento.putInteger(P_COLUMN_1, p.getInt(P_COLUMN_1) > 0 ? p.getInt(P_COLUMN_1) : 300); >+ fMemento.putInteger(P_COLUMN_2, p.getInt(P_COLUMN_2) > 0 ? p.getInt(P_COLUMN_2) : 150); >+ fMemento.putInteger(P_COLUMN_3, p.getInt(P_COLUMN_3) > 0 ? p.getInt(P_COLUMN_3) : 150); >+ fMemento.putString(P_ACTIVATE, p.getBoolean(P_ACTIVATE) ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ int order = p.getInt(P_ORDER_VALUE); >+ fMemento.putInteger(P_ORDER_VALUE, order == 0 ? DESCENDING : order); >+ fMemento.putInteger(P_ORDER_TYPE, p.getInt(P_ORDER_TYPE)); > } catch (NumberFormatException e) { >-// fMemento.putInteger(P_LOG_LIMIT, 50); >-// fMemento.putInteger(P_COLUMN_1, 300); >-// fMemento.putInteger(P_COLUMN_2, 150); >-// fMemento.putInteger(P_COLUMN_3, 150); >-// fMemento.putInteger(P_ORDER_TYPE, DATE); >-// fMemento.putInteger(P_ORDER_VALUE, DESCENDING); >+ fMemento.putInteger(P_LOG_LIMIT, 50); >+ fMemento.putInteger(P_COLUMN_1, 300); >+ fMemento.putInteger(P_COLUMN_2, 150); >+ fMemento.putInteger(P_COLUMN_3, 150); >+ fMemento.putInteger(P_ORDER_TYPE, DATE); >+ fMemento.putInteger(P_ORDER_VALUE, DESCENDING); > } > } > >@@ -1051,23 +1047,23 @@ > IDialogSettings settings = getLogSettings(); > if (settings == null) > settings = PDERuntimePlugin.getDefault().getDialogSettings().addNewSection(getClass().getName()); >-// settings.put(P_USE_LIMIT, fMemento.getString(P_USE_LIMIT).equals("true")); //$NON-NLS-1$ >-// settings.put(P_LOG_LIMIT, fMemento.getInteger(P_LOG_LIMIT).intValue()); >-// settings.put(P_LOG_INFO, fMemento.getString(P_LOG_INFO).equals("true")); //$NON-NLS-1$ >-// settings.put(P_LOG_WARNING, fMemento.getString(P_LOG_WARNING).equals("true")); //$NON-NLS-1$ >-// settings.put(P_LOG_ERROR, fMemento.getString(P_LOG_ERROR).equals("true")); //$NON-NLS-1$ >-// settings.put(P_SHOW_ALL_SESSIONS, fMemento.getString(P_SHOW_ALL_SESSIONS).equals("true")); //$NON-NLS-1$ >+ settings.put(P_USE_LIMIT, fMemento.getString(P_USE_LIMIT).equals("true")); //$NON-NLS-1$ >+ settings.put(P_LOG_LIMIT, fMemento.getInteger(P_LOG_LIMIT).intValue()); >+ settings.put(P_LOG_INFO, fMemento.getString(P_LOG_INFO).equals("true")); //$NON-NLS-1$ >+ settings.put(P_LOG_WARNING, fMemento.getString(P_LOG_WARNING).equals("true")); //$NON-NLS-1$ >+ settings.put(P_LOG_ERROR, fMemento.getString(P_LOG_ERROR).equals("true")); //$NON-NLS-1$ >+ settings.put(P_SHOW_ALL_SESSIONS, fMemento.getString(P_SHOW_ALL_SESSIONS).equals("true")); //$NON-NLS-1$ > } > > private void writeViewSettings(){ > Preferences preferences = getLogPreferences(); >-// preferences.setValue(P_COLUMN_1, fMemento.getInteger(P_COLUMN_1).intValue()); >-// preferences.setValue(P_COLUMN_2, fMemento.getInteger(P_COLUMN_2).intValue()); >-// preferences.setValue(P_COLUMN_3, fMemento.getInteger(P_COLUMN_3).intValue()); >-// preferences.setValue(P_ACTIVATE, fMemento.getString(P_ACTIVATE).equals("true")); //$NON-NLS-1$ >-// int order = fMemento.getInteger(P_ORDER_VALUE).intValue(); >-// preferences.setValue(P_ORDER_VALUE, order == 0 ? DESCENDING : order); >-// preferences.setValue(P_ORDER_TYPE, fMemento.getInteger(P_ORDER_TYPE).intValue()); >+ preferences.setValue(P_COLUMN_1, fMemento.getInteger(P_COLUMN_1).intValue()); >+ preferences.setValue(P_COLUMN_2, fMemento.getInteger(P_COLUMN_2).intValue()); >+ preferences.setValue(P_COLUMN_3, fMemento.getInteger(P_COLUMN_3).intValue()); >+ preferences.setValue(P_ACTIVATE, fMemento.getString(P_ACTIVATE).equals("true")); //$NON-NLS-1$ >+ int order = fMemento.getInteger(P_ORDER_VALUE).intValue(); >+ preferences.setValue(P_ORDER_VALUE, order == 0 ? DESCENDING : order); >+ preferences.setValue(P_ORDER_TYPE, fMemento.getInteger(P_ORDER_TYPE).intValue()); > } > > public void sortByDateDescending() { >@@ -1075,10 +1071,11 @@ > } > > protected Job getOpenLogFileJob() { >+ final Display display=Display.getDefault(); > final Shell shell = getViewSite().getShell(); > return new Job(PDERuntimeMessages.get().OpenLogDialog_message) { > protected IStatus run(IProgressMonitor monitor) { >- boolean failed = false; >+ boolean failed = true; > if (fInputFile.length() <= LogReader.MAX_FILE_LENGTH) { > // failed = !Program.launch(fInputFile.getAbsolutePath()); > // if (failed) { >@@ -1091,7 +1088,7 @@ > } > if (failed) { > final OpenLogDialog openDialog = new OpenLogDialog(shell, fInputFile); >- Display.getDefault().asyncExec(new Runnable() { >+ display.asyncExec(new Runnable() { > public void run() { > openDialog.create(); > openDialog.open();
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 347957
: 197097 |
197362
|
197365