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 70108 Details for
Bug 185625
MAX: Show error log automatically when exceptions are thrown in MAX
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]
Updated patch
185625.txt (text/plain), 7.67 KB, created by
Saurabh Dravid
on 2007-06-05 07:17:09 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Saurabh Dravid
Created:
2007-06-05 07:17:09 EDT
Size:
7.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.monitoring.managedagent >Index: src/org/eclipse/tptp/monitoring/managedagent/provisional/ManagedResourceAgent.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent/src/org/eclipse/tptp/monitoring/managedagent/provisional/ManagedResourceAgent.java,v >retrieving revision 1.7 >diff -u -r1.7 ManagedResourceAgent.java >--- src/org/eclipse/tptp/monitoring/managedagent/provisional/ManagedResourceAgent.java 4 May 2007 22:56:10 -0000 1.7 >+++ src/org/eclipse/tptp/monitoring/managedagent/provisional/ManagedResourceAgent.java 5 Jun 2007 10:01:07 -0000 >@@ -17,7 +17,11 @@ > import java.util.ArrayList; > import java.util.Hashtable; > >+import org.eclipse.core.filesystem.EFS; >+import org.eclipse.core.filesystem.IFileStore; >+import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.hyades.internal.execution.local.common.CustomCommand; > import org.eclipse.hyades.internal.execution.local.common.DataProcessor; > import org.eclipse.hyades.internal.execution.local.control.Agent; >@@ -26,10 +30,16 @@ > import org.eclipse.hyades.internal.execution.local.control.InactiveAgentException; > import org.eclipse.hyades.internal.execution.local.control.InactiveProcessException; > import org.eclipse.hyades.internal.execution.local.control.Process; >+import org.eclipse.swt.widgets.Display; > import org.eclipse.tptp.monitoring.managedagent.ManagedAgentPlugin; > import org.eclipse.tptp.monitoring.managedagent.internal.Constants; > import org.eclipse.tptp.monitoring.managedagent.provisional.commands.CommandSerializer; > import org.eclipse.tptp.monitoring.managedagent.provisional.commands.CommandWrapper; >+import org.eclipse.ui.IWorkbenchPage; >+import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.ide.IDE; > > /** > * An abstract class that implements the TPTP Agent interface and allows follows the custom command API defined for managed agents. >@@ -451,10 +461,50 @@ > sendResponse(_command); > }catch(Exception ex){ > throwException(ex); >+ openErrorLog(ex); > } > }catch(Exception e){ > ManagedAgentPlugin.getDefault().log(Messages.getString("ManagedResourceAgent.CANT_SERICE_CUSTOM_COMMAND.ERROR."), e, IStatus.ERROR); //$NON-NLS-1$ > setActive(false); > } > } >+ >+ private void openErrorLog(Exception ex) >+ { >+ if(ignoreError(ex)) >+ return; >+ IPath logPath = Platform.getLogFileLocation(); >+ final IFileStore fileStore = EFS.getLocalFileSystem().getStore(logPath); >+ if(!fileStore.fetchInfo().isDirectory() && fileStore.fetchInfo().exists()) >+ { >+ Display display = PlatformUI.getWorkbench().getDisplay(); >+ display.asyncExec(new Runnable(){ >+ >+ public void run() { >+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); >+ IWorkbenchPage page = window.getActivePage(); >+ try >+ { >+ IDE.openEditorOnFileStore(page, fileStore); >+ } >+ catch(PartInitException _ex) >+ { >+ _ex.printStackTrace(); >+ } >+ }}); >+ } >+ } >+ >+ protected boolean ignoreError(Exception ex) >+ { >+ // Ignore the warning message "IWAT0753I Found and instantiated Apache Muse Runtime WSDM runtime" >+ boolean museFoundMessage = ex.getMessage()!=null && ex.getMessage().indexOf("IWAT0753I")!=-1; >+ // Ignore the warning message "IWAT0761I This resource is not a service group" >+ boolean noSgMessage = ex.getMessage()!=null && (ex.getMessage().indexOf("IWAT0761I")!=-1 || ex.getMessage().indexOf("IWAT0762E")!=-1); >+ // Ignore the warning message "IWAT0725E Cannot get relationships" >+ boolean noRelationshipMessage = ex.getMessage()!=null && ex.getMessage().indexOf("IWAT0725E")!=-1; >+ if(museFoundMessage || noSgMessage || noRelationshipMessage) >+ return true; >+ return false; >+ } > } >\ No newline at end of file >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent/META-INF/MANIFEST.MF,v >retrieving revision 1.11 >diff -u -r1.11 MANIFEST.MF >--- META-INF/MANIFEST.MF 23 Mar 2007 04:57:31 -0000 1.11 >+++ META-INF/MANIFEST.MF 5 Jun 2007 10:01:06 -0000 >@@ -13,7 +13,9 @@ > Require-Bundle: org.eclipse.tptp.platform.models;visibility:=reexport, > org.eclipse.hyades.execution;visibility:=reexport, > org.eclipse.hyades.trace.ui;visibility:=reexport, >- org.eclipse.ui;visibility:=reexport >+ org.eclipse.ui;visibility:=reexport, >+ org.eclipse.core.filesystem, >+ org.eclipse.ui.ide > Eclipse-LazyStart: true > Bundle-Vendor: %plugin.provider > Bundle-Activator: org.eclipse.tptp.monitoring.managedagent.ManagedAgentPlugin >#P org.eclipse.tptp.monitoring.managedagent.wsdm >Index: src/org/eclipse/tptp/monitoring/managedagent/wsdm/provisional/agents/WSDMAgent.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent.wsdm/src/org/eclipse/tptp/monitoring/managedagent/wsdm/provisional/agents/WSDMAgent.java,v >retrieving revision 1.7 >diff -u -r1.7 WSDMAgent.java >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/provisional/agents/WSDMAgent.java 21 Mar 2007 21:30:50 -0000 1.7 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/provisional/agents/WSDMAgent.java 5 Jun 2007 10:01:13 -0000 >@@ -116,7 +116,8 @@ > }catch(Exception e){ > Activator.getDefault().log(Messages.getString("WSDMAgent.CANT_INIT_AGENT.ERROR."), e, IStatus.ERROR); //$NON-NLS-1$ > setActive(false); >- return false; >+ throw e; >+ //return false; > } > } > >#P org.eclipse.tptp.monitoring.managedagent.wsdm.muse >Index: src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.managedagent.wsdm.muse/src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java,v >retrieving revision 1.10 >diff -u -r1.10 MuseRuntime.java >--- src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 9 May 2007 13:26:07 -0000 1.10 >+++ src/org/eclipse/tptp/monitoring/managedagent/wsdm/internal/muse/MuseRuntime.java 5 Jun 2007 10:01:15 -0000 >@@ -21,6 +21,7 @@ > import org.apache.muse.util.xml.XmlUtils; > import org.apache.muse.ws.addressing.EndpointReference; > import org.apache.muse.ws.notification.WsnConstants; >+import org.apache.muse.ws.resource.properties.WsrpConstants; > import org.apache.muse.ws.resource.remote.WsResourceClient; > import org.apache.muse.ws.resource.sg.WssgConstants; > import org.eclipse.core.runtime.IStatus; >@@ -192,9 +193,12 @@ > return result; > } > >- public Object[] getResourceProperty(String propQName) throws Exception { >+ public Object[] getResourceProperty(String qnameStr) throws Exception { > // smashing of values into one string happens in UI controller >- Element[] results = _resource.getResourceProperty(CommonUtils.deserializeFromString(propQName)); >+ QName propQName = CommonUtils.deserializeFromString(qnameStr); >+ if(propQName.getNamespaceURI().equals(WsrpConstants.NAMESPACE_URI)) >+ propQName = new QName(propQName.getNamespaceURI(), propQName.getLocalPart(), WsrpConstants.PREFIX); >+ Element[] results = _resource.getResourceProperty(propQName); > String[] ret = new String[results.length]; > for (int i = 0; i < results.length; i++) { > ret[i] = XmlUtils.extractText(results[i]);
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 185625
:
65976
| 70108