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 91157 Details for
Bug 173040
[logview] Allow to open view upon .log entry
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
patch.txt (text/plain), 6.41 KB, created by
Jacek Pospychala
on 2008-02-29 06:50:29 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jacek Pospychala
Created:
2008-02-29 06:50:29 EST
Size:
6.41 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.17 >diff -u -r1.17 messages.properties >--- src/org/eclipse/ui/internal/views/log/messages.properties 13 Feb 2008 01:07:49 -0000 1.17 >+++ src/org/eclipse/ui/internal/views/log/messages.properties 29 Feb 2008 11:39:02 -0000 >@@ -39,6 +39,7 @@ > LogView_operation_reloading = Reloading... > LogView_activate = &Activate on new events > LogView_AddingBatchedEvents=Adding batched log events... >+LogView_Confirm_EarlyStart_Message=Do you want to activate view even if it's closed? Answering no view will be activated only if it's already visible. > LogView_view_currentLog = &Open Log > LogView_view_currentLog_tooltip = Open Log > LogView_properties_tooltip = Event Details >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.15 >diff -u -r1.15 Messages.java >--- src/org/eclipse/ui/internal/views/log/Messages.java 13 Feb 2008 01:07:49 -0000 1.15 >+++ src/org/eclipse/ui/internal/views/log/Messages.java 29 Feb 2008 11:39:02 -0000 >@@ -47,6 +47,7 @@ > public static String LogView_operation_reloading; > public static String LogView_activate; > public static String LogView_AddingBatchedEvents; >+ public static String LogView_Confirm_EarlyStart_Message; > public static String LogView_view_currentLog; > public static String LogView_view_currentLog_tooltip; > public static String LogView_properties_tooltip; >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.23 >diff -u -r1.23 LogView.java >--- src/org/eclipse/ui/internal/views/log/LogView.java 12 Feb 2008 16:53:02 -0000 1.23 >+++ src/org/eclipse/ui/internal/views/log/LogView.java 29 Feb 2008 11:39:02 -0000 >@@ -292,6 +292,10 @@ > Action action = new Action(Messages.LogView_activate) { // > public void run() { > fMemento.putString(P_ACTIVATE, isChecked() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$ >+ if (isChecked()) { >+ boolean earlyStartEnabled = MessageDialog.openQuestion(getSite().getShell(), Messages.LogView_activate, Messages.LogView_Confirm_EarlyStart_Message); >+ Activator.getDefault().getPreferenceStore().setValue(Activator.EARLY_START_ENABLED, earlyStartEnabled); >+ } > } > }; > action.setChecked(fMemento.getString(P_ACTIVATE).equals("true")); //$NON-NLS-1$ >Index: src/org/eclipse/ui/internal/views/log/Activator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/src/org/eclipse/ui/internal/views/log/Activator.java,v >retrieving revision 1.3 >diff -u -r1.3 Activator.java >--- src/org/eclipse/ui/internal/views/log/Activator.java 31 Dec 2007 00:37:51 -0000 1.3 >+++ src/org/eclipse/ui/internal/views/log/Activator.java 29 Feb 2008 11:38:55 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007 IBM Corporation and others. >+ * Copyright (c) 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -11,19 +11,31 @@ > *******************************************************************************/ > package org.eclipse.ui.internal.views.log; > >+import org.eclipse.core.runtime.*; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.resource.ImageRegistry; >+import org.eclipse.ui.*; > import org.eclipse.ui.plugin.AbstractUIPlugin; > import org.osgi.framework.BundleContext; > > /** > * The activator class controls the plug-in life cycle > */ >-public class Activator extends AbstractUIPlugin { >+public class Activator extends AbstractUIPlugin implements ILogListener { > > // The plug-in ID > public static final String PLUGIN_ID = "org.eclipse.ui.views.log"; //$NON-NLS-1$ > >+ public static final String EARLY_START_ENABLED = "earlyStartEnabled"; //$NON-NLS-1$ >+ >+ public static class Startup implements IStartup { >+ >+ public void earlyStartup() { >+ // empty - all initialization is in Activator.start(BundleContext) >+ } >+ >+ } >+ > // The shared instance > private static Activator plugin; > >@@ -40,6 +52,7 @@ > public void start(BundleContext context) throws Exception { > super.start(context); > plugin = this; >+ Platform.addLogListener(this); > } > > /* >@@ -49,6 +62,7 @@ > public void stop(BundleContext context) throws Exception { > plugin = null; > super.stop(context); >+ Platform.removeLogListener(this); > } > > public static Activator getDefault() { >@@ -88,4 +102,23 @@ > return imageDescriptorFromPlugin(PLUGIN_ID, id); > } > >+ public void logging(IStatus status, String plugin) { >+ if (!getPluginPreferences().getBoolean(EARLY_START_ENABLED)) { >+ return; >+ } >+ >+ // initializes logview on first comming log entry >+ final IWorkbench workbench = PlatformUI.getWorkbench(); >+ workbench.getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); >+ if (window != null) { >+ try { >+ window.getActivePage().showView("org.eclipse.pde.runtime.LogView"); //$NON-NLS-1$ >+ } catch (PartInitException e) { // empty >+ } >+ } >+ } >+ }); >+ } > } >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.views.log/plugin.xml,v >retrieving revision 1.3 >diff -u -r1.3 plugin.xml >--- plugin.xml 4 Oct 2007 16:07:18 -0000 1.3 >+++ plugin.xml 29 Feb 2008 11:38:55 -0000 >@@ -58,4 +58,10 @@ > priority="high"> > </content-type> > </extension> >+ <extension >+ point="org.eclipse.ui.startup"> >+ <startup >+ class="org.eclipse.ui.internal.views.log.Activator$Startup"> >+ </startup> >+ </extension> > </plugin>
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 173040
:
82402
|
91116
|
91157
|
91174